diff options
author | James Smart <James.Smart@Emulex.Com> | 2009-05-22 14:52:59 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-06-08 12:25:24 -0400 |
commit | 6fb120a7ed882aae9636545142a51cf3182a3ace (patch) | |
tree | 7e830b09907286288f20f60c0f104d5fbec9998d /drivers/scsi/lpfc/lpfc_attr.c | |
parent | 04c684968487eb4f98728363a97b8da48f3bb958 (diff) |
[SCSI] lpfc 8.3.2 : Addition of SLI4 Interface - FCOE Discovery support
SLI4 supports both FC and FCOE, with some extended topology objects.
This patch adss support for the objects, and updates the disovery
engines for their use.
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_attr.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_attr.c | 32 |
1 files changed, 13 insertions, 19 deletions
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c index 463104d96867..270a4c6cd3ac 100644 --- a/drivers/scsi/lpfc/lpfc_attr.c +++ b/drivers/scsi/lpfc/lpfc_attr.c | |||
@@ -2924,6 +2924,14 @@ LPFC_ATTR_R(enable_hba_heartbeat, 1, 0, 1, "Enable HBA Heartbeat."); | |||
2924 | */ | 2924 | */ |
2925 | LPFC_ATTR_R(enable_bg, 0, 0, 1, "Enable BlockGuard Support"); | 2925 | LPFC_ATTR_R(enable_bg, 0, 0, 1, "Enable BlockGuard Support"); |
2926 | 2926 | ||
2927 | /* | ||
2928 | # lpfc_enable_fip: When set, FIP is required to start discovery. If not | ||
2929 | # set, the driver will add an FCF record manually if the port has no | ||
2930 | # FCF records available and start discovery. | ||
2931 | # Value range is [0,1]. Default value is 1 (enabled) | ||
2932 | */ | ||
2933 | LPFC_ATTR_RW(enable_fip, 0, 0, 1, "Enable FIP Discovery"); | ||
2934 | |||
2927 | 2935 | ||
2928 | /* | 2936 | /* |
2929 | # lpfc_prot_mask: i | 2937 | # lpfc_prot_mask: i |
@@ -2990,6 +2998,7 @@ struct device_attribute *lpfc_hba_attrs[] = { | |||
2990 | &dev_attr_lpfc_peer_port_login, | 2998 | &dev_attr_lpfc_peer_port_login, |
2991 | &dev_attr_lpfc_nodev_tmo, | 2999 | &dev_attr_lpfc_nodev_tmo, |
2992 | &dev_attr_lpfc_devloss_tmo, | 3000 | &dev_attr_lpfc_devloss_tmo, |
3001 | &dev_attr_lpfc_enable_fip, | ||
2993 | &dev_attr_lpfc_fcp_class, | 3002 | &dev_attr_lpfc_fcp_class, |
2994 | &dev_attr_lpfc_use_adisc, | 3003 | &dev_attr_lpfc_use_adisc, |
2995 | &dev_attr_lpfc_ack0, | 3004 | &dev_attr_lpfc_ack0, |
@@ -3042,6 +3051,7 @@ struct device_attribute *lpfc_vport_attrs[] = { | |||
3042 | &dev_attr_lpfc_lun_queue_depth, | 3051 | &dev_attr_lpfc_lun_queue_depth, |
3043 | &dev_attr_lpfc_nodev_tmo, | 3052 | &dev_attr_lpfc_nodev_tmo, |
3044 | &dev_attr_lpfc_devloss_tmo, | 3053 | &dev_attr_lpfc_devloss_tmo, |
3054 | &dev_attr_lpfc_enable_fip, | ||
3045 | &dev_attr_lpfc_hba_queue_depth, | 3055 | &dev_attr_lpfc_hba_queue_depth, |
3046 | &dev_attr_lpfc_peer_port_login, | 3056 | &dev_attr_lpfc_peer_port_login, |
3047 | &dev_attr_lpfc_restrict_login, | 3057 | &dev_attr_lpfc_restrict_login, |
@@ -4167,26 +4177,10 @@ lpfc_get_cfgparam(struct lpfc_hba *phba) | |||
4167 | phba->cfg_soft_wwpn = 0L; | 4177 | phba->cfg_soft_wwpn = 0L; |
4168 | lpfc_sg_seg_cnt_init(phba, lpfc_sg_seg_cnt); | 4178 | lpfc_sg_seg_cnt_init(phba, lpfc_sg_seg_cnt); |
4169 | lpfc_prot_sg_seg_cnt_init(phba, lpfc_prot_sg_seg_cnt); | 4179 | lpfc_prot_sg_seg_cnt_init(phba, lpfc_prot_sg_seg_cnt); |
4170 | /* | ||
4171 | * Since the sg_tablesize is module parameter, the sg_dma_buf_size | ||
4172 | * used to create the sg_dma_buf_pool must be dynamically calculated. | ||
4173 | * 2 segments are added since the IOCB needs a command and response bde. | ||
4174 | */ | ||
4175 | phba->cfg_sg_dma_buf_size = sizeof(struct fcp_cmnd) + | ||
4176 | sizeof(struct fcp_rsp) + | ||
4177 | ((phba->cfg_sg_seg_cnt + 2) * sizeof(struct ulp_bde64)); | ||
4178 | |||
4179 | if (phba->cfg_enable_bg) { | ||
4180 | phba->cfg_sg_seg_cnt = LPFC_MAX_SG_SEG_CNT; | ||
4181 | phba->cfg_sg_dma_buf_size += | ||
4182 | phba->cfg_prot_sg_seg_cnt * sizeof(struct ulp_bde64); | ||
4183 | } | ||
4184 | |||
4185 | /* Also reinitialize the host templates with new values. */ | ||
4186 | lpfc_vport_template.sg_tablesize = phba->cfg_sg_seg_cnt; | ||
4187 | lpfc_template.sg_tablesize = phba->cfg_sg_seg_cnt; | ||
4188 | |||
4189 | lpfc_hba_queue_depth_init(phba, lpfc_hba_queue_depth); | 4180 | lpfc_hba_queue_depth_init(phba, lpfc_hba_queue_depth); |
4181 | lpfc_enable_fip_init(phba, lpfc_enable_fip); | ||
4182 | lpfc_hba_log_verbose_init(phba, lpfc_log_verbose); | ||
4183 | |||
4190 | return; | 4184 | return; |
4191 | } | 4185 | } |
4192 | 4186 | ||