From: Christoph Hellwig <hch@lst.de>
To: Jens Axboe <axboe@kernel.dk>, Keith Busch <keith.busch@intel.com>
Cc: Bart Van Assche <bart.vanassche@wdc.com>,
Ming Lei <ming.lei@redhat.com>,
Josef Bacik <josef@toxicpanda.com>, Tejun Heo <tj@kernel.org>,
Lee Duncan <lduncan@suse.com>, Chris Leech <cleech@redhat.com>,
linux-block@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: [PATCH 01/14] libata: remove ata_scsi_timed_out
Date: Tue, 29 May 2018 15:52:26 +0200 [thread overview]
Message-ID: <20180529135239.27005-2-hch@lst.de> (raw)
In-Reply-To: <20180529135239.27005-1-hch@lst.de>
As far as I can tell this function can't even be called any more, given
that ATA implements its own eh_strategy_handler with ata_scsi_error, which
never calls ->eh_timed_out.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.com>
---
drivers/ata/libata-eh.c | 51 -----------------------------------------
include/linux/libata.h | 2 --
2 files changed, 53 deletions(-)
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index c016829a38fd..e87785dec151 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -500,57 +500,6 @@ void ata_eh_release(struct ata_port *ap)
mutex_unlock(&ap->host->eh_mutex);
}
-/**
- * ata_scsi_timed_out - SCSI layer time out callback
- * @cmd: timed out SCSI command
- *
- * Handles SCSI layer timeout. We race with normal completion of
- * the qc for @cmd. If the qc is already gone, we lose and let
- * the scsi command finish (EH_HANDLED). Otherwise, the qc has
- * timed out and EH should be invoked. Prevent ata_qc_complete()
- * from finishing it by setting EH_SCHEDULED and return
- * EH_NOT_HANDLED.
- *
- * TODO: kill this function once old EH is gone.
- *
- * LOCKING:
- * Called from timer context
- *
- * RETURNS:
- * EH_HANDLED or EH_NOT_HANDLED
- */
-enum blk_eh_timer_return ata_scsi_timed_out(struct scsi_cmnd *cmd)
-{
- struct Scsi_Host *host = cmd->device->host;
- struct ata_port *ap = ata_shost_to_port(host);
- unsigned long flags;
- struct ata_queued_cmd *qc;
- enum blk_eh_timer_return ret;
-
- DPRINTK("ENTER\n");
-
- if (ap->ops->error_handler) {
- ret = BLK_EH_NOT_HANDLED;
- goto out;
- }
-
- ret = BLK_EH_HANDLED;
- spin_lock_irqsave(ap->lock, flags);
- qc = ata_qc_from_tag(ap, ap->link.active_tag);
- if (qc) {
- WARN_ON(qc->scsicmd != cmd);
- qc->flags |= ATA_QCFLAG_EH_SCHEDULED;
- qc->err_mask |= AC_ERR_TIMEOUT;
- ret = BLK_EH_NOT_HANDLED;
- }
- spin_unlock_irqrestore(ap->lock, flags);
-
- out:
- DPRINTK("EXIT, ret=%d\n", ret);
- return ret;
-}
-EXPORT_SYMBOL(ata_scsi_timed_out);
-
static void ata_eh_unload(struct ata_port *ap)
{
struct ata_link *link;
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 1795fecdea17..1c113134c98f 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -1133,7 +1133,6 @@ extern int ata_sas_port_start(struct ata_port *ap);
extern void ata_sas_port_stop(struct ata_port *ap);
extern int ata_sas_slave_configure(struct scsi_device *, struct ata_port *);
extern int ata_sas_queuecmd(struct scsi_cmnd *cmd, struct ata_port *ap);
-extern enum blk_eh_timer_return ata_scsi_timed_out(struct scsi_cmnd *cmd);
extern int sata_scr_valid(struct ata_link *link);
extern int sata_scr_read(struct ata_link *link, int reg, u32 *val);
extern int sata_scr_write(struct ata_link *link, int reg, u32 val);
@@ -1359,7 +1358,6 @@ extern struct device_attribute *ata_common_sdev_attrs[];
.proc_name = drv_name, \
.slave_configure = ata_scsi_slave_config, \
.slave_destroy = ata_scsi_slave_destroy, \
- .eh_timed_out = ata_scsi_timed_out, \
.bios_param = ata_std_bios_param, \
.unlock_native_capacity = ata_scsi_unlock_native_capacity, \
.sdev_attrs = ata_common_sdev_attrs
--
2.17.0
next prev parent reply other threads:[~2018-05-29 13:52 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-29 13:52 drop abort sequence, kill BLK_EH_HANDLED v2 Christoph Hellwig
2018-05-29 13:52 ` Christoph Hellwig [this message]
2018-05-29 13:52 ` [PATCH 02/14] blk-mq: Fix timeout and state order Christoph Hellwig
2018-05-29 13:52 ` [PATCH 03/14] blk-mq: Remove generation seqeunce Christoph Hellwig
2018-06-04 6:56 ` Bart Van Assche
2018-06-04 13:42 ` hch
2018-06-04 14:13 ` Bart Van Assche
2018-05-29 13:52 ` [PATCH 04/14] block: rename BLK_EH_NOT_HANDLED to BLK_EH_DONE Christoph Hellwig
2018-05-29 13:52 ` [PATCH 05/14] nvme: return BLK_EH_DONE from ->timeout Christoph Hellwig
2018-05-29 13:52 ` [PATCH 06/14] nbd: complete requests " Christoph Hellwig
2018-05-29 13:52 ` [PATCH 07/14] mtip32xx: " Christoph Hellwig
2018-05-29 14:17 ` Johannes Thumshirn
2018-05-29 13:52 ` [PATCH 08/14] null_blk: " Christoph Hellwig
2018-05-29 13:52 ` [PATCH 09/14] scsi_transport_fc: " Christoph Hellwig
2018-05-29 13:52 ` [PATCH 10/14] mmc: " Christoph Hellwig
2018-05-29 14:55 ` Shawn Lin
2018-05-30 8:09 ` Adrian Hunter
2018-05-29 13:52 ` [PATCH 11/14] libiscsi: don't try to bypass SCSI EH Christoph Hellwig
2018-05-30 1:04 ` Lee Duncan
2018-05-29 13:52 ` [PATCH 12/14] block: remove BLK_EH_HANDLED Christoph Hellwig
2018-05-29 14:17 ` Johannes Thumshirn
2018-05-29 13:52 ` [PATCH 13/14] block: document the blk_eh_timer_return values Christoph Hellwig
2018-05-29 14:17 ` Johannes Thumshirn
2018-05-29 13:52 ` [PATCH 14/14] blk-mq: simplify blk_mq_rq_timed_out Christoph Hellwig
2018-05-29 14:19 ` Johannes Thumshirn
2018-05-29 15:12 ` drop abort sequence, kill BLK_EH_HANDLED v2 Jens Axboe
-- strict thread matches above, loose matches on Subject: below --
2018-05-23 12:19 BLK_EH_HANDLED Christoph Hellwig
2018-05-23 12:19 ` [PATCH 01/14] libata: remove ata_scsi_timed_out Christoph Hellwig
2018-05-23 13:21 ` Hannes Reinecke
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=20180529135239.27005-2-hch@lst.de \
--to=hch@lst.de \
--cc=axboe@kernel.dk \
--cc=bart.vanassche@wdc.com \
--cc=cleech@redhat.com \
--cc=josef@toxicpanda.com \
--cc=keith.busch@intel.com \
--cc=lduncan@suse.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=ming.lei@redhat.com \
--cc=tj@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