Commit f2afae4629d74287aaac39d0532aac5819e77e70
Committed by
Linus Torvalds
1 parent
d941aeae42
Exists in
master
and in
20 other branches
ipmi: add options to disable openfirmware and PCI scanning
Add try... parameters to disable pci and platform (openfirmware) device scanning for IPMI. Also add docs for all the try... parameters. Signed-off-by: Corey Minyard <cminyard@mvista.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 2 changed files with 40 additions and 16 deletions Side-by-side Diff
Documentation/IPMI.txt
... | ... | @@ -348,33 +348,39 @@ |
348 | 348 | |
349 | 349 | modprobe ipmi_si.o type=<type1>,<type2>.... |
350 | 350 | ports=<port1>,<port2>... addrs=<addr1>,<addr2>... |
351 | - irqs=<irq1>,<irq2>... trydefaults=[0|1] | |
351 | + irqs=<irq1>,<irq2>... | |
352 | 352 | regspacings=<sp1>,<sp2>,... regsizes=<size1>,<size2>,... |
353 | 353 | regshifts=<shift1>,<shift2>,... |
354 | 354 | slave_addrs=<addr1>,<addr2>,... |
355 | 355 | force_kipmid=<enable1>,<enable2>,... |
356 | 356 | kipmid_max_busy_us=<ustime1>,<ustime2>,... |
357 | 357 | unload_when_empty=[0|1] |
358 | + trydefaults=[0|1] trydmi=[0|1] tryacpi=[0|1] | |
359 | + tryplatform=[0|1] trypci=[0|1] | |
358 | 360 | |
359 | -Each of these except si_trydefaults is a list, the first item for the | |
361 | +Each of these except try... items is a list, the first item for the | |
360 | 362 | first interface, second item for the second interface, etc. |
361 | 363 | |
362 | 364 | The si_type may be either "kcs", "smic", or "bt". If you leave it blank, it |
363 | 365 | defaults to "kcs". |
364 | 366 | |
365 | -If you specify si_addrs as non-zero for an interface, the driver will | |
367 | +If you specify addrs as non-zero for an interface, the driver will | |
366 | 368 | use the memory address given as the address of the device. This |
367 | 369 | overrides si_ports. |
368 | 370 | |
369 | -If you specify si_ports as non-zero for an interface, the driver will | |
371 | +If you specify ports as non-zero for an interface, the driver will | |
370 | 372 | use the I/O port given as the device address. |
371 | 373 | |
372 | -If you specify si_irqs as non-zero for an interface, the driver will | |
374 | +If you specify irqs as non-zero for an interface, the driver will | |
373 | 375 | attempt to use the given interrupt for the device. |
374 | 376 | |
375 | -si_trydefaults sets whether the standard IPMI interface at 0xca2 and | |
377 | +trydefaults sets whether the standard IPMI interface at 0xca2 and | |
376 | 378 | any interfaces specified by ACPE are tried. By default, the driver |
377 | 379 | tries it, set this value to zero to turn this off. |
380 | + | |
381 | +The other try... items disable discovery by their corresponding | |
382 | +names. These are all enabled by default, set them to zero to disable | |
383 | +them. The tryplatform disables openfirmware. | |
378 | 384 | |
379 | 385 | The next three parameters have to do with register layout. The |
380 | 386 | registers used by the interfaces may not appear at successive |
drivers/char/ipmi/ipmi_si_intf.c
... | ... | @@ -1214,6 +1214,10 @@ |
1214 | 1214 | #ifdef CONFIG_DMI |
1215 | 1215 | static bool si_trydmi = 1; |
1216 | 1216 | #endif |
1217 | +static bool si_tryplatform = 1; | |
1218 | +#ifdef CONFIG_PCI | |
1219 | +static bool si_trypci = 1; | |
1220 | +#endif | |
1217 | 1221 | static bool si_trydefaults = 1; |
1218 | 1222 | static char *si_type[SI_MAX_PARMS]; |
1219 | 1223 | #define MAX_SI_TYPE_STR 30 |
... | ... | @@ -1254,6 +1258,15 @@ |
1254 | 1258 | MODULE_PARM_DESC(trydmi, "Setting this to zero will disable the" |
1255 | 1259 | " default scan of the interfaces identified via DMI"); |
1256 | 1260 | #endif |
1261 | +module_param_named(tryplatform, si_tryplatform, bool, 0); | |
1262 | +MODULE_PARM_DESC(tryacpi, "Setting this to zero will disable the" | |
1263 | + " default scan of the interfaces identified via platform" | |
1264 | + " interfaces like openfirmware"); | |
1265 | +#ifdef CONFIG_PCI | |
1266 | +module_param_named(trypci, si_trypci, bool, 0); | |
1267 | +MODULE_PARM_DESC(tryacpi, "Setting this to zero will disable the" | |
1268 | + " default scan of the interfaces identified via pci"); | |
1269 | +#endif | |
1257 | 1270 | module_param_named(trydefaults, si_trydefaults, bool, 0); |
1258 | 1271 | MODULE_PARM_DESC(trydefaults, "Setting this to 'false' will disable the" |
1259 | 1272 | " default scan of the KCS and SMIC interface at the standard" |
1260 | 1273 | |
... | ... | @@ -3387,13 +3400,15 @@ |
3387 | 3400 | return 0; |
3388 | 3401 | initialized = 1; |
3389 | 3402 | |
3390 | - rv = platform_driver_register(&ipmi_driver); | |
3391 | - if (rv) { | |
3392 | - printk(KERN_ERR PFX "Unable to register driver: %d\n", rv); | |
3393 | - return rv; | |
3403 | + if (si_tryplatform) { | |
3404 | + rv = platform_driver_register(&ipmi_driver); | |
3405 | + if (rv) { | |
3406 | + printk(KERN_ERR PFX "Unable to register " | |
3407 | + "driver: %d\n", rv); | |
3408 | + return rv; | |
3409 | + } | |
3394 | 3410 | } |
3395 | 3411 | |
3396 | - | |
3397 | 3412 | /* Parse out the si_type string into its components. */ |
3398 | 3413 | str = si_type_str; |
3399 | 3414 | if (*str != '\0') { |
... | ... | @@ -3416,11 +3431,14 @@ |
3416 | 3431 | return 0; |
3417 | 3432 | |
3418 | 3433 | #ifdef CONFIG_PCI |
3419 | - rv = pci_register_driver(&ipmi_pci_driver); | |
3420 | - if (rv) | |
3421 | - printk(KERN_ERR PFX "Unable to register PCI driver: %d\n", rv); | |
3422 | - else | |
3423 | - pci_registered = 1; | |
3434 | + if (si_trypci) { | |
3435 | + rv = pci_register_driver(&ipmi_pci_driver); | |
3436 | + if (rv) | |
3437 | + printk(KERN_ERR PFX "Unable to register " | |
3438 | + "PCI driver: %d\n", rv); | |
3439 | + else | |
3440 | + pci_registered = 1; | |
3441 | + } | |
3424 | 3442 | #endif |
3425 | 3443 | |
3426 | 3444 | #ifdef CONFIG_ACPI |