Commit 72b0a7a8 authored by dhananjay@netxen.com's avatar dhananjay@netxen.com Committed by Jeff Garzik

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: default avatarDhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 001a731e
...@@ -732,11 +732,6 @@ static void __devexit netxen_nic_remove(struct pci_dev *pdev) ...@@ -732,11 +732,6 @@ static void __devexit netxen_nic_remove(struct pci_dev *pdev)
unregister_netdev(netdev); unregister_netdev(netdev);
if (adapter->stop_port)
adapter->stop_port(adapter);
netxen_nic_disable_int(adapter);
if (adapter->is_up == NETXEN_ADAPTER_UP_MAGIC) { if (adapter->is_up == NETXEN_ADAPTER_UP_MAGIC) {
init_firmware_done++; init_firmware_done++;
netxen_free_hw_resources(adapter); netxen_free_hw_resources(adapter);
...@@ -919,6 +914,9 @@ static int netxen_nic_close(struct net_device *netdev) ...@@ -919,6 +914,9 @@ static int netxen_nic_close(struct net_device *netdev)
netif_stop_queue(netdev); netif_stop_queue(netdev);
napi_disable(&adapter->napi); napi_disable(&adapter->napi);
if (adapter->stop_port)
adapter->stop_port(adapter);
netxen_nic_disable_int(adapter); netxen_nic_disable_int(adapter);
cmd_buff = adapter->cmd_buf_arr; cmd_buff = adapter->cmd_buf_arr;
......
...@@ -736,12 +736,12 @@ int netxen_niu_disable_xg_port(struct netxen_adapter *adapter) ...@@ -736,12 +736,12 @@ int netxen_niu_disable_xg_port(struct netxen_adapter *adapter)
__u32 mac_cfg; __u32 mac_cfg;
u32 port = physical_port[adapter->portnum]; u32 port = physical_port[adapter->portnum];
if (port != 0) if (port > NETXEN_NIU_MAX_XG_PORTS)
return -EINVAL; return -EINVAL;
mac_cfg = 0; mac_cfg = 0;
netxen_xg_soft_reset(mac_cfg); if (netxen_nic_hw_write_wx(adapter,
if (netxen_nic_hw_write_wx(adapter, NETXEN_NIU_XGE_CONFIG_0, NETXEN_NIU_XGE_CONFIG_0 + (0x10000 * port), &mac_cfg, 4))
&mac_cfg, 4))
return -EIO; return -EIO;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment