Received: by 10.223.164.202 with SMTP id h10csp751700wrb; Thu, 9 Nov 2017 13:51:56 -0800 (PST) X-Google-Smtp-Source: ABhQp+S62Nl6W6Z1Q3EnlVOsfANAbONekxT6ou6KnZs8kd8Ajwi2Bge0dsSZGSkx5rnfXgkiRlqD X-Received: by 10.159.194.204 with SMTP id u12mr1771287plz.401.1510264316382; Thu, 09 Nov 2017 13:51:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510264316; cv=none; d=google.com; s=arc-20160816; b=mG3SfZDks83JHth7an9qrGvWcQel5jv3Cf3v4fzGTN8rcrrdnJlpGzmGR9s97WuTBf WbFdXwW/BA7q4Ml0KW8IJbowTfXXFNzZWTtemB27TZoCe5AWfhTExBOiiSTIUEOzSg9j V1qg13azCUyKTep9mDPFNkryNmi10l4qsSFhff5BZosAwRKlAyOdK9+pZPXHKhZciFhL dibGo1+tfMcJgZpNBDAvYWkFrZt7IMhZ1BwnWWKBhcd+W1NR8Uxnkh2G7k4JH+NG6iXK vFfbWuVxPBqH84DWYZyzyrKPqWw5Tn+dyqqFNBjwQJYQwaiOXGXSyZw+cPKCzmHpSK9F jWbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=6Ac9g3Nkg09VUbl4JgD6uHGK0lhh7mV8u3Ltl0XIv10=; b=EDA/vz7OJz8eyghZfplNrUNH2BCrLRy3Ij/rFW9XScQuf7LdRgHTKTjC6Y8kNEt9MG Wdy4HGdzbW9BSkWNFStySYXeGNKGykUjcHQ0OzkAvvAyi4OOsY3NbIX3uWIo9Be1o98w gy7y8HnbYINTFlSbs9XQj8Akn493Gtj9e8gCZIKW2dCRFYIedtiZW41GITQhqw/MJqpp blXImC3p6ytiV6fezkoU8MP1XZ+oIaEGEclb2bcEyTd1Vv98NUcpXQ1GBH9+na4eGN+4 rl+6X4Ojud/sNrjIW82NnUMijX4XgIgwUijrfPqtKAyVh4rFjG2Iho0fdQCkghGc+HUx nU8Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g8si6966784pgq.226.2017.11.09.13.51.43; Thu, 09 Nov 2017 13:51:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754243AbdKIVu6 (ORCPT + 83 others); Thu, 9 Nov 2017 16:50:58 -0500 Received: from g4t3427.houston.hpe.com ([15.241.140.73]:31655 "EHLO g4t3427.houston.hpe.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752952AbdKIVu5 (ORCPT ); Thu, 9 Nov 2017 16:50:57 -0500 Received: from g4t3433.houston.hpecorp.net (g4t3433.houston.hpecorp.net [16.208.49.245]) by g4t3427.houston.hpe.com (Postfix) with ESMTP id 88EF16C; Thu, 9 Nov 2017 21:50:56 +0000 (UTC) Received: from Andrews-MacBook-Pro.local (unknown [16.99.176.5]) by g4t3433.houston.hpecorp.net (Postfix) with ESMTP id EE7A44A; Thu, 9 Nov 2017 21:50:55 +0000 (UTC) Subject: Re: [PATCH] ipmi: Prefer ACPI system interfaces over SMBIOS ones To: minyard@acm.org Cc: Dimitri Sivanich , Russ Anderson , Mike Travis , openipmi-developer@lists.sourceforge.net, linux-kernel@vger.kernel.org, Corey Minyard References: <1510256927-8033-1-git-send-email-minyard@acm.org> From: Andrew Banman Message-ID: <1d79c228-d6b3-807d-b370-ae062799660c@hpe.com> Date: Thu, 9 Nov 2017 15:50:55 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <1510256927-8033-1-git-send-email-minyard@acm.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Corey, This patch worked on my system. Thank you! Tested-by: Andrew Banman # insmod ipmi_si.ko; dmesg -c [ 225.793934] ipmi_si IPI0001:00: ipmi_si: probing via ACPI [ 225.799982] ipmi_si IPI0001:00: [io 0x0ce4-0x0ce6] regsize 1 spacing 1 irq 6 [ 225.807953] ipmi_si: Adding ACPI-specified bt state machine [ 225.814202] IPMI System Interface driver. [ 225.818895] ipmi_si: probing via SMBIOS [ 225.823183] ipmi_si: SMBIOS: mem 0xce4 regsize 1 spacing 1 irq 6 [ 225.829894] ipmi_si: Adding SMBIOS-specified bt state machine [ 225.836318] ipmi_si: probing via SPMI [ 225.840411] ipmi_si: SPMI: io 0xce4 regsize 1 spacing 1 irq 6 [ 225.846832] (NULL device *): SPMI-specified bt state machine: duplicate [ 225.854220] ipmi_si: Trying ACPI-specified bt state machine at i/o address 0xce4, slave address 0x0, irq 6 [ 225.870711] ipmi_si IPI0001:00: Using irq 6 [ 225.875530] ipmi_si IPI0001:00: Found new BMC (man_id: 0x000000, prod_id: 0x0101, dev_id: 0x20) [ 225.876266] IPMI BT: req2rsp=2 secs retries=1 [ 225.890166] ipmi_si IPI0001:00: IPMI bt interface initialized # rmmod ipmi_si.ko; dmesg -c # Andrew On 11/9/17 1:48 PM, minyard@acm.org wrote: > From: Corey Minyard > > The recent changes to add SMBIOS (DMI) IPMI interfaces as platform > devices caused DMI to be selected before ACPI, causing ACPI type > of operations to not work. > > Signed-off-by: Corey Minyard > --- > > Andrew, > > I looked a bit more and found that I already had this queued for the > next kernel release, it fixes your issue and another issue, too. > If this works for you, I'll request this for stable. > > -corey > > drivers/char/ipmi/ipmi_si_intf.c | 33 +++++++++++++++++++++++---------- > 1 file changed, 23 insertions(+), 10 deletions(-) > > diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c > index 39c55f4..f8e28ba 100644 > --- a/drivers/char/ipmi/ipmi_si_intf.c > +++ b/drivers/char/ipmi/ipmi_si_intf.c > @@ -3425,7 +3425,7 @@ static inline void wait_for_timer_and_thread(struct smi_info *smi_info) > del_timer_sync(&smi_info->si_timer); > } > > -static int is_new_interface(struct smi_info *info) > +static struct smi_info *find_dup_si(struct smi_info *info) > { > struct smi_info *e; > > @@ -3440,24 +3440,36 @@ static int is_new_interface(struct smi_info *info) > */ > if (info->slave_addr && !e->slave_addr) > e->slave_addr = info->slave_addr; > - return 0; > + return e; > } > } > > - return 1; > + return NULL; > } > > static int add_smi(struct smi_info *new_smi) > { > int rv = 0; > + struct smi_info *dup; > > mutex_lock(&smi_infos_lock); > - if (!is_new_interface(new_smi)) { > - pr_info(PFX "%s-specified %s state machine: duplicate\n", > - ipmi_addr_src_to_str(new_smi->addr_source), > - si_to_str[new_smi->si_type]); > - rv = -EBUSY; > - goto out_err; > + dup = find_dup_si(new_smi); > + if (dup) { > + if (new_smi->addr_source == SI_ACPI && > + dup->addr_source == SI_SMBIOS) { > + /* We prefer ACPI over SMBIOS. */ > + dev_info(dup->dev, > + "Removing SMBIOS-specified %s state machine in favor of ACPI\n", > + si_to_str[new_smi->si_type]); > + cleanup_one_si(dup); > + } else { > + dev_info(new_smi->dev, > + "%s-specified %s state machine: duplicate\n", > + ipmi_addr_src_to_str(new_smi->addr_source), > + si_to_str[new_smi->si_type]); > + rv = -EBUSY; > + goto out_err; > + } > } > > pr_info(PFX "Adding %s-specified %s state machine\n", > @@ -3866,7 +3878,8 @@ static void cleanup_one_si(struct smi_info *to_clean) > poll(to_clean); > schedule_timeout_uninterruptible(1); > } > - disable_si_irq(to_clean, false); > + if (to_clean->handlers) > + disable_si_irq(to_clean, false); > while (to_clean->curr_msg || (to_clean->si_state != SI_NORMAL)) { > poll(to_clean); > schedule_timeout_uninterruptible(1); > From 1583619236957354518@xxx Thu Nov 09 19:49:53 +0000 2017 X-GM-THRID: 1583619236957354518 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread