cxgb4: fix incorrect condition for using firmware LDST commands
authorRahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Fri, 26 Jan 2018 11:35:55 +0000 (17:05 +0530)
committerDavid S. Miller <davem@davemloft.net>
Fri, 26 Jan 2018 16:00:22 +0000 (11:00 -0500)
Only contact firmware if it's alive _AND_ if use_bd (use backdoor
access) is not set when issuing FW_LDST_CMD.

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/chelsio/cxgb4/t4_hw.c

index be795d0b0b7e184f2b0489278fc4aa88175f4fb7..047609ef0515a5019673e3b6f5b2cdad9da15b38 100644 (file)
@@ -5090,7 +5090,7 @@ int t4_read_rss(struct adapter *adapter, u16 *map)
 
 static unsigned int t4_use_ldst(struct adapter *adap)
 {
-       return (adap->flags & FW_OK) || !adap->use_bd;
+       return (adap->flags & FW_OK) && !adap->use_bd;
 }
 
 /**