All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Wolfram Sang <w.sang@pengutronix.de>
Cc: Daniel J Blueman <daniel.blueman@gmail.com>,
	Chris Ball <cjb@laptop.org>,
	linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sdhci: fix undue iomem warning
Date: Mon, 30 May 2011 20:33:12 +0200	[thread overview]
Message-ID: <201105302033.12409.arnd@arndb.de> (raw)
In-Reply-To: <20110530182103.GA2674@pengutronix.de>

On Monday 30 May 2011 20:21:03 Wolfram Sang wrote:
>   Show Details
>   > > a) SDHC Specs (even v3) only mention 0x100, so this is the standard.
> > >   Do the new cards (which ones?) have anything located in the extra
> > >   area?
> > 
> > This controller is a dual-slot one, so has two register sets (though
> > one set of pins aren't wired to a socket).
> 
> There are two controllers and they are packed into one PCI-bar? :( I guess this
> needs refactoring of the probe_slot routine then. Just silencing the warning
> will just hide the problem.

Right. Presumably someone has already built a different system with the
same chip and both slots in use. This probably also means we need a
way to figure out which of the slots are in fact connected.

> > > b) your approach won't scale very well
> > 
> > True - a more scalable test would be to check for non-zero length and
> > a multiple of 256 bytes, would you say?
> 
> That wouldn't alarm for 0x10000 or the like, so no gain as well.

In fact, all PCI resources are by definition power-of-two numbers,
so the check would not work at all.

> > >> +             dev_warn(&pdev->dev, "Invalid iomem size. You may "
> > >>                       "experience problems.\n");
> > >
> > > I second turning the message into a warning, though.
> > 
> > If the latter method is preferred, I'll adjust the patch and resend.
> 
> Reconsidering: Given the current situation, an error message is maybe not a
> that bad idea, until the code can handle two controllers in one bar.

Agreed.

	Arnd

      reply	other threads:[~2011-05-30 18:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-30 12:33 [PATCH] sdhci: fix undue iomem warning Daniel J Blueman
2011-05-30 12:58 ` Wolfram Sang
2011-05-30 13:27   ` Daniel J Blueman
2011-05-30 18:21     ` Wolfram Sang
2011-05-30 18:33       ` Arnd Bergmann [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=201105302033.12409.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=cjb@laptop.org \
    --cc=daniel.blueman@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=w.sang@pengutronix.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.