PNIC LC82C169-9902

Donald Becker becker@cesdis1.gsfc.nasa.gov
Mon Sep 13 11:22:38 1999


On Mon, 13 Sep 1999, Shawn Anderson wrote:
> > Donald Becker wrote:
> > > On Sun, 12 Sep 1999, Shawn Anderson wrote:
> > >
> > > >   I am having troubles getting my asante 10/100 ethernet card to see my
> > > > other linux box. And am hoping someone could help me out.  I insmod the
> > > > tulip driver, start eth0 and try to telnet or ping etc... and I get no
> > > > network activity at all.
> > > ...
> > > > Sep 11 03:45:26 space kernel: tulip.c:v0.91g 7/16/99
> > > > becker@cesdis.gsfc.nasa.gov
> > > > Sep 11 03:45:26 space kernel: eth0: Lite-On 82c168 PNIC rev 32 at 0x400,
> > > > 00:00:B4:94:ED:99, IRQ 25.
> > >
> > > That's an unusual I/O addrss and IRQ.  What type of machine are you using?
> > Its a PowerPC box (Performa 6400/180)

That's the problem.
The pre-0.91j Tulip drivers work on the PowerPC, but used the descriptor
byte-swapping feature of the Tulip so that the driver wouldn't need to byte
swap on the PPC.  (It still must in the setup, but not during operation.)

But the most of the Tulip clones, including the PNIC, didn't both to
implement the byte-swap feature. 

I used to advise just buying a real Tulip board.  But I decided that I had
spent way too much answering "bug" reports, and it was only going to get
worse with the increasing number of clone chips.  So the v0.91j and later
drivers have explicit byte swapping.

Get the new driver from
  http://cesdis.gsfc.nasa.gov/linux/drivers/kern-2.3/index.html
  ftp://cesdis.gsfc.nasa.gov/pub/linux/drivers/kern-2.3/

You *must* get the new support files (k_compat.h pci-netif.[ch]) as well!

While I don't have a PowerPC system to test with, I believe that every
PCI network driver in that directory, except for rtl8139.c, should
work with the PowerPC.

The rtl8139.c driver *might* require
  at line 344
-	((u16 *)(dev->dev_addr))[i] = read_eeprom(ioaddr, i+7, addr_len);
+	put_unaligned(le16_to_cpu(read_eeprom(ioaddr, i+7, addr_len),
+			(u16 *)(dev->dev_addr))[i]);

   at line 1157
-	u32 rx_status = *(u32*)(rx_ring + ring_offset);
+	u32 rx_status = le32_to_cpu(get_unaligned((u32*)(rx_ring + ring_offset));

If someone with a PPC and RTL8139 card would like to test..

Donald Becker					  becker@cesdis.gsfc.nasa.gov
USRA-CESDIS, Center of Excellence in Space Data and Information Sciences.
Code 930.5, Goddard Space Flight Center,  Greenbelt, MD.  20771
301-286-0882	     http://cesdis.gsfc.nasa.gov/people/becker/whoiam.html

 | To unsubscribe, send mail to Majordomo@cesdis.gsfc.nasa.gov, and within the
 |  body of the mail, include only the text:
 |   unsubscribe this-list-name youraddress@wherever.org
 | You will be unsubscribed as speedily as possible.