Skip to content

Commit 01fc27d

Browse files
Christoph Hellwigaxboe
authored andcommitted
libata: remove ata_scsi_timed_out
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 <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent ce4c3e1 commit 01fc27d

File tree

2 files changed

+0
-53
lines changed

2 files changed

+0
-53
lines changed

drivers/ata/libata-eh.c

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -500,57 +500,6 @@ void ata_eh_release(struct ata_port *ap)
500500
mutex_unlock(&ap->host->eh_mutex);
501501
}
502502

503-
/**
504-
* ata_scsi_timed_out - SCSI layer time out callback
505-
* @cmd: timed out SCSI command
506-
*
507-
* Handles SCSI layer timeout. We race with normal completion of
508-
* the qc for @cmd. If the qc is already gone, we lose and let
509-
* the scsi command finish (EH_HANDLED). Otherwise, the qc has
510-
* timed out and EH should be invoked. Prevent ata_qc_complete()
511-
* from finishing it by setting EH_SCHEDULED and return
512-
* EH_NOT_HANDLED.
513-
*
514-
* TODO: kill this function once old EH is gone.
515-
*
516-
* LOCKING:
517-
* Called from timer context
518-
*
519-
* RETURNS:
520-
* EH_HANDLED or EH_NOT_HANDLED
521-
*/
522-
enum blk_eh_timer_return ata_scsi_timed_out(struct scsi_cmnd *cmd)
523-
{
524-
struct Scsi_Host *host = cmd->device->host;
525-
struct ata_port *ap = ata_shost_to_port(host);
526-
unsigned long flags;
527-
struct ata_queued_cmd *qc;
528-
enum blk_eh_timer_return ret;
529-
530-
DPRINTK("ENTER\n");
531-
532-
if (ap->ops->error_handler) {
533-
ret = BLK_EH_NOT_HANDLED;
534-
goto out;
535-
}
536-
537-
ret = BLK_EH_HANDLED;
538-
spin_lock_irqsave(ap->lock, flags);
539-
qc = ata_qc_from_tag(ap, ap->link.active_tag);
540-
if (qc) {
541-
WARN_ON(qc->scsicmd != cmd);
542-
qc->flags |= ATA_QCFLAG_EH_SCHEDULED;
543-
qc->err_mask |= AC_ERR_TIMEOUT;
544-
ret = BLK_EH_NOT_HANDLED;
545-
}
546-
spin_unlock_irqrestore(ap->lock, flags);
547-
548-
out:
549-
DPRINTK("EXIT, ret=%d\n", ret);
550-
return ret;
551-
}
552-
EXPORT_SYMBOL(ata_scsi_timed_out);
553-
554503
static void ata_eh_unload(struct ata_port *ap)
555504
{
556505
struct ata_link *link;

include/linux/libata.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1133,7 +1133,6 @@ extern int ata_sas_port_start(struct ata_port *ap);
11331133
extern void ata_sas_port_stop(struct ata_port *ap);
11341134
extern int ata_sas_slave_configure(struct scsi_device *, struct ata_port *);
11351135
extern int ata_sas_queuecmd(struct scsi_cmnd *cmd, struct ata_port *ap);
1136-
extern enum blk_eh_timer_return ata_scsi_timed_out(struct scsi_cmnd *cmd);
11371136
extern int sata_scr_valid(struct ata_link *link);
11381137
extern int sata_scr_read(struct ata_link *link, int reg, u32 *val);
11391138
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[];
13591358
.proc_name = drv_name, \
13601359
.slave_configure = ata_scsi_slave_config, \
13611360
.slave_destroy = ata_scsi_slave_destroy, \
1362-
.eh_timed_out = ata_scsi_timed_out, \
13631361
.bios_param = ata_std_bios_param, \
13641362
.unlock_native_capacity = ata_scsi_unlock_native_capacity, \
13651363
.sdev_attrs = ata_common_sdev_attrs

0 commit comments

Comments
 (0)