linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robert Jennings <rcj@linux.vnet.ibm.com>
To: Brian King <brking@linux.vnet.ibm.com>
Cc: James.Bottomley@HansenPartnership.com, linux-scsi@vger.kernel.org
Subject: Re: [PATCH 1/1] ibmvfc: Fix for offlining devices during error recovery
Date: Tue, 3 Sep 2013 10:55:22 -0500	[thread overview]
Message-ID: <20130903155522.GA3180@linux.vnet.ibm.com> (raw)
In-Reply-To: <201308201608.r7KG8hCR015363@d01av05.pok.ibm.com>

* Brian King (brking@linux.vnet.ibm.com) wrote:
> 
> This fixes an issue seen with devices getting marked offline
> in a scenario where a VIOS was getting rebooted while a
> client VFC adapter is in SCSI EH and prevents unnecessary
> EH escalation in some scenarios.
> 
> Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Acked-by: Robert Jennings <rcj@linux.vnet.ibm.com>
> ---
> 
>  drivers/scsi/ibmvscsi/ibmvfc.c |   15 +++++++++++++--
>  1 file changed, 13 insertions(+), 2 deletions(-)
> 
> diff -puN drivers/scsi/ibmvscsi/ibmvfc.c~ibmvfc_abort_during_reset drivers/scsi/ibmvscsi/ibmvfc.c
> --- linux/drivers/scsi/ibmvscsi/ibmvfc.c~ibmvfc_abort_during_reset	2013-08-06 15:10:04.000000000 -0500
> +++ linux-bjking1/drivers/scsi/ibmvscsi/ibmvfc.c	2013-08-06 15:10:04.000000000 -0500
> @@ -2208,7 +2208,10 @@ static int ibmvfc_cancel_all(struct scsi
> 
>  	if (rsp_rc != 0) {
>  		sdev_printk(KERN_ERR, sdev, "Failed to send cancel event. rc=%d\n", rsp_rc);
> -		return -EIO;
> +		/* If failure is received, the host adapter is most likely going
> +		 through reset, return success so the caller will wait for the command
> +		 being cancelled to get returned */
> +		return 0;
>  	}
> 
>  	sdev_printk(KERN_INFO, sdev, "Cancelling outstanding commands.\n");
> @@ -2221,7 +2224,15 @@ static int ibmvfc_cancel_all(struct scsi
> 
>  	if (status != IBMVFC_MAD_SUCCESS) {
>  		sdev_printk(KERN_WARNING, sdev, "Cancel failed with rc=%x\n", status);
> -		return -EIO;
> +		switch (status) {
> +		case IBMVFC_MAD_DRIVER_FAILED:
> +		case IBMVFC_MAD_CRQ_ERROR:
> +			/* Host adapter most likely going through reset, return success to
> +			 the caller will wait for the command being cancelled to get returned */
> +			return 0;
> +		default:
> +			return -EIO;
> +		};
>  	}
> 
>  	sdev_printk(KERN_INFO, sdev, "Successfully cancelled outstanding commands\n");
> _


  reply	other threads:[~2013-09-03 15:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-20 16:08 [PATCH 1/1] ibmvfc: Fix for offlining devices during error recovery Brian King
2013-09-03 15:55 ` Robert Jennings [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-05-15 15:24 Brian King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130903155522.GA3180@linux.vnet.ibm.com \
    --to=rcj@linux.vnet.ibm.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=brking@linux.vnet.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).