aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/libata-eh.c13
-rw-r--r--drivers/ata/libata.h2
2 files changed, 8 insertions, 7 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index c1db2f234d2e..bd0b2bc76f10 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -33,6 +33,7 @@
33 */ 33 */
34 34
35#include <linux/kernel.h> 35#include <linux/kernel.h>
36#include <linux/blkdev.h>
36#include <linux/pci.h> 37#include <linux/pci.h>
37#include <scsi/scsi.h> 38#include <scsi/scsi.h>
38#include <scsi/scsi_host.h> 39#include <scsi/scsi_host.h>
@@ -457,29 +458,29 @@ static void ata_eh_clear_action(struct ata_link *link, struct ata_device *dev,
457 * RETURNS: 458 * RETURNS:
458 * EH_HANDLED or EH_NOT_HANDLED 459 * EH_HANDLED or EH_NOT_HANDLED
459 */ 460 */
460enum scsi_eh_timer_return ata_scsi_timed_out(struct scsi_cmnd *cmd) 461enum blk_eh_timer_return ata_scsi_timed_out(struct scsi_cmnd *cmd)
461{ 462{
462 struct Scsi_Host *host = cmd->device->host; 463 struct Scsi_Host *host = cmd->device->host;
463 struct ata_port *ap = ata_shost_to_port(host); 464 struct ata_port *ap = ata_shost_to_port(host);
464 unsigned long flags; 465 unsigned long flags;
465 struct ata_queued_cmd *qc; 466 struct ata_queued_cmd *qc;
466 enum scsi_eh_timer_return ret; 467 enum blk_eh_timer_return ret;
467 468
468 DPRINTK("ENTER\n"); 469 DPRINTK("ENTER\n");
469 470
470 if (ap->ops->error_handler) { 471 if (ap->ops->error_handler) {
471 ret = EH_NOT_HANDLED; 472 ret = BLK_EH_NOT_HANDLED;
472 goto out; 473 goto out;
473 } 474 }
474 475
475 ret = EH_HANDLED; 476 ret = BLK_EH_HANDLED;
476 spin_lock_irqsave(ap->lock, flags); 477 spin_lock_irqsave(ap->lock, flags);
477 qc = ata_qc_from_tag(ap, ap->link.active_tag); 478 qc = ata_qc_from_tag(ap, ap->link.active_tag);
478 if (qc) { 479 if (qc) {
479 WARN_ON(qc->scsicmd != cmd); 480 WARN_ON(qc->scsicmd != cmd);
480 qc->flags |= ATA_QCFLAG_EH_SCHEDULED; 481 qc->flags |= ATA_QCFLAG_EH_SCHEDULED;
481 qc->err_mask |= AC_ERR_TIMEOUT; 482 qc->err_mask |= AC_ERR_TIMEOUT;
482 ret = EH_NOT_HANDLED; 483 ret = BLK_EH_NOT_HANDLED;
483 } 484 }
484 spin_unlock_irqrestore(ap->lock, flags); 485 spin_unlock_irqrestore(ap->lock, flags);
485 486
@@ -831,7 +832,7 @@ void ata_qc_schedule_eh(struct ata_queued_cmd *qc)
831 * Note that ATA_QCFLAG_FAILED is unconditionally set after 832 * Note that ATA_QCFLAG_FAILED is unconditionally set after
832 * this function completes. 833 * this function completes.
833 */ 834 */
834 scsi_req_abort_cmd(qc->scsicmd); 835 blk_abort_request(qc->scsicmd->request);
835} 836}
836 837
837/** 838/**
diff --git a/drivers/ata/libata.h b/drivers/ata/libata.h
index ade5c75b6144..24f5005478b0 100644
--- a/drivers/ata/libata.h
+++ b/drivers/ata/libata.h
@@ -152,7 +152,7 @@ extern int ata_bus_probe(struct ata_port *ap);
152/* libata-eh.c */ 152/* libata-eh.c */
153extern unsigned long ata_internal_cmd_timeout(struct ata_device *dev, u8 cmd); 153extern unsigned long ata_internal_cmd_timeout(struct ata_device *dev, u8 cmd);
154extern void ata_internal_cmd_timed_out(struct ata_device *dev, u8 cmd); 154extern void ata_internal_cmd_timed_out(struct ata_device *dev, u8 cmd);
155extern enum scsi_eh_timer_return ata_scsi_timed_out(struct scsi_cmnd *cmd); 155extern enum blk_eh_timer_return ata_scsi_timed_out(struct scsi_cmnd *cmd);
156extern void ata_scsi_error(struct Scsi_Host *host); 156extern void ata_scsi_error(struct Scsi_Host *host);
157extern void ata_port_wait_eh(struct ata_port *ap); 157extern void ata_port_wait_eh(struct ata_port *ap);
158extern void ata_eh_fastdrain_timerfn(unsigned long arg); 158extern void ata_eh_fastdrain_timerfn(unsigned long arg);