Print this page
5255 uts shouldn't open-code ISP2
*** 2136,2146 ****
* Firmware needs the big buff size as a power of 2. Lie and
* tell him the buffer is larger, because we only use 1
* buffer/pkt, and the mtu will prevent overruns
*/
big_pow2 = myri10ge_mtu + MXGEFW_PAD;
! while ((big_pow2 & (big_pow2 - 1)) != 0)
big_pow2++;
/* now give firmware buffers sizes, and MTU */
cmd.data0 = myri10ge_mtu;
status = myri10ge_send_cmd(mgp, MXGEFW_CMD_SET_MTU, &cmd);
--- 2136,2146 ----
* Firmware needs the big buff size as a power of 2. Lie and
* tell him the buffer is larger, because we only use 1
* buffer/pkt, and the mtu will prevent overruns
*/
big_pow2 = myri10ge_mtu + MXGEFW_PAD;
! while (!ISP2(big_pow2))
big_pow2++;
/* now give firmware buffers sizes, and MTU */
cmd.data0 = myri10ge_mtu;
status = myri10ge_send_cmd(mgp, MXGEFW_CMD_SET_MTU, &cmd);
*** 5435,5445 ****
* slices. We give up on MSI-X if we can only get a single
* vector.
*/
while (mgp->num_slices > 1) {
/* make sure it is a power of two */
! while (mgp->num_slices & (mgp->num_slices - 1))
mgp->num_slices--;
if (mgp->num_slices == 1)
return (0);
status = myri10ge_add_intrs(mgp, 0);
--- 5435,5445 ----
* slices. We give up on MSI-X if we can only get a single
* vector.
*/
while (mgp->num_slices > 1) {
/* make sure it is a power of two */
! while (!ISP2(mgp->num_slices))
mgp->num_slices--;
if (mgp->num_slices == 1)
return (0);
status = myri10ge_add_intrs(mgp, 0);