diff options
Diffstat (limited to 'drivers/net/sundance.c')
-rw-r--r-- | drivers/net/sundance.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/sundance.c b/drivers/net/sundance.c index c8ba534c17bf..af0c9831074c 100644 --- a/drivers/net/sundance.c +++ b/drivers/net/sundance.c | |||
@@ -397,7 +397,6 @@ struct netdev_private { | |||
397 | unsigned char phys[MII_CNT]; /* MII device addresses, only first one used. */ | 397 | unsigned char phys[MII_CNT]; /* MII device addresses, only first one used. */ |
398 | struct pci_dev *pci_dev; | 398 | struct pci_dev *pci_dev; |
399 | void __iomem *base; | 399 | void __iomem *base; |
400 | unsigned char pci_rev_id; | ||
401 | }; | 400 | }; |
402 | 401 | ||
403 | /* The station address location in the EEPROM. */ | 402 | /* The station address location in the EEPROM. */ |
@@ -544,8 +543,6 @@ static int __devinit sundance_probe1 (struct pci_dev *pdev, | |||
544 | dev->change_mtu = &change_mtu; | 543 | dev->change_mtu = &change_mtu; |
545 | pci_set_drvdata(pdev, dev); | 544 | pci_set_drvdata(pdev, dev); |
546 | 545 | ||
547 | pci_read_config_byte(pdev, PCI_REVISION_ID, &np->pci_rev_id); | ||
548 | |||
549 | i = register_netdev(dev); | 546 | i = register_netdev(dev); |
550 | if (i) | 547 | if (i) |
551 | goto err_out_unmap_rx; | 548 | goto err_out_unmap_rx; |
@@ -828,7 +825,7 @@ static int netdev_open(struct net_device *dev) | |||
828 | iowrite8(100, ioaddr + RxDMAPollPeriod); | 825 | iowrite8(100, ioaddr + RxDMAPollPeriod); |
829 | iowrite8(127, ioaddr + TxDMAPollPeriod); | 826 | iowrite8(127, ioaddr + TxDMAPollPeriod); |
830 | /* Fix DFE-580TX packet drop issue */ | 827 | /* Fix DFE-580TX packet drop issue */ |
831 | if (np->pci_rev_id >= 0x14) | 828 | if (np->pci_dev->revision >= 0x14) |
832 | iowrite8(0x01, ioaddr + DebugCtrl1); | 829 | iowrite8(0x01, ioaddr + DebugCtrl1); |
833 | netif_start_queue(dev); | 830 | netif_start_queue(dev); |
834 | 831 | ||
@@ -1194,7 +1191,7 @@ static irqreturn_t intr_handler(int irq, void *dev_instance) | |||
1194 | hw_frame_id = ioread8(ioaddr + TxFrameId); | 1191 | hw_frame_id = ioread8(ioaddr + TxFrameId); |
1195 | } | 1192 | } |
1196 | 1193 | ||
1197 | if (np->pci_rev_id >= 0x14) { | 1194 | if (np->pci_dev->revision >= 0x14) { |
1198 | spin_lock(&np->lock); | 1195 | spin_lock(&np->lock); |
1199 | for (; np->cur_tx - np->dirty_tx > 0; np->dirty_tx++) { | 1196 | for (; np->cur_tx - np->dirty_tx > 0; np->dirty_tx++) { |
1200 | int entry = np->dirty_tx % TX_RING_SIZE; | 1197 | int entry = np->dirty_tx % TX_RING_SIZE; |