Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935055AbcLOAuq (ORCPT ); Wed, 14 Dec 2016 19:50:46 -0500 Received: from p3plsmtps2ded02.prod.phx3.secureserver.net ([208.109.80.59]:43330 "EHLO p3plsmtps2ded02.prod.phx3.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934384AbcLOAuY (ORCPT ); Wed, 14 Dec 2016 19:50:24 -0500 x-originating-ip: 72.167.245.219 From: kys@exchange.microsoft.com To: linux-kernel@vger.kernel.org, devel@linuxdriverproject.org, ohering@suse.com, linux-scsi@vger.kernel.org, apw@canonical.com, vkuznets@redhat.com, jasowang@redhat.com, martin.petersen@oracle.com, hare@suse.de, James.Bottomley@HansenPartnership.com Cc: Long Li , "K. Y. Srinivasan" , Subject: [PATCH 5/6] storvsc: properly handle SRB_ERROR when sense message is present Date: Wed, 14 Dec 2016 18:46:02 -0800 Message-Id: <1481769963-2069-5-git-send-email-kys@exchange.microsoft.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1481769963-2069-1-git-send-email-kys@exchange.microsoft.com> References: <1481769928-2026-1-git-send-email-kys@exchange.microsoft.com> <1481769963-2069-1-git-send-email-kys@exchange.microsoft.com> Reply-To: kys@microsoft.com X-CMAE-Envelope: MS4wfBWl9j/taPYkj8DpCYX9tikBNW5sPNJeq08LqI6+V5UaYbO16cf1u2UfiEqLAqgH8lMksc5RJhGk4pWe1pUrH0HDIvPgvhlSAnaUqGCSI9veQjZ4WpSj 78zhvfjk+iBjIB9IDIlKaP580cmhwO1VSw+GuCcOmYmWim667QWCIKxOJhdm8RbtSeH4+WcD3vZcwuqqqjoiyEupM+K4Qoz0XSDYtqr4SD1Dk5amkYNWcmR8 KkmKidGHgkFwjJEBNX0IvIvMxPJys0XIqgS5WKoXOEk5xtwS8dbTVteKRSW/jcfcc7izLrwu+ExvV5TPta4YE9jGHGZdCSr/wQ2bgnBe4Y6XKywXFwnzk+yN hpJcVu69aGk8wy6d5vcM33u0IDtNJMMi8ygO0yb79nJIKyfNqKZMaFdiISlQQBI7222nBZ/5rr3g226UJ/Eerj7cP7+yKx4VFzXXE4OFjKtYAdRKaVywipsn OkaA9yLK0PIkn2dJDyjJZ+t92hNSvSqodJnggk6RpFBj2fXHCr3BvEe1+jXh1kkjI0hiuyRDl0fwexrWab0gUFg2nNWIf0KfjM5PmGZ10TrV+0Qez8pgh6Nd glWuBVGWDuGcR7xD3P4Hg0DA Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1161 Lines: 34 From: Long Li When sense message is present on error, we should pass along to the upper layer to decide how to deal with the error. This patch fixes connectivity issues with Fiber Channel devices. Signed-off-by: Long Li Reviewed-by: K. Y. Srinivasan Signed-off-by: K. Y. Srinivasan Cc: --- drivers/scsi/storvsc_drv.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c index 3209387..3c92dc2 100644 --- a/drivers/scsi/storvsc_drv.c +++ b/drivers/scsi/storvsc_drv.c @@ -925,6 +925,13 @@ static void storvsc_handle_error(struct vmscsi_request *vm_srb, switch (SRB_STATUS(vm_srb->srb_status)) { case SRB_STATUS_ERROR: /* + * Let upper layer deal with error when + * sense message is present. + */ + + if (vm_srb->srb_status & SRB_STATUS_AUTOSENSE_VALID) + break; + /* * If there is an error; offline the device since all * error recovery strategies would have already been * deployed on the host side. However, if the command -- 1.7.4.1