From: Dan Williams <dan.j.williams@intel.com>
To: linux-scsi@vger.kernel.org
Cc: linux-ide@vger.kernel.org
Subject: [libsas PATCH v10 2/9] libsas: cleanup spurious calls to scsi_schedule_eh
Date: Sat, 10 Mar 2012 20:39:07 -0800 [thread overview]
Message-ID: <20120311043906.27797.28938.stgit@dwillia2-linux.jf.intel.com> (raw)
In-Reply-To: <20120311043722.27797.97791.stgit@dwillia2-linux.jf.intel.com>
eh is woken up automatically by the presence of failed commands,
scsi_schedule_eh is reserved for cases where there are no failed
commands. This guarantees that host_eh_sceduled is only incremented
when an explicit eh request is made.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
drivers/scsi/libsas/sas_ata.c | 25 -------------------------
drivers/scsi/libsas/sas_scsi_host.c | 5 -----
include/scsi/sas_ata.h | 4 ----
3 files changed, 0 insertions(+), 34 deletions(-)
diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c
index bc0cecc..729a7b6 100644
--- a/drivers/scsi/libsas/sas_ata.c
+++ b/drivers/scsi/libsas/sas_ata.c
@@ -574,31 +574,6 @@ int sas_ata_init_host_and_port(struct domain_device *found_dev)
return 0;
}
-void sas_ata_task_abort(struct sas_task *task)
-{
- struct ata_queued_cmd *qc = task->uldd_task;
- struct completion *waiting;
-
- /* Bounce SCSI-initiated commands to the SCSI EH */
- if (qc->scsicmd) {
- struct request_queue *q = qc->scsicmd->device->request_queue;
- unsigned long flags;
-
- spin_lock_irqsave(q->queue_lock, flags);
- blk_abort_request(qc->scsicmd->request);
- spin_unlock_irqrestore(q->queue_lock, flags);
- scsi_schedule_eh(qc->scsicmd->device->host);
- return;
- }
-
- /* Internal command, fake a timeout and complete. */
- qc->flags &= ~ATA_QCFLAG_ACTIVE;
- qc->flags |= ATA_QCFLAG_FAILED;
- qc->err_mask |= AC_ERR_TIMEOUT;
- waiting = qc->private_data;
- complete(waiting);
-}
-
static void sas_get_ata_command_set(struct domain_device *dev)
{
struct dev_to_host_fis *fis =
diff --git a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas/sas_scsi_host.c
index f0b9b7b..49a9113 100644
--- a/drivers/scsi/libsas/sas_scsi_host.c
+++ b/drivers/scsi/libsas/sas_scsi_host.c
@@ -992,10 +992,6 @@ void sas_task_abort(struct sas_task *task)
return;
task->timer.function(task->timer.data);
return;
- }
-
- if (dev_is_sata(task->dev)) {
- sas_ata_task_abort(task);
} else {
struct request_queue *q = sc->device->request_queue;
unsigned long flags;
@@ -1003,7 +999,6 @@ void sas_task_abort(struct sas_task *task)
spin_lock_irqsave(q->queue_lock, flags);
blk_abort_request(sc->request);
spin_unlock_irqrestore(q->queue_lock, flags);
- scsi_schedule_eh(sc->device->host);
}
}
diff --git a/include/scsi/sas_ata.h b/include/scsi/sas_ata.h
index cdccd2e..6d5d60c 100644
--- a/include/scsi/sas_ata.h
+++ b/include/scsi/sas_ata.h
@@ -38,7 +38,6 @@ static inline int dev_is_sata(struct domain_device *dev)
int sas_get_ata_info(struct domain_device *dev, struct ex_phy *phy);
int sas_ata_init_host_and_port(struct domain_device *found_dev);
-void sas_ata_task_abort(struct sas_task *task);
void sas_ata_strategy_handler(struct Scsi_Host *shost);
void sas_ata_eh(struct Scsi_Host *shost, struct list_head *work_q,
struct list_head *done_q);
@@ -56,9 +55,6 @@ static inline int sas_ata_init_host_and_port(struct domain_device *found_dev)
{
return 0;
}
-static inline void sas_ata_task_abort(struct sas_task *task)
-{
-}
static inline void sas_ata_strategy_handler(struct Scsi_Host *shost)
{
next prev parent reply other threads:[~2012-03-11 4:39 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-11 4:38 [libsas PATCH v10 0/9] libsas error handling + discovery v10 Dan Williams
2012-03-11 4:39 ` [libsas PATCH v10 1/9] libsas: introduce sas_work to fix sas_drain_work vs sas_queue_work Dan Williams
2012-03-11 4:39 ` Dan Williams [this message]
2012-03-16 15:25 ` [libsas PATCH v10 2/9] libsas: cleanup spurious calls to scsi_schedule_eh Dan Williams
2012-03-11 4:39 ` [libsas PATCH v10 3/9] libata, libsas: introduce sched_eh and end_eh port ops Dan Williams
2012-04-11 2:13 ` Dan Williams
2012-04-11 11:39 ` Jacek Danecki
2012-04-11 18:04 ` Dan Williams
2012-03-11 4:39 ` [libsas PATCH v10 4/9] libsas: enforce eh strategy handlers only in eh context Dan Williams
2012-03-11 4:39 ` [libsas PATCH v10 5/9] libsas: add sas_eh_abort_handler Dan Williams
2012-03-11 4:39 ` [libsas PATCH v10 6/9] libsas: use ->lldd_I_T_nexus_reset for ->eh_bus_reset_handler Dan Williams
2012-03-11 5:37 ` jack_wang
2012-03-11 4:39 ` [libsas PATCH v10 7/9] libsas: trim sas_task of slow path infrastructure Dan Williams
2012-03-11 4:39 ` [libsas PATCH v10 8/9] libsas: fix sas_find_bcast_phy() in the presence of 'vacant' phys Dan Williams
2012-03-11 4:39 ` [libsas PATCH v10 9/9] libsas: sas_rediscover_dev did not look at the SMP exec status 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=20120311043906.27797.28938.stgit@dwillia2-linux.jf.intel.com \
--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;
as well as URLs for NNTP newsgroup(s).