Skip to contentSkip to conversation

MIPS/linux compatible PCI network cards

DISCUSSION Michael Shmulevich 6 participants 19 messages Jan 25, 2001 – Jan 28, 2001 MIPS

lore
Share & tools
lore
#0 lore raw

Hello all,

I would like to ask if someone knows some more or less widely available PCI network card that is compatible with MIPS/Linux.

I have heard of Tulip and AMD's PCnet. I wonder if you heard of others.

Thanks in advance,
Sorry if this mail bothered you...

Sincerely yours,
Michael Shmulevich
______________________________________
Software Developer
Jungo - R&D
email: [email protected]
web: http://www.jungo.com
Phone: 1-877-514-0537(USA) +972-9-8859365(Worldwide) ext. 233
Fax: 1-877-514-0538(USA) +972-9-8859366(Worldwide)

#1 lore raw
Quoted 11 lines · Michael Shmulevich

Date: Fri, 26 Jan 2001 00:06:14 +0200
From: Michael Shmulevich <[email protected]>
To: "[email protected]" <[email protected]>
Subject: MIPS/linux compatible PCI network cards

Hello all,

I would like to ask if someone knows some more or less widely available PCI network card that is compatible with MIPS/Linux.

I have heard of Tulip and AMD's PCnet. I wonder if you heard of others.

These all have already been used with Linux/MIPS. I don't have any reports on the current status of these drivers. If they don't work they should be reasonably easy to fix.

Ralf

#8 lore raw
In reply to Michael Shmulevich
Quoted 10 lines · Michael Shmulevich

Hello all,

I would like to ask if someone knows some more or less widely available PCI network card that is compatible with MIPS/Linux.

I have heard of Tulip and AMD's PCnet. I wonder if you heard of others.

Thanks in advance,
Sorry if this mail bothered you...

Another one is the RTL8139. It's quite cheap (I think less than $20).

Pete

#9 lore raw
Quoted 9 lines · Pete Popov
Quoted 7 lines

I would like to ask if someone knows some more or less widely available PCI network card that is compatible with MIPS/Linux.

I have heard of Tulip and AMD's PCnet. I wonder if you heard of others.

Thanks in advance,
Sorry if this mail bothered you...

Another one is the RTL8139. It's quite cheap (I think less than $20).

In the dark past I had great success with the NE2k's. They PIO, so no driver hacking necessary at all.

Ralf

#2 lore raw
In reply to Ralf Baechle
Quoted 8 lines · Ralf Baechle
Quoted 7 lines · Michael Shmulevich

Date: Fri, 26 Jan 2001 00:06:14 +0200
From: Michael Shmulevich <[email protected]>
To: "[email protected]" <[email protected]>
Subject: MIPS/linux compatible PCI network cards

Hello all,

Quoted 8 lines
Quoted 4 lines

I would like to ask if someone knows some more or less widely available PCI network card that is compatible with MIPS/Linux.

I have heard of Tulip and AMD's PCnet. I wonder if you heard of others.

These all have already been used with Linux/MIPS. I don't have any reports on the current status of these drivers. If they don't work they should be reasonably easy to fix.

The tulip driver worked fine at least in the past. The AMD PCnet driver works just fine, we are using it on our reference boards.

Quoted 3 lines

Ralf

--

_    _ ____  ___   Carsten Langgaard   Mailto:[email protected]
|\  /|||___)(___   MIPS Denmark        Direct: +45 4486 5527
| \/ |||    ____)  Lautrupvang 4B      Switch: +45 4486 5555
  TECHNOLOGIES     2750 Ballerup       Fax...: +45 4486 5556
                   Denmark             http://www.mips.com
#3 lore raw
Quoted 2 lines · Carsten Langgaard

The tulip driver worked fine at least in the past. The AMD PCnet driver works just fine, we are using it on our reference boards.

The biggest grief I had was that about every embedded system I ever had uses violates the common standard for what is supposed to be in the EEPROMs of the Tulip or simply doesn't have one at all ...

Ralf

#10 lore raw
In reply to Pete Popov
Quoted 5 lines · Pete Popov

Another one is the RTL8139. It's quite cheap (I think less than $20).

Pete

Surprisingly enough, Realtek's driver is quite x86-oriented. It uses some ugly outb() functtions without any ioremap()'ping.

We tried to modify it to work for MIPS, but failed. There are some hard-to-detect situations, when driver just cannot talk to the hardware, probably due to transmit/receive buffer synchronization. But after some period the connection is restored (reset?).

Michael Shmulevich
______________________________________
Software Developer
Jungo - R&D
email: [email protected]
web: http://www.jungo.com
Phone: 1-877-514-0537(USA) +972-9-8859365(Worldwide) ext. 233
Fax: 1-877-514-0538(USA) +972-9-8859366(Worldwide)

#4 lore raw
In reply to Carsten Langgaard
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

Hello all,

I would like to ask if someone knows some more or less widely

available

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

PCI network card that is compatible with MIPS/Linux.

I have heard of Tulip and AMD's PCnet. I wonder if you heard of

others.

Quoted 2 lines
Quoted 2 lines

These all have already been used with Linux/MIPS. I don't have any

reports

Quoted 4 lines
Quoted 2 lines

on the current status of these drivers. If they don't work they should be reasonably easy to fix.

The tulip driver worked fine at least in the past. The AMD PCnet driver

works

Quoted 1 line

just fine, we are using it on our reference boards.

Note, however, that the Tulip driver that was part of the standard 2.2/2.3 repository at oss.sgi.com was both downrev with regard to the author's own web site and subobtimal if not outright buggy in it's cache management. The AMD PCnet driver as we found it was clean and efficient
but had no MIPS cache hooks. I had to put those in.
So unless Ralf or someone at SGI that the versions on oss.sgi.com are the versions I cleaned up for MIPS, I would recommend pulling them off the MIPS site.

Regards,

Kevin K.

#5 lore raw
Quoted 18 lines · Kevin D. Kissell
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

Hello all,

I would like to ask if someone knows some more or less widely

available

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

PCI network card that is compatible with MIPS/Linux.

I have heard of Tulip and AMD's PCnet. I wonder if you heard of

others.

Quoted 2 lines
Quoted 2 lines

These all have already been used with Linux/MIPS. I don't have any

reports

Quoted 4 lines
Quoted 2 lines

on the current status of these drivers. If they don't work they should be reasonably easy to fix.

The tulip driver worked fine at least in the past. The AMD PCnet driver

works

Quoted 1 line

just fine, we are using it on our reference boards.

Quoted 10 lines

Note, however, that the Tulip driver that was part of the standard 2.2/2.3 repository at oss.sgi.com was both downrev with regard to the author's own web site and subobtimal if not outright buggy in it's cache management. The AMD PCnet driver as we found it was clean and efficient
but had no MIPS cache hooks. I had to put those in.
So unless Ralf or someone at SGI that the versions on oss.sgi.com are the versions I cleaned up for MIPS, I would recommend pulling them off the MIPS site.

The AMD PCnet driver should be OK in the CVS from oss.sgi.com

Quoted 4 lines

Regards,

Kevin K.

--

_    _ ____  ___   Carsten Langgaard   Mailto:[email protected]
|\  /|||___)(___   MIPS Denmark        Direct: +45 4486 5527
| \/ |||    ____)  Lautrupvang 4B      Switch: +45 4486 5555
  TECHNOLOGIES     2750 Ballerup       Fax...: +45 4486 5556
                   Denmark             http://www.mips.com
#6 lore raw
Quoted 31 lines · Carsten Langgaard
Quoted 18 lines · Kevin D. Kissell
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

Hello all,

I would like to ask if someone knows some more or less widely

available

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

PCI network card that is compatible with MIPS/Linux.

I have heard of Tulip and AMD's PCnet. I wonder if you heard of

others.

Quoted 2 lines
Quoted 2 lines

These all have already been used with Linux/MIPS. I don't have any

reports

Quoted 4 lines
Quoted 2 lines

on the current status of these drivers. If they don't work they should be reasonably easy to fix.

The tulip driver worked fine at least in the past. The AMD PCnet driver

works

Quoted 1 line

just fine, we are using it on our reference boards.

Quoted 10 lines

Note, however, that the Tulip driver that was part of the standard 2.2/2.3 repository at oss.sgi.com was both downrev with regard to the author's own web site and subobtimal if not outright buggy in it's cache management. The AMD PCnet driver as we found it was clean and efficient
but had no MIPS cache hooks. I had to put those in.
So unless Ralf or someone at SGI that the versions on oss.sgi.com are the versions I cleaned up for MIPS, I would recommend pulling them off the MIPS site.

Quoted 1 line

The AMD PCnet driver should be OK in the CVS from oss.sgi.com

At least in the 2.4.0 version.

Quoted 4 lines
Quoted 4 lines

Regards,

Quoted 8 lines
Quoted 1 line

Kevin K.

--

_    _ ____  ___   Carsten Langgaard  Mailto:[email protected]
|\  /|||___)(___   MIPS Denmark        Direct: +45 4486 5527
| \/ |||    ____)  Lautrupvang 4B      Switch: +45 4486 5555
  TECHNOLOGIES     2750 Ballerup       Fax...: +45 4486 5556

Denmark http://www.mips.com

--

_    _ ____  ___   Carsten Langgaard   Mailto:[email protected]
|\  /|||___)(___   MIPS Denmark        Direct: +45 4486 5527
| \/ |||    ____)  Lautrupvang 4B      Switch: +45 4486 5555
  TECHNOLOGIES     2750 Ballerup       Fax...: +45 4486 5556
                   Denmark             http://www.mips.com
#11 lore raw
In reply to Michael Shmulevich
Quoted 8 lines · Michael Shmulevich
Quoted 5 lines · Pete Popov

Another one is the RTL8139. It's quite cheap (I think less than $20).

Pete

Quoted 7 lines

Surprisingly enough, Realtek's driver is quite x86-oriented. It uses some ugly outb() functtions without any ioremap()'ping.

We tried to modify it to work for MIPS, but failed. There are some hard-to-detect situations, when driver just cannot talk to the hardware, probably due to transmit/receive buffer synchronization. But after some period the connection is restored (reset?).

The 8139 driver (at least the latest one) has an "ifdef" option to use I/O or memory mapping. I've tried both and both work fine without any modifications. The I/O works fine, provided that you've set things up correctly.

The inb()/outb() functions are part of just about every driver, unfortunately. I really don't like this x86 emulation, but if you want to be able to use drivers without having to modify every one of them, you'll have to do this.

To get the realtek driver to work, all you need to do is to set mips_io_port_base to KSEG1. Let's assume that the ethernet card has been assigned i/o space at 0x14000000. The driver will pick that up as the ioaddr and use the 0x1400000 as the "port". The inb()/outb() macros add mips_io_port_base to the "port" value and now you have 0xB4000000, so you can access the card.

Pete

#17 lore raw
In reply to Michael Shmulevich
Quoted 10 lines · Michael Shmulevich

Hello all,

I would like to ask if someone knows some more or less widely available PCI network card that is compatible with MIPS/Linux.

I have heard of Tulip and AMD's PCnet. I wonder if you heard of others.

Thanks in advance,
Sorry if this mail bothered you...

Intel eepro100 works on mips too. What I had to modify is to
1) take care of the non-standard EEPROM
2) set rx_copybreak to 1518 to avoid some cache problem.
3) remove a buggy cpu_to_le32() coversion

I sent a patch to the author. Hopefully next release it will be ready for MIPS.

Jun

#7 lore raw
In reply to Kevin D. Kissell
Quoted 9 lines · Kevin D. Kissell

Note, however, that the Tulip driver that was part of the standard 2.2/2.3 repository at oss.sgi.com was both downrev with regard to the author's own web site and subobtimal if not outright buggy in it's cache management. The AMD PCnet driver as we found it was clean and efficient
but had no MIPS cache hooks. I had to put those in.
So unless Ralf or someone at SGI that the versions on oss.sgi.com are the versions I cleaned up for MIPS, I would recommend pulling them off the MIPS site.

Linux 2.4 has a new DMA API which is documented in Documentation/DMA-mapping.txt. So today drivers which don't work out of the box on a MIPS system should be considered broken.

Ralf

#12 lore raw
In reply to Pete Popov
Quoted 8 lines · Pete Popov

To get the realtek driver to work, all you need to do is to set mips_io_port_base to KSEG1. Let's assume that the ethernet card has been assigned i/o space at 0x14000000. The driver will pick that up as the ioaddr and use the 0x1400000 as the "port". The inb()/outb() macros add mips_io_port_base to the "port" value and now you have 0xB4000000, so you can access the card.

Pete

The KSEG1() is indeed what I did, however the driver, as I tried to describe, starts to loose synchronization on buffer at some point and just waits quietly... Even with all the DEBUG and mental effort switched on I can't get the reason why this happens...

By the way, which version of the driver are you talking about? Mine doesn't have any ifdef on anything... besides MODULE of course:-)

Mine is:

static const char *version =
"rtl8139.c:v1.07 5/6/99 Donald Becker
http://cesdis.gsfc.nasa.gov/linux/drivers/"

Signature · 9 lines
Sincerely yours,
Michael Shmulevich
______________________________________
Software Developer
Jungo - R&D 
email: [email protected]
web: http://www.jungo.com
Phone: 1-877-514-0537(USA)  +972-9-8859365(Worldwide) ext. 233
Fax:   1-877-514-0538(USA)  +972-9-8859366(Worldwide)
#13 lore raw
Quoted 17 lines · Michael Shmulevich
Quoted 8 lines · Pete Popov

To get the realtek driver to work, all you need to do is to set mips_io_port_base to KSEG1. Let's assume that the ethernet card has been assigned i/o space at 0x14000000. The driver will pick that up as the ioaddr and use the 0x1400000 as the "port". The inb()/outb() macros add mips_io_port_base to the "port" value and now you have 0xB4000000, so you can access the card.

Pete

The KSEG1() is indeed what I did, however the driver, as I tried to describe, starts to loose synchronization on buffer at some point and just waits quietly... Even with all the DEBUG and mental effort switched on I can't get the reason why this happens...

Quoted 8 lines

By the way, which version of the driver are you talking about? Mine doesn't have any ifdef on anything... besides MODULE of course:-)

Mine is:

static const char *version =
"rtl8139.c:v1.07 5/6/99 Donald Becker
http://cesdis.gsfc.nasa.gov/linux/drivers/"

Hmmm, the above looks like the header for the 8129 driver, except that
it says rtl8139. Make sure you're using drivers/net/8139too.c I see
this in the driver: #define RTL8139_VERSION "0.9.10". I'm using test9
kernel, I doubt that you're driver is out of date -- it seems you're perhaps using the wrong driver.

Regarding the I/O vs MEM accesses, look for this:

/* define to 1 to enable PIO instead of MMIO */
#undef USE_IO_OPS

Pete

#15 lore raw
In reply to Michael Shmulevich
Quoted 9 lines · Michael Shmulevich

Date: Fri, 26 Jan 2001 09:56:00 +0200
From: Michael Shmulevich <[email protected]>
CC: "[email protected]" <[email protected]>
Subject: Re: MIPS/linux compatible PCI network cards
To: unlisted-recipients:; (no To-header on input)

Quoted 2 lines · Pete Popov
Quoted 6 lines
Quoted 3 lines

Another one is the RTL8139. It's quite cheap (I think less than $20).

Pete

Surprisingly enough, Realtek's driver is quite x86-oriented. It uses some ugly outb() functtions without any ioremap()'ping.

inb() and friends are for what Inhell calls I/O space. Ioremap is for memory mapped I/O. So you usually don't find both of them in the same driver.

Ralf

#18 lore raw
In reply to Jun Sun
Quoted 1 line · Jun Sun

2) set rx_copybreak to 1518 to avoid some cache problem.

Now I wonder changing rx_copybreak is supposed to fix a cache problem? This sounds broken ...

Ralf

#16 lore raw
In reply to Ralf Baechle
Quoted 15 lines · Ralf Baechle
Quoted 13 lines · Michael Shmulevich

Date: Fri, 26 Jan 2001 09:56:00 +0200
From: Michael Shmulevich <[email protected]>
CC: "[email protected]" <[email protected]>
Subject: Re: MIPS/linux compatible PCI network cards
To: unlisted-recipients:; (no To-header on input)

Quoted 5 lines · Pete Popov

Another one is the RTL8139. It's quite cheap (I think less than $20).

Pete

Quoted 8 lines
Quoted 2 lines

Surprisingly enough, Realtek's driver is quite x86-oriented. It uses some ugly outb() functtions without any ioremap()'ping.

inb() and friends are for what Inhell calls I/O space. Ioremap is for memory mapped I/O. So you usually don't find both of them in the same driver.

Ralf

I guess I will not. But at least hoped to see some io_port_base (?) reference somewhere. neither ioremap, nor io_port_base is found in rtl8139.c... I have tried to add some, but the results are still quite disencouraging.

Newer version of rtl8139.c (from the Scyld) have pci-scan dependency which is not compatible with 2.2.14...

Sincerely yours,
Michael Shmulevich
______________________________________
Software Developer
Jungo - R&D
email: [email protected]
web: http://www.jungo.com
Phone: 1-877-514-0537(USA) +972-9-8859365(Worldwide) ext. 233
Fax: 1-877-514-0538(USA) +972-9-8859366(Worldwide)

#14 lore raw
In reply to Pete Popov
Quoted 17 lines · Pete Popov
Quoted 10 lines

By the way, which version of the driver are you talking about? Mine doesn't have any ifdef on anything... besides MODULE of course:-)

Mine is:

static const char *version =
"rtl8139.c:v1.07 5/6/99 Donald Becker
http://cesdis.gsfc.nasa.gov/linux/drivers/"

Hmmm, the above looks like the header for the 8129 driver, except that
it says rtl8139. Make sure you're using drivers/net/8139too.c I see
this in the driver: #define RTL8139_VERSION "0.9.10". I'm using test9
kernel, I doubt that you're driver is out of date -- it seems you're perhaps using the wrong driver.

Quoted 6 lines

Regarding the I/O vs MEM accesses, look for this:

/* define to 1 to enable PIO instead of MMIO */
#undef USE_IO_OPS

Pete

I have checked the Scyld web page, this is where D. Becker currently work on the driver (http://www.scyld.com/network/rtl8139.html)

Newer driver indeed seem to be more multi-platform aware, though out-of-box compilation still crashed the kernel (access to 0x18000051 instead of 0xb8000051, KSEG1 stuff again). Corrected. Still no luck, driver seems not to find where the card is. Switched cards to another manufacturer [compatible, of course :-)] -- same result.

Sincerely yours,
Michael Shmulevich
______________________________________
Software Developer
Jungo - R&D
email: [email protected]
web: http://www.jungo.com
Phone: 1-877-514-0537(USA) +972-9-8859365(Worldwide) ext. 233
Fax: 1-877-514-0538(USA) +972-9-8859366(Worldwide)