[PATCH] alx: revise self-test flag for external loopback
Huang, Xiong
xiong at qca.qualcomm.com
Fri Apr 5 20:26:49 EDT 2013
No, last final one should be following (see my another mail sent at Thursday, April 04, 2013 11:14 AM):
in previous code, etest->flag is
(ETH_TEST_FL_OFFLINE | ETH_TEST_FL_EXTERNAL_LB), for command 'ethtool -t ethX external_lb'.
and the bug-code cause external loopback wouldn't be excuted.
revising the flag test condition from '==' to "&' to fix this bug.
PS.
ethtool is a Linux command for displaying or modifying the NIC parameters.
such as disable/enable TSO or checksum offload, dump chip specific registers, statistics, link detection, diagnostic (self tst), and so on....
see https://www.kernel.org/pub/software/network/ethtool
for detail.
Signed-off-by: xiong <xiong at qca.qualcomm.com>
Tested-by: Wu, Ken <kenw at qca.qualcomm.com>
---
src/alx_ethtool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/alx_ethtool.c b/src/alx_ethtool.c index 074c640..8c73790 100644
--- a/src/alx_ethtool.c
+++ b/src/alx_ethtool.c
@@ -1695,7 +1695,7 @@ static void alx_self_test(struct net_device *netdev,
if (if_running)
dev_close(netdev);
- if (etest->flags == ETH_TEST_FL_OFFLINE) {
+ if (etest->flags & ETH_TEST_FL_OFFLINE) {
netif_info(adpt, hw, adpt->netdev, "offline test start...\n");
if (alx_diag_register(adpt, &data[0]))
--
1.8.0.msysgit.0
More information about the unified-drivers
mailing list