]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt_en: Fix ethtool self-test loopback.
authorMichael Chan <michael.chan@broadcom.com>
Wed, 19 Dec 2018 18:46:50 +0000 (13:46 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 19 Dec 2018 19:31:09 +0000 (11:31 -0800)
commit402865ce91ecf6bbaf5e4a30d9c6031a01f2c092
tree5d7204e45e08b7af9659e79bd76c729d66cc5124
parent02a67430c8afc96163cb73006b2e3eb6781face2
bnxt_en: Fix ethtool self-test loopback.

The current code has 2 problems.  It assumes that the RX ring for
the loopback packet is combined with the TX ring.  This is not
true if the ethtool channels are set to non-combined mode.  The
second problem is that it won't work on 57500 chips without
adjusting the logic to get the proper completion ring (cpr) pointer.
Fix both issues by locating the proper cpr pointer through the RX
ring.

Fixes: 2f9bc1f33da9 ("bnxt_en: Use bnxt_cp_ring_info struct pointer as parameter for RX path.")
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c