linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: "Jean Delvare" <jdelvare@suse.de>,
	"Zoltán Böszörményi" <zboszor@pr.hu>,
	linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] i2c: piix4: Use request_muxed_region
Date: Mon, 26 Feb 2018 12:37:29 -0800	[thread overview]
Message-ID: <20180226203729.GA28554@roeck-us.net> (raw)
In-Reply-To: <20180226195521.vs32bemg7iopkjvd@ninjato>

On Mon, Feb 26, 2018 at 08:55:21PM +0100, Wolfram Sang wrote:
> On Wed, Feb 14, 2018 at 03:23:05PM +0100, Jean Delvare wrote:
> > On Mon, 12 Feb 2018 10:51:52 -0800, Guenter Roeck wrote:
> > > On Mon, Feb 12, 2018 at 11:10:41AM +0100, Jean Delvare wrote:
> > > > On Sat, 30 Dec 2017 08:50:57 -0800, Guenter Roeck wrote:  
> > > > > @@ -298,12 +295,15 @@ static int piix4_setup_sb800(struct pci_dev *PIIX4_dev,
> > > > >  	else
> > > > >  		smb_en = (aux) ? 0x28 : 0x2c;
> > > > >  
> > > > > -	mutex_lock(&piix4_mutex_sb800);
> > > > > +	if (!request_muxed_region(SB800_PIIX4_SMB_IDX, 2, "sb800_piix4_smb"))
> > > > > +		return -EBUSY;  
> > > > 
> > > > This would happen if and only if another driver has requested the
> > > > region already but without IORESOURCE_MUXED, right? Don't you want to  
> > > 
> > > Or if its call to alloc_resource() fails.
> > 
> > OK, two things which are not supposed to happen, so failing is the
> > right thing to do.
> > 
> > > > write an error message then? I don't think request_muxed_region() will
> > > > do, and probe failing with -EBUSY but no error message logged would be
> > > > hard to diagnose.
> > >
> > > NP, though the analysis is quite simple - /proc/iomem will show the culprit.
> > 
> > I'm confused. How would the user know what to look for in /proc/iomem
> > (or, I believe, /proc/ioports actually) if the driver does not print
> > which resource allocation failed?
> > 
> > If the information is already printed somewhere, then I agree there's no
> > point adding a message. But from the code I could not find it.
> 
> I don't see any ack or rev from Jean, so I guess there are open issues?
> 
I was suppopsed to send v2, and I had prepared it, but it looks like I forgot
to actually send it out. I'll try to do that today.

Guenter

      reply	other threads:[~2018-02-26 20:37 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-30 16:50 [PATCH 1/2] i2c: piix4: Use request_muxed_region Guenter Roeck
2017-12-30 16:50 ` [PATCH 2/2] i2c: piix4: Use usleep_range() Guenter Roeck
2018-02-11 20:12   ` [2/2] " Guenter Roeck
2018-02-12 10:53   ` [PATCH 2/2] " Jean Delvare
2018-02-12 20:59     ` Guenter Roeck
2018-02-12 21:35       ` Joe Perches
2018-02-12 22:22     ` Guenter Roeck
2018-02-14 14:44       ` Jean Delvare
2018-02-26 19:56     ` Wolfram Sang
2018-02-11 20:11 ` [1/2] i2c: piix4: Use request_muxed_region Guenter Roeck
2018-02-12 10:10 ` [PATCH 1/2] " Jean Delvare
2018-02-12 18:51   ` Guenter Roeck
2018-02-13 11:48     ` Böszörményi Zoltán
2018-02-13 14:11       ` Guenter Roeck
2018-02-14 14:23     ` Jean Delvare
2018-02-26 19:55       ` Wolfram Sang
2018-02-26 20:37         ` Guenter Roeck [this message]

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=20180226203729.GA28554@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=jdelvare@suse.de \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wsa@the-dreams.de \
    --cc=zboszor@pr.hu \
    /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;
as well as URLs for NNTP newsgroup(s).