diff options
Diffstat (limited to 'drivers/net/tulip/tulip_core.c')
-rw-r--r-- | drivers/net/tulip/tulip_core.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/net/tulip/tulip_core.c b/drivers/net/tulip/tulip_core.c index 041af63f2811..7dcd138b0fed 100644 --- a/drivers/net/tulip/tulip_core.c +++ b/drivers/net/tulip/tulip_core.c | |||
@@ -1155,7 +1155,7 @@ static void __devinit tulip_mwi_config (struct pci_dev *pdev, | |||
1155 | /* set or disable MWI in the standard PCI command bit. | 1155 | /* set or disable MWI in the standard PCI command bit. |
1156 | * Check for the case where mwi is desired but not available | 1156 | * Check for the case where mwi is desired but not available |
1157 | */ | 1157 | */ |
1158 | if (csr0 & MWI) pci_set_mwi(pdev); | 1158 | if (csr0 & MWI) pci_try_set_mwi(pdev); |
1159 | else pci_clear_mwi(pdev); | 1159 | else pci_clear_mwi(pdev); |
1160 | 1160 | ||
1161 | /* read result from hardware (in case bit refused to enable) */ | 1161 | /* read result from hardware (in case bit refused to enable) */ |
@@ -1238,7 +1238,6 @@ static int __devinit tulip_init_one (struct pci_dev *pdev, | |||
1238 | }; | 1238 | }; |
1239 | static int last_irq; | 1239 | static int last_irq; |
1240 | static int multiport_cnt; /* For four-port boards w/one EEPROM */ | 1240 | static int multiport_cnt; /* For four-port boards w/one EEPROM */ |
1241 | u8 chip_rev; | ||
1242 | int i, irq; | 1241 | int i, irq; |
1243 | unsigned short sum; | 1242 | unsigned short sum; |
1244 | unsigned char *ee_data; | 1243 | unsigned char *ee_data; |
@@ -1274,10 +1273,8 @@ static int __devinit tulip_init_one (struct pci_dev *pdev, | |||
1274 | 1273 | ||
1275 | if (pdev->vendor == 0x1282 && pdev->device == 0x9100) | 1274 | if (pdev->vendor == 0x1282 && pdev->device == 0x9100) |
1276 | { | 1275 | { |
1277 | u32 dev_rev; | ||
1278 | /* Read Chip revision */ | 1276 | /* Read Chip revision */ |
1279 | pci_read_config_dword(pdev, PCI_REVISION_ID, &dev_rev); | 1277 | if (pdev->revision < 0x02000030) |
1280 | if(dev_rev < 0x02000030) | ||
1281 | { | 1278 | { |
1282 | printk(KERN_ERR PFX "skipping early DM9100 with Crc bug (use dmfe)\n"); | 1279 | printk(KERN_ERR PFX "skipping early DM9100 with Crc bug (use dmfe)\n"); |
1283 | return -ENODEV; | 1280 | return -ENODEV; |
@@ -1360,8 +1357,6 @@ static int __devinit tulip_init_one (struct pci_dev *pdev, | |||
1360 | if (!ioaddr) | 1357 | if (!ioaddr) |
1361 | goto err_out_free_res; | 1358 | goto err_out_free_res; |
1362 | 1359 | ||
1363 | pci_read_config_byte (pdev, PCI_REVISION_ID, &chip_rev); | ||
1364 | |||
1365 | /* | 1360 | /* |
1366 | * initialize private data structure 'tp' | 1361 | * initialize private data structure 'tp' |
1367 | * it is zeroed and aligned in alloc_etherdev | 1362 | * it is zeroed and aligned in alloc_etherdev |
@@ -1382,7 +1377,7 @@ static int __devinit tulip_init_one (struct pci_dev *pdev, | |||
1382 | tp->flags = tulip_tbl[chip_idx].flags; | 1377 | tp->flags = tulip_tbl[chip_idx].flags; |
1383 | tp->pdev = pdev; | 1378 | tp->pdev = pdev; |
1384 | tp->base_addr = ioaddr; | 1379 | tp->base_addr = ioaddr; |
1385 | tp->revision = chip_rev; | 1380 | tp->revision = pdev->revision; |
1386 | tp->csr0 = csr0; | 1381 | tp->csr0 = csr0; |
1387 | spin_lock_init(&tp->lock); | 1382 | spin_lock_init(&tp->lock); |
1388 | spin_lock_init(&tp->mii_lock); | 1383 | spin_lock_init(&tp->mii_lock); |
@@ -1399,7 +1394,7 @@ static int __devinit tulip_init_one (struct pci_dev *pdev, | |||
1399 | tulip_mwi_config (pdev, dev); | 1394 | tulip_mwi_config (pdev, dev); |
1400 | #else | 1395 | #else |
1401 | /* MWI is broken for DC21143 rev 65... */ | 1396 | /* MWI is broken for DC21143 rev 65... */ |
1402 | if (chip_idx == DC21143 && chip_rev == 65) | 1397 | if (chip_idx == DC21143 && pdev->revision == 65) |
1403 | tp->csr0 &= ~MWI; | 1398 | tp->csr0 &= ~MWI; |
1404 | #endif | 1399 | #endif |
1405 | 1400 | ||
@@ -1640,7 +1635,7 @@ static int __devinit tulip_init_one (struct pci_dev *pdev, | |||
1640 | #else | 1635 | #else |
1641 | "Port" | 1636 | "Port" |
1642 | #endif | 1637 | #endif |
1643 | " %#llx,", dev->name, chip_name, chip_rev, | 1638 | " %#llx,", dev->name, chip_name, pdev->revision, |
1644 | (unsigned long long) pci_resource_start(pdev, TULIP_BAR)); | 1639 | (unsigned long long) pci_resource_start(pdev, TULIP_BAR)); |
1645 | pci_set_drvdata(pdev, dev); | 1640 | pci_set_drvdata(pdev, dev); |
1646 | 1641 | ||