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 <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
ce4c3e19e5
commit
01fc27d969
@ -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;
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user