From 9122e991cebb90a7225109ed7627950f485c5f58 Mon Sep 17 00:00:00 2001 From: Jitendra Bhivare Date: Fri, 19 Aug 2016 15:20:11 +0530 Subject: scsi: be2iscsi: Fix checks for HBA in error state Save ue_detected and fw_timeout errors in state field of beiscsi_hba. BEISCSI_HBA_RUNNING BEISCSI_HBA_LINK_UP BEISCSI_HBA_BOOT_FOUND BEISCSI_HBA_PCI_ERR BEISCSI_HBA_FW_TIMEOUT BEISCSI_HBA_IN_UE Make sure no PCI transaction happens once in error state. Add checks in IO path to detect HBA in error. Skip hwi_purge_eq step which can't be done in error state. Signed-off-by: Jitendra Bhivare Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen --- drivers/scsi/be2iscsi/be_mgmt.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'drivers/scsi/be2iscsi/be_mgmt.c') diff --git a/drivers/scsi/be2iscsi/be_mgmt.c b/drivers/scsi/be2iscsi/be_mgmt.c index 8069ef0ce533..4f2194e324ae 100644 --- a/drivers/scsi/be2iscsi/be_mgmt.c +++ b/drivers/scsi/be2iscsi/be_mgmt.c @@ -108,9 +108,6 @@ void beiscsi_ue_detect(struct beiscsi_hba *phba) uint32_t ue_mask_hi = 0, ue_mask_lo = 0; uint8_t i = 0; - if (phba->ue_detected) - return; - pci_read_config_dword(phba->pcidev, PCICFG_UE_STATUS_LOW, &ue_lo); pci_read_config_dword(phba->pcidev, @@ -128,7 +125,7 @@ void beiscsi_ue_detect(struct beiscsi_hba *phba) if (ue_lo || ue_hi) { - phba->ue_detected = true; + set_bit(BEISCSI_HBA_IN_UE, &phba->state); beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_CONFIG | BEISCSI_LOG_MBOX, "BG_%d : Error detected on the adapter\n"); -- cgit v1.2.1