[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BANLkTinL3ZvaNhYnsRMZQ4zBRLx6_F-O6Q@mail.gmail.com>
Date: Mon, 30 May 2011 21:27:09 +0800
From: Daniel J Blueman <daniel.blueman@...il.com>
To: Wolfram Sang <w.sang@...gutronix.de>
Cc: Chris Ball <cjb@...top.org>, linux-mmc@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sdhci: fix undue iomem warning
Hi Wolfram,
On 30 May 2011 20:58, Wolfram Sang <w.sang@...gutronix.de> wrote:
> Hi Daniel,
>
>> diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c
>> index 936bbca..ae948b0 100644
>> --- a/drivers/mmc/host/sdhci-pci.c
>> +++ b/drivers/mmc/host/sdhci-pci.c
>> @@ -918,8 +918,9 @@ static struct sdhci_pci_slot * __devinit sdhci_pci_probe_slot(
>> return ERR_PTR(-ENODEV);
>> }
>>
>> - if (pci_resource_len(pdev, bar) != 0x100) {
>> - dev_err(&pdev->dev, "Invalid iomem size. You may "
>> + int len = pci_resource_len(pdev, bar);
>> + if (len != 0x100 && len != 0x200) {
>
> Hmmm,
>
> 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).
> 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?
This would be in-tune with page 2 of:
http://www.sdcard.org/developers/tech/host_controller/simple_spec/Simplified_SD_Host_Controller_Spec.pdf
> so, I'd say it is better to keep the old way.
>
>> + 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.
Thanks,
Daniel
--
Daniel J Blueman
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists