linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jean Delvare <khali@linux-fr.org>
To: David Miller <davem@davemloft.net>
Cc: corentin.labbe@geomatys.fr, sparclinux@vger.kernel.org,
	linux-i2c@vger.kernel.org
Subject: Re: [PATCH] i2c-ali1535: enable SPARC support
Date: Thu, 5 Jan 2012 21:06:00 +0100	[thread overview]
Message-ID: <20120105210600.7c099f75@endymion.delvare> (raw)
In-Reply-To: <20120105.145510.2259110209867964309.davem@davemloft.net>

On Thu, 05 Jan 2012 14:55:10 -0500 (EST), David Miller wrote:
> From: Jean Delvare <khali@linux-fr.org>
> Date: Thu, 5 Jan 2012 20:51:05 +0100
> > Actually I ended up doing the changes myself, and the patch is queued
> > for 3.3 already:
> > http://khali.linux-fr.org/devel/linux-3/jdelvare-i2c/i2c-ali1535-enable-sparc-support.patch
> > 
> > Please let me know quickly if you see anything wrong there.
> 
> Using the raw PCI config register value in the non-IO case is always
> wrong and non-portable.  You need to ioremap the thing using the PCI
> resource if it's not IO and therefore MEM.
> 
> More easier, if non-IO is really not expected, would be to fail the
> probe if we don't find IORESOURCE_IO set.

It's indeed not expected, and failing is what Corentin's original patch
was doing. I had him change (actually did the change myself with his
approval) to limit the risk of regression. I don't expect MEM but maybe
no resource type at all (i.e. BAR 0 unused.)

The rationale is that old PC boards use the same PCI chipset and we
were not able to find any tester. I have no idea what the PCI resources
look like on these machines, but I know the driver used to work OK, so
the strategy is to make the new code behave the same as the original
code if things don't look as expected.

We can revisit if/when we find a tester with ALI1535 on x86.

-- 
Jean Delvare

  reply	other threads:[~2012-01-05 20:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-24 11:01 [PATCH] i2c-ali1535: enable SPARC support corentin.labbe
2011-11-24 18:50 ` Jean Delvare
     [not found] ` <4ECE2410.7040608-Um+J1D3rkBVWj0EZb7rXcA@public.gmane.org>
2011-12-27 19:17   ` David Miller
     [not found]     ` <20111227.141759.1836372889946924661.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2012-01-05 19:51       ` Jean Delvare
     [not found]         ` <20120105205105.6a2d03b3-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2012-01-05 19:55           ` David Miller
2012-01-05 20:06             ` Jean Delvare [this message]
2012-01-05 20:44               ` David Miller

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=20120105210600.7c099f75@endymion.delvare \
    --to=khali@linux-fr.org \
    --cc=corentin.labbe@geomatys.fr \
    --cc=davem@davemloft.net \
    --cc=linux-i2c@vger.kernel.org \
    --cc=sparclinux@vger.kernel.org \
    /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).