aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/cpqphp_core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/hotplug/cpqphp_core.c')
-rw-r--r--drivers/pci/hotplug/cpqphp_core.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/pci/hotplug/cpqphp_core.c b/drivers/pci/hotplug/cpqphp_core.c
index 5617cfdadc5c..d590a99930fa 100644
--- a/drivers/pci/hotplug/cpqphp_core.c
+++ b/drivers/pci/hotplug/cpqphp_core.c
@@ -796,7 +796,6 @@ static int cpqhpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
796 u8 num_of_slots = 0; 796 u8 num_of_slots = 0;
797 u8 hp_slot = 0; 797 u8 hp_slot = 0;
798 u8 device; 798 u8 device;
799 u8 rev;
800 u8 bus_cap; 799 u8 bus_cap;
801 u16 temp_word; 800 u16 temp_word;
802 u16 vendor_id; 801 u16 vendor_id;
@@ -823,9 +822,8 @@ static int cpqhpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
823 } 822 }
824 dbg("Vendor ID: %x\n", vendor_id); 823 dbg("Vendor ID: %x\n", vendor_id);
825 824
826 rc = pci_read_config_byte(pdev, PCI_REVISION_ID, &rev); 825 dbg("revision: %d\n", pdev->revision);
827 dbg("revision: %d\n", rev); 826 if ((vendor_id == PCI_VENDOR_ID_COMPAQ) && (!pdev->revision)) {
828 if (rc || ((vendor_id == PCI_VENDOR_ID_COMPAQ) && (!rev))) {
829 err(msg_HPC_rev_error); 827 err(msg_HPC_rev_error);
830 rc = -ENODEV; 828 rc = -ENODEV;
831 goto err_disable_device; 829 goto err_disable_device;
@@ -836,7 +834,7 @@ static int cpqhpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
836 * For Intel, each SSID bit identifies a PHP capability. 834 * For Intel, each SSID bit identifies a PHP capability.
837 * Also Intel HPC's may have RID=0. 835 * Also Intel HPC's may have RID=0.
838 */ 836 */
839 if ((rev > 2) || (vendor_id == PCI_VENDOR_ID_INTEL)) { 837 if ((pdev->revision > 2) || (vendor_id == PCI_VENDOR_ID_INTEL)) {
840 // TODO: This code can be made to support non-Compaq or Intel subsystem IDs 838 // TODO: This code can be made to support non-Compaq or Intel subsystem IDs
841 rc = pci_read_config_word(pdev, PCI_SUBSYSTEM_VENDOR_ID, &subsystem_vid); 839 rc = pci_read_config_word(pdev, PCI_SUBSYSTEM_VENDOR_ID, &subsystem_vid);
842 if (rc) { 840 if (rc) {
@@ -870,7 +868,7 @@ static int cpqhpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
870 868
871 switch (subsystem_vid) { 869 switch (subsystem_vid) {
872 case PCI_VENDOR_ID_COMPAQ: 870 case PCI_VENDOR_ID_COMPAQ:
873 if (rev >= 0x13) { /* CIOBX */ 871 if (pdev->revision >= 0x13) { /* CIOBX */
874 ctrl->push_flag = 1; 872 ctrl->push_flag = 1;
875 ctrl->slot_switch_type = 1; 873 ctrl->slot_switch_type = 1;
876 ctrl->push_button = 1; 874 ctrl->push_button = 1;
@@ -1075,7 +1073,7 @@ static int cpqhpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1075 memcpy(ctrl->pci_bus, pdev->bus, sizeof(*ctrl->pci_bus)); 1073 memcpy(ctrl->pci_bus, pdev->bus, sizeof(*ctrl->pci_bus));
1076 1074
1077 ctrl->bus = pdev->bus->number; 1075 ctrl->bus = pdev->bus->number;
1078 ctrl->rev = rev; 1076 ctrl->rev = pdev->revision;
1079 dbg("bus device function rev: %d %d %d %d\n", ctrl->bus, 1077 dbg("bus device function rev: %d %d %d %d\n", ctrl->bus,
1080 PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn), ctrl->rev); 1078 PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn), ctrl->rev);
1081 1079