aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla4xxx/ql4_nx.c
diff options
context:
space:
mode:
authorLalit Chandivade <lalit.chandivade@qlogic.com>2011-10-07 19:55:42 -0400
committerJames Bottomley <JBottomley@Parallels.com>2011-10-16 12:08:41 -0400
commit4549415af6915017f5d3fbdbfd5edd1dfbe63fa9 (patch)
treeb06ad5224dd3093d6fd9377d8461a295f101e1b7 /drivers/scsi/qla4xxx/ql4_nx.c
parent0854f665a1cbb4566d3ebe449169b0200b8cdad0 (diff)
[SCSI] qla4xxx: Do not add duplicate CHAP entry in FLASH
QLogic applications store the CHAP information in FLASH. During login, authentication information is provided using an index into the CHAP region. In order to support QLogic applications along with iscsiadm, updated the LLD to not add duplicate CHAP entries in the CHAP region and preserve the existing CHAP info in the CHAP region in FLASH. This allows QLogic applications to pre-write the CHAP entries in the CHAP region. With iscsiadm, when the CHAP authentication information is sent to the LLD, the LLD searches for the entry in CHAP region in FLASH, if exists then do not add. If CHAP entry does not exist then add the CHAP entry in the CHAP region. JIRA Key: UPSISCSI-146 Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com> Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/qla4xxx/ql4_nx.c')
-rw-r--r--drivers/scsi/qla4xxx/ql4_nx.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_nx.c b/drivers/scsi/qla4xxx/ql4_nx.c
index 84c254afac0a..f484ff438199 100644
--- a/drivers/scsi/qla4xxx/ql4_nx.c
+++ b/drivers/scsi/qla4xxx/ql4_nx.c
@@ -2024,6 +2024,10 @@ qla4_8xxx_get_flt_info(struct scsi_qla_host *ha, uint32_t flt_addr)
2024 case FLT_REG_ISCSI_PARAM: 2024 case FLT_REG_ISCSI_PARAM:
2025 hw->flt_iscsi_param = start; 2025 hw->flt_iscsi_param = start;
2026 break; 2026 break;
2027 case FLT_REG_ISCSI_CHAP:
2028 hw->flt_region_chap = start;
2029 hw->flt_chap_size = le32_to_cpu(region->size);
2030 break;
2027 } 2031 }
2028 } 2032 }
2029 goto done; 2033 goto done;
@@ -2036,6 +2040,9 @@ no_flash_data:
2036 hw->flt_region_boot = FA_BOOT_CODE_ADDR_82; 2040 hw->flt_region_boot = FA_BOOT_CODE_ADDR_82;
2037 hw->flt_region_bootload = FA_BOOT_LOAD_ADDR_82; 2041 hw->flt_region_bootload = FA_BOOT_LOAD_ADDR_82;
2038 hw->flt_region_fw = FA_RISC_CODE_ADDR_82; 2042 hw->flt_region_fw = FA_RISC_CODE_ADDR_82;
2043 hw->flt_region_chap = FA_FLASH_ISCSI_CHAP;
2044 hw->flt_chap_size = FA_FLASH_CHAP_SIZE;
2045
2039done: 2046done:
2040 DEBUG2(ql4_printk(KERN_INFO, ha, "FLT[%s]: flt=0x%x fdt=0x%x " 2047 DEBUG2(ql4_printk(KERN_INFO, ha, "FLT[%s]: flt=0x%x fdt=0x%x "
2041 "boot=0x%x bootload=0x%x fw=0x%x\n", loc, hw->flt_region_flt, 2048 "boot=0x%x bootload=0x%x fw=0x%x\n", loc, hw->flt_region_flt,