Re: [PATCH] sdhci: fix undue iomem warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?
b) your approach won't scale very well

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.

Regards,

   Wolfram

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux