diff options
-rw-r--r-- | drivers/scsi/libsas/sas_scsi_host.c | 21 | ||||
-rw-r--r-- | include/scsi/libsas.h | 1 |
2 files changed, 22 insertions, 0 deletions
diff --git a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas/sas_scsi_host.c index 2e0e779fb3b2..875b87112c50 100644 --- a/drivers/scsi/libsas/sas_scsi_host.c +++ b/drivers/scsi/libsas/sas_scsi_host.c | |||
@@ -531,6 +531,27 @@ static int sas_queue_reset(struct domain_device *dev, int reset_type, int lun, i | |||
531 | return FAILED; | 531 | return FAILED; |
532 | } | 532 | } |
533 | 533 | ||
534 | int sas_eh_abort_handler(struct scsi_cmnd *cmd) | ||
535 | { | ||
536 | int res; | ||
537 | struct sas_task *task = TO_SAS_TASK(cmd); | ||
538 | struct Scsi_Host *host = cmd->device->host; | ||
539 | struct sas_internal *i = to_sas_internal(host->transportt); | ||
540 | |||
541 | if (current != host->ehandler) | ||
542 | return FAILED; | ||
543 | |||
544 | if (!i->dft->lldd_abort_task) | ||
545 | return FAILED; | ||
546 | |||
547 | res = i->dft->lldd_abort_task(task); | ||
548 | if (res == TMF_RESP_FUNC_SUCC || res == TMF_RESP_FUNC_COMPLETE) | ||
549 | return SUCCESS; | ||
550 | |||
551 | return FAILED; | ||
552 | } | ||
553 | EXPORT_SYMBOL_GPL(sas_eh_abort_handler); | ||
554 | |||
534 | /* Attempt to send a LUN reset message to a device */ | 555 | /* Attempt to send a LUN reset message to a device */ |
535 | int sas_eh_device_reset_handler(struct scsi_cmnd *cmd) | 556 | int sas_eh_device_reset_handler(struct scsi_cmnd *cmd) |
536 | { | 557 | { |
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index df9cefdf2a8e..acefe13ebacf 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h | |||
@@ -720,6 +720,7 @@ void sas_unregister_dev(struct asd_sas_port *port, struct domain_device *); | |||
720 | void sas_init_dev(struct domain_device *); | 720 | void sas_init_dev(struct domain_device *); |
721 | 721 | ||
722 | void sas_task_abort(struct sas_task *); | 722 | void sas_task_abort(struct sas_task *); |
723 | int sas_eh_abort_handler(struct scsi_cmnd *cmd); | ||
723 | int sas_eh_device_reset_handler(struct scsi_cmnd *cmd); | 724 | int sas_eh_device_reset_handler(struct scsi_cmnd *cmd); |
724 | int sas_eh_bus_reset_handler(struct scsi_cmnd *cmd); | 725 | int sas_eh_bus_reset_handler(struct scsi_cmnd *cmd); |
725 | 726 | ||