diff options
author | dhananjay@netxen.com <dhananjay@netxen.com> | 2007-08-28 07:53:26 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-08-31 06:52:57 -0400 |
commit | 3052246c815fe17ff3a9fcb5601c6688b523e5f5 (patch) | |
tree | da12e588f1895009e3baabe330b9e907dffb5880 /drivers/net/netxen/netxen_nic_hw.c | |
parent | b3e2d8874e8ba92bfefede645b8be2ec6c956933 (diff) |
netxen: fix crashes during module unload
This patch fixes two problems during driver unload. The pci_disable_device()
call is before firmware reload, causing reads and writes across PCI bus after
disabling device. Second problem is the register window was wrong during
firmware reload
Signed-off by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/netxen/netxen_nic_hw.c')
-rw-r--r-- | drivers/net/netxen/netxen_nic_hw.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c index aac15421bd1e..a7b8d7f23259 100644 --- a/drivers/net/netxen/netxen_nic_hw.c +++ b/drivers/net/netxen/netxen_nic_hw.c | |||
@@ -904,11 +904,11 @@ netxen_nic_pci_set_window(struct netxen_adapter *adapter, | |||
904 | ddr_mn_window = window; | 904 | ddr_mn_window = window; |
905 | writel(window, PCI_OFFSET_SECOND_RANGE(adapter, | 905 | writel(window, PCI_OFFSET_SECOND_RANGE(adapter, |
906 | NETXEN_PCIX_PH_REG | 906 | NETXEN_PCIX_PH_REG |
907 | (PCIX_MN_WINDOW))); | 907 | (PCIX_MN_WINDOW(adapter->ahw.pci_func)))); |
908 | /* MUST make sure window is set before we forge on... */ | 908 | /* MUST make sure window is set before we forge on... */ |
909 | readl(PCI_OFFSET_SECOND_RANGE(adapter, | 909 | readl(PCI_OFFSET_SECOND_RANGE(adapter, |
910 | NETXEN_PCIX_PH_REG | 910 | NETXEN_PCIX_PH_REG |
911 | (PCIX_MN_WINDOW))); | 911 | (PCIX_MN_WINDOW(adapter->ahw.pci_func)))); |
912 | } | 912 | } |
913 | addr -= (window * NETXEN_WINDOW_ONE); | 913 | addr -= (window * NETXEN_WINDOW_ONE); |
914 | addr += NETXEN_PCI_DDR_NET; | 914 | addr += NETXEN_PCI_DDR_NET; |
@@ -929,11 +929,11 @@ netxen_nic_pci_set_window(struct netxen_adapter *adapter, | |||
929 | writel((window << 22), | 929 | writel((window << 22), |
930 | PCI_OFFSET_SECOND_RANGE(adapter, | 930 | PCI_OFFSET_SECOND_RANGE(adapter, |
931 | NETXEN_PCIX_PH_REG | 931 | NETXEN_PCIX_PH_REG |
932 | (PCIX_SN_WINDOW))); | 932 | (PCIX_SN_WINDOW(adapter->ahw.pci_func)))); |
933 | /* MUST make sure window is set before we forge on... */ | 933 | /* MUST make sure window is set before we forge on... */ |
934 | readl(PCI_OFFSET_SECOND_RANGE(adapter, | 934 | readl(PCI_OFFSET_SECOND_RANGE(adapter, |
935 | NETXEN_PCIX_PH_REG | 935 | NETXEN_PCIX_PH_REG |
936 | (PCIX_SN_WINDOW))); | 936 | (PCIX_SN_WINDOW(adapter->ahw.pci_func)))); |
937 | } | 937 | } |
938 | addr -= (window * 0x400000); | 938 | addr -= (window * 0x400000); |
939 | addr += NETXEN_PCI_QDR_NET; | 939 | addr += NETXEN_PCI_QDR_NET; |