aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ips.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/scsi/ips.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/scsi/ips.c')
-rw-r--r--drivers/scsi/ips.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c
index 8b704f73055a..40f148e0833f 100644
--- a/drivers/scsi/ips.c
+++ b/drivers/scsi/ips.c
@@ -7148,7 +7148,6 @@ ips_init_phase1(struct pci_dev *pci_dev, int *indexPtr)
7148 uint32_t mem_addr; 7148 uint32_t mem_addr;
7149 uint32_t io_len; 7149 uint32_t io_len;
7150 uint32_t mem_len; 7150 uint32_t mem_len;
7151 uint8_t revision_id;
7152 uint8_t bus; 7151 uint8_t bus;
7153 uint8_t func; 7152 uint8_t func;
7154 uint8_t irq; 7153 uint8_t irq;
@@ -7227,12 +7226,6 @@ ips_init_phase1(struct pci_dev *pci_dev, int *indexPtr)
7227 } 7226 }
7228 } 7227 }
7229 7228
7230 /* get the revision ID */
7231 if (pci_read_config_byte(pci_dev, PCI_REVISION_ID, &revision_id)) {
7232 IPS_PRINTK(KERN_WARNING, pci_dev, "Can't get revision id.\n");
7233 return -1;
7234 }
7235
7236 subdevice_id = pci_dev->subsystem_device; 7229 subdevice_id = pci_dev->subsystem_device;
7237 7230
7238 /* found a controller */ 7231 /* found a controller */
@@ -7258,7 +7251,7 @@ ips_init_phase1(struct pci_dev *pci_dev, int *indexPtr)
7258 ha->mem_ptr = mem_ptr; 7251 ha->mem_ptr = mem_ptr;
7259 ha->ioremap_ptr = ioremap_ptr; 7252 ha->ioremap_ptr = ioremap_ptr;
7260 ha->host_num = (uint32_t) index; 7253 ha->host_num = (uint32_t) index;
7261 ha->revision_id = revision_id; 7254 ha->revision_id = pci_dev->revision;
7262 ha->slot_num = PCI_SLOT(pci_dev->devfn); 7255 ha->slot_num = PCI_SLOT(pci_dev->devfn);
7263 ha->device_id = pci_dev->device; 7256 ha->device_id = pci_dev->device;
7264 ha->subdevice_id = subdevice_id; 7257 ha->subdevice_id = subdevice_id;