Messages in this thread Patch in this message | | | Date | 26 Jan 99 15:36:03 -0800 | From | "Alex Adriaanse" <> | Subject | Lance driver doesn't work for AT1500 |
| |
I have an AT1500 NIC that I use under Linux with the lance driver. However, I could not get this driver to work with my card under Linux 2.0.35/36 and 2.2.0 without modifications.
First of all, the card uses the address 0x240, which is not supported by the driver. I had to add 0x240 to the list of probed IO ports in the source code. Specifying io=0x240 when loading the module would not make a difference without changing the source.
Second, once the card is recognized successfully, the card seems to "shut down" the Ethernet port when initialized. Linux doesn't notice anything wrong, but the LEDS on both my hub and NIC indicating the connection between the two are turned off (they were initially on when booting my computer) and the card won't send or receive any data. I solved this problem by commenting out two lines of code.
The patch that will solve these two problems is attached below. Perhaps some of it could be included in the future kernel releases.
Best regards,
Alex Adriaanse
============================================================================ --- lance.bak Tue Jan 26 02:05:32 1999 +++ lance.c Tue Jan 26 02:09:46 1999 @@ -67,7 +67,7 @@ #include <linux/etherdevice.h> #include <linux/skbuff.h> -static unsigned int lance_portlist[] __initdata = { 0x300, 0x320, 0x340, 0x360, 0}; +static unsigned int lance_portlist[] __initdata = { 0x240, 0x300, 0x320, 0x340, 0x360, 0}; int lance_probe(struct device *dev); int lance_probe1(struct device *dev, int ioaddr, int irq, int options); @@ -98,7 +98,7 @@ Most ISA boards have jumpered settings for the I/O base, IRQ line, and DMA channel. This driver probes the likely base addresses: -{0x300, 0x320, 0x340, 0x360}. +{0x240, 0x300, 0x320, 0x340, 0x360}. After the board is found it generates a DMA-timeout interrupt and uses autoIRQ to find the IRQ line. The DMA channel can be set with the low bits of the otherwise-unused dev->mem_start value (aka PARAM1). If unset it is @@ -438,7 +438,7 @@ This method provided by L. Julliard, Laurent_Julliard@grenoble.hp.com. */ if (readw(0x000f0102) == 0x5048) { - static const short ioaddr_table[] = { 0x300, 0x320, 0x340, 0x360}; + static const short ioaddr_table[] = { 0x240, 0x300, 0x320, 0x340, 0x360}; int hp_port = (readl(0x000f00f1) & 1) ? 0x499 : 0x99; /* We can have boards other than the built-in! Verify this is on-board. */ if ((inb(hp_port) & 0xc0) == 0x80 @@ -656,7 +656,7 @@ if (chip_table[lp->chip_version].flags & LANCE_ENABLE_AUTOSELECT) { /* Turn on auto-select of media (10baseT or BNC) so that the user can watch the LEDs even if the board isn't opened. */ - outw(0x0002, ioaddr+LANCE_ADDR); + /* outw(0x0002, ioaddr+LANCE_ADDR); */ /* Don't touch 10base2 power bit. */ outw(inw(ioaddr+LANCE_BUS_IF) | 0x0002, ioaddr+LANCE_BUS_IF); } @@ -716,7 +716,7 @@ if (chip_table[lp->chip_version].flags & LANCE_ENABLE_AUTOSELECT) { /* This is 79C960-specific: Turn on auto-select of media (AUI, BNC). */ - outw(0x0002, ioaddr+LANCE_ADDR); + /* outw(0x0002, ioaddr+LANCE_ADDR); */ /* Only touch autoselect bit. */ outw(inw(ioaddr+LANCE_BUS_IF) | 0x0002, ioaddr+LANCE_BUS_IF); }
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |