diff options
-rw-r--r-- | Documentation/kernel-parameters.txt | 6 | ||||
-rw-r--r-- | Documentation/pci.txt | 4 | ||||
-rw-r--r-- | arch/i386/pci/common.c | 88 | ||||
-rw-r--r-- | drivers/pci/pci-driver.c | 1 | ||||
-rw-r--r-- | drivers/pci/pci-sysfs.c | 11 | ||||
-rw-r--r-- | drivers/pci/pci.c | 12 | ||||
-rw-r--r-- | drivers/pci/setup-bus.c | 27 | ||||
-rw-r--r-- | drivers/pci/setup-irq.c | 18 | ||||
-rw-r--r-- | fs/sysfs/file.c | 2 | ||||
-rw-r--r-- | include/linux/pci.h | 3 | ||||
-rw-r--r-- | lib/kobject.c | 1 |
11 files changed, 144 insertions, 29 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index abd575cfc759..ce1f2c85e20f 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -1275,6 +1275,12 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1275 | This sorting is done to get a device | 1275 | This sorting is done to get a device |
1276 | order compatible with older (<= 2.4) kernels. | 1276 | order compatible with older (<= 2.4) kernels. |
1277 | nobfsort Don't sort PCI devices into breadth-first order. | 1277 | nobfsort Don't sort PCI devices into breadth-first order. |
1278 | cbiosize=nn[KMG] The fixed amount of bus space which is | ||
1279 | reserved for the CardBus bridge's IO window. | ||
1280 | The default value is 256 bytes. | ||
1281 | cbmemsize=nn[KMG] The fixed amount of bus space which is | ||
1282 | reserved for the CardBus bridge's memory | ||
1283 | window. The default value is 64 megabytes. | ||
1278 | 1284 | ||
1279 | pcmv= [HW,PCMCIA] BadgePAD 4 | 1285 | pcmv= [HW,PCMCIA] BadgePAD 4 |
1280 | 1286 | ||
diff --git a/Documentation/pci.txt b/Documentation/pci.txt index fd5028eca13e..cdf2f3c0ab14 100644 --- a/Documentation/pci.txt +++ b/Documentation/pci.txt | |||
@@ -205,8 +205,8 @@ Tips on when/where to use the above attributes: | |||
205 | exclusively called by the probe() routine, can be marked __devinit. | 205 | exclusively called by the probe() routine, can be marked __devinit. |
206 | Ditto for remove() and __devexit. | 206 | Ditto for remove() and __devexit. |
207 | 207 | ||
208 | o If mydriver_probe() is marked with __devinit(), then all address | 208 | o If mydriver_remove() is marked with __devexit(), then all address |
209 | references to mydriver_probe must use __devexit_p(mydriver_probe) | 209 | references to mydriver_remove must use __devexit_p(mydriver_remove) |
210 | (in the struct pci_driver declaration for example). | 210 | (in the struct pci_driver declaration for example). |
211 | __devexit_p() will generate the function name _or_ NULL if the | 211 | __devexit_p() will generate the function name _or_ NULL if the |
212 | function will be discarded. For an example, see drivers/net/tg3.c. | 212 | function will be discarded. For an example, see drivers/net/tg3.c. |
diff --git a/arch/i386/pci/common.c b/arch/i386/pci/common.c index 53ca6e897984..1bb069372143 100644 --- a/arch/i386/pci/common.c +++ b/arch/i386/pci/common.c | |||
@@ -191,6 +191,94 @@ static struct dmi_system_id __devinitdata pciprobe_dmi_table[] = { | |||
191 | DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge 2950"), | 191 | DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge 2950"), |
192 | }, | 192 | }, |
193 | }, | 193 | }, |
194 | { | ||
195 | .callback = set_bf_sort, | ||
196 | .ident = "HP ProLiant BL20p G3", | ||
197 | .matches = { | ||
198 | DMI_MATCH(DMI_SYS_VENDOR, "HP"), | ||
199 | DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant BL20p G3"), | ||
200 | }, | ||
201 | }, | ||
202 | { | ||
203 | .callback = set_bf_sort, | ||
204 | .ident = "HP ProLiant BL20p G4", | ||
205 | .matches = { | ||
206 | DMI_MATCH(DMI_SYS_VENDOR, "HP"), | ||
207 | DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant BL20p G4"), | ||
208 | }, | ||
209 | }, | ||
210 | { | ||
211 | .callback = set_bf_sort, | ||
212 | .ident = "HP ProLiant BL30p G1", | ||
213 | .matches = { | ||
214 | DMI_MATCH(DMI_SYS_VENDOR, "HP"), | ||
215 | DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant BL30p G1"), | ||
216 | }, | ||
217 | }, | ||
218 | { | ||
219 | .callback = set_bf_sort, | ||
220 | .ident = "HP ProLiant BL25p G1", | ||
221 | .matches = { | ||
222 | DMI_MATCH(DMI_SYS_VENDOR, "HP"), | ||
223 | DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant BL25p G1"), | ||
224 | }, | ||
225 | }, | ||
226 | { | ||
227 | .callback = set_bf_sort, | ||
228 | .ident = "HP ProLiant BL35p G1", | ||
229 | .matches = { | ||
230 | DMI_MATCH(DMI_SYS_VENDOR, "HP"), | ||
231 | DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant BL35p G1"), | ||
232 | }, | ||
233 | }, | ||
234 | { | ||
235 | .callback = set_bf_sort, | ||
236 | .ident = "HP ProLiant BL45p G1", | ||
237 | .matches = { | ||
238 | DMI_MATCH(DMI_SYS_VENDOR, "HP"), | ||
239 | DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant BL45p G1"), | ||
240 | }, | ||
241 | }, | ||
242 | { | ||
243 | .callback = set_bf_sort, | ||
244 | .ident = "HP ProLiant BL45p G2", | ||
245 | .matches = { | ||
246 | DMI_MATCH(DMI_SYS_VENDOR, "HP"), | ||
247 | DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant BL45p G2"), | ||
248 | }, | ||
249 | }, | ||
250 | { | ||
251 | .callback = set_bf_sort, | ||
252 | .ident = "HP ProLiant BL460c G1", | ||
253 | .matches = { | ||
254 | DMI_MATCH(DMI_SYS_VENDOR, "HP"), | ||
255 | DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant BL460c G1"), | ||
256 | }, | ||
257 | }, | ||
258 | { | ||
259 | .callback = set_bf_sort, | ||
260 | .ident = "HP ProLiant BL465c G1", | ||
261 | .matches = { | ||
262 | DMI_MATCH(DMI_SYS_VENDOR, "HP"), | ||
263 | DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant BL465c G1"), | ||
264 | }, | ||
265 | }, | ||
266 | { | ||
267 | .callback = set_bf_sort, | ||
268 | .ident = "HP ProLiant BL480c G1", | ||
269 | .matches = { | ||
270 | DMI_MATCH(DMI_SYS_VENDOR, "HP"), | ||
271 | DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant BL480c G1"), | ||
272 | }, | ||
273 | }, | ||
274 | { | ||
275 | .callback = set_bf_sort, | ||
276 | .ident = "HP ProLiant BL685c G1", | ||
277 | .matches = { | ||
278 | DMI_MATCH(DMI_SYS_VENDOR, "HP"), | ||
279 | DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant BL685c G1"), | ||
280 | }, | ||
281 | }, | ||
194 | {} | 282 | {} |
195 | }; | 283 | }; |
196 | 284 | ||
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index 4438ae1ede4f..a3c1755b2f28 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c | |||
@@ -415,6 +415,7 @@ static struct kobj_type pci_driver_kobj_type = { | |||
415 | * __pci_register_driver - register a new pci driver | 415 | * __pci_register_driver - register a new pci driver |
416 | * @drv: the driver structure to register | 416 | * @drv: the driver structure to register |
417 | * @owner: owner module of drv | 417 | * @owner: owner module of drv |
418 | * @mod_name: module name string | ||
418 | * | 419 | * |
419 | * Adds the driver structure to the list of registered drivers. | 420 | * Adds the driver structure to the list of registered drivers. |
420 | * Returns a negative value on error, otherwise 0. | 421 | * Returns a negative value on error, otherwise 0. |
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index 7a94076752d0..cd913a2a416f 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c | |||
@@ -143,6 +143,14 @@ static ssize_t is_enabled_show(struct device *dev, | |||
143 | return sprintf (buf, "%u\n", atomic_read(&pdev->enable_cnt)); | 143 | return sprintf (buf, "%u\n", atomic_read(&pdev->enable_cnt)); |
144 | } | 144 | } |
145 | 145 | ||
146 | #ifdef CONFIG_NUMA | ||
147 | static ssize_t | ||
148 | numa_node_show(struct device *dev, struct device_attribute *attr, char *buf) | ||
149 | { | ||
150 | return sprintf (buf, "%d\n", dev->numa_node); | ||
151 | } | ||
152 | #endif | ||
153 | |||
146 | static ssize_t | 154 | static ssize_t |
147 | msi_bus_show(struct device *dev, struct device_attribute *attr, char *buf) | 155 | msi_bus_show(struct device *dev, struct device_attribute *attr, char *buf) |
148 | { | 156 | { |
@@ -194,6 +202,9 @@ struct device_attribute pci_dev_attrs[] = { | |||
194 | __ATTR_RO(irq), | 202 | __ATTR_RO(irq), |
195 | __ATTR_RO(local_cpus), | 203 | __ATTR_RO(local_cpus), |
196 | __ATTR_RO(modalias), | 204 | __ATTR_RO(modalias), |
205 | #ifdef CONFIG_NUMA | ||
206 | __ATTR_RO(numa_node), | ||
207 | #endif | ||
197 | __ATTR(enable, 0600, is_enabled_show, is_enabled_store), | 208 | __ATTR(enable, 0600, is_enabled_show, is_enabled_store), |
198 | __ATTR(broken_parity_status,(S_IRUGO|S_IWUSR), | 209 | __ATTR(broken_parity_status,(S_IRUGO|S_IWUSR), |
199 | broken_parity_status_show,broken_parity_status_store), | 210 | broken_parity_status_show,broken_parity_status_store), |
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 8b44cff2c176..1e74e1ee8bd8 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -21,6 +21,12 @@ | |||
21 | 21 | ||
22 | unsigned int pci_pm_d3_delay = 10; | 22 | unsigned int pci_pm_d3_delay = 10; |
23 | 23 | ||
24 | #define DEFAULT_CARDBUS_IO_SIZE (256) | ||
25 | #define DEFAULT_CARDBUS_MEM_SIZE (64*1024*1024) | ||
26 | /* pci=cbmemsize=nnM,cbiosize=nn can override this */ | ||
27 | unsigned long pci_cardbus_io_size = DEFAULT_CARDBUS_IO_SIZE; | ||
28 | unsigned long pci_cardbus_mem_size = DEFAULT_CARDBUS_MEM_SIZE; | ||
29 | |||
24 | /** | 30 | /** |
25 | * pci_bus_max_busnr - returns maximum PCI bus number of given bus' children | 31 | * pci_bus_max_busnr - returns maximum PCI bus number of given bus' children |
26 | * @bus: pointer to PCI bus structure to search | 32 | * @bus: pointer to PCI bus structure to search |
@@ -1300,7 +1306,7 @@ pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask) | |||
1300 | 1306 | ||
1301 | /** | 1307 | /** |
1302 | * pci_select_bars - Make BAR mask from the type of resource | 1308 | * pci_select_bars - Make BAR mask from the type of resource |
1303 | * @pdev: the PCI device for which BAR mask is made | 1309 | * @dev: the PCI device for which BAR mask is made |
1304 | * @flags: resource type mask to be selected | 1310 | * @flags: resource type mask to be selected |
1305 | * | 1311 | * |
1306 | * This helper routine makes bar mask from the type of resource. | 1312 | * This helper routine makes bar mask from the type of resource. |
@@ -1333,6 +1339,10 @@ static int __devinit pci_setup(char *str) | |||
1333 | if (*str && (str = pcibios_setup(str)) && *str) { | 1339 | if (*str && (str = pcibios_setup(str)) && *str) { |
1334 | if (!strcmp(str, "nomsi")) { | 1340 | if (!strcmp(str, "nomsi")) { |
1335 | pci_no_msi(); | 1341 | pci_no_msi(); |
1342 | } else if (!strncmp(str, "cbiosize=", 9)) { | ||
1343 | pci_cardbus_io_size = memparse(str + 9, &str); | ||
1344 | } else if (!strncmp(str, "cbmemsize=", 10)) { | ||
1345 | pci_cardbus_mem_size = memparse(str + 10, &str); | ||
1336 | } else { | 1346 | } else { |
1337 | printk(KERN_ERR "PCI: Unknown option `%s'\n", | 1347 | printk(KERN_ERR "PCI: Unknown option `%s'\n", |
1338 | str); | 1348 | str); |
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 89f3036f0de8..3554f3948814 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c | |||
@@ -36,13 +36,6 @@ | |||
36 | 36 | ||
37 | #define ROUND_UP(x, a) (((x) + (a) - 1) & ~((a) - 1)) | 37 | #define ROUND_UP(x, a) (((x) + (a) - 1) & ~((a) - 1)) |
38 | 38 | ||
39 | /* | ||
40 | * FIXME: IO should be max 256 bytes. However, since we may | ||
41 | * have a P2P bridge below a cardbus bridge, we need 4K. | ||
42 | */ | ||
43 | #define CARDBUS_IO_SIZE (256) | ||
44 | #define CARDBUS_MEM_SIZE (64*1024*1024) | ||
45 | |||
46 | static void __devinit | 39 | static void __devinit |
47 | pbus_assign_resources_sorted(struct pci_bus *bus) | 40 | pbus_assign_resources_sorted(struct pci_bus *bus) |
48 | { | 41 | { |
@@ -415,12 +408,12 @@ pci_bus_size_cardbus(struct pci_bus *bus) | |||
415 | * Reserve some resources for CardBus. We reserve | 408 | * Reserve some resources for CardBus. We reserve |
416 | * a fixed amount of bus space for CardBus bridges. | 409 | * a fixed amount of bus space for CardBus bridges. |
417 | */ | 410 | */ |
418 | b_res[0].start = CARDBUS_IO_SIZE; | 411 | b_res[0].start = pci_cardbus_io_size; |
419 | b_res[0].end = b_res[0].start + CARDBUS_IO_SIZE - 1; | 412 | b_res[0].end = b_res[0].start + pci_cardbus_io_size - 1; |
420 | b_res[0].flags |= IORESOURCE_IO; | 413 | b_res[0].flags |= IORESOURCE_IO; |
421 | 414 | ||
422 | b_res[1].start = CARDBUS_IO_SIZE; | 415 | b_res[1].start = pci_cardbus_io_size; |
423 | b_res[1].end = b_res[1].start + CARDBUS_IO_SIZE - 1; | 416 | b_res[1].end = b_res[1].start + pci_cardbus_io_size - 1; |
424 | b_res[1].flags |= IORESOURCE_IO; | 417 | b_res[1].flags |= IORESOURCE_IO; |
425 | 418 | ||
426 | /* | 419 | /* |
@@ -440,16 +433,16 @@ pci_bus_size_cardbus(struct pci_bus *bus) | |||
440 | * twice the size. | 433 | * twice the size. |
441 | */ | 434 | */ |
442 | if (ctrl & PCI_CB_BRIDGE_CTL_PREFETCH_MEM0) { | 435 | if (ctrl & PCI_CB_BRIDGE_CTL_PREFETCH_MEM0) { |
443 | b_res[2].start = CARDBUS_MEM_SIZE; | 436 | b_res[2].start = pci_cardbus_mem_size; |
444 | b_res[2].end = b_res[2].start + CARDBUS_MEM_SIZE - 1; | 437 | b_res[2].end = b_res[2].start + pci_cardbus_mem_size - 1; |
445 | b_res[2].flags |= IORESOURCE_MEM | IORESOURCE_PREFETCH; | 438 | b_res[2].flags |= IORESOURCE_MEM | IORESOURCE_PREFETCH; |
446 | 439 | ||
447 | b_res[3].start = CARDBUS_MEM_SIZE; | 440 | b_res[3].start = pci_cardbus_mem_size; |
448 | b_res[3].end = b_res[3].start + CARDBUS_MEM_SIZE - 1; | 441 | b_res[3].end = b_res[3].start + pci_cardbus_mem_size - 1; |
449 | b_res[3].flags |= IORESOURCE_MEM; | 442 | b_res[3].flags |= IORESOURCE_MEM; |
450 | } else { | 443 | } else { |
451 | b_res[3].start = CARDBUS_MEM_SIZE * 2; | 444 | b_res[3].start = pci_cardbus_mem_size * 2; |
452 | b_res[3].end = b_res[3].start + CARDBUS_MEM_SIZE * 2 - 1; | 445 | b_res[3].end = b_res[3].start + pci_cardbus_mem_size * 2 - 1; |
453 | b_res[3].flags |= IORESOURCE_MEM; | 446 | b_res[3].flags |= IORESOURCE_MEM; |
454 | } | 447 | } |
455 | } | 448 | } |
diff --git a/drivers/pci/setup-irq.c b/drivers/pci/setup-irq.c index a251289c9958..568f1877315c 100644 --- a/drivers/pci/setup-irq.c +++ b/drivers/pci/setup-irq.c | |||
@@ -24,7 +24,7 @@ pdev_fixup_irq(struct pci_dev *dev, | |||
24 | int (*map_irq)(struct pci_dev *, u8, u8)) | 24 | int (*map_irq)(struct pci_dev *, u8, u8)) |
25 | { | 25 | { |
26 | u8 pin, slot; | 26 | u8 pin, slot; |
27 | int irq; | 27 | int irq = 0; |
28 | 28 | ||
29 | /* If this device is not on the primary bus, we need to figure out | 29 | /* If this device is not on the primary bus, we need to figure out |
30 | which interrupt pin it will come in on. We know which slot it | 30 | which interrupt pin it will come in on. We know which slot it |
@@ -33,16 +33,18 @@ pdev_fixup_irq(struct pci_dev *dev, | |||
33 | apply the swizzle function. */ | 33 | apply the swizzle function. */ |
34 | 34 | ||
35 | pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin); | 35 | pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin); |
36 | /* Cope with 0 and illegal. */ | 36 | /* Cope with illegal. */ |
37 | if (pin == 0 || pin > 4) | 37 | if (pin > 4) |
38 | pin = 1; | 38 | pin = 1; |
39 | 39 | ||
40 | /* Follow the chain of bridges, swizzling as we go. */ | 40 | if (pin != 0) { |
41 | slot = (*swizzle)(dev, &pin); | 41 | /* Follow the chain of bridges, swizzling as we go. */ |
42 | slot = (*swizzle)(dev, &pin); | ||
42 | 43 | ||
43 | irq = (*map_irq)(dev, slot, pin); | 44 | irq = (*map_irq)(dev, slot, pin); |
44 | if (irq == -1) | 45 | if (irq == -1) |
45 | irq = 0; | 46 | irq = 0; |
47 | } | ||
46 | dev->irq = irq; | 48 | dev->irq = irq; |
47 | 49 | ||
48 | pr_debug("PCI: fixup irq: (%s) got %d\n", | 50 | pr_debug("PCI: fixup irq: (%s) got %d\n", |
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c index c0e117649a4d..98b0910ad80c 100644 --- a/fs/sysfs/file.c +++ b/fs/sysfs/file.c | |||
@@ -54,7 +54,7 @@ static struct sysfs_ops subsys_sysfs_ops = { | |||
54 | /** | 54 | /** |
55 | * add_to_collection - add buffer to a collection | 55 | * add_to_collection - add buffer to a collection |
56 | * @buffer: buffer to be added | 56 | * @buffer: buffer to be added |
57 | * @node inode of set to add to | 57 | * @node: inode of set to add to |
58 | */ | 58 | */ |
59 | 59 | ||
60 | static inline void | 60 | static inline void |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 98c8765a488e..2c4b6842dfb9 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -854,5 +854,8 @@ extern int pci_pci_problems; | |||
854 | #define PCIPCI_ALIMAGIK 32 /* Need low latency setting */ | 854 | #define PCIPCI_ALIMAGIK 32 /* Need low latency setting */ |
855 | #define PCIAGP_FAIL 64 /* No PCI to AGP DMA */ | 855 | #define PCIAGP_FAIL 64 /* No PCI to AGP DMA */ |
856 | 856 | ||
857 | extern unsigned long pci_cardbus_io_size; | ||
858 | extern unsigned long pci_cardbus_mem_size; | ||
859 | |||
857 | #endif /* __KERNEL__ */ | 860 | #endif /* __KERNEL__ */ |
858 | #endif /* LINUX_PCI_H */ | 861 | #endif /* LINUX_PCI_H */ |
diff --git a/lib/kobject.c b/lib/kobject.c index 93685f43bb9b..f4f6176dcd12 100644 --- a/lib/kobject.c +++ b/lib/kobject.c | |||
@@ -326,6 +326,7 @@ int kobject_rename(struct kobject * kobj, const char *new_name) | |||
326 | /** | 326 | /** |
327 | * kobject_rename - change the name of an object | 327 | * kobject_rename - change the name of an object |
328 | * @kobj: object in question. | 328 | * @kobj: object in question. |
329 | * @new_parent: object's new parent | ||
329 | * @new_name: object's new name | 330 | * @new_name: object's new name |
330 | */ | 331 | */ |
331 | 332 | ||