diff options
author | Andreas Schwab <schwab@suse.de> | 2006-03-28 18:10:38 +0200 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-04-12 18:11:23 -0400 |
commit | c91e468a48a2afd2a2b0c2e29a35d6b8c51ea682 (patch) | |
tree | 402fe545765761341c744683b510b306c18887cb /drivers/net/ixgb | |
parent | 43f2f10444c008296cc8de68a72fd87b33b50452 (diff) | |
download | op-kernel-dev-c91e468a48a2afd2a2b0c2e29a35d6b8c51ea682.zip op-kernel-dev-c91e468a48a2afd2a2b0c2e29a35d6b8c51ea682.tar.gz |
[PATCH] Use pci_set_consistent_dma_mask in ixgb driver
The ixgb driver is using pci_alloc_consistent, thus is should also use
pci_set_consistent_dma_mask. This allows the driver to work on SGI
systems.
In case of an error during probing it should also disable the device again.
Signed-off-by: Andreas Schwab <schwab@suse.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/ixgb')
-rw-r--r-- | drivers/net/ixgb/ixgb_main.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c index f9f77e4..cfd67d8 100644 --- a/drivers/net/ixgb/ixgb_main.c +++ b/drivers/net/ixgb/ixgb_main.c @@ -357,18 +357,20 @@ ixgb_probe(struct pci_dev *pdev, if((err = pci_enable_device(pdev))) return err; - if(!(err = pci_set_dma_mask(pdev, DMA_64BIT_MASK))) { + if(!(err = pci_set_dma_mask(pdev, DMA_64BIT_MASK)) && + !(err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK))) { pci_using_dac = 1; } else { - if((err = pci_set_dma_mask(pdev, DMA_32BIT_MASK))) { + if((err = pci_set_dma_mask(pdev, DMA_32BIT_MASK)) || + (err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK))) { IXGB_ERR("No usable DMA configuration, aborting\n"); - return err; + goto err_dma_mask; } pci_using_dac = 0; } if((err = pci_request_regions(pdev, ixgb_driver_name))) - return err; + goto err_request_regions; pci_set_master(pdev); @@ -502,6 +504,9 @@ err_ioremap: free_netdev(netdev); err_alloc_etherdev: pci_release_regions(pdev); +err_request_regions: +err_dma_mask: + pci_disable_device(pdev); return err; } |