Bug 233255 - Megahertz EM1144-T pcmcia ethernet adapter doesn't work
Megahertz EM1144-T pcmcia ethernet adapter doesn't work
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
8
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Kernel Maintainer List
Brian Brock
:
Depends On:
Blocks: 427887
  Show dependency treegraph
 
Reported: 2007-03-21 05:59 EDT by mvegh
Modified: 2008-02-13 02:10 EST (History)
2 users (show)

See Also:
Fixed In Version: 2.6.23.15-137.fc8
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-02-11 17:39:28 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
lspci output file (14.08 KB, text/plain)
2008-02-04 07:39 EST, mvegh
no flags Details
pccardctl output (160 bytes, text/plain)
2008-02-04 07:39 EST, mvegh
no flags Details
source files (20.33 KB, application/x-bzip)
2008-02-08 04:50 EST, mvegh
no flags Details
Diff of changes between 2.6.15 and 2.6.22 (24.92 KB, text/plain)
2008-02-08 07:55 EST, Christopher Brown
no flags Details
Diff between 2.6.19 and 2.6.20 (3.56 KB, text/plain)
2008-02-08 08:37 EST, Christopher Brown
no flags Details

  None (edit)
Description mvegh 2007-03-21 05:59:02 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.10) Gecko/20070216 Firefox/1.5.0.10

Description of problem:
I use a Megahertz EM1144-T model pcmcia ethernet adapter (FCC ID is F2M7410003) with the smc91c92_cs driver on my laptop.
I'm running Fedora Core 6 on my laptop which is configured to continuously receive security and other updates.
About 1 or 2 weeks ago a new kernel update 2.6.20-1.2925.fc6 was downloaded and installed. With this update my ethernet adapter stopped working.
If I try to modprobe it dmesg says 'smc91c92_cs: Unable to find hardware address'.
I tried to boot up my previuos kernel (2.6.19-1.2911.6.5.fc6) and the driver find the HW address ant it works fine!

Version-Release number of selected component (if applicable):
kernel-2.6.20-1.2925.fc6

How reproducible:
Always


Steps to Reproduce:
1. Boot up with the 2.6.20-1.2925.fc6 kernel
2. dmesg | grep smc


Actual Results:


Expected Results:


Additional info:
Comment 1 Jon Stanley 2008-01-07 20:48:43 EST
(This is a mass-update to all current FC6 kernel bugs in NEW state)

Hello,

I'm reviewing this bug list as part of the kernel bug triage project, an attempt
to isolate current bugs in the Fedora kernel.

http://fedoraproject.org/wiki/KernelBugTriage

I am CC'ing myself to this bug, however this version of Fedora is no longer
maintained.

Please attempt to reproduce this bug with a current version of Fedora (presently
Fedora 8). If the bug no longer exists, please close the bug or I'll do so in a
few days if there is no further information lodged.

Thanks for using Fedora!
Comment 2 mvegh 2008-01-08 07:36:50 EST
The problem still exists in FC8:

Linux version 2.6.23.12-99.fc8 (mockbuild@xenbuilder2.fedora.redhat.com) (gcc
version 4.1.2 20070925 (Red Hat 4.1.2-33)) #1 SMP Wed Dec 19 17:20:50 EST 2007
...
...
...
pccard: PCMCIA card inserted into slot 1
cs: memory probe 0xa0000000-0xa0ffffff: excluding 0xa0000000-0xa00fffff
pcmcia: registering new device pcmcia1.0
smc91c92_cs: Unable to find hardware address.
unregister_netdevice: device eth%d/cff31800 never was registered
WARNING: at net/core/dev.c:3769 unregister_netdevice() (Not tainted)
 [<c05bc678>] unregister_netdev+0xf/0x15
 [<d4b58a9c>] smc91c92_probe+0xb46/0xb9a [smc91c92_cs]
 [<c056ea60>] pccard_get_tuple_data+0x65/0x6e
 [<c056ef6a>] pccard_read_tuple+0x7e/0x88
 [<c0570a08>] pcmcia_device_probe+0xaa/0xfa
 [<c0566fd3>] driver_probe_device+0xea/0x168
 [<c04f3589>] kobject_uevent_env+0x37a/0x3a1
 [<c05670f7>] __driver_attach+0x0/0xa5
 [<c0567167>] __driver_attach+0x70/0xa5
 [<c056655f>] bus_for_each_dev+0x39/0x5b
 [<c0566e2e>] driver_attach+0x16/0x18
 [<c05670f7>] __driver_attach+0x0/0xa5
 [<c0566843>] bus_add_driver+0x6d/0x16d
 [<c05712af>] pcmcia_register_driver+0xd1/0x101
 [<c044931b>] __link_module+0x0/0x10
 [<c044ab9e>] sys_init_module+0x150d/0x1651
 [<c06206ea>] do_page_fault+0x2c0/0x5ef
 [<c0570845>] pcmcia_dev_present+0x0/0x33
 [<c040518a>] syscall_call+0x7/0xb
 [<c0610000>] xfrm_tmpl_sort+0x36/0x5a
 =======================
1.0: ttyS3 at I/O 0x2e8 (irq = 4) is a 16550A
Comment 3 Christopher Brown 2008-02-03 16:26:06 EST
Miklos,

I'm not sure a driver exists for your hardware in linux. However would you mind
running the following and attach it as type text/plain to this bug:

pccardctl ident > pccardctl.out
# lspci -vvxxx > lspci.out

We may then be able to add the hardware ident to /etc/pcmcia/config.opts

Cheers
Chris
Comment 4 mvegh 2008-02-04 07:39:12 EST
Created attachment 293878 [details]
lspci output file
Comment 5 mvegh 2008-02-04 07:39:49 EST
Created attachment 293879 [details]
pccardctl output
Comment 6 mvegh 2008-02-04 07:42:04 EST
Hi Chris,
I was using this adapter so this driver did work correctly in the earlier
releases of Fedora and RHx linuxes. I was examining the source code of the
driver both of the working and the not working versions (release nums are above)
with the Meld diff viewer as I recognized the problem. I have searched for the
output message in the sources and found the place where the code was changed
which caused the error-exit. As I remember it was somewhere around the
initialization routines. Although I have more than 10 yrs programming experience
[but rather in Bill's op system :-( not in linux driver programming] I am still
a hobby linux user and fun so I could'nt do anything except reporting the problem.
Thanks for help!
Miklos
Comment 7 Christopher Brown 2008-02-04 12:39:23 EST
If you have the diff that would be appreciated...
Comment 8 mvegh 2008-02-08 04:50:00 EST
Created attachment 294330 [details]
source files

Guys,
unfortunately I couldn't provide the driver source files of the same kernel
versions as given in the first report entry. But I attach two other versions of
the source files: 2.6.15 which was working, and 2.6.22 which shows up some
changes that made the EM1144T not working.
If you compare these files, there will be a lot of changes. But I think the
important difference for us is in the 'mhz_setup' routine (line 600-609 in the
old file). There is a comment there: "Ugh -- the EM1144 card has two VERS_1
tuples!?!" I don't know what does that mean, but I feel that there was some
hacking there which is missing from the new source. Therefore the new setup
routine returns with nonzero so the "smc91c92_cs: Unable to find hardware
address." is printed out.
Comment 9 Christopher Brown 2008-02-08 07:55:13 EST
Created attachment 294348 [details]
Diff of changes between 2.6.15 and 2.6.22
Comment 10 Christopher Brown 2008-02-08 08:37:07 EST
Created attachment 294350 [details]
Diff between 2.6.19 and 2.6.20

We can try reverting this commit and see if it resolves the issue for you as
you mentioned the 2.6.19 > 2.6.20 upgrade broke things for you.
Comment 11 Chuck Ebbert 2008-02-08 14:42:48 EST
We would only need to revert this part... and it does look like that would fix it:

--- a/drivers/net/pcmcia/smc91c92_cs.c	Tue Dec 05 06:09:20 2006 +0500
+++ b/drivers/net/pcmcia/smc91c92_cs.c	Tue Dec 05 06:09:21 2006 +0500
@@ -560,16 +560,8 @@ static int mhz_setup(struct pcmcia_devic
 
     /* Read the station address from the CIS.  It is stored as the last
        (fourth) string in the Version 1 Version/ID tuple. */
-    tuple->DesiredTuple = CISTPL_VERS_1;
-    if (first_tuple(link, tuple, parse) != CS_SUCCESS) {
-	rc = -1;
-	goto free_cfg_mem;
-    }
-    /* Ugh -- the EM1144 card has two VERS_1 tuples!?! */
-    if (next_tuple(link, tuple, parse) != CS_SUCCESS)
-	first_tuple(link, tuple, parse);
-    if (parse->version_1.ns > 3) {
-	station_addr = parse->version_1.str + parse->version_1.ofs[3];
+    if (link->prod_id[3]) {
+	station_addr = link->prod_id[3];
 	if (cvt_ascii_address(dev, station_addr) == 0) {
 		rc = 0;
 		goto free_cfg_mem;
Comment 12 Chuck Ebbert 2008-02-08 16:14:21 EST
Fixed in 2.6.23.15-136
Comment 13 Fedora Update System 2008-02-10 22:34:17 EST
kernel-2.6.23.15-137.fc8 has been submitted as an update for Fedora 8
Comment 14 Fedora Update System 2008-02-11 17:39:03 EST
kernel-2.6.23.15-137.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 15 mvegh 2008-02-13 02:10:44 EST
Hi,
this modification solved the problem. Here is the dmesg output:
----------------------------------------
pccard: PCMCIA card inserted into slot 1
cs: memory probe 0xa0000000-0xa0ffffff: excluding 0xa0000000-0xa00fffff
pcmcia: registering new device pcmcia1.0
eth1: smc91c92 rev 3: io 0x310, irq 4, hw_addr xx:xx:xx:xx:xx:xx
  4608 byte buffer, auto xcvr
pcmcia: registering new device pcmcia1.1
1.1: ttyS2 at I/O 0x3e8 (irq = 4) is a 16550A
eth1: flipped to 10baseT
eth1: no IPv6 routers present
----------------------------------------

Thanks!
m

Note You need to log in before you can comment on or make changes to this bug.