diff options
Diffstat (limited to 'drivers/ata/ata_piix.c')
-rw-r--r-- | drivers/ata/ata_piix.c | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c index 720174d628fa..14b726b9f985 100644 --- a/drivers/ata/ata_piix.c +++ b/drivers/ata/ata_piix.c | |||
@@ -93,7 +93,7 @@ | |||
93 | #include <linux/libata.h> | 93 | #include <linux/libata.h> |
94 | 94 | ||
95 | #define DRV_NAME "ata_piix" | 95 | #define DRV_NAME "ata_piix" |
96 | #define DRV_VERSION "2.00ac6" | 96 | #define DRV_VERSION "2.00ac7" |
97 | 97 | ||
98 | enum { | 98 | enum { |
99 | PIIX_IOCFG = 0x54, /* IDE I/O configuration register */ | 99 | PIIX_IOCFG = 0x54, /* IDE I/O configuration register */ |
@@ -571,6 +571,23 @@ module_param(force_pcs, int, 0444); | |||
571 | MODULE_PARM_DESC(force_pcs, "force honoring or ignoring PCS to work around " | 571 | MODULE_PARM_DESC(force_pcs, "force honoring or ignoring PCS to work around " |
572 | "device mis-detection (0=default, 1=ignore PCS, 2=honor PCS)"); | 572 | "device mis-detection (0=default, 1=ignore PCS, 2=honor PCS)"); |
573 | 573 | ||
574 | struct ich_laptop { | ||
575 | u16 device; | ||
576 | u16 subvendor; | ||
577 | u16 subdevice; | ||
578 | }; | ||
579 | |||
580 | /* | ||
581 | * List of laptops that use short cables rather than 80 wire | ||
582 | */ | ||
583 | |||
584 | static const struct ich_laptop ich_laptop[] = { | ||
585 | /* devid, subvendor, subdev */ | ||
586 | { 0x27DF, 0x0005, 0x0280 }, /* ICH7 on Acer 5602WLMi */ | ||
587 | /* end marker */ | ||
588 | { 0, } | ||
589 | }; | ||
590 | |||
574 | /** | 591 | /** |
575 | * piix_pata_cbl_detect - Probe host controller cable detect info | 592 | * piix_pata_cbl_detect - Probe host controller cable detect info |
576 | * @ap: Port for which cable detect info is desired | 593 | * @ap: Port for which cable detect info is desired |
@@ -585,12 +602,24 @@ MODULE_PARM_DESC(force_pcs, "force honoring or ignoring PCS to work around " | |||
585 | static void ich_pata_cbl_detect(struct ata_port *ap) | 602 | static void ich_pata_cbl_detect(struct ata_port *ap) |
586 | { | 603 | { |
587 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); | 604 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); |
605 | const struct ich_laptop *lap = &ich_laptop[0]; | ||
588 | u8 tmp, mask; | 606 | u8 tmp, mask; |
589 | 607 | ||
590 | /* no 80c support in host controller? */ | 608 | /* no 80c support in host controller? */ |
591 | if ((ap->udma_mask & ~ATA_UDMA_MASK_40C) == 0) | 609 | if ((ap->udma_mask & ~ATA_UDMA_MASK_40C) == 0) |
592 | goto cbl40; | 610 | goto cbl40; |
593 | 611 | ||
612 | /* Check for specials - Acer Aspire 5602WLMi */ | ||
613 | while (lap->device) { | ||
614 | if (lap->device == pdev->device && | ||
615 | lap->subvendor == pdev->subsystem_vendor && | ||
616 | lap->subdevice == pdev->subsystem_device) { | ||
617 | ap->cbl = ATA_CBL_PATA40_SHORT; | ||
618 | return; | ||
619 | } | ||
620 | lap++; | ||
621 | } | ||
622 | |||
594 | /* check BIOS cable detect results */ | 623 | /* check BIOS cable detect results */ |
595 | mask = ap->port_no == 0 ? PIIX_80C_PRI : PIIX_80C_SEC; | 624 | mask = ap->port_no == 0 ? PIIX_80C_PRI : PIIX_80C_SEC; |
596 | pci_read_config_byte(pdev, PIIX_IOCFG, &tmp); | 625 | pci_read_config_byte(pdev, PIIX_IOCFG, &tmp); |