From: Dan Williams <dan.j.williams@intel.com>
To: linux-scsi@vger.kernel.org
Cc: linux-ide@vger.kernel.org
Subject: [PATCH v3 07/14] libsas: async ata-eh
Date: Thu, 05 Jan 2012 16:59:36 -0800 [thread overview]
Message-ID: <20120106005936.11464.35825.stgit@localhost6.localdomain6> (raw)
In-Reply-To: <20120106005634.11464.64030.stgit@localhost6.localdomain6>
Once sas_ata_hard_reset() starts honoring the 'deadline' parameter a
pathological configuration could take 25 seconds per ata device
(serialized) to recover. Run per-port recoveries in parallel.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
drivers/scsi/libsas/sas_ata.c | 17 ++++++++++++++---
1 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c
index 39ce224..537e8da 100644
--- a/drivers/scsi/libsas/sas_ata.c
+++ b/drivers/scsi/libsas/sas_ata.c
@@ -23,6 +23,7 @@
#include <linux/scatterlist.h>
#include <linux/slab.h>
+#include <linux/async.h>
#include <scsi/sas_ata.h>
#include "sas_internal.h"
@@ -605,10 +606,21 @@ int sas_discover_sata(struct domain_device *dev)
return 0;
}
+static void async_sas_ata_eh(void *data, async_cookie_t cookie)
+{
+ struct domain_device *dev = data;
+ struct ata_port *ap = dev->sata_dev.ap;
+ struct sas_ha_struct *ha = dev->port->ha;
+
+ ata_port_printk(ap, KERN_DEBUG, "sas eh calling libata port error handler");
+ ata_scsi_port_error_handler(ha->core.shost, ap);
+}
+
void sas_ata_strategy_handler(struct Scsi_Host *shost)
{
struct scsi_device *sdev;
struct sas_ha_struct *sas_ha = SHOST_TO_SAS_HA(shost);
+ LIST_HEAD(async);
/* it's ok to defer revalidation events during ata eh, these
* disks are in one of three states:
@@ -622,14 +634,13 @@ void sas_ata_strategy_handler(struct Scsi_Host *shost)
shost_for_each_device(sdev, shost) {
struct domain_device *ddev = sdev_to_domain_dev(sdev);
- struct ata_port *ap = ddev->sata_dev.ap;
if (!dev_is_sata(ddev))
continue;
- ata_port_printk(ap, KERN_DEBUG, "sas eh calling libata port error handler");
- ata_scsi_port_error_handler(shost, ap);
+ async_schedule_domain(async_sas_ata_eh, ddev, &async);
}
+ async_synchronize_full_domain(&async);
sas_enable_revalidation(sas_ha);
}
next prev parent reply other threads:[~2012-01-06 0:59 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-06 0:59 [GIT PATCH v3 00/14] libsas: eh reworks (ata-eh vs discovery, races, ...) Dan Williams
2012-01-06 0:59 ` [PATCH v3 01/14] libsas: introduce sas_drain_work() Dan Williams
2012-01-06 0:59 ` [PATCH v3 02/14] libsas: remove ata_port.lock management duties from lldds Dan Williams
2012-01-06 0:59 ` [PATCH v3 03/14] libsas: prevent domain rediscovery competing with ata error handling Dan Williams
2012-01-09 19:14 ` Dan Williams
2012-01-09 20:03 ` Dan Williams
2012-01-06 0:59 ` [PATCH v3 04/14] libsas: fix timeout vs completion race Dan Williams
2012-01-06 0:59 ` [PATCH v3 05/14] libsas: perform sas-transport resets in shost->workq context Dan Williams
2012-01-06 0:59 ` [PATCH v3 06/14] libsas: sas_phy_enable via transport_sas_phy_reset Dan Williams
2012-01-06 0:59 ` Dan Williams [this message]
2012-01-06 0:59 ` [PATCH v3 08/14] isci: kill iphy->isci_port lookups Dan Williams
2012-01-23 23:45 ` Dan Williams
2012-01-06 0:59 ` [PATCH v3 09/14] isci: kill isci_port->status Dan Williams
2012-01-06 0:59 ` [PATCH v3 10/14] isci: fix interpretation of "hard" reset Dan Williams
2012-01-06 0:59 ` [PATCH v3 11/14] isci: stop interpreting ->lldd_lu_reset() as an ata soft-reset Dan Williams
2012-01-06 1:00 ` [PATCH v3 12/14] isci: ->lldd_ata_check_ready handler Dan Williams
2012-01-09 1:57 ` Jack Wang
2012-01-09 19:26 ` Dan Williams
2012-01-06 1:00 ` [PATCH v3 13/14] isci: remove bus and reset handlers Dan Williams
2012-01-06 1:00 ` [PATCH v3 14/14] isci: remove IDEV_EH hack to disable "discovery-time" ata resets Dan Williams
2012-01-06 1:46 ` [GIT PATCH v3 00/14] libsas: eh reworks (ata-eh vs discovery, races, ...) Dan Williams
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=20120106005936.11464.35825.stgit@localhost6.localdomain6 \
--to=dan.j.williams@intel.com \
--cc=linux-ide@vger.kernel.org \
--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