diff options
author | James Smart <james.smart@emulex.com> | 2009-12-21 17:02:51 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-01-04 12:39:45 -0500 |
commit | aacc20e35edfb86cf66c5ee8d9f3d06a98362fd1 (patch) | |
tree | feced0764c142d9c7de4f94cd2724bf54e97dfbe /drivers/scsi/lpfc | |
parent | def9c7a994f194377a23e687e6fd39b46c3ce631 (diff) |
[SCSI] lpfc 8.3.7: Fix SCSI protocol related errors.
Fix SCSI protocol related errors:
- Avoid I/O failures during EEH and HBA/CNA reset by correcting when
we block the targets on the adapter.
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/lpfc')
-rwxr-xr-x | drivers/scsi/lpfc/lpfc_hbadisc.c | 4 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_init.c | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c index f40b9609f6e4..1c2737293eb5 100755 --- a/drivers/scsi/lpfc/lpfc_hbadisc.c +++ b/drivers/scsi/lpfc/lpfc_hbadisc.c | |||
@@ -747,6 +747,10 @@ lpfc_linkdown(struct lpfc_hba *phba) | |||
747 | 747 | ||
748 | if (phba->link_state == LPFC_LINK_DOWN) | 748 | if (phba->link_state == LPFC_LINK_DOWN) |
749 | return 0; | 749 | return 0; |
750 | |||
751 | /* Block all SCSI stack I/Os */ | ||
752 | lpfc_scsi_dev_block(phba); | ||
753 | |||
750 | spin_lock_irq(&phba->hbalock); | 754 | spin_lock_irq(&phba->hbalock); |
751 | phba->fcf.fcf_flag &= ~(FCF_AVAILABLE | FCF_DISCOVERED); | 755 | phba->fcf.fcf_flag &= ~(FCF_AVAILABLE | FCF_DISCOVERED); |
752 | if (phba->link_state > LPFC_LINK_DOWN) { | 756 | if (phba->link_state > LPFC_LINK_DOWN) { |
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 7083ef3b3878..974ea6d85efe 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c | |||
@@ -7226,8 +7226,6 @@ lpfc_prep_dev_for_perm_failure(struct lpfc_hba *phba) | |||
7226 | { | 7226 | { |
7227 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 7227 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, |
7228 | "2711 PCI channel permanent disable for failure\n"); | 7228 | "2711 PCI channel permanent disable for failure\n"); |
7229 | /* Block all SCSI devices' I/Os on the host */ | ||
7230 | lpfc_scsi_dev_block(phba); | ||
7231 | /* Clean up all driver's outstanding SCSI I/Os */ | 7229 | /* Clean up all driver's outstanding SCSI I/Os */ |
7232 | lpfc_sli_flush_fcp_rings(phba); | 7230 | lpfc_sli_flush_fcp_rings(phba); |
7233 | } | 7231 | } |
@@ -7256,6 +7254,9 @@ lpfc_io_error_detected_s3(struct pci_dev *pdev, pci_channel_state_t state) | |||
7256 | struct Scsi_Host *shost = pci_get_drvdata(pdev); | 7254 | struct Scsi_Host *shost = pci_get_drvdata(pdev); |
7257 | struct lpfc_hba *phba = ((struct lpfc_vport *)shost->hostdata)->phba; | 7255 | struct lpfc_hba *phba = ((struct lpfc_vport *)shost->hostdata)->phba; |
7258 | 7256 | ||
7257 | /* Block all SCSI devices' I/Os on the host */ | ||
7258 | lpfc_scsi_dev_block(phba); | ||
7259 | |||
7259 | switch (state) { | 7260 | switch (state) { |
7260 | case pci_channel_io_normal: | 7261 | case pci_channel_io_normal: |
7261 | /* Non-fatal error, prepare for recovery */ | 7262 | /* Non-fatal error, prepare for recovery */ |