Re: [PATCH v5 1/2] IPMI/ACPI: use ACPI detection mechanism firstly to detect IPMI system interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday 25 January 2010 02:24:32 am yakui.zhao@xxxxxxxxx wrote:
> From: Zhao Yakui <yakui.zhao@xxxxxxxxx>
> 
> Sometimes one IPMI system interface will be detected by several methods.
> For example: ACPI mechanism, SPMI table, DMI.
> In such case when one IPMI system interface can be detected in two mechanism,
> the second mechanism will fail in the detection and can't record which IPMI
> system interface is detected by it.
> 
> Use the ACPI detection mechanism firstly to detect the IPMI system interface
> so that we can know which IPMI system interface is detected in ACPI namespace and
> then install the IPMI opregion to enable ACPI to access the BMC controller. 
> But the hardcode detection mechanism is still put in the first order.
> 
> Signed-off-by: Zhao Yakui <yakui.zhao@xxxxxxxxx>
> cc: Bjorn Helgaas <bjorn.helgaas@xxxxxx>

Looks great!

Reviewed-by: Bjorn Helgaas <bjorn.helgaas@xxxxxx>

> ---
>  drivers/char/ipmi/ipmi_si_intf.c |    8 +++++---
>  1 files changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
> index 176f175..65dabd8 100644
> --- a/drivers/char/ipmi/ipmi_si_intf.c
> +++ b/drivers/char/ipmi/ipmi_si_intf.c
> @@ -3197,6 +3197,10 @@ static __devinit int init_ipmi_si(void)
>  
>  	hardcode_find_bmc();
>  
> +#ifdef CONFIG_ACPI
> +	pnp_register_driver(&ipmi_pnp_driver);
> +#endif
> +
>  #ifdef CONFIG_DMI
>  	dmi_find_bmc();
>  #endif
> @@ -3204,9 +3208,6 @@ static __devinit int init_ipmi_si(void)
>  #ifdef CONFIG_ACPI
>  	spmi_find_bmc();
>  #endif
> -#ifdef CONFIG_ACPI
> -	pnp_register_driver(&ipmi_pnp_driver);
> -#endif
>  
>  #ifdef CONFIG_PCI
>  	rv = pci_register_driver(&ipmi_pci_driver);
> @@ -3330,6 +3331,7 @@ static __exit void cleanup_ipmi_si(void)
>  #ifdef CONFIG_PCI
>  	pci_unregister_driver(&ipmi_pci_driver);
>  #endif
> +
>  #ifdef CONFIG_ACPI
>  	pnp_unregister_driver(&ipmi_pnp_driver);
>  #endif


--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux