ioremap fails for a device in PCI-E slot on AMCC katmai board

Shubhada Pugaonkar shubhada at chelsio.com
Tue Feb 24 05:17:58 EST 2009


Great...That works!!!

Thank you so much.
Shubhada

-----Original Message-----
From: Benjamin Herrenschmidt [mailto:benh at kernel.crashing.org] 
Sent: Friday, February 20, 2009 8:38 PM
To: Shubhada Pugaonkar
Cc: linuxppc-dev at ozlabs.org
Subject: Re: ioremap fails for a device in PCI-E slot on AMCC katmai
board

On Fri, 2009-02-20 at 17:35 -0800, Shubhada Pugaonkar wrote:

> ****************************************************
> 
> cxgb3_main.c:
> 
>         mmio_start = pci_resource_start(pdev, 0);
> 
>         mmio_len = pci_resource_len(pdev, 0);
> 
>         ai = t3_get_adapter_info(ent->driver_data);
> 

My bet is that mmio_start is an unsigned long instead of a
resource_size_t and thus gets cropped (ie, driver bug).

 (/me goes read the source)

Yes, indeed, that's the problem. Change the definition
of mmio_start and mmio_len to resource_size_t, that should
fix it. I suspect the other driver has the same problem.

Note: They will still get cropped, I suspect, when copied
to netdev->mem_start, nothing much to do here, but fortunately
those fields aren't used.

BTW. If you do patches to fix those drivers, please send them
to the netdev at vger.kernel.org mailing list too.

Cheers,
Ben.






More information about the Linuxppc-dev mailing list