Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

sys/dev/usb/if_axen.c



Hi,
I have following device:
  -----------------
  axen0 at uhub3 port 1
  axen0: ASIX (0x0b95) AX88179A (0x1790), rev 2.10/2.00, addr 3
  axen0: AX88179
  ukphy0 at axen0 phy 3: OUI 0x00e038, model 0x0006, rev. 1
  ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, auto
  axen0: Ethernet address ....
  -----------------
And running 10.99.10,
it emits following lines

  Nov 13 20:24:54 beebox-03 /netbsd: [ 154.8236912] axen0: autoconfiguration error: invalid buffer(pkt#1), continue

I put simple checking line as:

-----------
diff --git a/sys/dev/usb/if_axen.c b/sys/dev/usb/if_axen.c
index 423a87e5c541..6215db354c90 100644
--- a/sys/dev/usb/if_axen.c
+++ b/sys/dev/usb/if_axen.c
@@ -793,6 +793,8 @@ axen_uno_rx_loop(struct usbnet *un, struct usbnet_chain *c, uint32_t total_len)
 		if ((buf[0] != 0xee) || (buf[1] != 0xee)) {
 			aprint_error_dev(un->un_dev,
 			    "invalid buffer(pkt#%d), continue\n", pkt_count);
+			aprint_error_dev(un->un_dev,
+			    "%04d %02x %02x\n", __LINE__, buf[0], buf[1]);
 			if_statadd(ifp, if_ierrors, pkt_count);
 			return;
 		}
-----------

and then the lines show:

Nov 13 20:25:03 beebox-03 /netbsd: [ 163.6740410] axen0: autoconfiguration error: invalid buffer(pkt#1), continue
Nov 13 20:25:03 beebox-03 /netbsd: [ 163.6740410] axen0: autoconfiguration error: 0797 00 08

so buf[0]:buf[1] expected 0xeeee is 0x0008.

I've compared to openbsd: if_axen.c 
   https://raw.githubusercontent.com/openbsd/src/master/sys/dev/usb/if_axen.c
to N, and there are so many differencies.

Does this (N) if_axen.c works on any installation ?

Also, I've prepared GENERIC-axen with following conf:
  -------
  include         "arch/amd64/conf/GENERIC"
  options         AXEN_DEBUG
  options         MSGBUFSIZE=131072
  -------
but No debug lines appears, please let me know what is wrong,
thanks
-- 
Makoto Fujiwara
mef%NetBSD.org@localhost
makoto%if.t.u-tokyo.ac.jp@localhost
Key fingerprint = 0BFA FAEB EAD1 90BA 7498  8F85 6809 9E0B B7EF A12E
----
pkgsrc freshness:
http://www.ki.nu/~makoto/pkgsrc/check-update/00_Summary.html


Home | Main Index | Thread Index | Old Index