From: Rahul Lakkireddy Date: Fri, 26 Jan 2018 11:35:55 +0000 (+0530) Subject: cxgb4: fix incorrect condition for using firmware LDST commands X-Git-Tag: v4.16-rc1~123^2~36^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ebb5568fe27794cdcf18c8d9dc6b80dae98d79ec;p=thirdparty%2Fkernel%2Flinux.git cxgb4: fix incorrect condition for using firmware LDST commands 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 Signed-off-by: Ganesh Goudar Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c index be795d0b0b7e1..047609ef0515a 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c +++ b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c @@ -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; } /**