* [PATCH 1/3] hpsa: Use LUN reset instead of target reset
2012-07-26 16:34 [PATCH 0/3] hpsa patches for July 2012 Stephen M. Cameron
@ 2012-07-26 16:34 ` Stephen M. Cameron
2012-07-26 16:34 ` [PATCH 2/3] hpsa: fix incorrect abort diagnostic message Stephen M. Cameron
2012-07-26 16:34 ` [PATCH 3/3] hpsa: use ioremap_nocache instead of ioremap Stephen M. Cameron
2 siblings, 0 replies; 4+ messages in thread
From: Stephen M. Cameron @ 2012-07-26 16:34 UTC (permalink / raw)
To: james.bottomley
Cc: linux-scsi, linux-kernel, stephenmcameron, thenzl, akpm, mikem
From: Stephen M. Cameron <scameron@beardog.cce.hp.com>
It turns out Smart Array logical drives do not support target
reset and when the target reset fails, the logical drive will
be taken off line. Symptoms look like this:
hpsa 0000:03:00.0: Abort request on C1:B0:T0:L0
hpsa 0000:03:00.0: resetting device 1:0:0:0
hpsa 0000:03:00.0: cp ffff880037c56000 is reported invalid (probably means target device no longer present)
hpsa 0000:03:00.0: resetting device failed.
sd 1:0:0:0: Device offlined - not ready after error recovery
sd 1:0:0:0: rejecting I/O to offline device
EXT3-fs error (device sdb1): read_block_bitmap:
LUN reset is supported though, and is what we should be using.
Target reset is also disruptive in shared SAS situations,
for example, an external MSA1210m which does support target
reset attached to Smart Arrays in multiple hosts -- a target
reset from one host is disruptive to other hosts as all LUNs
on the target will be reset and will abort all outstanding i/os
back to all the attached hosts. So we should use LUN reset,
not target reset.
Tested this with Smart Array logical drives and with tape drives.
Not sure how this bug survived since 2009, except it must be very
rare for a Smart Array to require more than 30s to complete a request.
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Cc: stable@vger.kernel.org
---
drivers/scsi/hpsa.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 796482b..015a6c8 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -3265,7 +3265,7 @@ static void fill_cmd(struct CommandList *c, u8 cmd, struct ctlr_info *h,
c->Request.Timeout = 0; /* Don't time out */
memset(&c->Request.CDB[0], 0, sizeof(c->Request.CDB));
c->Request.CDB[0] = cmd;
- c->Request.CDB[1] = 0x03; /* Reset target above */
+ c->Request.CDB[1] = HPSA_RESET_TYPE_LUN;
/* If bytes 4-7 are zero, it means reset the */
/* LunID device */
c->Request.CDB[4] = 0x00;
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/3] hpsa: fix incorrect abort diagnostic message
2012-07-26 16:34 [PATCH 0/3] hpsa patches for July 2012 Stephen M. Cameron
2012-07-26 16:34 ` [PATCH 1/3] hpsa: Use LUN reset instead of target reset Stephen M. Cameron
@ 2012-07-26 16:34 ` Stephen M. Cameron
2012-07-26 16:34 ` [PATCH 3/3] hpsa: use ioremap_nocache instead of ioremap Stephen M. Cameron
2 siblings, 0 replies; 4+ messages in thread
From: Stephen M. Cameron @ 2012-07-26 16:34 UTC (permalink / raw)
To: james.bottomley
Cc: linux-scsi, linux-kernel, stephenmcameron, thenzl, akpm, mikem
From: Stephen M. Cameron <scameron@beardog.cce.hp.com>
In the abort handler, when asked to abort a command which
is not known to the driver, SUCCESS is returned, but the
diagnostic message incorrectly indicates the abort failed.
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
---
drivers/scsi/hpsa.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 015a6c8..415db96 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -2609,7 +2609,7 @@ static int hpsa_eh_abort_handler(struct scsi_cmnd *sc)
/* not in reqQ, if also not in cmpQ, must have already completed */
found = hpsa_find_cmd_in_queue(h, sc, &h->cmpQ);
if (!found) {
- dev_dbg(&h->pdev->dev, "%s Request FAILED (not known to driver).\n",
+ dev_dbg(&h->pdev->dev, "%s Request SUCCEEDED (not known to driver).\n",
msg);
return SUCCESS;
}
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 3/3] hpsa: use ioremap_nocache instead of ioremap
2012-07-26 16:34 [PATCH 0/3] hpsa patches for July 2012 Stephen M. Cameron
2012-07-26 16:34 ` [PATCH 1/3] hpsa: Use LUN reset instead of target reset Stephen M. Cameron
2012-07-26 16:34 ` [PATCH 2/3] hpsa: fix incorrect abort diagnostic message Stephen M. Cameron
@ 2012-07-26 16:34 ` Stephen M. Cameron
2 siblings, 0 replies; 4+ messages in thread
From: Stephen M. Cameron @ 2012-07-26 16:34 UTC (permalink / raw)
To: james.bottomley
Cc: linux-scsi, linux-kernel, stephenmcameron, thenzl, akpm, mikem
From: Stephen M. Cameron <scameron@beardog.cce.hp.com>
I think ioremap() ends up being equivalent to ioremap_nocache
by default, but we should signal our intent that these mappings
should be non-cacheable.
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
---
drivers/scsi/hpsa.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 415db96..5ed5859 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -3337,7 +3337,8 @@ static void __iomem *remap_pci_mem(ulong base, ulong size)
{
ulong page_base = ((ulong) base) & PAGE_MASK;
ulong page_offs = ((ulong) base) - page_base;
- void __iomem *page_remapped = ioremap(page_base, page_offs + size);
+ void __iomem *page_remapped = ioremap_nocache(page_base,
+ page_offs + size);
return page_remapped ? (page_remapped + page_offs) : NULL;
}
^ permalink raw reply related [flat|nested] 4+ messages in thread