aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ahci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/ahci.c')
-rw-r--r--drivers/scsi/ahci.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c
index e3b9692b9688..841f4e2cfe08 100644
--- a/drivers/scsi/ahci.c
+++ b/drivers/scsi/ahci.c
@@ -269,6 +269,8 @@ static struct pci_device_id ahci_pci_tbl[] = {
269 board_ahci }, /* ESB2 */ 269 board_ahci }, /* ESB2 */
270 { PCI_VENDOR_ID_INTEL, 0x2683, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 270 { PCI_VENDOR_ID_INTEL, 0x2683, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
271 board_ahci }, /* ESB2 */ 271 board_ahci }, /* ESB2 */
272 { PCI_VENDOR_ID_INTEL, 0x27c6, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
273 board_ahci }, /* ICH7-M DH */
272 { } /* terminate list */ 274 { } /* terminate list */
273}; 275};
274 276
@@ -584,12 +586,16 @@ static void ahci_intr_error(struct ata_port *ap, u32 irq_stat)
584 586
585static void ahci_eng_timeout(struct ata_port *ap) 587static void ahci_eng_timeout(struct ata_port *ap)
586{ 588{
587 void *mmio = ap->host_set->mmio_base; 589 struct ata_host_set *host_set = ap->host_set;
590 void *mmio = host_set->mmio_base;
588 void *port_mmio = ahci_port_base(mmio, ap->port_no); 591 void *port_mmio = ahci_port_base(mmio, ap->port_no);
589 struct ata_queued_cmd *qc; 592 struct ata_queued_cmd *qc;
593 unsigned long flags;
590 594
591 DPRINTK("ENTER\n"); 595 DPRINTK("ENTER\n");
592 596
597 spin_lock_irqsave(&host_set->lock, flags);
598
593 ahci_intr_error(ap, readl(port_mmio + PORT_IRQ_STAT)); 599 ahci_intr_error(ap, readl(port_mmio + PORT_IRQ_STAT));
594 600
595 qc = ata_qc_from_tag(ap, ap->active_tag); 601 qc = ata_qc_from_tag(ap, ap->active_tag);
@@ -607,6 +613,7 @@ static void ahci_eng_timeout(struct ata_port *ap)
607 ata_qc_complete(qc, ATA_ERR); 613 ata_qc_complete(qc, ATA_ERR);
608 } 614 }
609 615
616 spin_unlock_irqrestore(&host_set->lock, flags);
610} 617}
611 618
612static inline int ahci_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc) 619static inline int ahci_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc)
@@ -696,9 +703,6 @@ static int ahci_qc_issue(struct ata_queued_cmd *qc)
696 struct ata_port *ap = qc->ap; 703 struct ata_port *ap = qc->ap;
697 void *port_mmio = (void *) ap->ioaddr.cmd_addr; 704 void *port_mmio = (void *) ap->ioaddr.cmd_addr;
698 705
699 writel(1, port_mmio + PORT_SCR_ACT);
700 readl(port_mmio + PORT_SCR_ACT); /* flush */
701
702 writel(1, port_mmio + PORT_CMD_ISSUE); 706 writel(1, port_mmio + PORT_CMD_ISSUE);
703 readl(port_mmio + PORT_CMD_ISSUE); /* flush */ 707 readl(port_mmio + PORT_CMD_ISSUE); /* flush */
704 708