diff options
-rw-r--r-- | Documentation/IPMI.txt | 65 | ||||
-rw-r--r-- | drivers/Makefile | 4 | ||||
-rw-r--r-- | drivers/acpi/Makefile | 5 | ||||
-rw-r--r-- | drivers/char/Makefile | 1 | ||||
-rw-r--r-- | drivers/char/ipmi/ipmi_msghandler.c | 2 | ||||
-rw-r--r-- | drivers/char/ipmi/ipmi_si_intf.c | 36 |
6 files changed, 46 insertions, 67 deletions
diff --git a/Documentation/IPMI.txt b/Documentation/IPMI.txt index b2bea15137d2..16eb4c9e9233 100644 --- a/Documentation/IPMI.txt +++ b/Documentation/IPMI.txt | |||
@@ -42,13 +42,7 @@ The driver interface depends on your hardware. If your system | |||
42 | properly provides the SMBIOS info for IPMI, the driver will detect it | 42 | properly provides the SMBIOS info for IPMI, the driver will detect it |
43 | and just work. If you have a board with a standard interface (These | 43 | and just work. If you have a board with a standard interface (These |
44 | will generally be either "KCS", "SMIC", or "BT", consult your hardware | 44 | will generally be either "KCS", "SMIC", or "BT", consult your hardware |
45 | manual), choose the 'IPMI SI handler' option. A driver also exists | 45 | manual), choose the 'IPMI SI handler' option. |
46 | for direct I2C access to the IPMI management controller. Some boards | ||
47 | support this, but it is unknown if it will work on every board. For | ||
48 | this, choose 'IPMI SMBus handler', but be ready to try to do some | ||
49 | figuring to see if it will work on your system if the SMBIOS/APCI | ||
50 | information is wrong or not present. It is fairly safe to have both | ||
51 | these enabled and let the drivers auto-detect what is present. | ||
52 | 46 | ||
53 | You should generally enable ACPI on your system, as systems with IPMI | 47 | You should generally enable ACPI on your system, as systems with IPMI |
54 | can have ACPI tables describing them. | 48 | can have ACPI tables describing them. |
@@ -58,8 +52,7 @@ their job correctly, the IPMI controller should be automatically | |||
58 | detected (via ACPI or SMBIOS tables) and should just work. Sadly, | 52 | detected (via ACPI or SMBIOS tables) and should just work. Sadly, |
59 | many boards do not have this information. The driver attempts | 53 | many boards do not have this information. The driver attempts |
60 | standard defaults, but they may not work. If you fall into this | 54 | standard defaults, but they may not work. If you fall into this |
61 | situation, you need to read the section below named 'The SI Driver' or | 55 | situation, you need to read the section below named 'The SI Driver'. |
62 | "The SMBus Driver" on how to hand-configure your system. | ||
63 | 56 | ||
64 | IPMI defines a standard watchdog timer. You can enable this with the | 57 | IPMI defines a standard watchdog timer. You can enable this with the |
65 | 'IPMI Watchdog Timer' config option. If you compile the driver into | 58 | 'IPMI Watchdog Timer' config option. If you compile the driver into |
@@ -104,12 +97,7 @@ driver, each open file for this device ties in to the message handler | |||
104 | as an IPMI user. | 97 | as an IPMI user. |
105 | 98 | ||
106 | ipmi_si - A driver for various system interfaces. This supports KCS, | 99 | ipmi_si - A driver for various system interfaces. This supports KCS, |
107 | SMIC, and BT interfaces. Unless you have an SMBus interface or your | 100 | SMIC, and BT interfaces. |
108 | own custom interface, you probably need to use this. | ||
109 | |||
110 | ipmi_smb - A driver for accessing BMCs on the SMBus. It uses the | ||
111 | I2C kernel driver's SMBus interfaces to send and receive IPMI messages | ||
112 | over the SMBus. | ||
113 | 101 | ||
114 | ipmi_watchdog - IPMI requires systems to have a very capable watchdog | 102 | ipmi_watchdog - IPMI requires systems to have a very capable watchdog |
115 | timer. This driver implements the standard Linux watchdog timer | 103 | timer. This driver implements the standard Linux watchdog timer |
@@ -482,53 +470,6 @@ for specifying an interface. Note that when removing an interface, | |||
482 | only the first three parameters (si type, address type, and address) | 470 | only the first three parameters (si type, address type, and address) |
483 | are used for the comparison. Any options are ignored for removing. | 471 | are used for the comparison. Any options are ignored for removing. |
484 | 472 | ||
485 | The SMBus Driver | ||
486 | ---------------- | ||
487 | |||
488 | The SMBus driver allows up to 4 SMBus devices to be configured in the | ||
489 | system. By default, the driver will register any SMBus interfaces it finds | ||
490 | in the I2C address range of 0x20 to 0x4f on any adapter. You can change this | ||
491 | at module load time (for a module) with: | ||
492 | |||
493 | modprobe ipmi_smb.o | ||
494 | addr=<adapter1>,<i2caddr1>[,<adapter2>,<i2caddr2>[,...]] | ||
495 | dbg=<flags1>,<flags2>... | ||
496 | [defaultprobe=1] [dbg_probe=1] | ||
497 | |||
498 | The addresses are specified in pairs, the first is the adapter ID and the | ||
499 | second is the I2C address on that adapter. | ||
500 | |||
501 | The debug flags are bit flags for each BMC found, they are: | ||
502 | IPMI messages: 1, driver state: 2, timing: 4, I2C probe: 8 | ||
503 | |||
504 | Setting smb_defaultprobe to zero disabled the default probing of SMBus | ||
505 | interfaces at address range 0x20 to 0x4f. This means that only the | ||
506 | BMCs specified on the smb_addr line will be detected. | ||
507 | |||
508 | Setting smb_dbg_probe to 1 will enable debugging of the probing and | ||
509 | detection process for BMCs on the SMBusses. | ||
510 | |||
511 | Discovering the IPMI compliant BMC on the SMBus can cause devices | ||
512 | on the I2C bus to fail. The SMBus driver writes a "Get Device ID" IPMI | ||
513 | message as a block write to the I2C bus and waits for a response. | ||
514 | This action can be detrimental to some I2C devices. It is highly recommended | ||
515 | that the known I2c address be given to the SMBus driver in the smb_addr | ||
516 | parameter. The default address range will not be used when a smb_addr | ||
517 | parameter is provided. | ||
518 | |||
519 | When compiled into the kernel, the addresses can be specified on the | ||
520 | kernel command line as: | ||
521 | |||
522 | ipmb_smb.addr=<adapter1>,<i2caddr1>[,<adapter2>,<i2caddr2>[,...]] | ||
523 | ipmi_smb.dbg=<flags1>,<flags2>... | ||
524 | ipmi_smb.defaultprobe=0 ipmi_smb.dbg_probe=1 | ||
525 | |||
526 | These are the same options as on the module command line. | ||
527 | |||
528 | Note that you might need some I2C changes if CONFIG_IPMI_PANIC_EVENT | ||
529 | is enabled along with this, so the I2C driver knows to run to | ||
530 | completion during sending a panic event. | ||
531 | |||
532 | 473 | ||
533 | Other Pieces | 474 | Other Pieces |
534 | ------------ | 475 | ------------ |
diff --git a/drivers/Makefile b/drivers/Makefile index 03da5b663aef..a16a8d001ae0 100644 --- a/drivers/Makefile +++ b/drivers/Makefile | |||
@@ -17,6 +17,10 @@ obj-$(CONFIG_PARISC) += parisc/ | |||
17 | obj-$(CONFIG_RAPIDIO) += rapidio/ | 17 | obj-$(CONFIG_RAPIDIO) += rapidio/ |
18 | obj-y += video/ | 18 | obj-y += video/ |
19 | obj-y += idle/ | 19 | obj-y += idle/ |
20 | |||
21 | # IPMI must come before ACPI in order to provide IPMI opregion support | ||
22 | obj-$(CONFIG_IPMI_HANDLER) += char/ipmi/ | ||
23 | |||
20 | obj-$(CONFIG_ACPI) += acpi/ | 24 | obj-$(CONFIG_ACPI) += acpi/ |
21 | obj-$(CONFIG_SFI) += sfi/ | 25 | obj-$(CONFIG_SFI) += sfi/ |
22 | # PnP must come after ACPI since it will eventually need to check if acpi | 26 | # PnP must come after ACPI since it will eventually need to check if acpi |
diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile index 47199e2a9130..82422fe90f81 100644 --- a/drivers/acpi/Makefile +++ b/drivers/acpi/Makefile | |||
@@ -47,6 +47,10 @@ acpi-y += video_detect.o | |||
47 | endif | 47 | endif |
48 | 48 | ||
49 | # These are (potentially) separate modules | 49 | # These are (potentially) separate modules |
50 | |||
51 | # IPMI may be used by other drivers, so it has to initialise before them | ||
52 | obj-$(CONFIG_ACPI_IPMI) += acpi_ipmi.o | ||
53 | |||
50 | obj-$(CONFIG_ACPI_AC) += ac.o | 54 | obj-$(CONFIG_ACPI_AC) += ac.o |
51 | obj-$(CONFIG_ACPI_BUTTON) += button.o | 55 | obj-$(CONFIG_ACPI_BUTTON) += button.o |
52 | obj-$(CONFIG_ACPI_FAN) += fan.o | 56 | obj-$(CONFIG_ACPI_FAN) += fan.o |
@@ -70,6 +74,5 @@ processor-y += processor_idle.o processor_thermal.o | |||
70 | processor-$(CONFIG_CPU_FREQ) += processor_perflib.o | 74 | processor-$(CONFIG_CPU_FREQ) += processor_perflib.o |
71 | 75 | ||
72 | obj-$(CONFIG_ACPI_PROCESSOR_AGGREGATOR) += acpi_pad.o | 76 | obj-$(CONFIG_ACPI_PROCESSOR_AGGREGATOR) += acpi_pad.o |
73 | obj-$(CONFIG_ACPI_IPMI) += acpi_ipmi.o | ||
74 | 77 | ||
75 | obj-$(CONFIG_ACPI_APEI) += apei/ | 78 | obj-$(CONFIG_ACPI_APEI) += apei/ |
diff --git a/drivers/char/Makefile b/drivers/char/Makefile index d0b27a39f1d4..7ff1d0d208a7 100644 --- a/drivers/char/Makefile +++ b/drivers/char/Makefile | |||
@@ -52,7 +52,6 @@ obj-$(CONFIG_TELCLOCK) += tlclk.o | |||
52 | obj-$(CONFIG_MWAVE) += mwave/ | 52 | obj-$(CONFIG_MWAVE) += mwave/ |
53 | obj-$(CONFIG_AGP) += agp/ | 53 | obj-$(CONFIG_AGP) += agp/ |
54 | obj-$(CONFIG_PCMCIA) += pcmcia/ | 54 | obj-$(CONFIG_PCMCIA) += pcmcia/ |
55 | obj-$(CONFIG_IPMI_HANDLER) += ipmi/ | ||
56 | 55 | ||
57 | obj-$(CONFIG_HANGCHECK_TIMER) += hangcheck-timer.o | 56 | obj-$(CONFIG_HANGCHECK_TIMER) += hangcheck-timer.o |
58 | obj-$(CONFIG_TCG_TPM) += tpm/ | 57 | obj-$(CONFIG_TCG_TPM) += tpm/ |
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c index 2c29942b1326..a0c84bb30856 100644 --- a/drivers/char/ipmi/ipmi_msghandler.c +++ b/drivers/char/ipmi/ipmi_msghandler.c | |||
@@ -1880,7 +1880,7 @@ int ipmi_request_supply_msgs(ipmi_user_t user, | |||
1880 | struct ipmi_recv_msg *supplied_recv, | 1880 | struct ipmi_recv_msg *supplied_recv, |
1881 | int priority) | 1881 | int priority) |
1882 | { | 1882 | { |
1883 | unsigned char saddr, lun; | 1883 | unsigned char saddr = 0, lun = 0; |
1884 | int rv; | 1884 | int rv; |
1885 | 1885 | ||
1886 | if (!user) | 1886 | if (!user) |
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index 83f85cf7fb1b..32a6c7e256bd 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c | |||
@@ -2424,6 +2424,38 @@ static void ipmi_pci_cleanup(struct smi_info *info) | |||
2424 | pci_disable_device(pdev); | 2424 | pci_disable_device(pdev); |
2425 | } | 2425 | } |
2426 | 2426 | ||
2427 | static int __devinit ipmi_pci_probe_regspacing(struct smi_info *info) | ||
2428 | { | ||
2429 | if (info->si_type == SI_KCS) { | ||
2430 | unsigned char status; | ||
2431 | int regspacing; | ||
2432 | |||
2433 | info->io.regsize = DEFAULT_REGSIZE; | ||
2434 | info->io.regshift = 0; | ||
2435 | info->io_size = 2; | ||
2436 | info->handlers = &kcs_smi_handlers; | ||
2437 | |||
2438 | /* detect 1, 4, 16byte spacing */ | ||
2439 | for (regspacing = DEFAULT_REGSPACING; regspacing <= 16;) { | ||
2440 | info->io.regspacing = regspacing; | ||
2441 | if (info->io_setup(info)) { | ||
2442 | dev_err(info->dev, | ||
2443 | "Could not setup I/O space\n"); | ||
2444 | return DEFAULT_REGSPACING; | ||
2445 | } | ||
2446 | /* write invalid cmd */ | ||
2447 | info->io.outputb(&info->io, 1, 0x10); | ||
2448 | /* read status back */ | ||
2449 | status = info->io.inputb(&info->io, 1); | ||
2450 | info->io_cleanup(info); | ||
2451 | if (status) | ||
2452 | return regspacing; | ||
2453 | regspacing *= 4; | ||
2454 | } | ||
2455 | } | ||
2456 | return DEFAULT_REGSPACING; | ||
2457 | } | ||
2458 | |||
2427 | static int __devinit ipmi_pci_probe(struct pci_dev *pdev, | 2459 | static int __devinit ipmi_pci_probe(struct pci_dev *pdev, |
2428 | const struct pci_device_id *ent) | 2460 | const struct pci_device_id *ent) |
2429 | { | 2461 | { |
@@ -2476,8 +2508,8 @@ static int __devinit ipmi_pci_probe(struct pci_dev *pdev, | |||
2476 | } | 2508 | } |
2477 | info->io.addr_data = pci_resource_start(pdev, 0); | 2509 | info->io.addr_data = pci_resource_start(pdev, 0); |
2478 | 2510 | ||
2479 | info->io.regspacing = DEFAULT_REGSPACING; | 2511 | info->io.regspacing = ipmi_pci_probe_regspacing(info); |
2480 | info->io.regsize = DEFAULT_REGSPACING; | 2512 | info->io.regsize = DEFAULT_REGSIZE; |
2481 | info->io.regshift = 0; | 2513 | info->io.regshift = 0; |
2482 | 2514 | ||
2483 | info->irq = pdev->irq; | 2515 | info->irq = pdev->irq; |