diff options
author | James Smart <james.smart@emulex.com> | 2013-04-17 20:18:39 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-05-02 16:06:38 -0400 |
commit | a88dbb6a960675f15fa02b4f057388b2b4bc8286 (patch) | |
tree | 40c6a497cf5b718fd90fc4f6c8dfa6ac086a9ed6 /drivers/scsi | |
parent | 711ea882a0ce853521cc444ce07c167992c44d0f (diff) |
[SCSI] lpfc 8.3.39: Fixed not returning FAILED status when SCSI invoking host reset handler failed
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_crtn.h | 1 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_init.c | 2 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_scsi.c | 14 |
3 files changed, 13 insertions, 4 deletions
diff --git a/drivers/scsi/lpfc/lpfc_crtn.h b/drivers/scsi/lpfc/lpfc_crtn.h index 7631893ae005..d41456e5f814 100644 --- a/drivers/scsi/lpfc/lpfc_crtn.h +++ b/drivers/scsi/lpfc/lpfc_crtn.h | |||
@@ -470,3 +470,4 @@ int lpfc_sli4_xri_sgl_update(struct lpfc_hba *); | |||
470 | void lpfc_free_sgl_list(struct lpfc_hba *, struct list_head *); | 470 | void lpfc_free_sgl_list(struct lpfc_hba *, struct list_head *); |
471 | uint32_t lpfc_sli_port_speed_get(struct lpfc_hba *); | 471 | uint32_t lpfc_sli_port_speed_get(struct lpfc_hba *); |
472 | int lpfc_sli4_request_firmware_update(struct lpfc_hba *, uint8_t); | 472 | int lpfc_sli4_request_firmware_update(struct lpfc_hba *, uint8_t); |
473 | void lpfc_sli4_offline_eratt(struct lpfc_hba *); | ||
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 207d3ec05b83..291c46aa9846 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c | |||
@@ -1202,7 +1202,7 @@ lpfc_offline_eratt(struct lpfc_hba *phba) | |||
1202 | * This routine is called to bring a SLI4 HBA offline when HBA hardware error | 1202 | * This routine is called to bring a SLI4 HBA offline when HBA hardware error |
1203 | * other than Port Error 6 has been detected. | 1203 | * other than Port Error 6 has been detected. |
1204 | **/ | 1204 | **/ |
1205 | static void | 1205 | void |
1206 | lpfc_sli4_offline_eratt(struct lpfc_hba *phba) | 1206 | lpfc_sli4_offline_eratt(struct lpfc_hba *phba) |
1207 | { | 1207 | { |
1208 | lpfc_offline_prep(phba, LPFC_MBX_NO_WAIT); | 1208 | lpfc_offline_prep(phba, LPFC_MBX_NO_WAIT); |
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index 44995de74a62..959067c71060 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c | |||
@@ -5376,16 +5376,24 @@ lpfc_host_reset_handler(struct scsi_cmnd *cmnd) | |||
5376 | struct lpfc_hba *phba = vport->phba; | 5376 | struct lpfc_hba *phba = vport->phba; |
5377 | int rc, ret = SUCCESS; | 5377 | int rc, ret = SUCCESS; |
5378 | 5378 | ||
5379 | lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP, | ||
5380 | "3172 SCSI layer issued Host Reset Data:\n"); | ||
5381 | |||
5379 | lpfc_offline_prep(phba, LPFC_MBX_WAIT); | 5382 | lpfc_offline_prep(phba, LPFC_MBX_WAIT); |
5380 | lpfc_offline(phba); | 5383 | lpfc_offline(phba); |
5381 | rc = lpfc_sli_brdrestart(phba); | 5384 | rc = lpfc_sli_brdrestart(phba); |
5382 | if (rc) | 5385 | if (rc) |
5383 | ret = FAILED; | 5386 | ret = FAILED; |
5384 | lpfc_online(phba); | 5387 | rc = lpfc_online(phba); |
5388 | if (rc) | ||
5389 | ret = FAILED; | ||
5385 | lpfc_unblock_mgmt_io(phba); | 5390 | lpfc_unblock_mgmt_io(phba); |
5386 | 5391 | ||
5387 | lpfc_printf_log(phba, KERN_ERR, LOG_FCP, | 5392 | if (ret == FAILED) { |
5388 | "3172 SCSI layer issued Host Reset Data: x%x\n", ret); | 5393 | lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP, |
5394 | "3323 Failed host reset, bring it offline\n"); | ||
5395 | lpfc_sli4_offline_eratt(phba); | ||
5396 | } | ||
5389 | return ret; | 5397 | return ret; |
5390 | } | 5398 | } |
5391 | 5399 | ||