[SCSI] atp870u, mpt2sas, qla4xxx use pci_dev->revision
commit 44c10138fd
(PCI: Change all
drivers to use pci_device->revision) converted all drivers to use
pci_dev->revision. Convert these three drivers which got missed.
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
This commit is contained in:
parent
2280512342
commit
7d7311c445
|
@ -2583,7 +2583,7 @@ static int atp870u_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||
* this than via the PCI device table
|
||||
*/
|
||||
if (ent->device == PCI_DEVICE_ID_ARTOP_AEC7610) {
|
||||
error = pci_read_config_byte(pdev, PCI_CLASS_REVISION, &atpdev->chip_ver);
|
||||
atpdev->chip_ver = pdev->revision;
|
||||
if (atpdev->chip_ver < 2)
|
||||
goto err_eio;
|
||||
}
|
||||
|
@ -2602,7 +2602,7 @@ static int atp870u_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||
base_io &= 0xfffffff8;
|
||||
|
||||
if ((ent->device == ATP880_DEVID1)||(ent->device == ATP880_DEVID2)) {
|
||||
error = pci_read_config_byte(pdev, PCI_CLASS_REVISION, &atpdev->chip_ver);
|
||||
atpdev->chip_ver = pdev->revision;
|
||||
pci_write_config_byte(pdev, PCI_LATENCY_TIMER, 0x80);//JCC082803
|
||||
|
||||
host_id = inb(base_io + 0x39);
|
||||
|
|
|
@ -2060,12 +2060,10 @@ _base_display_ioc_capabilities(struct MPT2SAS_ADAPTER *ioc)
|
|||
{
|
||||
int i = 0;
|
||||
char desc[16];
|
||||
u8 revision;
|
||||
u32 iounit_pg1_flags;
|
||||
u32 bios_version;
|
||||
|
||||
bios_version = le32_to_cpu(ioc->bios_pg3.BiosVersion);
|
||||
pci_read_config_byte(ioc->pdev, PCI_CLASS_REVISION, &revision);
|
||||
strncpy(desc, ioc->manu_pg0.ChipName, 16);
|
||||
printk(MPT2SAS_INFO_FMT "%s: FWVersion(%02d.%02d.%02d.%02d), "
|
||||
"ChipRevision(0x%02x), BiosVersion(%02d.%02d.%02d.%02d)\n",
|
||||
|
@ -2074,7 +2072,7 @@ _base_display_ioc_capabilities(struct MPT2SAS_ADAPTER *ioc)
|
|||
(ioc->facts.FWVersion.Word & 0x00FF0000) >> 16,
|
||||
(ioc->facts.FWVersion.Word & 0x0000FF00) >> 8,
|
||||
ioc->facts.FWVersion.Word & 0x000000FF,
|
||||
revision,
|
||||
ioc->pdev->revision,
|
||||
(bios_version & 0xFF000000) >> 24,
|
||||
(bios_version & 0x00FF0000) >> 16,
|
||||
(bios_version & 0x0000FF00) >> 8,
|
||||
|
|
|
@ -1026,7 +1026,6 @@ _ctl_getiocinfo(void __user *arg)
|
|||
{
|
||||
struct mpt2_ioctl_iocinfo karg;
|
||||
struct MPT2SAS_ADAPTER *ioc;
|
||||
u8 revision;
|
||||
|
||||
if (copy_from_user(&karg, arg, sizeof(karg))) {
|
||||
printk(KERN_ERR "failure at %s:%d/%s()!\n",
|
||||
|
@ -1046,8 +1045,7 @@ _ctl_getiocinfo(void __user *arg)
|
|||
karg.adapter_type = MPT2_IOCTL_INTERFACE_SAS2;
|
||||
if (ioc->pfacts)
|
||||
karg.port_number = ioc->pfacts[0].PortNumber;
|
||||
pci_read_config_byte(ioc->pdev, PCI_CLASS_REVISION, &revision);
|
||||
karg.hw_rev = revision;
|
||||
karg.hw_rev = ioc->pdev->revision;
|
||||
karg.pci_id = ioc->pdev->device;
|
||||
karg.subsystem_device = ioc->pdev->subsystem_device;
|
||||
karg.subsystem_vendor = ioc->pdev->subsystem_vendor;
|
||||
|
|
|
@ -3445,7 +3445,6 @@ static void qla4xxx_free_adapter(struct scsi_qla_host *ha)
|
|||
int qla4_8xxx_iospace_config(struct scsi_qla_host *ha)
|
||||
{
|
||||
int status = 0;
|
||||
uint8_t revision_id;
|
||||
unsigned long mem_base, mem_len, db_base, db_len;
|
||||
struct pci_dev *pdev = ha->pdev;
|
||||
|
||||
|
@ -3457,10 +3456,9 @@ int qla4_8xxx_iospace_config(struct scsi_qla_host *ha)
|
|||
goto iospace_error_exit;
|
||||
}
|
||||
|
||||
pci_read_config_byte(pdev, PCI_REVISION_ID, &revision_id);
|
||||
DEBUG2(printk(KERN_INFO "%s: revision-id=%d\n",
|
||||
__func__, revision_id));
|
||||
ha->revision_id = revision_id;
|
||||
__func__, pdev->revision));
|
||||
ha->revision_id = pdev->revision;
|
||||
|
||||
/* remap phys address */
|
||||
mem_base = pci_resource_start(pdev, 0); /* 0 is for BAR 0 */
|
||||
|
|
Loading…
Reference in New Issue