Skip to content

Commit

Permalink
Merge refs/heads/upstream from master.kernel.org:/pub/scm/linux/kerne…
Browse files Browse the repository at this point in the history
…l/git/jgarzik/libata-dev
  • Loading branch information
Linus Torvalds committed Aug 29, 2005
2 parents 69be8f1 + 1359326 commit 5be1d85
Show file tree
Hide file tree
Showing 18 changed files with 450 additions and 153 deletions.
12 changes: 8 additions & 4 deletions drivers/scsi/ahci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
};

Expand Down Expand Up @@ -584,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);
Expand All @@ -607,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)
Expand Down Expand Up @@ -696,9 +703,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 */

Expand Down
14 changes: 7 additions & 7 deletions drivers/scsi/ata_piix.c
Original file line number Diff line number Diff line change
Expand Up @@ -629,13 +629,13 @@ static int piix_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
port_info[1] = NULL;

if (port_info[0]->host_flags & PIIX_FLAG_AHCI) {
u8 tmp;
pci_read_config_byte(pdev, PIIX_SCC, &tmp);
if (tmp == PIIX_AHCI_DEVICE) {
int rc = piix_disable_ahci(pdev);
if (rc)
return rc;
}
u8 tmp;
pci_read_config_byte(pdev, PIIX_SCC, &tmp);
if (tmp == PIIX_AHCI_DEVICE) {
int rc = piix_disable_ahci(pdev);
if (rc)
return rc;
}
}

if (port_info[0]->host_flags & PIIX_FLAG_COMBINED) {
Expand Down
Loading

0 comments on commit 5be1d85

Please sign in to comment.