tech-net archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
#41258 Atheros L2 driver patch
Jeff, good day!
<in regard to PR #41258 >
Remember we had a chat on #netbsd about if_lii driver.
Today i've chatted with the user originally wrote that patch.
He's confirmed that watch *worked for him*, so it may be
nice to commit it.
the chat:
<kla> x4da, hi, this in regard to PR #41258 the one where lii(4) fails
to read the mac address
<x4da> kla, great! so what's up with that?
* girafe ушел (Read error: Connection reset by peer)
<kla> x4da, it's been a while since the issue was last brought up but
honestly I thought it was just forgotten
<kla> x4da, well i can most definitely confirm it works entirely
including bring the link up
<x4da> kla, so it works on your setup with that old patch from #41258?
<kla> x4da, that's correct, at least it was working when I used that hardware
* ewdafa (~moo@unaffiliated/ewdafa) зашел на канал #NetBSD
<x4da> kla, was that nic an the ASUS motherboard?
<kla> the mobo is a biostar with attansic l2 built into the chipset
<x4da> kla, that's almost the mobo i have
<kla> x4da, okay, so i'm not sure why it wouldn't work on your setup then
<x4da> x4da, i thought it might be the PHY issue
<x4da> kla, riz said he would commit your patch
<kla> x4da, great, i no longer use the same hw myself but hopefully
someone else will : )
<kla> x4da, thanks.
<x4da> kla, thx to you
<kla> Have a great day
the patch:
Index: if_lii.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/if_lii.c,v
retrieving revision 1.5
diff -u -p -r1.5 if_lii.c
--- if_lii.c 8 Jul 2008 12:39:27 -0000 1.5
+++ if_lii.c 11 Mar 2009 11:52:01 -0000
@@ -547,17 +547,17 @@ lii_read_macaddr(struct lii_softc *sc, u
}
if (found < 2) {
- aprint_error_dev(sc->sc_dev, "error reading MAC address\n");
- return 1;
- }
-
- addr0 = htole32(addr0);
- addr1 = htole32(addr1);
-
- if ((addr0 == 0xffffff && (addr1 & 0xffff) == 0xffff) ||
- (addr0 == 0 && (addr1 & 0xffff) == 0)) {
+ /* Make sure we try the BIOS method before giving up */
addr0 = htole32(AT_READ_4(sc, ATL2_MAC_ADDR_0));
addr1 = htole32(AT_READ_4(sc, ATL2_MAC_ADDR_1));
+ if ((addr0 == 0xffffff && (addr1 & 0xffff) == 0xffff) ||
+ (addr0 == 0 && (addr1 & 0xffff) == 0)) {
+ aprint_error_dev(sc->sc_dev, "error reading MAC
address\n");
+ return 1;
+ }
+ } else {
+ addr0 = htole32(addr0);
+ addr1 = htole32(addr1);
}
ea[0] = (addr1 & 0x0000ff00) >> 8;
Thank you.
--
With best regards,
Dmitry
Home |
Main Index |
Thread Index |
Old Index