From: Corey Minyard <minyard@acm.org>
To: Matthew Garrett <mjg@redhat.com>
Cc: openipmi-developer@lists.sourceforge.net, bjorn.helgaas@hp.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] ipmi: Only register one si per bmc
Date: Wed, 21 Apr 2010 13:09:45 -0500 [thread overview]
Message-ID: <4BCF3F69.3050003@acm.org> (raw)
In-Reply-To: <1271788828-10231-2-git-send-email-mjg@redhat.com>
Matthew Garrett wrote:
> Only register one si per bmc. Use any user-provided devices first, followed
> by the first device with an irq, followed by the first device discovered.
>
If I understand this correctly, this would really be "Only register one
si per system". Unfortunately, there are systems that have more than
one BMC each with their own interface. Also, I believe the driver would
not function between the previous patch and this patch, which isn't the
best.
The spec is rather fuzzy about the whole subject of multiple BMCs and
interfaces, but reality is that there are systems that will be broken
with this.
-corey
> Signed-off-by: Matthew Garrett <mjg@redhat.com>
> ---
> drivers/char/ipmi/ipmi_si_intf.c | 33 +++++++++++++++++++++++++++++++++
> 1 files changed, 33 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
> index d2bdf92..95af023 100644
> --- a/drivers/char/ipmi/ipmi_si_intf.c
> +++ b/drivers/char/ipmi/ipmi_si_intf.c
> @@ -3258,6 +3258,7 @@ static __devinit int init_ipmi_si(void)
> int i;
> char *str;
> int rv;
> + struct smi_info *e;
>
> if (initialized)
> return 0;
> @@ -3292,6 +3293,14 @@ static __devinit int init_ipmi_si(void)
>
> hardcode_find_bmc();
>
> + /* If the user gave us a device, they presumably want us to use it */
> + mutex_lock(&smi_infos_lock);
> + if (!list_empty(&smi_infos)) {
> + mutex_unlock(&smi_infos_lock);
> + return 0;
> + }
> + mutex_unlock(&smi_infos_lock);
> +
> #ifdef CONFIG_DMI
> dmi_find_bmc();
> #endif
> @@ -3315,6 +3324,30 @@ static __devinit int init_ipmi_si(void)
> of_register_platform_driver(&ipmi_of_platform_driver);
> #endif
>
> + /* Try to register something with interrupts first */
> +
> + mutex_lock(&smi_infos_lock);
> + list_for_each_entry(e, &smi_infos, link) {
> + if (e->irq) {
> + if (!try_smi_init(e)) {
> + mutex_unlock(&smi_infos_lock);
> + return 0;
> + }
> + }
> + }
> +
> + /* Fall back to the preferred device */
> +
> + list_for_each_entry(e, &smi_infos, link) {
> + if (!e->irq) {
> + if (!try_smi_init(e)) {
> + mutex_unlock(&smi_infos_lock);
> + return 0;
> + }
> + }
> + }
> + mutex_unlock(&smi_infos_lock);
> +
> if (si_trydefaults) {
> mutex_lock(&smi_infos_lock);
> if (list_empty(&smi_infos)) {
>
next prev parent reply other threads:[~2010-04-21 18:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-20 18:40 [PATCH 1/3] ipmi: Split device discovery and registration Matthew Garrett
2010-04-20 18:40 ` [PATCH 2/3] ipmi: Only register one si per bmc Matthew Garrett
2010-04-20 18:40 ` [PATCH 3/3] ipmi: Change device discovery order Matthew Garrett
2010-04-21 18:09 ` Corey Minyard [this message]
2010-04-21 18:21 ` [PATCH 2/3] ipmi: Only register one si per bmc Matthew Garrett
2010-04-21 20:03 ` Corey Minyard
2010-04-21 20:10 ` Matthew Garrett
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BCF3F69.3050003@acm.org \
--to=minyard@acm.org \
--cc=bjorn.helgaas@hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mjg@redhat.com \
--cc=openipmi-developer@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox