LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Issues with 2.6.8 and 3c59x.c (https://www.linuxquestions.org/questions/linux-newbie-8/issues-with-2-6-8-and-3c59x-c-242786/)

JimBass 10-14-2004 09:46 PM

Issues with 2.6.8 and 3c59x.c
 
There is a fair amount of chatter on groups.google about issues with this driver for a 3com network card that is in several IBM thinkpad notebooks. As it stands currently, the 2.6.8.1 kernel and the driver file (/usr/src/linux-kernel-2.6.8.1/drivers/net/3c59x.c) don't get along very well. In short, the 2.6.8 kernel will boot, but the card will never become functional. It gives errors, can't accept a DHCP address or a static, and fails to ping itself under all addresses except 127.0.0.1.

I tracked down a few solutions that people had posted, and using the patch command I modified the 3c59x.c file, recompiled, and always had the same problem. In desperation I took the 3c59x.c file from the 2.4.25 kernel (which works fine) and dropped that file inplace of the one that comes with the source for 2.6.8. After the compiling and reboot, you have the same errors that occur with the native 3c59xc file. That leads me to speculate that the problem is somewhere other than the 3c59x.c file itself, but I am not enough of a hacker to track down the problem.

I did learn quite a bit attempting to build the 2.6.8.1 kernel 5 times. I am now fairly adept at menuconfig, and was shocked to see how much crap is built into most default kernels! When I finally get one running, it will be MUCH leaner than the standard issue kernel.

What my question is at this point is what can I do? The problems I speak of seemed to show up in 2.6.6 iirc. I guess my choices are to build the testing 2.6.9, or 2.6.4? I'm running 2.4.25 as that is the only way I can get the laptop online. If anyone has suggestions for something I didn't try, I'm more than willing to entertain them!

Peace,
JimBass

JimBass 05-19-2005 08:38 AM

continued to 2.6.11, but now solved!
 
I solved the problem! I had hoped the problem would go away with a newer kernel, so I downloaded 2.6.11 and went through the entire Debian kernel upgrade process outlined here. I again had a fully functional kernel, with the exception of the network card.

Specs of the system in question:
IBM thinkpad T21
Debian unstable
3Com hurrricane pci card (uses the 3c59x driver, built into the laptop)
It is an issue with all 2.6 kernels

I was going to repost this thread, but I did a little searching myself, and found the solution in a redhat mailing list archive. You can read the whole thread here. SInce I was working with Debian instead of Redhat, I was skeptical, but I found the solution buried in the redhat group, in comment #88.

The problem was that because of the order the driver is loaded during boot, it doesn't function correctly. Here is the important output of a dmesg from a 2.6.11 kernel before I found th fix:
Code:

PCI: Enabling device 0000:00:03.0 (0000 -> 0003)
ACPI: PCI Interrupt Link [LNKC] enabled at IRQ 11
ACPI: PCI interrupt 0000:00:03.0[A] -> GSI 11 (level, low) -> IRQ 11
3c59x: Donald Becker and others. www.scyld.com/network/vortex.html
0000:00:03.0: 3Com PCI 3c556B Laptop Hurricane at 0x1400. Vers LK1.1.19
PCI: Setting latency timer of device 0000:00:03.0 to 64
*** EEPROM MAC address is invalid.
3c59x: vortex_probe1 fails.  Returns -22
3c59x: probe of 0000:00:03.0 failed with error -22

Obviously the MAC address couldn't be invalid, since it worked in under the 2.4.27 kernel as well as in dual boot mode with winXP.


The SOLUTION: Of all the stupid annoying things, the way the 2.6 kernel deals with acpi was causing the crash. I should have thought of that, because besides the ethernet card, the battery monitor in KDE would not function, complaining about ACPI. In any case, here is all I needed to do to get the card to work:
change the line in /boot/grub/menu.lst from
Code:

kernel          /boot/vmlinuz-2.6.11-take1 root=/dev/hda2 ro
and change it by adding acpi=off:
Code:

kernel          /boot/vmlinuz-2.6.11-take1 acpi=off root=/dev/hda2 ro
Now the card works and the battery monitor works as well. If you use lilo I don't know if you can add the same acpi=off info anywhere, but if you have a nonfunctional 3com card, chances are good this may have something to do with why.

Peace,
JimBass


All times are GMT -5. The time now is 02:15 AM.