aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libata-scsi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/libata-scsi.c')
-rw-r--r--drivers/scsi/libata-scsi.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c
index a9b4083a4f67..fd7064b9697d 100644
--- a/drivers/scsi/libata-scsi.c
+++ b/drivers/scsi/libata-scsi.c
@@ -2596,3 +2596,26 @@ void ata_scsi_scan_host(struct ata_port *ap)
2596 } 2596 }
2597} 2597}
2598 2598
2599/**
2600 * ata_schedule_scsi_eh - schedule EH for SCSI host
2601 * @shost: SCSI host to invoke error handling on.
2602 *
2603 * Schedule SCSI EH without scmd. This is a hack.
2604 *
2605 * LOCKING:
2606 * spin_lock_irqsave(host_set lock)
2607 **/
2608void ata_schedule_scsi_eh(struct Scsi_Host *shost)
2609{
2610 unsigned long flags;
2611
2612 spin_lock_irqsave(shost->host_lock, flags);
2613
2614 if (scsi_host_set_state(shost, SHOST_RECOVERY) == 0 ||
2615 scsi_host_set_state(shost, SHOST_CANCEL_RECOVERY) == 0) {
2616 shost->host_eh_scheduled++;
2617 scsi_eh_wakeup(shost);
2618 }
2619
2620 spin_unlock_irqrestore(shost->host_lock, flags);
2621}