diff options
author | James Smart <James.Smart@Emulex.Com> | 2007-08-02 11:10:31 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.localdomain> | 2007-08-01 13:24:10 -0400 |
commit | 51ef4c26891a734bc8416b639ad460a8162926bc (patch) | |
tree | 8279e11bf1a0a3200e8aa9bb3d956345ef73533c /drivers/scsi/lpfc/lpfc_attr.c | |
parent | 78b2d852a88cd2a55e3ab632109de045d58b83e3 (diff) |
[SCSI] lpfc 8.2.2 : Miscellaneous Bug Fixes
- Fix vport ndlp ref counting errors
- Fix use after free of ndlp structure
- Use the correct flag to check for LOADING setting.
- Fix driver unload bugs (related to shost references) after link down or rscn
- Fix up HBQ initialization
- Fix port_list locking around driver unload.
- Fix references to hostdata as a phba
- Fix GFFID type offset to work correctly with big endian structure.
- Only call pci_disable_msi if the pci_enable_msi succeeded
- Fix vport_delete wait/fail if in discovery
- Put a reference on the nameservers ndlp when performing CT traffic.
- Remove unbalanced hba unlock.
- Fix up HBQ processing
- Fix lpfc debugfs discovery trace output for ELS rsp cmpl
- Send ADISC when rpi is 0
- Stop FDISC retrying forever
- Unable to retrieve correct config parameter for vport
- Fix sli_validate_fcp_iocb, sli_sum_iocb, sli_abort_iocb to be vport-aware.
- Fix index-out-of-range error in iocb. Spotted by Coverity.
Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_attr.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_attr.c | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c index 0a7f06ba77c0..09743d7b6bab 100644 --- a/drivers/scsi/lpfc/lpfc_attr.c +++ b/drivers/scsi/lpfc/lpfc_attr.c | |||
@@ -1027,8 +1027,8 @@ static CLASS_DEVICE_ATTR(lpfc_soft_wwpn, S_IRUGO | S_IWUSR,\ | |||
1027 | static ssize_t | 1027 | static ssize_t |
1028 | lpfc_soft_wwnn_show(struct class_device *cdev, char *buf) | 1028 | lpfc_soft_wwnn_show(struct class_device *cdev, char *buf) |
1029 | { | 1029 | { |
1030 | struct Scsi_Host *host = class_to_shost(cdev); | 1030 | struct Scsi_Host *shost = class_to_shost(cdev); |
1031 | struct lpfc_hba *phba = (struct lpfc_hba*)host->hostdata; | 1031 | struct lpfc_hba *phba = ((struct lpfc_vport *)shost->hostdata)->phba; |
1032 | return snprintf(buf, PAGE_SIZE, "0x%llx\n", | 1032 | return snprintf(buf, PAGE_SIZE, "0x%llx\n", |
1033 | (unsigned long long)phba->cfg_soft_wwnn); | 1033 | (unsigned long long)phba->cfg_soft_wwnn); |
1034 | } | 1034 | } |
@@ -1037,8 +1037,8 @@ lpfc_soft_wwnn_show(struct class_device *cdev, char *buf) | |||
1037 | static ssize_t | 1037 | static ssize_t |
1038 | lpfc_soft_wwnn_store(struct class_device *cdev, const char *buf, size_t count) | 1038 | lpfc_soft_wwnn_store(struct class_device *cdev, const char *buf, size_t count) |
1039 | { | 1039 | { |
1040 | struct Scsi_Host *host = class_to_shost(cdev); | 1040 | struct Scsi_Host *shost = class_to_shost(cdev); |
1041 | struct lpfc_hba *phba = (struct lpfc_hba*)host->hostdata; | 1041 | struct lpfc_hba *phba = ((struct lpfc_vport *)shost->hostdata)->phba; |
1042 | unsigned int i, j, cnt=count; | 1042 | unsigned int i, j, cnt=count; |
1043 | u8 wwnn[8]; | 1043 | u8 wwnn[8]; |
1044 | 1044 | ||
@@ -1153,24 +1153,15 @@ lpfc_nodev_tmo_init(struct lpfc_vport *vport, int val) | |||
1153 | static void | 1153 | static void |
1154 | lpfc_update_rport_devloss_tmo(struct lpfc_vport *vport) | 1154 | lpfc_update_rport_devloss_tmo(struct lpfc_vport *vport) |
1155 | { | 1155 | { |
1156 | struct lpfc_vport **vports; | ||
1157 | struct Scsi_Host *shost; | 1156 | struct Scsi_Host *shost; |
1158 | struct lpfc_nodelist *ndlp; | 1157 | struct lpfc_nodelist *ndlp; |
1159 | int i; | ||
1160 | 1158 | ||
1161 | vports = lpfc_create_vport_work_array(vport->phba); | 1159 | shost = lpfc_shost_from_vport(vport); |
1162 | if (vports != NULL) | 1160 | spin_lock_irq(shost->host_lock); |
1163 | for(i = 0; i < LPFC_MAX_VPORTS && vports[i] != NULL; i++) { | 1161 | list_for_each_entry(ndlp, &vport->fc_nodes, nlp_listp) |
1164 | shost = lpfc_shost_from_vport(vports[i]); | 1162 | if (ndlp->rport) |
1165 | spin_lock_irq(shost->host_lock); | 1163 | ndlp->rport->dev_loss_tmo = vport->cfg_devloss_tmo; |
1166 | list_for_each_entry(ndlp, &vports[i]->fc_nodes, | 1164 | spin_unlock_irq(shost->host_lock); |
1167 | nlp_listp) | ||
1168 | if (ndlp->rport) | ||
1169 | ndlp->rport->dev_loss_tmo = | ||
1170 | vport->cfg_devloss_tmo; | ||
1171 | spin_unlock_irq(shost->host_lock); | ||
1172 | } | ||
1173 | lpfc_destroy_vport_work_array(vports); | ||
1174 | } | 1165 | } |
1175 | 1166 | ||
1176 | static int | 1167 | static int |