aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tulip/xircom_cb.c
diff options
context:
space:
mode:
authorAuke Kok <auke-jan.h.kok@intel.com>2007-06-08 18:46:36 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-07-11 19:02:10 -0400
commit44c10138fd4bbc4b6d6bff0873c24902f2a9da65 (patch)
tree6e16d3ec80c87490dc743f72da086356f2906ace /drivers/net/tulip/xircom_cb.c
parentb8a3a5214d7cc115f1ca3a3967b7229d97c46f4a (diff)
PCI: Change all drivers to use pci_device->revision
Instead of all drivers reading pci config space to get the revision ID, they can now use the pci_device->revision member. This exposes some issues where drivers where reading a word or a dword for the revision number, and adding useless error-handling around the read. Some drivers even just read it for no purpose of all. In devices where the revision ID is being copied over and used in what appears to be the equivalent of hotpath, I have left the copy code and the cached copy as not to influence the driver's performance. Compile tested with make all{yes,mod}config on x86_64 and i386. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Acked-by: Dave Jones <davej@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/net/tulip/xircom_cb.c')
-rw-r--r--drivers/net/tulip/xircom_cb.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/tulip/xircom_cb.c b/drivers/net/tulip/xircom_cb.c
index 2470b1ee33c0..79943cdd6337 100644
--- a/drivers/net/tulip/xircom_cb.c
+++ b/drivers/net/tulip/xircom_cb.c
@@ -205,7 +205,6 @@ static int __devinit xircom_probe(struct pci_dev *pdev, const struct pci_device_
205{ 205{
206 struct net_device *dev = NULL; 206 struct net_device *dev = NULL;
207 struct xircom_private *private; 207 struct xircom_private *private;
208 unsigned char chip_rev;
209 unsigned long flags; 208 unsigned long flags;
210 unsigned short tmp16; 209 unsigned short tmp16;
211 enter("xircom_probe"); 210 enter("xircom_probe");
@@ -224,8 +223,6 @@ static int __devinit xircom_probe(struct pci_dev *pdev, const struct pci_device_
224 pci_read_config_word (pdev,PCI_STATUS, &tmp16); 223 pci_read_config_word (pdev,PCI_STATUS, &tmp16);
225 pci_write_config_word (pdev, PCI_STATUS,tmp16); 224 pci_write_config_word (pdev, PCI_STATUS,tmp16);
226 225
227 pci_read_config_byte(pdev, PCI_REVISION_ID, &chip_rev);
228
229 if (!request_region(pci_resource_start(pdev, 0), 128, "xircom_cb")) { 226 if (!request_region(pci_resource_start(pdev, 0), 128, "xircom_cb")) {
230 printk(KERN_ERR "xircom_probe: failed to allocate io-region\n"); 227 printk(KERN_ERR "xircom_probe: failed to allocate io-region\n");
231 return -ENODEV; 228 return -ENODEV;
@@ -286,7 +283,7 @@ static int __devinit xircom_probe(struct pci_dev *pdev, const struct pci_device_
286 goto reg_fail; 283 goto reg_fail;
287 } 284 }
288 285
289 printk(KERN_INFO "%s: Xircom cardbus revision %i at irq %i \n", dev->name, chip_rev, pdev->irq); 286 printk(KERN_INFO "%s: Xircom cardbus revision %i at irq %i \n", dev->name, pdev->revision, pdev->irq);
290 /* start the transmitter to get a heartbeat */ 287 /* start the transmitter to get a heartbeat */
291 /* TODO: send 2 dummy packets here */ 288 /* TODO: send 2 dummy packets here */
292 transceiver_voodoo(private); 289 transceiver_voodoo(private);