# 3c59x problems

## ctford0

I'm having a strange problem with a 3c59x card.  When I compile a new kernel and reboot the card works on the first boot.  However the next time I boot it will not get an ip.  I get the same results using a module and compiled into the kernel.  Thanks in advance for the help.

Chris

----------

## modal

first make sure that "3c59x" is in your /etc/modules.autoload file.

then, if you are using dhcp edit your /etc/conf.d/net file:

make his part look like this:

# For DHCP set iface_eth? to "dhcp"

# For passing options to dhcpcd use dhcpcd_eth?

#

iface_eth0="dhcp"

#dhcpcd_eth0="..."

that will make your nic automagically use dhcp to get an ip address.

let use know how it goes.

----------

## ctford0

Yea, I'm doing that already.  Like I said, on the first boot after compiling a fresh kernel everthing works fine.  I get an ip and internet access.  I can ping anything and get a response.  The problem comes when I reboot.  Any other time that I boot the nic will not work.  The module loads fine and I see eth0 if i do ifconfig, however it doesn't have an ip assigned to it.  I can do 

```

/etc/init.d/net.eth0 start
```

but the network never comes up.  Another weird thing is that after trying to start the nic, ifconfig only gives "lo".  To see eth0 I have to do ifconfig -a.  Thanks.

Chris

----------

## K0byB0y

Yeah I was having the same problem myself with the same ethernet module.  I'm willing to bet that you've installed the Gentoo Kernel Sources.  While it might seem like the logical thing to do, there is a patch applied to those kernel sources that tend to screw with your 3Com card.  After finishing my installation I was left with no net access on my Gentoo box.  What I ended up doing was going to kernel.org and getting the latest plain "vanilla" kernel sources, burning them onto a CD, mounting the CD on my Gentoo box and extracting the sources under /usr/src.  Then you have the "linux" symbolic link point to your plain vanilla kernel sources and you recompile the kernel.  Once I got a kernel built from the vanilla sources I'm not having any network issues.  Hope this helps...

-Koby

----------

## ctford0

I'm using the vanilla sources that is avaliable to emerge.  I'll give the kernel on kernel.org a try and see what happens.  

Thanks

Chris

----------

## modal

vanilla sources is the kernel from kernel.org, just so that'll save you time going to kernel.org.

----------

## ctford0

OK, thanks.  So I have the correct kernel.  

Does anyone have any idea why the card would work right after compiling the kernel, but never again?

Chris

----------

## 6169

We're not dealing with a pcmcia/cardbus card using the 3c59x driver, correct?  I had some problems getting my 3com 575c cardbus nic (which uses the above driver) working, eventually narrowed it down to the distinction between built-in kernel-pcmcia drivers and the pcmcia modules for pcmcia-cs.  The gentoo install cd kernel actually uses pcmcia-cs modules.

When they config their first kernel, most people end up choosing pcmcia modules from the kernel config, which  disables the pcmcia-cs modules (they are not built when you emerge pcmcia-cs).  This is confusing, and often results in problems with cards that did work from the install cd but fail to work after a reboot (with the kernel drivers)...I tried to send an email requesting a clarification in the install docs but it bouced.

Anyway If I recall my symptoms were similar:  Trying to bring the card up resulted in no errors, but no welcome beeps either, and no real results (eth0 not being registed as a valid iface, etc).  Hope this helps, or at least gives you some ideas.

----------

## K0byB0y

To be honest I don't think its your card.  I think something funky is up with the network setup.  Here are a couple of ideas that might push you in the right direction:

<li>Are you compiling the 3Com card driver as part or the kernel or as a module ?  If you are not planning to unload it from a running system I would recommend that you compile it into the kernel.  If you compile it as a module, is it getting loaded at startup (is it in /etc/modules.autoload) ?

<li>When you are recompiling the kernel how do you boot ?  Do you boot from a Gentoo disk or do you boot from your hard drive ?  My networking worked 100% all the time when I booted with the Gentoo boot disk.  The Gentoo network autodetect detected my netcard (even when I specified "nonet" at startup).  I think this was because the boot disk's kernel was not patched but rather it was a "vanilla" kernel.

<li> Are you using a DHCP server or are you assigning a static IP address to eth0 ?  When I was trying to configure my card to use DHCP the interface would not even come up.  Next I tried to configure the card to use a static IP and the interface came up but could not route to anywhere.  Try setting up the card to use a static IP.  If/when eth0 comes up look at it with ifconfig.  What protocols does it support ?  It should only support IP4 but if you see anything related to IPv6 the you are back to square one again.

<li>If you are using DHCP do a ("killall dhcpcd") from a prompt and try to fire up dhcpcd with different options.  Try doing a "dhcpcd eth0 -d" to see all the debug messages.  Also you might want to enable syslog to start logging dhcpcd messages into a separate file (you can find everything you need to know about dhcpcd command-line switches here: http://www.phystech.com/download/dhcpcd_man.html)

<li>Look at your startup messages (dmesg | less) or look through your kernel messages to see if there's anything irregular in there about your eth0 interface (grep /var/log/messages eth)

   Report back about your findings.  We will get your networking going  :Smile: 

-Koby

----------

## ctford0

Some of your questions I can answer tonight, others I will have to post tomorrow when I get to work, where the machine is.  

First the card is a pci card.  I'm not sure of its age though, it is much larger than any of today's generic nic's that use the tulip driver.  I robbed an old server that had maybe a 90 MHz P-Pro (not sure of that factoid.)  The length of the card is probably twice the length of the pci slot and the width is greater than that of the slot on the back of the computer.  Just a little info......

 *Quote:*   

> <li>Are you compiling the 3Com card driver as part or the kernel or as a module ? If you are not planning to unload it from a running system I would recommend that you compile it into the kernel. If you compile it as a module, is it getting loaded at startup (is it in /etc/modules.autoload) ? 
> 
> 

 

I've tried both.  Currently I am using a module because it gave me the ability to load the card on the fly.  I do have the module in the modules.autoload file.

 *Quote:*   

> <li>When you are recompiling the kernel how do you boot ? Do you boot from a Gentoo disk or do you boot from your hard drive ? My networking worked 100% all the time when I booted with the Gentoo boot disk. The Gentoo network autodetect detected my netcard (even when I specified "nonet" at startup). I think this was because the boot disk's kernel was not patched but rather it was a "vanilla" kernel. 
> 
> 

 

No, not from the cd...  The OS is fine...  I can boot and if it is the first boot after the kernel compile then I can emerge things and other things that need network access.

 *Quote:*   

> <li> Are you using a DHCP server or are you assigning a static IP address to eth0 ? When I was trying to configure my card to use DHCP the interface would not even come up. Next I tried to configure the card to use a static IP and the interface came up but could not route to anywhere. Try setting up the card to use a static IP. If/when eth0 comes up look at it with ifconfig. What protocols does it support ? It should only support IP4 but if you see anything related to IPv6 the you are back to square one again. 
> 
> 

 

Yes, I have a permanent IP address, but it is obtained using dhcp.  I have all the correct entries in /etc/conf.d/net and have net.eth0 added to the default runlevel.  I can try setting the card up to use a static ip, however im not sure how that will work with our network.  On our network ip addresses are assingned by the mac address of the card.  I always have the eth0 interface, however it is only assigned an ip the first boot after the kernel compile.

 *Quote:*   

> <li>If you are using DHCP do a ("killall dhcpcd") from a prompt and try to fire up dhcpcd with different options. Try doing a "dhcpcd eth0 -d" to see all the debug messages. Also you might want to enable syslog to start logging dhcpcd messages into a separate file (you can find everything you need to know about dhcpcd command-line switches here: http://www.phystech.com/download/dhcpcd_man.html) 
> 
> 

 

I will give this a try tomorrow....

 *Quote:*   

> <li>Look at your startup messages (dmesg | less) or look through your kernel messages to see if there's anything irregular in there about your eth0 interface (grep /var/log/messages eth) 
> 
> 

 

When I run dmesg I see the network card, however it doesnt show the mac address.  Not sure if this is a problem, but I have noticed that most cards do show the mac addy when it is found by the kernel.  I will post the exact output from dmesg tomorrow....

Thanks

Chris

----------

## ctford0

I tried killing dhcpcd, said that it wasn't running.  I then tried the argument that you suggested, the only output that I had was the mac address no errors and then after a couple of minutes I got the command prompt back.  As for dmesg I only get a conformation that the module has loaded. 

Any Ideas??

Chirs

----------

## K0byB0y

Ok, so far you've been doing everything fine.  You've got excellent troubleshooting skills  :Smile:   Try this next: instead of rebooting the box try power cycling it.  Shut it down, wait a minute and then turn it back on.  That should "reboot the card" also (for lack of a better term).  I did a google search on this and a lot of people whom experienced this kind of behavior ended up replacing their cards because their cards were on the way to kick the bucket.  Have you considered doing that ?  You can try throwing in another spare NIC card lying around or get a new one for a couple of $$$.  You can also try moving the card to a different slot to see if it might work that way.  And I don't know if this is possible but on some cards you can flash the BIOS.  You might want to throw in a spare card to see if it works with that.

-Koby

----------

## ctford0

Buying a new nic is a hassle since I have to get the company credit card and then go somewhere to buy one so I'm going to try everything I can before I do that.  I've had the system powered down since Monday until today, booted up and no ip.....  I was thinking of pulling the plug on the system tomorrow to see what happens there, that would make sure that all power was cut to the card.  

I have tried one other pci nic in this system and could never get it working, however I know for a fact that nic had problems....  Right now my machine has the troublesome 3c59x pci nic and an older isa nic which works fine.  The reason I don't just use the isa nic is because of the lag it creates.  This machine is going to be used mostly as a dumb terminal and the isa nic doesnt transfer data quickly enough to allow for a comfortable work env.  I had this extra pci nic just laying around so I decided to put it to use.  

I have thought of trying a different pci slot and I plan to when time allows.  I have also thought of maybe upgrading the motherboards bios and hope for a miracle.  There has to be some reason that the card will connect after a kernel compile and then never again....

Any other suggestions??

Chris

----------

## ctford0

Changing PCI slots did not help the situation any.  I plan on trying a few other thing tomorrow....

chris

----------

