mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +00:00
cxgbe(4): Shared code update to deal with partial failure in query_params.
Obtained from: Chelsio Communications MFC after: 1 week Sponsored by: Chelsio Communications
This commit is contained in:
parent
43f6f08488
commit
2965ae5914
|
@ -7740,9 +7740,18 @@ int t4_query_params_rw(struct adapter *adap, unsigned int mbox, unsigned int pf,
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = t4_wr_mbox(adap, mbox, &c, sizeof(c), &c);
|
ret = t4_wr_mbox(adap, mbox, &c, sizeof(c), &c);
|
||||||
if (ret == 0)
|
|
||||||
for (i = 0, p = &c.param[0].val; i < nparams; i++, p += 2)
|
/*
|
||||||
*val++ = be32_to_cpu(*p);
|
* We always copy back the results, even if there's an error. We'll
|
||||||
|
* get an error if any of the parameters was unknown to the Firmware,
|
||||||
|
* but there will be results for the others ... (Older Firmware
|
||||||
|
* stopped at the first unknown parameter; newer Firmware processes
|
||||||
|
* them all and flags the unknown parameters with a return value of
|
||||||
|
* ~0UL.)
|
||||||
|
*/
|
||||||
|
for (i = 0, p = &c.param[0].val; i < nparams; i++, p += 2)
|
||||||
|
*val++ = be32_to_cpu(*p);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue