All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <jdelvare@suse.de>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Jean Delvare <jdelvare@suse.com>,
	Wolfram Sang <wsa@the-dreams.de>,
	linux-i2c@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] i2c: i801: Fix Failed to allocate irq -2147483648 error
Date: Fri, 24 Nov 2017 14:49:57 +0100	[thread overview]
Message-ID: <20171124144957.6a7323cc@endymion> (raw)
In-Reply-To: <20171122112817.9554-1-hdegoede@redhat.com>

Hi Hans,

On Wed, 22 Nov 2017 12:28:17 +0100, Hans de Goede wrote:
> On Apollo Lake devices the BIOS does not set up IRQ routing for the i801
> SMBUS controller IRQ, so we end up with dev->irq set to IRQ_NOTCONNECTED.
> 
> Detect this and do not try to use the irq in this case silencing:
> i801_smbus 0000:00:1f.1: Failed to allocate irq -2147483648: -107

Isn't it a BIOS bug?

> Cc: stable@vger.kernel.org
> BugLink: https://communities.intel.com/thread/114759
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
>  drivers/i2c/busses/i2c-i801.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
> index 9e12a53ef7b8..8eac00efadc1 100644
> --- a/drivers/i2c/busses/i2c-i801.c
> +++ b/drivers/i2c/busses/i2c-i801.c
> @@ -1617,6 +1617,9 @@ static int i801_probe(struct pci_dev *dev, const struct pci_device_id *id)
>  	/* Default timeout in interrupt mode: 200 ms */
>  	priv->adapter.timeout = HZ / 5;
>  
> +	if (dev->irq == IRQ_NOTCONNECTED)
> +		priv->features &= ~FEATURE_IRQ;
> +
>  	if (priv->features & FEATURE_IRQ) {
>  		u16 pcictl, pcists;

Certainly better than returning a cryptic error message, so:

Reviewed-by: Jean Delvare <jdelvare@suse.de>

However if this is considered a BIOS bug then a pr_err(FW_BUG...) would
be good to add IMHO.

-- 
Jean Delvare
SUSE L3 Support

  reply	other threads:[~2017-11-24 13:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-22 11:28 [PATCH] i2c: i801: Fix Failed to allocate irq -2147483648 error Hans de Goede
2017-11-24 13:49 ` Jean Delvare [this message]
2017-11-25 13:43   ` Hans de Goede
2017-11-27 10:04     ` Jean Delvare
2017-11-27 15:38       ` Hans de Goede
2017-11-28 13:37         ` Jean Delvare
2017-11-28 13:42           ` Hans de Goede
2017-11-27 18:11 ` Wolfram Sang

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=20171124144957.6a7323cc@endymion \
    --to=jdelvare@suse.de \
    --cc=hdegoede@redhat.com \
    --cc=jdelvare@suse.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=wsa@the-dreams.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.