aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgb
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>2006-03-28 11:10:38 -0500
committerJeff Garzik <jeff@garzik.org>2006-04-12 18:11:23 -0400
commitc91e468a48a2afd2a2b0c2e29a35d6b8c51ea682 (patch)
tree402fe545765761341c744683b510b306c18887cb /drivers/net/ixgb
parent43f2f10444c008296cc8de68a72fd87b33b50452 (diff)
[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.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
index f9f77e4f5965..cfd67d812f0d 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,
357 if((err = pci_enable_device(pdev))) 357 if((err = pci_enable_device(pdev)))
358 return err; 358 return err;
359 359
360 if(!(err = pci_set_dma_mask(pdev, DMA_64BIT_MASK))) { 360 if(!(err = pci_set_dma_mask(pdev, DMA_64BIT_MASK)) &&
361 !(err = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK))) {
361 pci_using_dac = 1; 362 pci_using_dac = 1;
362 } else { 363 } else {
363 if((err = pci_set_dma_mask(pdev, DMA_32BIT_MASK))) { 364 if((err = pci_set_dma_mask(pdev, DMA_32BIT_MASK)) ||
365 (err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK))) {
364 IXGB_ERR("No usable DMA configuration, aborting\n"); 366 IXGB_ERR("No usable DMA configuration, aborting\n");
365 return err; 367 goto err_dma_mask;
366 } 368 }
367 pci_using_dac = 0; 369 pci_using_dac = 0;
368 } 370 }
369 371
370 if((err = pci_request_regions(pdev, ixgb_driver_name))) 372 if((err = pci_request_regions(pdev, ixgb_driver_name)))
371 return err; 373 goto err_request_regions;
372 374
373 pci_set_master(pdev); 375 pci_set_master(pdev);
374 376
@@ -502,6 +504,9 @@ err_ioremap:
502 free_netdev(netdev); 504 free_netdev(netdev);
503err_alloc_etherdev: 505err_alloc_etherdev:
504 pci_release_regions(pdev); 506 pci_release_regions(pdev);
507err_request_regions:
508err_dma_mask:
509 pci_disable_device(pdev);
505 return err; 510 return err;
506} 511}
507 512