aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorDhananjay Phadke <dhananjay@netxen.com>2008-08-08 03:08:40 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-08-14 04:43:08 -0400
commit9e410778047d0f2887adb888b44eda4d72d4f67d (patch)
tree26abc4daef3178d00592f09e130c5918017e2e3b /drivers/net
parent9dc28efeee98a4f81d5469d3576f55c5e6d1a5db (diff)
netxen: fix rxbuf leak across driver reload
Free up rx ring during driver unload or open() failure. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/netxen/netxen_nic_main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c
index 6fc42cd30729..056f6b17a331 100644
--- a/drivers/net/netxen/netxen_nic_main.c
+++ b/drivers/net/netxen/netxen_nic_main.c
@@ -1017,6 +1017,7 @@ static void __devexit netxen_nic_remove(struct pci_dev *pdev)
1017 1017
1018 if (adapter->is_up == NETXEN_ADAPTER_UP_MAGIC) { 1018 if (adapter->is_up == NETXEN_ADAPTER_UP_MAGIC) {
1019 netxen_free_hw_resources(adapter); 1019 netxen_free_hw_resources(adapter);
1020 netxen_release_rx_buffers(adapter);
1020 netxen_free_sw_resources(adapter); 1021 netxen_free_sw_resources(adapter);
1021 } 1022 }
1022 1023
@@ -1111,7 +1112,7 @@ static int netxen_nic_open(struct net_device *netdev)
1111 flags, netdev->name, adapter); 1112 flags, netdev->name, adapter);
1112 if (err) { 1113 if (err) {
1113 printk(KERN_ERR "request_irq failed with: %d\n", err); 1114 printk(KERN_ERR "request_irq failed with: %d\n", err);
1114 goto err_out_free_hw; 1115 goto err_out_free_rxbuf;
1115 } 1116 }
1116 1117
1117 adapter->is_up = NETXEN_ADAPTER_UP_MAGIC; 1118 adapter->is_up = NETXEN_ADAPTER_UP_MAGIC;
@@ -1144,7 +1145,8 @@ static int netxen_nic_open(struct net_device *netdev)
1144 1145
1145err_out_free_irq: 1146err_out_free_irq:
1146 free_irq(adapter->irq, adapter); 1147 free_irq(adapter->irq, adapter);
1147err_out_free_hw: 1148err_out_free_rxbuf:
1149 netxen_release_rx_buffers(adapter);
1148 netxen_free_hw_resources(adapter); 1150 netxen_free_hw_resources(adapter);
1149err_out_free_sw: 1151err_out_free_sw:
1150 netxen_free_sw_resources(adapter); 1152 netxen_free_sw_resources(adapter);