diff options
author | dhananjay@netxen.com <dhananjay@netxen.com> | 2007-12-26 13:23:56 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2008-01-12 17:35:34 -0500 |
commit | 72b0a7a8a40a50cf2eab42fd6a56e04b05090434 (patch) | |
tree | 21855d0a2f6b733bf616b555b5694ed698c32144 /drivers/net/netxen/netxen_nic_niu.c | |
parent | 001a731ecfc2e5fdbb5022ad3708705d9edf801c (diff) |
netxen: stop second phy correctly
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>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/netxen/netxen_nic_niu.c')
-rw-r--r-- | drivers/net/netxen/netxen_nic_niu.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/netxen/netxen_nic_niu.c b/drivers/net/netxen/netxen_nic_niu.c index 5b9e1b300fa..d04ecb77d08 100644 --- a/drivers/net/netxen/netxen_nic_niu.c +++ b/drivers/net/netxen/netxen_nic_niu.c | |||
@@ -736,12 +736,12 @@ int netxen_niu_disable_xg_port(struct netxen_adapter *adapter) | |||
736 | __u32 mac_cfg; | 736 | __u32 mac_cfg; |
737 | u32 port = physical_port[adapter->portnum]; | 737 | u32 port = physical_port[adapter->portnum]; |
738 | 738 | ||
739 | if (port != 0) | 739 | if (port > NETXEN_NIU_MAX_XG_PORTS) |
740 | return -EINVAL; | 740 | return -EINVAL; |
741 | |||
741 | mac_cfg = 0; | 742 | mac_cfg = 0; |
742 | netxen_xg_soft_reset(mac_cfg); | 743 | if (netxen_nic_hw_write_wx(adapter, |
743 | if (netxen_nic_hw_write_wx(adapter, NETXEN_NIU_XGE_CONFIG_0, | 744 | NETXEN_NIU_XGE_CONFIG_0 + (0x10000 * port), &mac_cfg, 4)) |
744 | &mac_cfg, 4)) | ||
745 | return -EIO; | 745 | return -EIO; |
746 | return 0; | 746 | return 0; |
747 | } | 747 | } |