aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sundance.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-12 16:40:57 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-12 16:40:57 -0400
commit21ba0f88ae56da82a3a15fe54d729208b64c4f4b (patch)
tree17ce67f276fe3ea7284c3dc730bdd6a2ec7dfe2f /drivers/net/sundance.c
parentdc690d8ef842b464f1c429a376ca16cb8dbee6ae (diff)
parent36e235901f90fb83215be43cbd8f1ca14661ea40 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6: (34 commits) PCI: Only build PCI syscalls on architectures that want them PCI: limit pci_get_bus_and_slot to domain 0 PCI: hotplug: acpiphp: avoid acpiphp "cannot get bridge info" PCI hotplug failure PCI: hotplug: acpiphp: remove hot plug parameter write to PCI host bridge PCI: hotplug: acpiphp: fix slot poweroff problem on systems without _PS3 PCI: hotplug: pciehp: wait for 1 second after power off slot PCI: pci_set_power_state(): check for PM capabilities earlier PCI: cpci_hotplug: Convert to use the kthread API PCI: add pci_try_set_mwi PCI: pcie: remove SPIN_LOCK_UNLOCKED PCI: ROUND_UP macro cleanup in drivers/pci PCI: remove pci_dac_dma_... APIs PCI: pci-x-pci-express-read-control-interfaces cleanups PCI: Fix typo in include/linux/pci.h PCI: pci_ids, remove double or more empty lines PCI: pci_ids, add atheros and 3com_2 vendors PCI: pci_ids, reorder some entries PCI: i386: traps, change VENDOR to DEVICE PCI: ATM: lanai, change VENDOR to DEVICE PCI: Change all drivers to use pci_device->revision ...
Diffstat (limited to 'drivers/net/sundance.c')
-rw-r--r--drivers/net/sundance.c7
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;