Problem with 3Com 10/100 Ethernet card not being recognized

From ThinkWiki
Revision as of 00:39, 14 June 2005 by 82.47.145.14 (Talk) (Alternative to disabling ACPI)
Jump to: navigation, search

Information about the problem of non-recognized 3Com Ethernet card when using ACPI with 2.6 kernels.

Problem description

When using a 2.6 kernel with ACPI enabled, the card is not recognized properly. In fact the kernel finds the card and tries to enable it but gives an error message in dmesg output.

Affected Models

Affected Operating Systems

  • all Linux flavours

Status

This is a problem of the ACPI subsystem interfering with the PCI resource management.

Solutions

Try one of the following kernel parameters (in that order):

  • nolapic (disables support for local apic)
  • acpi=nopci (disables PCI resource control of the ACPI subsystem)
  • acpi=off (completely disables ACPI, should always work)

Alternative to disabling ACPI

It is possible to get the ethernet controller of the 3Com combo card working with ACPI enabled by using the setpci command. Since it requires PCI bus and IO port addresses that change each boot, this Perl script automates things. It has only been tested under the 2.6.12-rc5-mm2 and 2.6.12-rc6 kernels with the 3c59x driver compiled as a module. It may break with different versions of the lspci command (tested with 2.1.11).

#!/usr/bin/perl
use strict;
my $DRIVER = "3c59x";
my $LSPCI = `lspci -v -d 10b7: | grep -A3 Ethernet`;
print "Resetting 3Com ethernet controller... ";
if($LSPCI =~ /[0-9a-f]{4}:([0-9a-f]{2}:[0-9a-f]{2}.[0-9a-f]).*?I\/O ports at (\d{4})/is) {
       my $bus = $1;
       my $io = sprintf("%x", (hex $2) + 1);
       `rmmod $DRIVER`;
       `setpci -v -H 1 -s $bus COMMAND=0x07 CACHE_LINE_SIZE=0 LATENCY_TIMER=0x40 BASE_ADDRESS_0=0x$io >/dev/null`;
       `modprobe $DRIVER`;
       print "done.\n";
} else {
       print "failed.\n";
}