lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <C508F8684F59FF47960D08B35B998FFE6563003D68@GVW1341EXA.americas.hpqcorp.net>
Date:	Fri, 20 Apr 2012 23:51:16 +0100
From:	"Shergill, Gurinder" <gurinder.shergill@...com>
To:	"Stephen M. Cameron" <scameron@...rdog.cce.hp.com>
CC:	"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"Gates, Matt" <matthew.gates@...com>,
	"stephenmcameron@...il.com" <stephenmcameron@...il.com>,
	"thenzl@...hat.com" <thenzl@...hat.com>,
	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
	"mikem@...rdog.cce.hp.com" <mikem@...rdog.cce.hp.com>,
	"james.bottomley@...senpartnership.com" 
	<james.bottomley@...senpartnership.com>
Subject: RE: [PATCH 06/17] hpsa: retry driver initiated commands on busy
 status


| -----Original Message-----
| From: linux-scsi-owner@...r.kernel.org [mailto:linux-scsi-
| owner@...r.kernel.org] On Behalf Of Stephen M. Cameron
| Sent: Friday, April 20, 2012 8:07 AM
| To: james.bottomley@...senpartnership.com
| Cc: linux-scsi@...r.kernel.org; linux-kernel@...r.kernel.org; Gates, Matt;
| stephenmcameron@...il.com; thenzl@...hat.com; akpm@...ux-foundation.org;
| mikem@...rdog.cce.hp.com
| Subject: [PATCH 06/17] hpsa: retry driver initiated commands on busy
| status
| 
| From: Matt Bondurant <Matthew.dav.bondurant@...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@...com>
| Signed-off-by: Stephen M. Cameron <scameron@...rdog.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@...r.kernel.org More majordomo info at
| http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ