From: Amit S. Kale Date: Wed, 21 Feb 2007 14:37:06 +0000 (-0800) Subject: NetXen: Driver unload fixes X-Git-Tag: v2.6.21-rc2~3^2~35 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9de06610669b2f7b9c2ba6f0a849b70aa91b2edb;p=linux-2.6 NetXen: Driver unload fixes Signed-off-by: Amit S. Kale Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c index 7195af3e8f..deec796f90 100644 --- a/drivers/net/netxen/netxen_nic_hw.c +++ b/drivers/net/netxen/netxen_nic_hw.c @@ -242,10 +242,11 @@ int netxen_nic_hw_resources(struct netxen_adapter *adapter) adapter->cmd_consumer = (uint32_t *) (((char *)addr) + sizeof(struct netxen_ring_ctx)); - addr = pci_alloc_consistent(adapter->ahw.pdev, - sizeof(struct cmd_desc_type0) * - adapter->max_tx_desc_count, - (dma_addr_t *) & hw->cmd_desc_phys_addr); + addr = netxen_alloc(adapter->ahw.pdev, + sizeof(struct cmd_desc_type0) * + adapter->max_tx_desc_count, + (dma_addr_t *) & hw->cmd_desc_phys_addr, + &adapter->ahw.cmd_desc_pdev); printk("cmd_desc_phys_addr: 0x%llx\n", (u64) hw->cmd_desc_phys_addr); if (addr == NULL) { diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c index 225ff55527..b2fc2bccc3 100644 --- a/drivers/net/netxen/netxen_nic_main.c +++ b/drivers/net/netxen/netxen_nic_main.c @@ -1155,8 +1155,8 @@ static void __exit netxen_exit_module(void) /* * Wait for some time to allow the dma to drain, if any. */ - destroy_workqueue(netxen_workq); pci_unregister_driver(&netxen_driver); + destroy_workqueue(netxen_workq); } module_exit(netxen_exit_module);