diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 5dffcfe..5f8104f 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt @@ -633,6 +633,13 @@ running once the system is up. inport.irq= [HW] Inport (ATI XL and Microsoft) busmouse driver Format: + intel_combined_mode= + [HW] control which driver uses IDE ports in combined + mode, legacy IDE driver, both or libata exclusively + (in the latter case, libata.atapi_enabled=1 may be + useful as well) + Format: ide,combined,libata + inttest= [IA64] io7= [HW] IO7 for Marvel based alpha systems diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 3a4f49f..9be5ae0 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -1099,6 +1099,23 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I #endif #ifdef CONFIG_SCSI_SATA_INTEL_COMBINED +enum ide_combined_type { COMBINED = 0, IDE = 1, LIBATA = 2 }; +/* Defaults to combined */ +static enum ide_combined_type intel_combined_mode_type; + +static int __init intel_ide_combined_setup(char *str) +{ + if (!strncmp(str, "ide", 3)) + intel_combined_mode_type = IDE; + else if (!strncmp(str, "libata", 6)) + intel_combined_mode_type = LIBATA; + else /* "combined" or anything else defaults to old behavior */ + intel_combined_mode_type = COMBINED; + + return 1; +} +__setup("intel_combined_mode=", intel_ide_combined_setup); + static void __devinit quirk_intel_ide_combined(struct pci_dev *pdev) { u8 prog, comb, tmp; @@ -1164,6 +1181,19 @@ static void __devinit quirk_intel_ide_co if (prog & comb) return; + /* Don't reserve any so the IDE driver can get them (but only if + * intel_combined_mode=ide). + */ + if (intel_combined_mode_type == IDE) + return; + + /* Grab them both for libata if intel_combined_mode=libata. */ + if (intel_combined_mode_type == LIBATA) { + request_region(0x1f0, 8, "libata"); /* port 0 */ + request_region(0x170, 8, "libata"); /* port 1 */ + return; + } + /* SATA port is in legacy mode. Reserve port so that * IDE driver does not attempt to use it. If request_region * fails, it will be obvious at boot time, so we don't bother