From 3db368f71a91f08c5a93a5bfb6ca1e2de2668e04 Mon Sep 17 00:00:00 2001 From: Jason Gaston Date: Wed, 10 Aug 2005 06:18:43 -0700 Subject: [PATCH] ahci: AHCI mode SATA patch for Intel ICH7-M DH MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hello, This patch adds the Intel ICH7-M DH DID to the ahci.c file for AHCI mode SATA support.  This patch was built against the 2.6.13-rc6 kernel.   If acceptable, please apply. Thanks, Jason Gaston Signed-off-by:  Jason Gaston Signed-off-by: Jeff Garzik --- drivers/scsi/ahci.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/scsi/ahci.c') diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c index c562369..0c79caf 100644 --- a/drivers/scsi/ahci.c +++ b/drivers/scsi/ahci.c @@ -269,6 +269,8 @@ static struct pci_device_id ahci_pci_tbl[] = { board_ahci }, /* ESB2 */ { PCI_VENDOR_ID_INTEL, 0x2683, PCI_ANY_ID, PCI_ANY_ID, 0, 0, board_ahci }, /* ESB2 */ + { PCI_VENDOR_ID_INTEL, 0x27c6, PCI_ANY_ID, PCI_ANY_ID, 0, 0, + board_ahci }, /* ICH7-M DH */ { } /* terminate list */ }; -- cgit v1.1 From c0b34ad2956036cdba87792d6c46d8f491539df1 Mon Sep 17 00:00:00 2001 From: Martin Wilck Date: Thu, 4 Aug 2005 09:04:56 +0200 Subject: [PATCH] Fix HD activity LED with ahci Patch: fix wrong HD activity control by ahci driver The ahci driver 1.0 sets the SActive bit on every transaction, causing the LED to light up. The SActive bit is used only for native command queuing (NCQ) which the current driver version doesn't implement. Resetting the SActive bit is the device's responsibility (by sending a "Set Device Bits FIS" to the host adapter) but this is not required in response to non-NCQ commands, and (most) devices don't. Thus the LED stays always on. This patch fixes the LED behavior. Spec references: http://www.intel.com/technology/serialata/pdf/rev1_1.pdf, sec. 3.3.13, 5.5.1 http://www.serialata.org/docs/serialata10a.pdf http://www.intel.com/design/storage/papers/25266401.pdf Signed-off-by: Martin.Wilck@fujitsu-siemens.com Signed-off-by: Jeff Garzik --- drivers/scsi/ahci.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'drivers/scsi/ahci.c') diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c index 0c79caf..0b228ff 100644 --- a/drivers/scsi/ahci.c +++ b/drivers/scsi/ahci.c @@ -698,9 +698,6 @@ static int ahci_qc_issue(struct ata_queued_cmd *qc) struct ata_port *ap = qc->ap; void *port_mmio = (void *) ap->ioaddr.cmd_addr; - writel(1, port_mmio + PORT_SCR_ACT); - readl(port_mmio + PORT_SCR_ACT); /* flush */ - writel(1, port_mmio + PORT_CMD_ISSUE); readl(port_mmio + PORT_CMD_ISSUE); /* flush */ -- cgit v1.1 From b8f6153ee421014f42b620238f4203a4106db309 Mon Sep 17 00:00:00 2001 From: Jeff Garzik Date: Thu, 25 Aug 2005 22:01:20 -0400 Subject: libata: fix EH locking Wrap ata_qc_complete() calls in EH context in spinlocks, to prevent races (mainly in ATAPI code paths). --- drivers/scsi/ahci.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'drivers/scsi/ahci.c') diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c index 3484939..841f4e2 100644 --- a/drivers/scsi/ahci.c +++ b/drivers/scsi/ahci.c @@ -586,12 +586,16 @@ static void ahci_intr_error(struct ata_port *ap, u32 irq_stat) static void ahci_eng_timeout(struct ata_port *ap) { - void *mmio = ap->host_set->mmio_base; + struct ata_host_set *host_set = ap->host_set; + void *mmio = host_set->mmio_base; void *port_mmio = ahci_port_base(mmio, ap->port_no); struct ata_queued_cmd *qc; + unsigned long flags; DPRINTK("ENTER\n"); + spin_lock_irqsave(&host_set->lock, flags); + ahci_intr_error(ap, readl(port_mmio + PORT_IRQ_STAT)); qc = ata_qc_from_tag(ap, ap->active_tag); @@ -609,6 +613,7 @@ static void ahci_eng_timeout(struct ata_port *ap) ata_qc_complete(qc, ATA_ERR); } + spin_unlock_irqrestore(&host_set->lock, flags); } static inline int ahci_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc) -- cgit v1.1