forked from luck/tmp_suning_uos_patched
netxen: fix dma watchdog
NX3031 does not require driver to kill dma watchdog. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
This commit is contained in:
parent
922c4f2c70
commit
15eef1e1b7
@ -1079,10 +1079,12 @@ int netxen_initialize_adapter_offload(struct netxen_adapter *adapter)
|
|||||||
|
|
||||||
void netxen_free_adapter_offload(struct netxen_adapter *adapter)
|
void netxen_free_adapter_offload(struct netxen_adapter *adapter)
|
||||||
{
|
{
|
||||||
int i;
|
int i = 100;
|
||||||
|
|
||||||
if (adapter->dummy_dma.addr) {
|
if (!adapter->dummy_dma.addr)
|
||||||
i = 100;
|
return;
|
||||||
|
|
||||||
|
if (NX_IS_REVISION_P2(adapter->ahw.revision_id)) {
|
||||||
do {
|
do {
|
||||||
if (dma_watchdog_shutdown_request(adapter) == 1)
|
if (dma_watchdog_shutdown_request(adapter) == 1)
|
||||||
break;
|
break;
|
||||||
@ -1090,17 +1092,17 @@ void netxen_free_adapter_offload(struct netxen_adapter *adapter)
|
|||||||
if (dma_watchdog_shutdown_poll_result(adapter) == 1)
|
if (dma_watchdog_shutdown_poll_result(adapter) == 1)
|
||||||
break;
|
break;
|
||||||
} while (--i);
|
} while (--i);
|
||||||
|
}
|
||||||
|
|
||||||
if (i) {
|
if (i) {
|
||||||
pci_free_consistent(adapter->pdev,
|
pci_free_consistent(adapter->pdev,
|
||||||
NETXEN_HOST_DUMMY_DMA_SIZE,
|
NETXEN_HOST_DUMMY_DMA_SIZE,
|
||||||
adapter->dummy_dma.addr,
|
adapter->dummy_dma.addr,
|
||||||
adapter->dummy_dma.phys_addr);
|
adapter->dummy_dma.phys_addr);
|
||||||
adapter->dummy_dma.addr = NULL;
|
adapter->dummy_dma.addr = NULL;
|
||||||
} else {
|
} else {
|
||||||
printk(KERN_ERR "%s: dma_watchdog_shutdown failed\n",
|
printk(KERN_ERR "%s: dma_watchdog_shutdown failed\n",
|
||||||
adapter->netdev->name);
|
adapter->netdev->name);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user