Commit 03789917 authored by Christopher Leech's avatar Christopher Leech Committed by Jeff Garzik

Fix e1000 net driver 64-bit DMA initialization.

parent c49e48e9
......@@ -117,9 +117,6 @@ struct e1000_adapter;
#define BAR_0 0
/* Advertise that we can DMA from any address location */
#define E1000_DMA_MASK (~0x0UL)
#if DBG
#define E1000_DBG(args...) printk(KERN_DEBUG "e1000: " args)
#else
......
......@@ -79,7 +79,7 @@ char e1000_driver_name[] = "e1000";
char e1000_driver_string[] = "Intel(R) PRO/1000 Network Driver";
char e1000_driver_version[] = "4.2.4-k1";
char e1000_driver_version[] = "4.2.4-k2";
char e1000_copyright[] = "Copyright (c) 1999-2002 Intel Corporation.";
......@@ -368,13 +368,21 @@ e1000_probe(struct pci_dev *pdev,
static int cards_found = 0;
unsigned long mmio_start;
int mmio_len;
int pci_using_dac;
int i;
if((i = pci_enable_device(pdev)))
return i;
if((i = pci_set_dma_mask(pdev, E1000_DMA_MASK)))
if(!(i = pci_set_dma_mask(pdev, (u64) 0xffffffffffffffff))) {
pci_using_dac = 1;
} else {
if((i = pci_set_dma_mask(pdev, (u64) 0xffffffff))) {
E1000_ERR("No usable DMA configuration, aborting\n");
return i;
}
pci_using_dac = 0;
}
if((i = pci_request_regions(pdev, e1000_driver_name)))
return i;
......@@ -422,13 +430,14 @@ e1000_probe(struct pci_dev *pdev,
e1000_sw_init(adapter);
if(adapter->shared.mac_type >= e1000_82543) {
netdev->features = NETIF_F_SG |
NETIF_F_IP_CSUM |
NETIF_F_HIGHDMA;
netdev->features = NETIF_F_SG | NETIF_F_HW_CSUM;
} else {
netdev->features = NETIF_F_SG | NETIF_F_HIGHDMA;
netdev->features = NETIF_F_SG;
}
if(pci_using_dac)
netdev->features |= NETIF_F_HIGHDMA;
/* make sure the EEPROM is good */
if(!e1000_validate_eeprom_checksum(&adapter->shared))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment