All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Shergill, Gurinder" <gurinder.shergill@hp.com>
To: "Stephen M. Cameron" <scameron@beardog.cce.hp.com>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Gates, Matt" <matthew.gates@hp.com>,
	"stephenmcameron@gmail.com" <stephenmcameron@gmail.com>,
	"thenzl@redhat.com" <thenzl@redhat.com>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"mikem@beardog.cce.hp.com" <mikem@beardog.cce.hp.com>,
	"james.bottomley@hansenpartnership.com" 
	<james.bottomley@hansenpartnership.com>
Subject: RE: [PATCH 06/17] hpsa: retry driver initiated commands on busy status
Date: Fri, 20 Apr 2012 23:51:16 +0100	[thread overview]
Message-ID: <C508F8684F59FF47960D08B35B998FFE6563003D68@GVW1341EXA.americas.hpqcorp.net> (raw)
In-Reply-To: <20120420150646.10596.37875.stgit@beardog.cce.hp.com>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 2674 bytes --]


| -----Original Message-----
| From: linux-scsi-owner@vger.kernel.org [mailto:linux-scsi-
| owner@vger.kernel.org] On Behalf Of Stephen M. Cameron
| Sent: Friday, April 20, 2012 8:07 AM
| To: james.bottomley@hansenpartnership.com
| Cc: linux-scsi@vger.kernel.org; linux-kernel@vger.kernel.org; Gates, Matt;
| stephenmcameron@gmail.com; thenzl@redhat.com; akpm@linux-foundation.org;
| mikem@beardog.cce.hp.com
| Subject: [PATCH 06/17] hpsa: retry driver initiated commands on busy
| status
| 
| From: Matt Bondurant <Matthew.dav.bondurant@hp.com>
| 
| In shared SAS configurations we might get a busy status during driver
| initiated commands (e.g. during rescan for devices).  We should retry the
| command in such cases rather than giving up.

This may or may not apply to your situation. Some targets/disks return TASK SET FULL when they can't accept any new SCSI commands. If that applies to your situation, it may make sense to also check for SCSI status of SAM_STAT_TASK_SET_FULL.

Sunny

| 
| Signed-off-by: Matt Bondurant <Matthew.dav.bondurant@hp.com>
| Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
| ---
|  drivers/scsi/hpsa.c |   12 +++++++++++-
|  1 files changed, 11 insertions(+), 1 deletions(-)
| 
| diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index
| fcb9fb2..7355891 100644
| --- a/drivers/scsi/hpsa.c
| +++ b/drivers/scsi/hpsa.c
| @@ -234,6 +234,15 @@ static int check_for_unit_attention(struct ctlr_info
| *h,
|  	return 1;
|  }
| 
| +static int check_for_busy(struct ctlr_info *h, struct CommandList *c) {
| +	if (c->err_info->CommandStatus != CMD_TARGET_STATUS ||
| +		c->err_info->ScsiStatus != SAM_STAT_BUSY)
| +		return 0;
| +	dev_warn(&h->pdev->dev, HPSA "device busy");
| +	return 1;
| +}
| +
|  static ssize_t host_store_rescan(struct device *dev,
|  				 struct device_attribute *attr,
|  				 const char *buf, size_t count)
| @@ -1379,7 +1388,8 @@ static void
| hpsa_scsi_do_simple_cmd_with_retry(struct ctlr_info *h,
|  		memset(c->err_info, 0, sizeof(*c->err_info));
|  		hpsa_scsi_do_simple_cmd_core(h, c);
|  		retry_count++;
| -	} while (check_for_unit_attention(h, c) && retry_count <= 3);
| +	} while ((check_for_unit_attention(h, c) ||
| +			check_for_busy(h, c)) && retry_count <= 3);
|  	hpsa_pci_unmap(h->pdev, c, 1, data_direction);  }
| 
| 
| --
| To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
| the body of a message to majordomo@vger.kernel.org More majordomo info at
| http://vger.kernel.org/majordomo-info.html
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

WARNING: multiple messages have this Message-ID (diff)
From: "Shergill, Gurinder" <gurinder.shergill@hp.com>
To: "Stephen M. Cameron" <scameron@beardog.cce.hp.com>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Gates, Matt" <matthew.gates@hp.com>,
	"stephenmcameron@gmail.com" <stephenmcameron@gmail.com>,
	"thenzl@redhat.com" <thenzl@redhat.com>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"mikem@beardog.cce.hp.com" <mikem@beardog.cce.hp.com>,
	"james.bottomley@hansenpartnership.com"
	<james.bottomley@hansenpartnership.com>
Subject: RE: [PATCH 06/17] hpsa: retry driver initiated commands on busy status
Date: Fri, 20 Apr 2012 23:51:16 +0100	[thread overview]
Message-ID: <C508F8684F59FF47960D08B35B998FFE6563003D68@GVW1341EXA.americas.hpqcorp.net> (raw)
In-Reply-To: <20120420150646.10596.37875.stgit@beardog.cce.hp.com>


| -----Original Message-----
| From: linux-scsi-owner@vger.kernel.org [mailto:linux-scsi-
| owner@vger.kernel.org] On Behalf Of Stephen M. Cameron
| Sent: Friday, April 20, 2012 8:07 AM
| To: james.bottomley@hansenpartnership.com
| Cc: linux-scsi@vger.kernel.org; linux-kernel@vger.kernel.org; Gates, Matt;
| stephenmcameron@gmail.com; thenzl@redhat.com; akpm@linux-foundation.org;
| mikem@beardog.cce.hp.com
| Subject: [PATCH 06/17] hpsa: retry driver initiated commands on busy
| status
| 
| From: Matt Bondurant <Matthew.dav.bondurant@hp.com>
| 
| In shared SAS configurations we might get a busy status during driver
| initiated commands (e.g. during rescan for devices).  We should retry the
| command in such cases rather than giving up.

This may or may not apply to your situation. Some targets/disks return TASK SET FULL when they can't accept any new SCSI commands. If that applies to your situation, it may make sense to also check for SCSI status of SAM_STAT_TASK_SET_FULL.

Sunny

| 
| Signed-off-by: Matt Bondurant <Matthew.dav.bondurant@hp.com>
| Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
| ---
|  drivers/scsi/hpsa.c |   12 +++++++++++-
|  1 files changed, 11 insertions(+), 1 deletions(-)
| 
| diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index
| fcb9fb2..7355891 100644
| --- a/drivers/scsi/hpsa.c
| +++ b/drivers/scsi/hpsa.c
| @@ -234,6 +234,15 @@ static int check_for_unit_attention(struct ctlr_info
| *h,
|  	return 1;
|  }
| 
| +static int check_for_busy(struct ctlr_info *h, struct CommandList *c) {
| +	if (c->err_info->CommandStatus != CMD_TARGET_STATUS ||
| +		c->err_info->ScsiStatus != SAM_STAT_BUSY)
| +		return 0;
| +	dev_warn(&h->pdev->dev, HPSA "device busy");
| +	return 1;
| +}
| +
|  static ssize_t host_store_rescan(struct device *dev,
|  				 struct device_attribute *attr,
|  				 const char *buf, size_t count)
| @@ -1379,7 +1388,8 @@ static void
| hpsa_scsi_do_simple_cmd_with_retry(struct ctlr_info *h,
|  		memset(c->err_info, 0, sizeof(*c->err_info));
|  		hpsa_scsi_do_simple_cmd_core(h, c);
|  		retry_count++;
| -	} while (check_for_unit_attention(h, c) && retry_count <= 3);
| +	} while ((check_for_unit_attention(h, c) ||
| +			check_for_busy(h, c)) && retry_count <= 3);
|  	hpsa_pci_unmap(h->pdev, c, 1, data_direction);  }
| 
| 
| --
| To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
| the body of a message to majordomo@vger.kernel.org More majordomo info at
| http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2012-04-20 22:51 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-20 15:06 [PATCH 00/17] hpsa updates for April, 2012 Stephen M. Cameron
2012-04-20 15:06 ` [PATCH 01/17] hpsa: call pci_disable_device on driver unload Stephen M. Cameron
2012-04-20 15:06 ` [PATCH 02/17] hpsa: do not skip disabled devices Stephen M. Cameron
2012-04-20 15:06 ` [PATCH 03/17] hpsa: enable bus master bit after pci_enable_device Stephen M. Cameron
2012-04-20 18:41   ` Khalid Aziz
2012-04-20 20:06     ` scameron
2012-04-20 15:06 ` [PATCH 04/17] hpsa: suppress excessively chatty error messages Stephen M. Cameron
2012-04-20 22:49   ` Shergill, Gurinder
2012-04-20 22:49     ` Shergill, Gurinder
2012-04-20 15:06 ` [PATCH 05/17] hpsa: do not read from controller unnecessarily in completion code Stephen M. Cameron
2012-04-20 15:06 ` [PATCH 06/17] hpsa: retry driver initiated commands on busy status Stephen M. Cameron
2012-04-20 22:51   ` Shergill, Gurinder [this message]
2012-04-20 22:51     ` Shergill, Gurinder
2012-04-20 15:06 ` [PATCH 07/17] hpsa: remove unused parameter from finish_cmd Stephen M. Cameron
2012-04-20 15:07 ` [PATCH 08/17] hpsa: add abort error handler function Stephen M. Cameron
2012-04-20 15:07 ` [PATCH 09/17] hpsa: do aborts two ways Stephen M. Cameron
2012-04-20 15:07 ` [PATCH 10/17] hpsa: factor out tail calls to next_command() in process_(non)indexed_cmd() Stephen M. Cameron
2012-04-20 15:07 ` [PATCH 11/17] hpsa: use multiple reply queues Stephen M. Cameron
2012-04-20 15:07 ` [PATCH 12/17] hpsa: refine interrupt handler locking for greater concurrency Stephen M. Cameron
2012-04-20 15:07 ` [PATCH 13/17] hpsa: factor out hpsa_free_irqs_and_disable_msix Stephen M. Cameron
2012-04-20 15:07 ` [PATCH 14/17] hpsa: use new IS_ENABLED macro Stephen M. Cameron
2012-04-22 18:12   ` Paul Gortmaker
2012-04-22 18:12     ` Paul Gortmaker
2012-04-23  2:20     ` Stephen Cameron
2012-04-23  2:20       ` Stephen Cameron
2012-04-23 13:56       ` Paul Gortmaker
2012-04-23 13:56         ` Paul Gortmaker
2012-04-23 14:56         ` James Bottomley
2012-04-24  1:43           ` Paul Gortmaker
2012-04-24  8:25             ` James Bottomley
2012-04-24 15:15               ` Paul Gortmaker
2012-04-24 15:15                 ` Paul Gortmaker
2012-04-25 15:11                 ` scameron
2012-04-20 15:07 ` [PATCH 15/17] hpsa: add new RAID level "1(ADM)" Stephen M. Cameron
2012-04-20 15:07 ` [PATCH 16/17] hpsa: removed unused member maxQsinceinit Stephen M. Cameron
2012-04-20 15:07 ` [PATCH 17/17] hpsa: dial down lockup detection during firmware flash Stephen M. Cameron
2012-05-01 16:42 [PATCH 00/17] hpsa: resend updates for April, 2012 Stephen M. Cameron
2012-05-01 16:42 ` [PATCH 06/17] hpsa: retry driver initiated commands on busy status Stephen M. Cameron

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=C508F8684F59FF47960D08B35B998FFE6563003D68@GVW1341EXA.americas.hpqcorp.net \
    --to=gurinder.shergill@hp.com \
    --cc=akpm@linux-foundation.org \
    --cc=james.bottomley@hansenpartnership.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=matthew.gates@hp.com \
    --cc=mikem@beardog.cce.hp.com \
    --cc=scameron@beardog.cce.hp.com \
    --cc=stephenmcameron@gmail.com \
    --cc=thenzl@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.