diff options
author | David Woodhouse <dwmw2@infradead.org> | 2006-08-30 18:30:38 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2006-08-30 18:30:38 -0400 |
commit | 0a7d5f8ce960e74fa22986bda4af488539796e49 (patch) | |
tree | e29ad17808a5c3410518e22dae8dfe94801b59f3 /drivers/scsi/ahci.c | |
parent | 0165508c80a2b5d5268d9c5dfa9b30c534a33693 (diff) | |
parent | dc709bd190c130b299ac19d596594256265c042a (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/scsi/ahci.c')
-rw-r--r-- | drivers/scsi/ahci.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c index 15f6cd4279b7..904c25fb4ba4 100644 --- a/drivers/scsi/ahci.c +++ b/drivers/scsi/ahci.c | |||
@@ -940,14 +940,8 @@ static void ahci_host_intr(struct ata_port *ap) | |||
940 | return; | 940 | return; |
941 | 941 | ||
942 | /* ignore interim PIO setup fis interrupts */ | 942 | /* ignore interim PIO setup fis interrupts */ |
943 | if (ata_tag_valid(ap->active_tag)) { | 943 | if (ata_tag_valid(ap->active_tag) && (status & PORT_IRQ_PIOS_FIS)) |
944 | struct ata_queued_cmd *qc = | 944 | return; |
945 | ata_qc_from_tag(ap, ap->active_tag); | ||
946 | |||
947 | if (qc && qc->tf.protocol == ATA_PROT_PIO && | ||
948 | (status & PORT_IRQ_PIOS_FIS)) | ||
949 | return; | ||
950 | } | ||
951 | 945 | ||
952 | if (ata_ratelimit()) | 946 | if (ata_ratelimit()) |
953 | ata_port_printk(ap, KERN_INFO, "spurious interrupt " | 947 | ata_port_printk(ap, KERN_INFO, "spurious interrupt " |
@@ -1052,7 +1046,7 @@ static void ahci_thaw(struct ata_port *ap) | |||
1052 | 1046 | ||
1053 | static void ahci_error_handler(struct ata_port *ap) | 1047 | static void ahci_error_handler(struct ata_port *ap) |
1054 | { | 1048 | { |
1055 | if (!(ap->flags & ATA_FLAG_FROZEN)) { | 1049 | if (!(ap->pflags & ATA_PFLAG_FROZEN)) { |
1056 | /* restart engine */ | 1050 | /* restart engine */ |
1057 | ahci_stop_engine(ap); | 1051 | ahci_stop_engine(ap); |
1058 | ahci_start_engine(ap); | 1052 | ahci_start_engine(ap); |
@@ -1323,6 +1317,17 @@ static int ahci_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1323 | if (!printed_version++) | 1317 | if (!printed_version++) |
1324 | dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n"); | 1318 | dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n"); |
1325 | 1319 | ||
1320 | /* JMicron-specific fixup: make sure we're in AHCI mode */ | ||
1321 | /* This is protected from races with ata_jmicron by the pci probe | ||
1322 | locking */ | ||
1323 | if (pdev->vendor == PCI_VENDOR_ID_JMICRON) { | ||
1324 | /* AHCI enable, AHCI on function 0 */ | ||
1325 | pci_write_config_byte(pdev, 0x41, 0xa1); | ||
1326 | /* Function 1 is the PATA controller */ | ||
1327 | if (PCI_FUNC(pdev->devfn)) | ||
1328 | return -ENODEV; | ||
1329 | } | ||
1330 | |||
1326 | rc = pci_enable_device(pdev); | 1331 | rc = pci_enable_device(pdev); |
1327 | if (rc) | 1332 | if (rc) |
1328 | return rc; | 1333 | return rc; |
@@ -1378,10 +1383,6 @@ static int ahci_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1378 | if (have_msi) | 1383 | if (have_msi) |
1379 | hpriv->flags |= AHCI_FLAG_MSI; | 1384 | hpriv->flags |= AHCI_FLAG_MSI; |
1380 | 1385 | ||
1381 | /* JMicron-specific fixup: make sure we're in AHCI mode */ | ||
1382 | if (pdev->vendor == 0x197b) | ||
1383 | pci_write_config_byte(pdev, 0x41, 0xa1); | ||
1384 | |||
1385 | /* initialize adapter */ | 1386 | /* initialize adapter */ |
1386 | rc = ahci_host_init(probe_ent); | 1387 | rc = ahci_host_init(probe_ent); |
1387 | if (rc) | 1388 | if (rc) |