diff options
Diffstat (limited to 'drivers/ata/ahci.c')
-rw-r--r-- | drivers/ata/ahci.c | 43 |
1 files changed, 37 insertions, 6 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index b1a257746a19..a3241a1a710b 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c | |||
@@ -575,7 +575,7 @@ static const struct pci_device_id ahci_pci_tbl[] = { | |||
575 | { PCI_VDEVICE(ATI, 0x4395), board_ahci_sb700 }, /* ATI SB700/800 */ | 575 | { PCI_VDEVICE(ATI, 0x4395), board_ahci_sb700 }, /* ATI SB700/800 */ |
576 | 576 | ||
577 | /* AMD */ | 577 | /* AMD */ |
578 | { PCI_VDEVICE(AMD, 0x7800), board_ahci }, /* AMD SB900 */ | 578 | { PCI_VDEVICE(AMD, 0x7800), board_ahci }, /* AMD Hudson-2 */ |
579 | /* AMD is using RAID class only for ahci controllers */ | 579 | /* AMD is using RAID class only for ahci controllers */ |
580 | { PCI_VENDOR_ID_AMD, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, | 580 | { PCI_VENDOR_ID_AMD, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, |
581 | PCI_CLASS_STORAGE_RAID << 8, 0xffffff, board_ahci }, | 581 | PCI_CLASS_STORAGE_RAID << 8, 0xffffff, board_ahci }, |
@@ -605,6 +605,7 @@ static const struct pci_device_id ahci_pci_tbl[] = { | |||
605 | { PCI_VDEVICE(NVIDIA, 0x0559), board_ahci_yesncq }, /* MCP67 */ | 605 | { PCI_VDEVICE(NVIDIA, 0x0559), board_ahci_yesncq }, /* MCP67 */ |
606 | { PCI_VDEVICE(NVIDIA, 0x055a), board_ahci_yesncq }, /* MCP67 */ | 606 | { PCI_VDEVICE(NVIDIA, 0x055a), board_ahci_yesncq }, /* MCP67 */ |
607 | { PCI_VDEVICE(NVIDIA, 0x055b), board_ahci_yesncq }, /* MCP67 */ | 607 | { PCI_VDEVICE(NVIDIA, 0x055b), board_ahci_yesncq }, /* MCP67 */ |
608 | { PCI_VDEVICE(NVIDIA, 0x0580), board_ahci_yesncq }, /* Linux ID */ | ||
608 | { PCI_VDEVICE(NVIDIA, 0x07f0), board_ahci_yesncq }, /* MCP73 */ | 609 | { PCI_VDEVICE(NVIDIA, 0x07f0), board_ahci_yesncq }, /* MCP73 */ |
609 | { PCI_VDEVICE(NVIDIA, 0x07f1), board_ahci_yesncq }, /* MCP73 */ | 610 | { PCI_VDEVICE(NVIDIA, 0x07f1), board_ahci_yesncq }, /* MCP73 */ |
610 | { PCI_VDEVICE(NVIDIA, 0x07f2), board_ahci_yesncq }, /* MCP73 */ | 611 | { PCI_VDEVICE(NVIDIA, 0x07f2), board_ahci_yesncq }, /* MCP73 */ |
@@ -2717,6 +2718,30 @@ static bool ahci_sb600_enable_64bit(struct pci_dev *pdev) | |||
2717 | }, | 2718 | }, |
2718 | .driver_data = "20071026", /* yyyymmdd */ | 2719 | .driver_data = "20071026", /* yyyymmdd */ |
2719 | }, | 2720 | }, |
2721 | /* | ||
2722 | * All BIOS versions for the MSI K9A2 Platinum (MS-7376) | ||
2723 | * support 64bit DMA. | ||
2724 | * | ||
2725 | * BIOS versions earlier than 1.5 had the Manufacturer DMI | ||
2726 | * fields as "MICRO-STAR INTERANTIONAL CO.,LTD". | ||
2727 | * This spelling mistake was fixed in BIOS version 1.5, so | ||
2728 | * 1.5 and later have the Manufacturer as | ||
2729 | * "MICRO-STAR INTERNATIONAL CO.,LTD". | ||
2730 | * So try to match on DMI_BOARD_VENDOR of "MICRO-STAR INTER". | ||
2731 | * | ||
2732 | * BIOS versions earlier than 1.9 had a Board Product Name | ||
2733 | * DMI field of "MS-7376". This was changed to be | ||
2734 | * "K9A2 Platinum (MS-7376)" in version 1.9, but we can still | ||
2735 | * match on DMI_BOARD_NAME of "MS-7376". | ||
2736 | */ | ||
2737 | { | ||
2738 | .ident = "MSI K9A2 Platinum", | ||
2739 | .matches = { | ||
2740 | DMI_MATCH(DMI_BOARD_VENDOR, | ||
2741 | "MICRO-STAR INTER"), | ||
2742 | DMI_MATCH(DMI_BOARD_NAME, "MS-7376"), | ||
2743 | }, | ||
2744 | }, | ||
2720 | { } | 2745 | { } |
2721 | }; | 2746 | }; |
2722 | const struct dmi_system_id *match; | 2747 | const struct dmi_system_id *match; |
@@ -2728,18 +2753,24 @@ static bool ahci_sb600_enable_64bit(struct pci_dev *pdev) | |||
2728 | !match) | 2753 | !match) |
2729 | return false; | 2754 | return false; |
2730 | 2755 | ||
2756 | if (!match->driver_data) | ||
2757 | goto enable_64bit; | ||
2758 | |||
2731 | dmi_get_date(DMI_BIOS_DATE, &year, &month, &date); | 2759 | dmi_get_date(DMI_BIOS_DATE, &year, &month, &date); |
2732 | snprintf(buf, sizeof(buf), "%04d%02d%02d", year, month, date); | 2760 | snprintf(buf, sizeof(buf), "%04d%02d%02d", year, month, date); |
2733 | 2761 | ||
2734 | if (strcmp(buf, match->driver_data) >= 0) { | 2762 | if (strcmp(buf, match->driver_data) >= 0) |
2735 | dev_printk(KERN_WARNING, &pdev->dev, "%s: enabling 64bit DMA\n", | 2763 | goto enable_64bit; |
2736 | match->ident); | 2764 | else { |
2737 | return true; | ||
2738 | } else { | ||
2739 | dev_printk(KERN_WARNING, &pdev->dev, "%s: BIOS too old, " | 2765 | dev_printk(KERN_WARNING, &pdev->dev, "%s: BIOS too old, " |
2740 | "forcing 32bit DMA, update BIOS\n", match->ident); | 2766 | "forcing 32bit DMA, update BIOS\n", match->ident); |
2741 | return false; | 2767 | return false; |
2742 | } | 2768 | } |
2769 | |||
2770 | enable_64bit: | ||
2771 | dev_printk(KERN_WARNING, &pdev->dev, "%s: enabling 64bit DMA\n", | ||
2772 | match->ident); | ||
2773 | return true; | ||
2743 | } | 2774 | } |
2744 | 2775 | ||
2745 | static bool ahci_broken_system_poweroff(struct pci_dev *pdev) | 2776 | static bool ahci_broken_system_poweroff(struct pci_dev *pdev) |