From: dhananjay@netxen.com
To: netdev@vger.kernel.org
Cc: jeff@garzik.org
Subject: [patch 4/7] netxen: stop second phy correctly
Date: Wed, 26 Dec 2007 10:23:56 -0800 [thread overview]
Message-ID: <20071226182927.458002764@netxen.com> (raw)
In-Reply-To: 20071226182352.704678179@netxen.com
[-- Attachment #1: stop_port.patch --]
[-- Type: text/plain, Size: 1691 bytes --]
This patch fixes bug that doesn't quiesce second port when interface is
brought down, which could lead to unwarranted interrupt during rmmod /
ifdown.
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Index: upstream/drivers/net/netxen/netxen_nic_niu.c
===================================================================
--- upstream.orig/drivers/net/netxen/netxen_nic_niu.c
+++ upstream/drivers/net/netxen/netxen_nic_niu.c
@@ -742,12 +742,12 @@ int netxen_niu_disable_xg_port(struct ne
__u32 mac_cfg;
u32 port = physical_port[adapter->portnum];
- if (port != 0)
+ if (port > NETXEN_NIU_MAX_XG_PORTS)
return -EINVAL;
+
mac_cfg = 0;
- netxen_xg_soft_reset(mac_cfg);
- if (netxen_nic_hw_write_wx(adapter, NETXEN_NIU_XGE_CONFIG_0,
- &mac_cfg, 4))
+ if (netxen_nic_hw_write_wx(adapter,
+ NETXEN_NIU_XGE_CONFIG_0 + (0x10000 * port), &mac_cfg, 4))
return -EIO;
return 0;
}
Index: upstream/drivers/net/netxen/netxen_nic_main.c
===================================================================
--- upstream.orig/drivers/net/netxen/netxen_nic_main.c
+++ upstream/drivers/net/netxen/netxen_nic_main.c
@@ -725,11 +725,6 @@ static void __devexit netxen_nic_remove(
unregister_netdev(netdev);
- if (adapter->stop_port)
- adapter->stop_port(adapter);
-
- netxen_nic_disable_int(adapter);
-
if (adapter->is_up == NETXEN_ADAPTER_UP_MAGIC) {
init_firmware_done++;
netxen_free_hw_resources(adapter);
@@ -912,6 +907,9 @@ static int netxen_nic_close(struct net_d
netif_stop_queue(netdev);
napi_disable(&adapter->napi);
+ if (adapter->stop_port)
+ adapter->stop_port(adapter);
+
netxen_nic_disable_int(adapter);
cmd_buff = adapter->cmd_buf_arr;
--
next prev parent reply other threads:[~2007-12-26 18:25 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-26 18:23 [patch 0/7] netxen bug fixes dhananjay
2007-12-26 18:23 ` [patch 1/7] netxen: update MAINTAINERS dhananjay
2008-01-12 22:36 ` Jeff Garzik
2007-12-26 18:23 ` [patch 2/7] netxen: update driver version dhananjay
2007-12-26 18:23 ` [patch 3/7] netxen: improve MSI interrupt handling dhananjay
2008-01-12 22:37 ` Jeff Garzik
2007-12-26 18:23 ` dhananjay [this message]
2008-01-12 22:37 ` [patch 4/7] netxen: stop second phy correctly Jeff Garzik
2007-12-26 18:23 ` [patch 5/7] netxen: fix race in interrupt / napi dhananjay
2008-01-12 22:38 ` Jeff Garzik
2008-01-14 18:00 ` Dhananjay Phadke
2007-12-26 18:23 ` [patch 6/7] netxen: optimize tx handling dhananjay
2008-01-12 22:38 ` Jeff Garzik
2007-12-26 18:23 ` [patch 7/7] netxen: fix byte-swapping in tx and rx dhananjay
2007-12-26 22:38 ` Al Viro
2007-12-26 23:29 ` Dhananjay Phadke
2007-12-26 23:53 ` Al Viro
2007-12-31 18:08 ` Dhananjay Phadke
2008-01-12 22:38 ` Jeff Garzik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071226182927.458002764@netxen.com \
--to=dhananjay@netxen.com \
--cc=jeff@garzik.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.