diff options
author | Jitendra Bhivare <jitendra.bhivare@broadcom.com> | 2016-08-19 11:50:18 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-08-24 04:42:44 +0200 |
commit | d1d5ca887c0ee60ec6c6e42db0c1073155a09d32 (patch) | |
tree | c0c8d6ebf44cf776fb5beb5c351068e8ae6890bf /drivers/scsi/be2iscsi/be_iscsi.c | |
parent | scsi: be2iscsi: Add V1 of EPFW cleanup IOCTL (diff) | |
download | linux-d1d5ca887c0ee60ec6c6e42db0c1073155a09d32.tar.xz linux-d1d5ca887c0ee60ec6c6e42db0c1073155a09d32.zip |
scsi: be2iscsi: Add TPE recovery feature
After UE is detected, check for recoverable error by reading
SLIPORT SEMAPHORE register. If transient parity error i.e. 0xExxx
then schedule recovery work on driver wq.
FLag this error to prevent any transactions for the duration of ue2rp to
restart polling. After that, if FW becomes ready then recover port.
Wake up processes in wq before going offline.
Wait for process to execute before cleaning up.
Signed-off-by: Jitendra Bhivare <jitendra.bhivare@broadcom.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/be2iscsi/be_iscsi.c')
-rw-r--r-- | drivers/scsi/be2iscsi/be_iscsi.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/scsi/be2iscsi/be_iscsi.c b/drivers/scsi/be2iscsi/be_iscsi.c index 677491a4b0b4..35f7d3aab366 100644 --- a/drivers/scsi/be2iscsi/be_iscsi.c +++ b/drivers/scsi/be2iscsi/be_iscsi.c @@ -58,7 +58,7 @@ struct iscsi_cls_session *beiscsi_session_create(struct iscsi_endpoint *ep, beiscsi_ep = ep->dd_data; phba = beiscsi_ep->phba; - if (beiscsi_hba_in_error(phba)) { + if (!beiscsi_hba_is_online(phba)) { beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG, "BS_%d : HBA in error 0x%lx\n", phba->state); return NULL; @@ -444,7 +444,7 @@ int beiscsi_iface_set_param(struct Scsi_Host *shost, uint32_t rm_len = dt_len; int ret; - if (beiscsi_hba_in_error(phba)) { + if (!beiscsi_hba_is_online(phba)) { beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG, "BS_%d : HBA in error 0x%lx\n", phba->state); return -EBUSY; @@ -587,7 +587,7 @@ int beiscsi_iface_get_param(struct iscsi_iface *iface, if (param_type != ISCSI_NET_PARAM) return 0; - if (beiscsi_hba_in_error(phba)) { + if (!beiscsi_hba_is_online(phba)) { beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG, "BS_%d : HBA in error 0x%lx\n", phba->state); return -EBUSY; @@ -797,7 +797,7 @@ int beiscsi_get_host_param(struct Scsi_Host *shost, struct beiscsi_hba *phba = iscsi_host_priv(shost); int status = 0; - if (beiscsi_hba_in_error(phba)) { + if (!beiscsi_hba_is_online(phba)) { beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG, "BS_%d : HBA in error 0x%lx\n", phba->state); return -EBUSY; @@ -945,7 +945,7 @@ int beiscsi_conn_start(struct iscsi_cls_conn *cls_conn) phba = ((struct beiscsi_conn *)conn->dd_data)->phba; - if (beiscsi_hba_in_error(phba)) { + if (!beiscsi_hba_is_online(phba)) { beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG, "BS_%d : HBA in error 0x%lx\n", phba->state); return -EBUSY; @@ -1175,7 +1175,7 @@ beiscsi_ep_connect(struct Scsi_Host *shost, struct sockaddr *dst_addr, } phba = iscsi_host_priv(shost); - if (beiscsi_hba_in_error(phba)) { + if (!beiscsi_hba_is_online(phba)) { ret = -EIO; beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG, "BS_%d : HBA in error 0x%lx\n", phba->state); @@ -1335,7 +1335,7 @@ void beiscsi_ep_disconnect(struct iscsi_endpoint *ep) tcp_upload_flag = CONNECTION_UPLOAD_ABORT; } - if (beiscsi_hba_in_error(phba)) { + if (!beiscsi_hba_is_online(phba)) { beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG, "BS_%d : HBA in error 0x%lx\n", phba->state); goto free_ep; |