Re: [PATCH v2 8/8] lpfc: Added support to handle marginal state

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/28/20 6:50 AM, Muneendra wrote:
Added additional check to set SCMD_NORETRIES_ABORT bit in scmd->state
if port state is marginal prior to initiating io to the port.

Signed-off-by: Muneendra <muneendra.kumar@xxxxxxxxxxxx>

---
v2:
New patch
---
  drivers/scsi/lpfc/lpfc_scsi.c | 6 ++++++
  1 file changed, 6 insertions(+)

diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
index 5e802c8b22a9..1198351d34a8 100644
--- a/drivers/scsi/lpfc/lpfc_scsi.c
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -4526,6 +4526,12 @@ lpfc_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *cmnd)
  		cmnd->result = err;
  		goto out_fail_command;
  	}
+
+	/*
+	 * If port state is marginal
+	 * Set the SCMD_NORETRIES_ABORT bit in scmd->state
+	 */
+	fc_rport_chkmarginal_set_noretries(rport, cmnd);
  	ndlp = rdata->pnode;
if ((scsi_get_prot_op(cmnd) != SCSI_PROT_NORMAL) &&

This really should be moved into the transport class; fc_block_rport() would be an ideal place for it.

Cheers,

Hannes
--
Dr. Hannes Reinecke		           Kernel Storage Architect
hare@xxxxxxx			                  +49 911 74053 688
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), GF: Felix Imendörffer



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux