From: Hannes Reinecke Date: Fri, 19 Feb 2016 08:17:01 +0000 (+0100) Subject: scsi_dh_alua: call alua_rtpg() if stpg fails X-Git-Tag: v4.9.8~2329^2~105 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dd5cc4086bda53c2cd1a845c472816719d1dd50c;p=platform%2Fkernel%2Flinux-rpi3.git scsi_dh_alua: call alua_rtpg() if stpg fails If the call to SET TARGET PORT GROUPS fails we have no idea what state the array is left in, so we need to issue a call to REPORT TARGET PORT GROUPS in these cases. Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen --- diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c index 467c2cf..b2a2a77 100644 --- a/drivers/scsi/device_handler/scsi_dh_alua.c +++ b/drivers/scsi/device_handler/scsi_dh_alua.c @@ -674,6 +674,8 @@ static int alua_activate(struct scsi_device *sdev, h->flags |= ALUA_OPTIMIZE_STPG; err = alua_stpg(sdev, h); + if (err == SCSI_DH_RETRY) + err = alua_rtpg(sdev, h, 1); out: if (fn) fn(data, err);