diff options
author | Lalit Chandivade <lalit.chandivade@qlogic.com> | 2011-10-07 19:55:42 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2011-10-16 12:08:41 -0400 |
commit | 4549415af6915017f5d3fbdbfd5edd1dfbe63fa9 (patch) | |
tree | b06ad5224dd3093d6fd9377d8461a295f101e1b7 /drivers/scsi/qla4xxx/ql4_def.h | |
parent | 0854f665a1cbb4566d3ebe449169b0200b8cdad0 (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_def.h')
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_def.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_def.h b/drivers/scsi/qla4xxx/ql4_def.h index a80adfc6d780..fcb1dff9bc19 100644 --- a/drivers/scsi/qla4xxx/ql4_def.h +++ b/drivers/scsi/qla4xxx/ql4_def.h | |||
@@ -279,7 +279,8 @@ struct ql82xx_hw_data { | |||
279 | uint32_t flt_region_fw; | 279 | uint32_t flt_region_fw; |
280 | 280 | ||
281 | uint32_t flt_iscsi_param; | 281 | uint32_t flt_iscsi_param; |
282 | uint32_t reserved; | 282 | uint32_t flt_region_chap; |
283 | uint32_t flt_chap_size; | ||
283 | }; | 284 | }; |
284 | 285 | ||
285 | struct qla4_8xxx_legacy_intr_set { | 286 | struct qla4_8xxx_legacy_intr_set { |
@@ -609,6 +610,8 @@ struct scsi_qla_host { | |||
609 | #define QLFLASH_READING 1 | 610 | #define QLFLASH_READING 1 |
610 | #define QLFLASH_WRITING 2 | 611 | #define QLFLASH_WRITING 2 |
611 | struct dma_pool *chap_dma_pool; | 612 | struct dma_pool *chap_dma_pool; |
613 | uint8_t *chap_list; /* CHAP table cache */ | ||
614 | struct mutex chap_sem; | ||
612 | #define CHAP_DMA_BLOCK_SIZE 512 | 615 | #define CHAP_DMA_BLOCK_SIZE 512 |
613 | struct workqueue_struct *task_wq; | 616 | struct workqueue_struct *task_wq; |
614 | unsigned long ddb_idx_map[MAX_DDB_ENTRIES / BITS_PER_LONG]; | 617 | unsigned long ddb_idx_map[MAX_DDB_ENTRIES / BITS_PER_LONG]; |
@@ -671,6 +674,11 @@ static inline int is_qla4032(struct scsi_qla_host *ha) | |||
671 | return ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP4032; | 674 | return ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP4032; |
672 | } | 675 | } |
673 | 676 | ||
677 | static inline int is_qla40XX(struct scsi_qla_host *ha) | ||
678 | { | ||
679 | return is_qla4032(ha) || is_qla4022(ha) || is_qla4010(ha); | ||
680 | } | ||
681 | |||
674 | static inline int is_qla8022(struct scsi_qla_host *ha) | 682 | static inline int is_qla8022(struct scsi_qla_host *ha) |
675 | { | 683 | { |
676 | return ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP8022; | 684 | return ha->pdev->device == PCI_DEVICE_ID_QLOGIC_ISP8022; |