Information on network hardware

This is an informal collection of information about network hardware and bug work-arounds.

Here is a quick index:


"eth0: unknown interrupt 0x1" messages

>At some moment mine /var/adm/messages started to record zillions >of messages like: >"eth0: unknown interrupt 0x1"

This message should only occur with kernels 1.0.0 to 1.0.3 or so.

These are mostly harmless messsages produced by error-checking code around line 277 in 8390.c. The root cause is usually some part of the system shutting off interrupts for longer than the net code expects, or that your network is exceptionally busy.

This section of code that produces this message combines a check for unrecognized hardware return values with a check to prevent unlimited work being done during a single interrupt, which might indicate a hardware failure. A kernel patch (1.0.3 I think) increased this 'boguscnt' check from '5'(four actions per network interrupt) to '9' (eight actions per interrupt). This prevents the error message for almost all systems.


8390-based ethercards don't capture all packets in promiscuous mode

Due to my misinterpretation of the 8390 documentation, all drivers based on the 8390 core (3c503, WD80*3, SMC Ultra, NE*000, HP PCLAN and others) do not receive multicast packets in promiscuous mode.

Only network monitoring programs use promiscuous mode, and protocols that use multicast packets are currently rare, so very few people will encounter this problem. Kernels after 1.1.24 already include the following fix:

drivers/net/8390.c:set_multicast_list() } else if (num_addrs < 0) - outb_p(E8390_RXCONFIG | 0x10, ioaddr + EN0_RXCR); + outb_p(E8390_RXCONFIG | 0x18, ioaddr + EN0_RXCR); else -djb 7/13/94

NE2000 driver DMA conflict message

>The problem has to do with machine crashes about every 1 to 2 days with >this error: >eth0: DMAing conflict in ne_block_output. [DMAstat:fffffffe][irqlock:fffffff]

Ohhh, bad. This "can't" happen when everything is working correctly.

The "DMA" that this message is referring to is the DMA controller internal to the NE2000. It has nothing to do with the motherboard DMA channels. (A few NE1000 clones do allow the two DMA systems to be connected, but DMA results in *slower* system operation when transferring typical ethernet traffic.)

What is likely happening is an interrupt conflict or a noisy interrupt line, causing the device driver to start another packet transfer when it thinks that it has locked out interrupt from the card.

A remote possibility is that you are running an old kernel, or mixing versions of 8390.c and ne.c.

>And thats about it. With so little on it, its hard to believe I have this >problem, but I do. The problem seems to corrolate with the addition of the >second IDE, before we had it, we used to have uptimes of 2+ weeks. The

Hmmm, adding a card often results in IRQ conflicts and occasionally results in electrical noise problems. Try swapping card in their slots or changing the interrupt line. (Note: uppen IRQs are often quieter than lower ones! Try IRQ11 or IRQ15.)


Midwest Micro subnotebook

>I got your email address off the laptop survey list on tsx and thought I'd >write you for some experience/advice. I'm getting an Elite Subnote and >wondered how you like yours. How long have you had it? Any trouble? I've >read stuff about it's "cramped" keyboard and unreliable trackball. Is this >your experience?

I've order five machine in two batches. The first machine was ordered in early January and had the following problems

The lastest four arrived in mid-April and have none of these problems.

>About Linux, any pointers about installing it? I'm planning to use >Slackware and load tinyX. I see you're running XWindows? Would you mind >sending me your Xconfig file? Also any trouble getting the trackball to >work? No problems installing it. A few notes: The 4 bit VGA server works fine. The alpha-test 8 bit server from Mike Hollick doesn't restore text mode correctly. The trackball is a two button microsoft serial mouse. Except for the missing third button I love it, and have had no problems with it. The wrist rest turned out to be far more useful that I had expected. The keyboard feels fine, it took about a week to get used to it. >I guess you're pretty happy with the Subnote since you have five. You >certainly can't beat the price.

Not only was the price great, it was also the only reasonable subnote that was shipping with a 340M drive.

BTW, the first was ordered with a 4M memory expansion because the 8M memory expansion cards were not due to be available until "late February". The recent batch was ordered with 8M modules, but they arrived with only the base 4M because the 8M expansion modules still were not available! Rule: if it's not "in stock for immediate delivery", it doesn't exist. People that ordered IBM Thinkpad 750s back in the fall are just getting them now!

The Other Rule: divide the advertised battery life by two.


I/O region extents, and snarf_region().

(This is a question about why the kernel function snarf_region() only works up to 0x3fff, and why drivers don't bother allocating higher I/O regions.)

> /* We've committed to using the board, and can start filling in *dev. */ > /* I suppose this assigns this I/O range to this proc */ > snarf_region(ioaddr, 16); > /* Why the same is not done for the range starting at ioaddr+0xC008 ? */

The snarf_region() function shares some of the same bitmap functions as the ioperm() call, and only marks the I/O ports used in the 0x0 - 0x3ff (the original PC I/O space). I claim (I wrote the ioperm() and *_region() code, so I feel the need to defend this :->) that this is actually the right thing to do, as some (many?) I/O devices deliberately ignore the upper I/O address bits because some ancient broken PC software required it.


3c503 mysteriously switches to the AUI port.

>I have been having a problem with my eternet card changing from the TP port >to the AUI without any notice. The machine will change interfaces >between 1 day and 1 week of uptime. If I move the cable from the TP port to >a tranceiver on the AUI the machine after it swaps it will work again.

The '8390' part of the 3c503 driver has special code to automatically switch interfaces around line drivers/net/8390.c:156 in version 1.0. This code was added so that the ethercard could automatically configure itself for the network in use. This turned out to be a not-quite-perfect implementation of an otherwise good idea, and around version 1.0.2 the code was changed to only switch interfaces if *no* packets had yet been transmitted without error, rather than anytime in the session.


PLIP length warning.

>> 1. It works ONLY with short cables - I have one cable 2 meters long and one >> 40 meters long. My old plip worked fine on both; your one works with the

Acckkkk! A 40 meter printer cable is *way* beyond the specs for even output-only printer traffic! It's unreasonable to expect bidirectional traffic to work on a cable this long.

You should switch to ethernet for this link: not only is ethernet faster, cheaper and more reliable, it's also much *safer* for a connection this long. 10base2 provides at least 600V of isolation if the 'T' taps are insulated, and 10baseT provides over 1500V isolation with fully enclosed contacts. That's protection against lightning hits, ground loops, ground noise and ground offsets that you *need*.


Problem with HP Vectra 486/66XM LANCE probe.

>Subject: Problem with HP Vectra 486/66XM LANCE probe >We're using HP Vectra 486/66XM's here and they have an AMD >79C960 chip on the motherboard. The Ethernet HowTo indicates >that this is supported using the PCnet-ISA driver, lance.c, >which says upon booting that it is: > > HP J2405A IRQ 15 DMA 7. > >The only problem is that the IRQ and DMA are incorrect.

Ooops, when I put in the HP-J2405A special-case code I didn't realize that they were going to come out with an incompatible implementation. The 'lance.c' driver *always* uses the value in the setup register of an HP Lance implementation. In this case it's reading an invalid 0xff value.

>For the time being, I've been hardcoding the proper IRQ and DMA >values in the driver itself and everything has been working >fine, but I'd like to get the probe for this fixed so that I >don't have to muck around with the source (or do funny things >with LILO) in the future.

That's the right temporary solution, and the right long-term attitude. I'll see if I can find someone at HP that knows how to tell the difference between a J2405A and a Vectra. If there isn't an easy way, I'll just ignore a 0xff setup value and do autoIRQ/autoDMA instead.


Multiple 3c509's in one machine.

> Alan Cox suggested talking to you about figuring out how to do multiple >3c509's within 1 linux box. I have an application where I would like to do >just this. Specifically I'd like to get 3 of them into a single ISA box.

The 3c509 driver already supports multiple 3c509 cards on the *ISA* bus. Look in the probe code for the variable 'current tag'. Just make certain that "eth1" and "eth2" are set to probe anywhere (address '0'), not just a specific I/O address.

A side note: the 3c509 probe doesn't mix well with the rest of the probes. It's difficult to predict a priori which card will be accepted "first" -- the order is based on the hardware ethernet address. That means that the ethercard with the lowest ethernet address will be assigned to "eth0", and the next to "eth1", etc. If the "eth0" ethercard is removed, they all shift down one number.

Another note: the 3c509 driver will fail to find multiple EISA-mode 3c509s and 3c579s. The file net/drivers/3c509.c needs to be modified to accept multiple EISA adaptors. This change is already made in later 1.1.* kernels. Around line 94 make the following changes

- /* First check for a board on the EISA bus. */ + /* First check all slots of the EISA bus. The next slot address to + probe is kept in 'eisa_addr' to support multiple probe() calls. */ if (EISA_bus) { - for (ioaddr = 0x1000; ioaddr < 0x9000; ioaddr += 0x1000) { + static int eisa_addr = 0x1000; + while (eisa_addr < 0x9000) { + ioaddr = eisa_addr; + eisa_addr += 0x1000; + /* Check the standard EISA ID register for an encoded '3Com'. */ if (inw(ioaddr + 0xC80) != 0x6d50) continue;

Please let me know if this works for you.


Intel EtherExpress driver status.

>I have just installed linux with support for the intel etherexpress >card what is the current status of this card and where can the latest >version of the driver be got from. > >The current version I have is v0.07 1/19/94 by yourself.

The EExpress driver is still in alpha test -- it only works on some machines, generally slower 386 machines.

Several people are actively working on the driver, but a stable release is at least several months away.


IDE Disk Power-down Code.

>My friend has a small utility (under DOS) which can tell the disk controller >to switch off the disk after some period of inactivity. He runs this program >and then boots linux. (He has two IDE disks).

This is a standard feature of all modern IDE disks. I have a short program (appended) that I use to do the same thing on laptops. A user-level program is a poor way to do this, but I got tired of patching it into my own kernels and I didn't feel I could maintain an Official Kernel Feature.

>After some time the disks are >switched off. Now, when linux wants to use them, disk driver writes some >messages about timeouts (one on the new disk and three-four on the old one) >and than everything is ok.

This is almost normal: the Linux kernel gets upset when the disk doesn't respond immediately. It resets the controller, and by that time the disk has spun up. One annoying misfeature is that the disk drive posts an interrupt when it goes into spin-down mode, the kernel doesn't know where the interrupt is from, and 'syslog' immediately spins the disk back up. The quick, sleazy solution is to configure 'syslog' to ignore those messages.

>BUT if the first process that wants to access >disk is swapper, the system hangs. It doesn't matter, which hard disk the >swap partition is on, the system hangs only when swapper wants to access >the disk. If somebody wants more details, I can reproduce it.

Hmm, I've never experienced this.

Anyway, here is my short program to put the disk into standby-timer mode. It takes a single optional parameter, the number of seconds to wait before going into standby mode.

/* * diskdown.c: Shut down a IDE disk if there is no activity. * Written by Donald Becker ([email protected]) for Linux. */ #include < unistd.h > #include < stdio.h > #include < asm/io.h > #define IDE_BASE 0x1f0 #define IDE_SECTOR_CNT 0x1f2 #define IDE_CMD 0x1f7 #define PORTIO_ON 1 enum ide_cmd {StandbyImmediate=0xe0, IdleImmediate=0xe1, StandbyTimer=0xe2, IdleTimer=0xe3,}; main(int argc, char *argv[]) { int timeout; if (ioperm(IDE_BASE, 8, PORTIO_ON)) { perror("diskdown:ioperm()"); fprintf(stderr, "diskdown: You must run this program as root.\n"); return 1; } if (argc > 1) { timeout = atoi(argv[1]); if (timeout < 10) timeout = 10; } { int old_cnt = inb(IDE_SECTOR_CNT); printf("Old sector count: %d.\n", old_cnt); outb((timeout + 4)/5,IDE_SECTOR_CNT); outb(StandbyTimer, IDE_CMD); outb(old_cnt,IDE_SECTOR_CNT); } return 0; } /* * Local variables: * compile-command: "gcc -O6 -o diskdown diskdown.c" * comment-column: 32 * End: */

Verifying a 3c589 is enabled.

>How does one work out/set that memory map, i.e. mem_start, >I've set io_addr to 0x300 and irq to 10 ok, its the memory >part I've got a blind spot for.

The 3c589 uses 16 I/O locations and no memory locations. That makes it much easier to configure than a I/O + memory card.

A quick way to check if the 3c589 is correctly mapped in to run

dd if=/dev/port skip=768 count=16 bs=1 | od -t x2 instead of the 'ifconfig...'. This will show the contents of I/O locations 0x300-0x30f (768 to 768+16). The 3c589 signature of 6d 50 (or 50 6d) should be the first bytes if it's mapped in correctly.

Xircom, again.

>I have a friend who just got a laptop and I've been putting linux >on it. They got a Xircom credit card ethernet adapter (it says right >on the box that it supports "all popular network operating systems, right? >:-) Unfortunately, it looks like it is unsupported in Linux. On the other >hand, it is a PCMCIA card, and it sounded like "generic" PCMCIA support >might be forthcoming.

Until Xircom releases programming information, no non-standard (i.e. non-modem) product can be supported.

The "generic" part of the PCMCIA support will only handle socket enabling. That's all that's needed for devices that adhere to a common register standard, like modems, but ethernet adaptors differ wildly.

You should give Xircom a call and ask for the Linux driver. Tell them that it says right on the box that it "supports all popular operating systems". When they tell you that they don't have a device driver, ask them for the programming specifications:->.


MCA bus 3c529 support.

> I've managed to boot up linux on a PS/2 - at present I'd like to try and >get the current ETHERLINK/MC card working. I saw that in 3c509.c you >had provided some support for MCA. Some of the routime you call in >that section are undefined. What other routines do I need to have in order to build the 3c509 and try it out ?

I don't have access to a MCA machine (nor do I fully understand the probing code) so I never wrote the mca_adaptor_select_mode() or mca_adaptor_id() routines. If you can find a way to get the adaptor I/O address that assigned at boot time, you can just hard-wire that in place of the commented-out probe. Be sure to keep the code that reads the IRQ, if_port, and ethernet address.

Sorry I can't be more helpful.


Top
Linux at CESDIS
Author:Donald Becker, [email protected].