aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libata-bmdma.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-06-22 23:46:10 -0400
committerJeff Garzik <jeff@garzik.org>2006-06-22 23:46:10 -0400
commitba6a13083c1b720a47c05bee7bedbb6ef06c4611 (patch)
tree26f9d8d37145fac426744f96ecf006ec0a481e31 /drivers/scsi/libata-bmdma.c
parent47005f255ed126a4b48a1a2f63164fb1d83bcb0a (diff)
[libata] Add host lock to struct ata_port
Prepare for changes required to support SATA devices attached to SAS HBAs. For these devices we don't want to use host_set at all, since libata will not be the owner of struct scsi_host. Signed-off-by: Brian King <brking@us.ibm.com> (with slight merge modifications made by...) Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/scsi/libata-bmdma.c')
-rw-r--r--drivers/scsi/libata-bmdma.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/scsi/libata-bmdma.c b/drivers/scsi/libata-bmdma.c
index 13fab97c840e..004e1a0d8b71 100644
--- a/drivers/scsi/libata-bmdma.c
+++ b/drivers/scsi/libata-bmdma.c
@@ -715,7 +715,6 @@ void ata_bmdma_drive_eh(struct ata_port *ap, ata_prereset_fn_t prereset,
715 ata_reset_fn_t softreset, ata_reset_fn_t hardreset, 715 ata_reset_fn_t softreset, ata_reset_fn_t hardreset,
716 ata_postreset_fn_t postreset) 716 ata_postreset_fn_t postreset)
717{ 717{
718 struct ata_host_set *host_set = ap->host_set;
719 struct ata_eh_context *ehc = &ap->eh_context; 718 struct ata_eh_context *ehc = &ap->eh_context;
720 struct ata_queued_cmd *qc; 719 struct ata_queued_cmd *qc;
721 unsigned long flags; 720 unsigned long flags;
@@ -726,7 +725,7 @@ void ata_bmdma_drive_eh(struct ata_port *ap, ata_prereset_fn_t prereset,
726 qc = NULL; 725 qc = NULL;
727 726
728 /* reset PIO HSM and stop DMA engine */ 727 /* reset PIO HSM and stop DMA engine */
729 spin_lock_irqsave(&host_set->lock, flags); 728 spin_lock_irqsave(ap->lock, flags);
730 729
731 ap->hsm_task_state = HSM_ST_IDLE; 730 ap->hsm_task_state = HSM_ST_IDLE;
732 731
@@ -755,7 +754,7 @@ void ata_bmdma_drive_eh(struct ata_port *ap, ata_prereset_fn_t prereset,
755 ata_chk_status(ap); 754 ata_chk_status(ap);
756 ap->ops->irq_clear(ap); 755 ap->ops->irq_clear(ap);
757 756
758 spin_unlock_irqrestore(&host_set->lock, flags); 757 spin_unlock_irqrestore(ap->lock, flags);
759 758
760 if (thaw) 759 if (thaw)
761 ata_eh_thaw_port(ap); 760 ata_eh_thaw_port(ap);