linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Shubhada Pugaonkar <shubhada@chelsio.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: ioremap fails for a device in PCI-E slot on AMCC katmai board
Date: Sat, 21 Feb 2009 15:38:03 +1100	[thread overview]
Message-ID: <1235191083.8805.207.camel@pasglop> (raw)
In-Reply-To: <8A71B368A89016469F72CD08050AD33402D57562@maui.asicdesigners.com>

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@vger.kernel.org mailing list too.

Cheers,
Ben.

  reply	other threads:[~2009-02-21  4:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-21  1:35 ioremap fails for a device in PCI-E slot on AMCC katmai board Shubhada Pugaonkar
2009-02-21  4:38 ` Benjamin Herrenschmidt [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-02-23 18:17 Shubhada Pugaonkar

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=1235191083.8805.207.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=shubhada@chelsio.com \
    /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).