summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_os.c
diff options
context:
space:
mode:
authorAnirban Chakraborty2009-04-07 07:33:50 +0200
committerJames Bottomley2009-05-21 00:21:11 +0200
commite5b68a61e15ca8e200c60cfd4dbe1818e6beb4e1 (patch)
tree3efb29e4cca6868e7a5775589d877fb6e30639ac /drivers/scsi/qla2xxx/qla_os.c
parent[SCSI] qla2xxx: Add an override option to specify ISP firmware load semantics. (diff)
downloadkernel-qcow2-linux-e5b68a61e15ca8e200c60cfd4dbe1818e6beb4e1.tar.gz
kernel-qcow2-linux-e5b68a61e15ca8e200c60cfd4dbe1818e6beb4e1.tar.xz
kernel-qcow2-linux-e5b68a61e15ca8e200c60cfd4dbe1818e6beb4e1.zip
[SCSI] qla2xxx: Use port number to compute nvram/vpd parameter offsets.
Read adapter's physical port number from interrupt pin register and use it instead of pci function number to offset into the nvram to obtain the port's configuration parameters. Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_os.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 88a75d0a8d7e..f4f535536952 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -1581,6 +1581,13 @@ qla2x00_set_isp_flags(struct qla_hw_data *ha)
ha->fw_srisc_address = RISC_START_ADDRESS_2400;
break;
}
+
+ /* Get adapter physical port no from interrupt pin register. */
+ pci_read_config_byte(ha->pdev, PCI_INTERRUPT_PIN, &ha->port_no);
+ if (ha->port_no & 1)
+ ha->flags.port0 = 1;
+ else
+ ha->flags.port0 = 0;
}
static int