aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-eh.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-09-23 00:14:12 -0400
committerJeff Garzik <jeff@garzik.org>2007-10-12 14:55:41 -0400
commitda917d69d0ea63f5390716cba6e77f490ce96df9 (patch)
tree214670f42be4c140bbd05226adc8f86db51ee725 /drivers/ata/libata-eh.c
parent31cc23b34913bc173680bdc87af79e551bf8cc0d (diff)
libata-pmp-prep: implement qc_defer helpers
Implement ap->nr_active_links (the number of links with active qcs), ap->excl_link (pointer to link which can be used by ->qc_defer and is cleared when a qc with ATA_QCFLAG_CLEAR_EXCL completes), and ata_link_active(). These can be used by ->qc_defer() to implement proper command exclusion. This set of helpers seem enough for both sil24 (ATAPI exclusion needed) and cmd-switching PMP. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/libata-eh.c')
-rw-r--r--drivers/ata/libata-eh.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 1d3b0dccfb0a..5244723952c2 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -451,6 +451,7 @@ void ata_scsi_error(struct Scsi_Host *host)
451 451
452 ap->pflags |= ATA_PFLAG_EH_IN_PROGRESS; 452 ap->pflags |= ATA_PFLAG_EH_IN_PROGRESS;
453 ap->pflags &= ~ATA_PFLAG_EH_PENDING; 453 ap->pflags &= ~ATA_PFLAG_EH_PENDING;
454 ap->excl_link = NULL; /* don't maintain exclusion over EH */
454 455
455 spin_unlock_irqrestore(ap->lock, flags); 456 spin_unlock_irqrestore(ap->lock, flags);
456 457
@@ -2474,6 +2475,10 @@ void ata_eh_finish(struct ata_port *ap)
2474 } 2475 }
2475 } 2476 }
2476 } 2477 }
2478
2479 /* make sure nr_active_links is zero after EH */
2480 WARN_ON(ap->nr_active_links);
2481 ap->nr_active_links = 0;
2477} 2482}
2478 2483
2479/** 2484/**