diff options
author | Anirban Chakraborty <anirban.chakraborty@qlogic.com> | 2009-04-07 01:33:50 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-05-20 18:21:11 -0400 |
commit | e5b68a61e15ca8e200c60cfd4dbe1818e6beb4e1 (patch) | |
tree | 3efb29e4cca6868e7a5775589d877fb6e30639ac /drivers/scsi/qla2xxx/qla_sup.c | |
parent | e337d9070e5821e7c8e5973679bdd34376263bd1 (diff) |
[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_sup.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_sup.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/scsi/qla2xxx/qla_sup.c b/drivers/scsi/qla2xxx/qla_sup.c index 2a9b3f83ba67..22f97eb50cf9 100644 --- a/drivers/scsi/qla2xxx/qla_sup.c +++ b/drivers/scsi/qla2xxx/qla_sup.c | |||
@@ -702,30 +702,30 @@ qla2xxx_get_flt_info(scsi_qla_host_t *vha, uint32_t flt_addr) | |||
702 | break; | 702 | break; |
703 | case FLT_REG_VPD_0: | 703 | case FLT_REG_VPD_0: |
704 | ha->flt_region_vpd_nvram = start; | 704 | ha->flt_region_vpd_nvram = start; |
705 | if (!(PCI_FUNC(ha->pdev->devfn) & 1)) | 705 | if (ha->flags.port0) |
706 | ha->flt_region_vpd = start; | 706 | ha->flt_region_vpd = start; |
707 | break; | 707 | break; |
708 | case FLT_REG_VPD_1: | 708 | case FLT_REG_VPD_1: |
709 | if (PCI_FUNC(ha->pdev->devfn) & 1) | 709 | if (!ha->flags.port0) |
710 | ha->flt_region_vpd = start; | 710 | ha->flt_region_vpd = start; |
711 | break; | 711 | break; |
712 | case FLT_REG_NVRAM_0: | 712 | case FLT_REG_NVRAM_0: |
713 | if (!(PCI_FUNC(ha->pdev->devfn) & 1)) | 713 | if (ha->flags.port0) |
714 | ha->flt_region_nvram = start; | 714 | ha->flt_region_nvram = start; |
715 | break; | 715 | break; |
716 | case FLT_REG_NVRAM_1: | 716 | case FLT_REG_NVRAM_1: |
717 | if (PCI_FUNC(ha->pdev->devfn) & 1) | 717 | if (!ha->flags.port0) |
718 | ha->flt_region_nvram = start; | 718 | ha->flt_region_nvram = start; |
719 | break; | 719 | break; |
720 | case FLT_REG_FDT: | 720 | case FLT_REG_FDT: |
721 | ha->flt_region_fdt = start; | 721 | ha->flt_region_fdt = start; |
722 | break; | 722 | break; |
723 | case FLT_REG_NPIV_CONF_0: | 723 | case FLT_REG_NPIV_CONF_0: |
724 | if (!(PCI_FUNC(ha->pdev->devfn) & 1)) | 724 | if (ha->flags.port0) |
725 | ha->flt_region_npiv_conf = start; | 725 | ha->flt_region_npiv_conf = start; |
726 | break; | 726 | break; |
727 | case FLT_REG_NPIV_CONF_1: | 727 | case FLT_REG_NPIV_CONF_1: |
728 | if (PCI_FUNC(ha->pdev->devfn) & 1) | 728 | if (!ha->flags.port0) |
729 | ha->flt_region_npiv_conf = start; | 729 | ha->flt_region_npiv_conf = start; |
730 | break; | 730 | break; |
731 | } | 731 | } |
@@ -745,12 +745,12 @@ no_flash_data: | |||
745 | ha->flt_region_fw = def_fw[def]; | 745 | ha->flt_region_fw = def_fw[def]; |
746 | ha->flt_region_boot = def_boot[def]; | 746 | ha->flt_region_boot = def_boot[def]; |
747 | ha->flt_region_vpd_nvram = def_vpd_nvram[def]; | 747 | ha->flt_region_vpd_nvram = def_vpd_nvram[def]; |
748 | ha->flt_region_vpd = !(PCI_FUNC(ha->pdev->devfn) & 1) ? | 748 | ha->flt_region_vpd = ha->flags.port0 ? |
749 | def_vpd0[def]: def_vpd1[def]; | 749 | def_vpd0[def]: def_vpd1[def]; |
750 | ha->flt_region_nvram = !(PCI_FUNC(ha->pdev->devfn) & 1) ? | 750 | ha->flt_region_nvram = ha->flags.port0 ? |
751 | def_nvram0[def]: def_nvram1[def]; | 751 | def_nvram0[def]: def_nvram1[def]; |
752 | ha->flt_region_fdt = def_fdt[def]; | 752 | ha->flt_region_fdt = def_fdt[def]; |
753 | ha->flt_region_npiv_conf = !(PCI_FUNC(ha->pdev->devfn) & 1) ? | 753 | ha->flt_region_npiv_conf = ha->flags.port0 ? |
754 | def_npiv_conf0[def]: def_npiv_conf1[def]; | 754 | def_npiv_conf0[def]: def_npiv_conf1[def]; |
755 | done: | 755 | done: |
756 | DEBUG2(qla_printk(KERN_DEBUG, ha, "FLT[%s]: boot=0x%x fw=0x%x " | 756 | DEBUG2(qla_printk(KERN_DEBUG, ha, "FLT[%s]: boot=0x%x fw=0x%x " |