diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-16 21:08:21 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-16 21:08:21 -0400 |
commit | cba8d1cb6608bba49803ddceef1ff889aa2ed316 (patch) | |
tree | 34fceea3ab0f777df2e72729f393661e7001cee1 /drivers | |
parent | c772fc26f8938dd526a411a6162db95a33f56028 (diff) | |
parent | a6c16c2803089f032f86fe15e952176c0713d6e3 (diff) |
Merge branch 'ipmi' (IPMI patches from Corey Minyard)
Merge emailed patches from Corey Minyard:
"Remove some bogus docs, Fix ACPI/IPMI interactions, fix some warnings,
and add register spacing detection for PCI interfaces."
* ipmi:
IPMI: Detect register spacing on PCI interfaces
IPMI: Fix some uninitialized warning
IPMI: Change link order
ACPI: Reorder IPMI driver before any other ACPI drivers
IPMI: Remove SMBus driver info from the docs
Diffstat (limited to 'drivers')
-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 |
5 files changed, 43 insertions, 5 deletions
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; |