a66828e6b8
[ Upstream commit c50e7475961c36ec4d21d60af055b32f9436b431 ]
The dpaa2_switch_add_bufs() function returns the number of bufs that it
was able to add. It returns BUFS_PER_CMD (7) for complete success or a
smaller number if there are not enough pages available. However, the
error checking is looking at the total number of bufs instead of the
number which were added on this iteration. Thus the error checking
only works correctly for the first iteration through the loop and
subsequent iterations are always counted as a success.
Fix this by checking only the bufs added in the current iteration.
Fixes:
|
||
---|---|---|
.. | ||
Kconfig | ||
Makefile | ||
dpaa2-eth-dcb.c | ||
dpaa2-eth-debugfs.c | ||
dpaa2-eth-debugfs.h | ||
dpaa2-eth-devlink.c | ||
dpaa2-eth-trace.h | ||
dpaa2-eth.c | ||
dpaa2-eth.h | ||
dpaa2-ethtool.c | ||
dpaa2-mac.c | ||
dpaa2-mac.h | ||
dpaa2-ptp.c | ||
dpaa2-ptp.h | ||
dpaa2-switch-ethtool.c | ||
dpaa2-switch-flower.c | ||
dpaa2-switch.c | ||
dpaa2-switch.h | ||
dpkg.h | ||
dpmac-cmd.h | ||
dpmac.c | ||
dpmac.h | ||
dpni-cmd.h | ||
dpni.c | ||
dpni.h | ||
dprtc-cmd.h | ||
dprtc.c | ||
dprtc.h | ||
dpsw-cmd.h | ||
dpsw.c | ||
dpsw.h |