aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-09-11 08:54:55 -0400
committerJeff Garzik <jeff@garzik.org>2006-09-11 08:54:55 -0400
commitdd1dc802368154a75926491092ec9e6a939c32df (patch)
treed30356622b57f9d993ff1c54a621c2d1f8cd31d9
parent406176ee7ef81cec3f346ecd41286a67148e3b0c (diff)
parent6708374178d225ef77571ed23b30e8a93c36add5 (diff)
Merge branch 'upstream-fixes' into upstream
Conflicts: drivers/ata/ata_piix.c
-rw-r--r--drivers/ata/ata_piix.c40
-rw-r--r--drivers/ata/sata_mv.c3
2 files changed, 37 insertions, 6 deletions
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index 1a4c03d5de9f..965b4f0ba711 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -126,7 +126,8 @@ enum {
126 ich6_sata = 7, 126 ich6_sata = 7,
127 ich6_sata_ahci = 8, 127 ich6_sata_ahci = 8,
128 ich6m_sata_ahci = 9, 128 ich6m_sata_ahci = 9,
129 ich8_sata_ahci = 10, 129 ich7m_sata_ahci = 10,
130 ich8_sata_ahci = 11,
130 131
131 /* constants for mapping table */ 132 /* constants for mapping table */
132 P0 = 0, /* port 0 */ 133 P0 = 0, /* port 0 */
@@ -226,7 +227,7 @@ static const struct pci_device_id piix_pci_tbl[] = {
226 /* 82801GB/GR/GH (ICH7, identical to ICH6) */ 227 /* 82801GB/GR/GH (ICH7, identical to ICH6) */
227 { 0x8086, 0x27c0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci }, 228 { 0x8086, 0x27c0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci },
228 /* 2801GBM/GHM (ICH7M, identical to ICH6M) */ 229 /* 2801GBM/GHM (ICH7M, identical to ICH6M) */
229 { 0x8086, 0x27c4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6m_sata_ahci }, 230 { 0x8086, 0x27c4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich7m_sata_ahci },
230 /* Enterprise Southbridge 2 (where's the datasheet?) */ 231 /* Enterprise Southbridge 2 (where's the datasheet?) */
231 { 0x8086, 0x2680, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci }, 232 { 0x8086, 0x2680, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_ahci },
232 /* SATA Controller 1 IDE (ICH8, no datasheet yet) */ 233 /* SATA Controller 1 IDE (ICH8, no datasheet yet) */
@@ -407,6 +408,24 @@ static const struct piix_map_db ich6m_map_db = {
407 }, 408 },
408}; 409};
409 410
411static const struct piix_map_db ich7m_map_db = {
412 .mask = 0x3,
413 .port_enable = 0x5,
414 .present_shift = 4,
415
416 /* Map 01b isn't specified in the doc but some notebooks use
417 * it anyway. ATM, the only case spotted carries subsystem ID
418 * 1025:0107. This is the only difference from ich6m.
419 */
420 .map = {
421 /* PM PS SM SS MAP */
422 { P0, P2, RV, RV }, /* 00b */
423 { IDE, IDE, P1, P3 }, /* 01b */
424 { P0, P2, IDE, IDE }, /* 10b */
425 { RV, RV, RV, RV },
426 },
427};
428
410static const struct piix_map_db ich8_map_db = { 429static const struct piix_map_db ich8_map_db = {
411 .mask = 0x3, 430 .mask = 0x3,
412 .port_enable = 0x3, 431 .port_enable = 0x3,
@@ -426,6 +445,7 @@ static const struct piix_map_db *piix_map_db_table[] = {
426 [ich6_sata] = &ich6_map_db, 445 [ich6_sata] = &ich6_map_db,
427 [ich6_sata_ahci] = &ich6_map_db, 446 [ich6_sata_ahci] = &ich6_map_db,
428 [ich6m_sata_ahci] = &ich6m_map_db, 447 [ich6m_sata_ahci] = &ich6m_map_db,
448 [ich7m_sata_ahci] = &ich7m_map_db,
429 [ich8_sata_ahci] = &ich8_map_db, 449 [ich8_sata_ahci] = &ich8_map_db,
430}; 450};
431 451
@@ -512,7 +532,7 @@ static struct ata_port_info piix_port_info[] = {
512 .port_ops = &piix_sata_ops, 532 .port_ops = &piix_sata_ops,
513 }, 533 },
514 534
515 /* ich6_sata_ahci:8 */ 535 /* ich6_sata_ahci: 8 */
516 { 536 {
517 .sht = &piix_sht, 537 .sht = &piix_sht,
518 .flags = ATA_FLAG_SATA | 538 .flags = ATA_FLAG_SATA |
@@ -536,7 +556,19 @@ static struct ata_port_info piix_port_info[] = {
536 .port_ops = &piix_sata_ops, 556 .port_ops = &piix_sata_ops,
537 }, 557 },
538 558
539 /* ich8_sata_ahci */ 559 /* ich7m_sata_ahci: 10 */
560 {
561 .sht = &piix_sht,
562 .host_flags = ATA_FLAG_SATA |
563 PIIX_FLAG_CHECKINTR | PIIX_FLAG_SCR |
564 PIIX_FLAG_AHCI,
565 .pio_mask = 0x1f, /* pio0-4 */
566 .mwdma_mask = 0x07, /* mwdma0-2 */
567 .udma_mask = 0x7f, /* udma0-6 */
568 .port_ops = &piix_sata_ops,
569 },
570
571 /* ich8_sata_ahci: 11 */
540 { 572 {
541 .sht = &piix_sht, 573 .sht = &piix_sht,
542 .flags = ATA_FLAG_SATA | 574 .flags = ATA_FLAG_SATA |
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 34f1939b44c9..fdce6e07ecd2 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -1960,8 +1960,7 @@ comreset_retry:
1960 timeout = jiffies + msecs_to_jiffies(200); 1960 timeout = jiffies + msecs_to_jiffies(200);
1961 do { 1961 do {
1962 sata_scr_read(ap, SCR_STATUS, &sstatus); 1962 sata_scr_read(ap, SCR_STATUS, &sstatus);
1963 sstatus &= 0x3; 1963 if (((sstatus & 0x3) == 3) || ((sstatus & 0x3) == 0))
1964 if ((sstatus == 3) || (sstatus == 0))
1965 break; 1964 break;
1966 1965
1967 __msleep(1, can_sleep); 1966 __msleep(1, can_sleep);