linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* ioremap (still?) broken
@ 1999-09-07  6:44 Troy Benjegerdes
  1999-09-07  6:55 ` Geert Uytterhoeven
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Troy Benjegerdes @ 1999-09-07  6:44 UTC (permalink / raw)
  To: linuxppc-dev


I am attempting to make an Alteon based Gigabit Ethernet card work in a
Yosemite G3, and it appears that either ioremap is not mapping memory
correctly, or the implementation of 'readl,writel' on PPC is not
consistent with the implementation on all other architectures.

The alteon driver does an 'ioremap' on the address provided by the kernel
PCI services, and then expects to be able to access the PCI card's memory
via accessing the memory returned using 'readl,writel'.

The first thing the driver does is check the card version by reading a
particular register. By using appropriate printf's, I have found that the
value returned is '0xffffffff'. (defininitely NOT the register it's
looking for)

Before I go on a wild chase again, could someone let me know whether the
2.2.12 kernel might have a better chance with this, or will I need to go
to the 2.3.x series? (I tried this on a 2.2.6 kernel).

Thanks.

--------------------------------------------------------------------------
| Troy Benjegerdes    |  troy@blacklablinux.com    |    hozer@drgw.net   |
|    Unix is user friendly... You just have to be friendly to it first.  |
| This message composed with 100% free software.    http://www.gnu.org   |
--------------------------------------------------------------------------


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ioremap (still?) broken
  1999-09-07  6:44 ioremap (still?) broken Troy Benjegerdes
@ 1999-09-07  6:55 ` Geert Uytterhoeven
  1999-09-08  1:03 ` Paul Mackerras
  1999-09-09  6:29 ` Michel Lanners
  2 siblings, 0 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 1999-09-07  6:55 UTC (permalink / raw)
  To: Troy Benjegerdes; +Cc: linuxppc-dev


On Tue, 7 Sep 1999, Troy Benjegerdes wrote:
> I am attempting to make an Alteon based Gigabit Ethernet card work in a
> Yosemite G3, and it appears that either ioremap is not mapping memory
> correctly, or the implementation of 'readl,writel' on PPC is not
> consistent with the implementation on all other architectures.

Paul just checked in an ioremap() fix at the linux_2_2 branch of vger.

Greetings,

						Geert

--
Geert Uytterhoeven ----------------- SONY Suprastructure Center Europe (SUPC-E)
Geert.Uytterhoeven@sonycom.com ------------------- Sint-Stevens-Woluwestraat 55
Phone +32-2-7248608 Fax +32-2-7242686 ---------------- B-1130 Brussels, Belgium


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ioremap (still?) broken
  1999-09-07  6:44 ioremap (still?) broken Troy Benjegerdes
  1999-09-07  6:55 ` Geert Uytterhoeven
@ 1999-09-08  1:03 ` Paul Mackerras
  1999-09-09  6:29 ` Michel Lanners
  2 siblings, 0 replies; 5+ messages in thread
From: Paul Mackerras @ 1999-09-08  1:03 UTC (permalink / raw)
  To: hozer; +Cc: linuxppc-dev


Troy Benjegerdes <hozer@drgw.net> wrote:

> The alteon driver does an 'ioremap' on the address provided by the kernel
> PCI services, and then expects to be able to access the PCI card's memory
> via accessing the memory returned using 'readl,writel'.

That should work.

> The first thing the driver does is check the card version by reading a
> particular register. By using appropriate printf's, I have found that the
> value returned is '0xffffffff'. (defininitely NOT the register it's
> looking for)

Possibly you may need to enable PCI memory or I/O space responses in
the PCI command register in the card's configuration space.

> Before I go on a wild chase again, could someone let me know whether the
> 2.2.12 kernel might have a better chance with this, or will I need to go

I just checked in a fix to ioremap in the vger 2.2 branch which fixes
the case where the mapping added by ioremap is the first in a 4MB
region.  You would be getting kernel DSI exceptions (page faults) if
you had hit that bug, though.

Paul.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ioremap (still?) broken
  1999-09-07  6:44 ioremap (still?) broken Troy Benjegerdes
  1999-09-07  6:55 ` Geert Uytterhoeven
  1999-09-08  1:03 ` Paul Mackerras
@ 1999-09-09  6:29 ` Michel Lanners
  1999-09-10  3:07   ` Troy Benjegerdes
  2 siblings, 1 reply; 5+ messages in thread
From: Michel Lanners @ 1999-09-09  6:29 UTC (permalink / raw)
  To: hozer; +Cc: linuxppc-dev


On   7 Sep, this message from Troy Benjegerdes echoed through cyberspace:
[about an Alteon PCI Gigabit card]
> The first thing the driver does is check the card version by reading a
> particular register. By using appropriate printf's, I have found that the
> value returned is '0xffffffff'. (defininitely NOT the register it's
> looking for)

First, I'd try to get the card identification right. What kind of
register are you trying to read? Is that a PCI config register, or
already a memory- or IO-register on the card?

What about lspci? Does it report your board? Does it identify it
correctly? In what machine are you trying this?

Get back with this, and we'll see for the next step ;-)

Michel

-------------------------------------------------------------------------
Michel Lanners                 |  " Read Philosophy.  Study Art.
23, Rue Paul Henkes            |    Ask Questions.  Make Mistakes.
L-1710 Luxembourg              |
email   mlan@cpu.lu            |
http://www.cpu.lu/~mlan        |                     Learn Always. "


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ioremap (still?) broken
  1999-09-09  6:29 ` Michel Lanners
@ 1999-09-10  3:07   ` Troy Benjegerdes
  0 siblings, 0 replies; 5+ messages in thread
From: Troy Benjegerdes @ 1999-09-10  3:07 UTC (permalink / raw)
  To: linuxppc-dev



A couple of people mentioned I should check that PCI memory accesses are
enabled in the PCI command register. I fixed this, and about an hour later
I was transmitting at around 300 Mbit/second ;)

Thanks to all who replied.



On Thu, 9 Sep 1999, Michel Lanners wrote:

> On   7 Sep, this message from Troy Benjegerdes echoed through cyberspace:
> [about an Alteon PCI Gigabit card]
> > The first thing the driver does is check the card version by reading a
> > particular register. By using appropriate printf's, I have found that the
> > value returned is '0xffffffff'. (defininitely NOT the register it's
> > looking for)
> 
> First, I'd try to get the card identification right. What kind of
> register are you trying to read? Is that a PCI config register, or
> already a memory- or IO-register on the card?
> 
> What about lspci? Does it report your board? Does it identify it
> correctly? In what machine are you trying this?
> 
> Get back with this, and we'll see for the next step ;-)
> 
> Michel
> 
> -------------------------------------------------------------------------
> Michel Lanners                 |  " Read Philosophy.  Study Art.
> 23, Rue Paul Henkes            |    Ask Questions.  Make Mistakes.
> L-1710 Luxembourg              |
> email   mlan@cpu.lu            |
> http://www.cpu.lu/~mlan        |                     Learn Always. "
> 
> 

--------------------------------------------------------------------------
| Troy Benjegerdes    |  troy@blacklablinux.com    |    hozer@drgw.net   |
|    Unix is user friendly... You just have to be friendly to it first.  |
| This message composed with 100% free software.    http://www.gnu.org   |
--------------------------------------------------------------------------


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1999-09-10  3:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-09-07  6:44 ioremap (still?) broken Troy Benjegerdes
1999-09-07  6:55 ` Geert Uytterhoeven
1999-09-08  1:03 ` Paul Mackerras
1999-09-09  6:29 ` Michel Lanners
1999-09-10  3:07   ` Troy Benjegerdes

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).