Patchwork [PATCHv2,NEXT,1/1] netxen: suppress false lro warning messages

login
register
mail settings
Submitter amit salecha
Date June 2, 2011, 12:24 p.m.
Message ID <1307017454-10826-1-git-send-email-amit.salecha@qlogic.com>
Download mbox | patch
Permalink /patch/98383/
State Accepted
Delegated to: David Miller
Headers show

Comments

amit salecha - June 2, 2011, 12:24 p.m.
From: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>

When interface is down, driver prints false warning messages
during lro configuration through ethtool.

Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
---
 drivers/net/netxen/netxen_nic_hw.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
David Miller - June 3, 2011, 7:03 a.m.
From: amit.salecha@qlogic.com
Date: Thu,  2 Jun 2011 05:24:14 -0700

> From: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
> 
> When interface is down, driver prints false warning messages
> during lro configuration through ethtool.
> 
> Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c
index 5cef718..3f89e57 100644
--- a/drivers/net/netxen/netxen_nic_hw.c
+++ b/drivers/net/netxen/netxen_nic_hw.c
@@ -809,6 +809,9 @@  int netxen_config_hw_lro(struct netxen_adapter *adapter, int enable)
 	u64 word;
 	int rv = 0;
 
+	if (!test_bit(__NX_FW_ATTACHED, &adapter->state))
+		return 0;
+
 	memset(&req, 0, sizeof(nx_nic_req_t));
 
 	req.qhdr = cpu_to_le64(NX_HOST_REQUEST << 23);
@@ -959,6 +962,9 @@  int netxen_send_lro_cleanup(struct netxen_adapter *adapter)
 	u64 word;
 	int rv;
 
+	if (!test_bit(__NX_FW_ATTACHED, &adapter->state))
+		return 0;
+
 	memset(&req, 0, sizeof(nx_nic_req_t));
 	req.qhdr = cpu_to_le64(NX_HOST_REQUEST << 23);