* [patch] Fix station address detection in smc
@ 2008-02-14 0:47 Chuck Ebbert
2008-02-15 15:53 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: Chuck Ebbert @ 2008-02-14 0:47 UTC (permalink / raw)
To: Dominik Brodowski; +Cc: linux-pcmcia, Netdev, Jeff Garzik
Megahertz EM1144 PCMCIA ethernet adapter needs special handling
because it has two VERS_1 tuples and the station address is in
the second one. Conversion to generic handling of these fields
broke it. Reverting that fixes the device.
https://bugzilla.redhat.com/show_bug.cgi?id=233255
Thanks go to Jon Stanley for not giving up on this one until the
problem was found.
Signed-off-by: Chuck Ebbert <cebbert@redhat.com>
---
This was broken for over a year before the problem was found...
--- b/drivers/net/pcmcia/smc91c92_cs.c Tue Dec 05 06:09:21 2006 +0500
+++ a/drivers/net/pcmcia/smc91c92_cs.c Tue Dec 05 06:09:20 2006 +0500
@@ -560,8 +560,16 @@
/* 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;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch] Fix station address detection in smc
2008-02-14 0:47 [patch] Fix station address detection in smc Chuck Ebbert
@ 2008-02-15 15:53 ` Jeff Garzik
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2008-02-15 15:53 UTC (permalink / raw)
To: Chuck Ebbert; +Cc: Dominik Brodowski, linux-pcmcia, Netdev
Chuck Ebbert wrote:
> Megahertz EM1144 PCMCIA ethernet adapter needs special handling
> because it has two VERS_1 tuples and the station address is in
> the second one. Conversion to generic handling of these fields
> broke it. Reverting that fixes the device.
>
> https://bugzilla.redhat.com/show_bug.cgi?id=233255
>
> Thanks go to Jon Stanley for not giving up on this one until the
> problem was found.
>
> Signed-off-by: Chuck Ebbert <cebbert@redhat.com>
>
> ---
>
> This was broken for over a year before the problem was found...
applied
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-02-15 15:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-14 0:47 [patch] Fix station address detection in smc Chuck Ebbert
2008-02-15 15:53 ` Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).