From: Chandra Seetharaman Date: Fri, 22 Aug 2008 06:12:40 +0000 (-0700) Subject: [SCSI] scsi_dh: Initialize path state to be passive when path is not owned X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5a36756b8b3d7178d9c101d1e2a7a83fd7b17706;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git [SCSI] scsi_dh: Initialize path state to be passive when path is not owned Set the path state to be passive when we learn that the controller does not own the path to the LUN. This will avoid sending even a single i/o thru the passive path at the probe time. Signed-off-by: Chandra Seetharaman Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/device_handler/scsi_dh_rdac.c b/drivers/scsi/device_handler/scsi_dh_rdac.c index a43c3ed4df28..3d50cabca7ee 100644 --- a/drivers/scsi/device_handler/scsi_dh_rdac.c +++ b/drivers/scsi/device_handler/scsi_dh_rdac.c @@ -401,6 +401,9 @@ static int check_ownership(struct scsi_device *sdev, struct rdac_dh_data *h) } } + if (h->lun_state == RDAC_LUN_UNOWNED) + h->state = RDAC_STATE_PASSIVE; + return err; }