diff options
author | Len Brown <len.brown@intel.com> | 2006-01-06 16:34:21 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2006-01-06 16:34:21 -0500 |
commit | 25da0974601fc8096461f3d3f7ca3aab8e79adfb (patch) | |
tree | f9b3c1bfbc63fdb6a94e82177b8c3ae891125422 /drivers/pci | |
parent | 036d25f79ddfbc9878da24ef8e468a6d22caa605 (diff) | |
parent | d99cf9d679a520d67f81d805b7cb91c68e1847f0 (diff) |
Auto-update from upstream
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/hotplug.c | 44 | ||||
-rw-r--r-- | drivers/pci/pci-driver.c | 6 | ||||
-rw-r--r-- | drivers/pci/pci.h | 4 | ||||
-rw-r--r-- | drivers/pci/quirks.c | 30 |
4 files changed, 57 insertions, 27 deletions
diff --git a/drivers/pci/hotplug.c b/drivers/pci/hotplug.c index e1743be31909..1c97e7dd130b 100644 --- a/drivers/pci/hotplug.c +++ b/drivers/pci/hotplug.c | |||
@@ -3,8 +3,8 @@ | |||
3 | #include <linux/module.h> | 3 | #include <linux/module.h> |
4 | #include "pci.h" | 4 | #include "pci.h" |
5 | 5 | ||
6 | int pci_hotplug (struct device *dev, char **envp, int num_envp, | 6 | int pci_uevent(struct device *dev, char **envp, int num_envp, |
7 | char *buffer, int buffer_size) | 7 | char *buffer, int buffer_size) |
8 | { | 8 | { |
9 | struct pci_dev *pdev; | 9 | struct pci_dev *pdev; |
10 | int i = 0; | 10 | int i = 0; |
@@ -17,34 +17,34 @@ int pci_hotplug (struct device *dev, char **envp, int num_envp, | |||
17 | if (!pdev) | 17 | if (!pdev) |
18 | return -ENODEV; | 18 | return -ENODEV; |
19 | 19 | ||
20 | if (add_hotplug_env_var(envp, num_envp, &i, | 20 | if (add_uevent_var(envp, num_envp, &i, |
21 | buffer, buffer_size, &length, | 21 | buffer, buffer_size, &length, |
22 | "PCI_CLASS=%04X", pdev->class)) | 22 | "PCI_CLASS=%04X", pdev->class)) |
23 | return -ENOMEM; | 23 | return -ENOMEM; |
24 | 24 | ||
25 | if (add_hotplug_env_var(envp, num_envp, &i, | 25 | if (add_uevent_var(envp, num_envp, &i, |
26 | buffer, buffer_size, &length, | 26 | buffer, buffer_size, &length, |
27 | "PCI_ID=%04X:%04X", pdev->vendor, pdev->device)) | 27 | "PCI_ID=%04X:%04X", pdev->vendor, pdev->device)) |
28 | return -ENOMEM; | 28 | return -ENOMEM; |
29 | 29 | ||
30 | if (add_hotplug_env_var(envp, num_envp, &i, | 30 | if (add_uevent_var(envp, num_envp, &i, |
31 | buffer, buffer_size, &length, | 31 | buffer, buffer_size, &length, |
32 | "PCI_SUBSYS_ID=%04X:%04X", pdev->subsystem_vendor, | 32 | "PCI_SUBSYS_ID=%04X:%04X", pdev->subsystem_vendor, |
33 | pdev->subsystem_device)) | 33 | pdev->subsystem_device)) |
34 | return -ENOMEM; | 34 | return -ENOMEM; |
35 | 35 | ||
36 | if (add_hotplug_env_var(envp, num_envp, &i, | 36 | if (add_uevent_var(envp, num_envp, &i, |
37 | buffer, buffer_size, &length, | 37 | buffer, buffer_size, &length, |
38 | "PCI_SLOT_NAME=%s", pci_name(pdev))) | 38 | "PCI_SLOT_NAME=%s", pci_name(pdev))) |
39 | return -ENOMEM; | 39 | return -ENOMEM; |
40 | 40 | ||
41 | if (add_hotplug_env_var(envp, num_envp, &i, | 41 | if (add_uevent_var(envp, num_envp, &i, |
42 | buffer, buffer_size, &length, | 42 | buffer, buffer_size, &length, |
43 | "MODALIAS=pci:v%08Xd%08Xsv%08Xsd%08Xbc%02Xsc%02Xi%02x", | 43 | "MODALIAS=pci:v%08Xd%08Xsv%08Xsd%08Xbc%02Xsc%02Xi%02x", |
44 | pdev->vendor, pdev->device, | 44 | pdev->vendor, pdev->device, |
45 | pdev->subsystem_vendor, pdev->subsystem_device, | 45 | pdev->subsystem_vendor, pdev->subsystem_device, |
46 | (u8)(pdev->class >> 16), (u8)(pdev->class >> 8), | 46 | (u8)(pdev->class >> 16), (u8)(pdev->class >> 8), |
47 | (u8)(pdev->class))) | 47 | (u8)(pdev->class))) |
48 | return -ENOMEM; | 48 | return -ENOMEM; |
49 | 49 | ||
50 | envp[i] = NULL; | 50 | envp[i] = NULL; |
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index a9046d4b8af3..7146b69b812c 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c | |||
@@ -502,8 +502,8 @@ void pci_dev_put(struct pci_dev *dev) | |||
502 | } | 502 | } |
503 | 503 | ||
504 | #ifndef CONFIG_HOTPLUG | 504 | #ifndef CONFIG_HOTPLUG |
505 | int pci_hotplug (struct device *dev, char **envp, int num_envp, | 505 | int pci_uevent(struct device *dev, char **envp, int num_envp, |
506 | char *buffer, int buffer_size) | 506 | char *buffer, int buffer_size) |
507 | { | 507 | { |
508 | return -ENODEV; | 508 | return -ENODEV; |
509 | } | 509 | } |
@@ -512,7 +512,7 @@ int pci_hotplug (struct device *dev, char **envp, int num_envp, | |||
512 | struct bus_type pci_bus_type = { | 512 | struct bus_type pci_bus_type = { |
513 | .name = "pci", | 513 | .name = "pci", |
514 | .match = pci_bus_match, | 514 | .match = pci_bus_match, |
515 | .hotplug = pci_hotplug, | 515 | .uevent = pci_uevent, |
516 | .suspend = pci_device_suspend, | 516 | .suspend = pci_device_suspend, |
517 | .resume = pci_device_resume, | 517 | .resume = pci_device_resume, |
518 | .dev_attrs = pci_dev_attrs, | 518 | .dev_attrs = pci_dev_attrs, |
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 6527b36c9a61..294849d24590 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* Functions internal to the PCI core code */ | 1 | /* Functions internal to the PCI core code */ |
2 | 2 | ||
3 | extern int pci_hotplug (struct device *dev, char **envp, int num_envp, | 3 | extern int pci_uevent(struct device *dev, char **envp, int num_envp, |
4 | char *buffer, int buffer_size); | 4 | char *buffer, int buffer_size); |
5 | extern int pci_create_sysfs_dev_files(struct pci_dev *pdev); | 5 | extern int pci_create_sysfs_dev_files(struct pci_dev *pdev); |
6 | extern void pci_remove_sysfs_dev_files(struct pci_dev *pdev); | 6 | extern void pci_remove_sysfs_dev_files(struct pci_dev *pdev); |
7 | extern void pci_cleanup_rom(struct pci_dev *dev); | 7 | extern void pci_cleanup_rom(struct pci_dev *dev); |
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 3a4f49f4effb..f28ebdd3958a 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c | |||
@@ -1098,6 +1098,23 @@ static void __init quirk_alder_ioapic(struct pci_dev *pdev) | |||
1098 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_EESSC, quirk_alder_ioapic ); | 1098 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_EESSC, quirk_alder_ioapic ); |
1099 | #endif | 1099 | #endif |
1100 | 1100 | ||
1101 | enum ide_combined_type { COMBINED = 0, IDE = 1, LIBATA = 2 }; | ||
1102 | /* Defaults to combined */ | ||
1103 | static enum ide_combined_type combined_mode; | ||
1104 | |||
1105 | static int __init combined_setup(char *str) | ||
1106 | { | ||
1107 | if (!strncmp(str, "ide", 3)) | ||
1108 | combined_mode = IDE; | ||
1109 | else if (!strncmp(str, "libata", 6)) | ||
1110 | combined_mode = LIBATA; | ||
1111 | else /* "combined" or anything else defaults to old behavior */ | ||
1112 | combined_mode = COMBINED; | ||
1113 | |||
1114 | return 1; | ||
1115 | } | ||
1116 | __setup("combined_mode=", combined_setup); | ||
1117 | |||
1101 | #ifdef CONFIG_SCSI_SATA_INTEL_COMBINED | 1118 | #ifdef CONFIG_SCSI_SATA_INTEL_COMBINED |
1102 | static void __devinit quirk_intel_ide_combined(struct pci_dev *pdev) | 1119 | static void __devinit quirk_intel_ide_combined(struct pci_dev *pdev) |
1103 | { | 1120 | { |
@@ -1164,6 +1181,19 @@ static void __devinit quirk_intel_ide_combined(struct pci_dev *pdev) | |||
1164 | if (prog & comb) | 1181 | if (prog & comb) |
1165 | return; | 1182 | return; |
1166 | 1183 | ||
1184 | /* Don't reserve any so the IDE driver can get them (but only if | ||
1185 | * combined_mode=ide). | ||
1186 | */ | ||
1187 | if (combined_mode == IDE) | ||
1188 | return; | ||
1189 | |||
1190 | /* Grab them both for libata if combined_mode=libata. */ | ||
1191 | if (combined_mode == LIBATA) { | ||
1192 | request_region(0x1f0, 8, "libata"); /* port 0 */ | ||
1193 | request_region(0x170, 8, "libata"); /* port 1 */ | ||
1194 | return; | ||
1195 | } | ||
1196 | |||
1167 | /* SATA port is in legacy mode. Reserve port so that | 1197 | /* SATA port is in legacy mode. Reserve port so that |
1168 | * IDE driver does not attempt to use it. If request_region | 1198 | * IDE driver does not attempt to use it. If request_region |
1169 | * fails, it will be obvious at boot time, so we don't bother | 1199 | * fails, it will be obvious at boot time, so we don't bother |