NetBSD Problem Report #47245
From www@NetBSD.org Sun Nov 25 22:07:55 2012
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
by www.NetBSD.org (Postfix) with ESMTP id 60B0F63DFC7
for <gnats-bugs@gnats.NetBSD.org>; Sun, 25 Nov 2012 22:07:55 +0000 (UTC)
Message-Id: <20121125220754.5FCA063DFC7@www.NetBSD.org>
Date: Sun, 25 Nov 2012 22:07:54 +0000 (UTC)
From: toby.karyadi@gmail.com
Reply-To: toby.karyadi@gmail.com
To: gnats-bugs@NetBSD.org
Subject: Add AX88772B support to axe(4), e.g. for DLINK DUB-E100 C1
X-Send-Pr-Version: www-1.0
>Number: 47245
>Category: kern
>Synopsis: Add AX88772B support to axe(4), e.g. for DLINK DUB-E100 C1
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: kern-bug-people
>State: closed
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sun Nov 25 22:10:00 +0000 2012
>Closed-Date: Sun Jul 28 20:43:41 +0000 2019
>Last-Modified: Sun Jul 28 20:43:41 +0000 2019
>Originator: Toby Karyadi
>Release: current
>Organization:
>Environment:
NetBSD kowari.simplecubes.com 6.99.15 NetBSD 6.99.15 (SHEEVAAXE) #2: Sat Nov 24 20:15:44 EST 2012 archie@zutu.simplecubes.com:/mnt/v01/build/src/current/2012.11.17.05.20.00/obj/sys/arch/evbarm/compile/SHEEVAAXE evbarm
>Description:
The attached patchset adds support for AX88772B devices into the axe(4) driver. These changes incorporates the changes in openbsd on src/sys/dev/usb/if_axe.c, specifically revision 1.108 and 1.109 (and also the associated changes to if_axereg.h)
The impetus for this is because I was trying to use the DLINK DUB-E100 rev C1 RJ45 USB 2.0 eth device on my SheevaPlug. I've tested these changes for that specific device by simply doing simultaneous incoming and outgoing scp. Note that the actual device mappings will be included as an addendum to this PR as a separate patchset.
>How-To-Repeat:
N/A
>Fix:
--- src/sys/dev/usb/if_axe.c.orig 2012-08-24 05:01:23.000000000 -0400
+++ src/sys/dev/usb/if_axe.c 2012-11-24 19:15:31.000000000 -0500
@@ -145,6 +145,7 @@
{ { USB_VENDOR_ASIX, USB_PRODUCT_ASIX_AX88172}, 0 },
{ { USB_VENDOR_ASIX, USB_PRODUCT_ASIX_AX88772}, AX772 },
{ { USB_VENDOR_ASIX, USB_PRODUCT_ASIX_AX88772A}, AX772 },
+ { { USB_VENDOR_ASIX, USB_PRODUCT_ASIX_AX88772B}, AX772 | AX772B },
{ { USB_VENDOR_ASIX, USB_PRODUCT_ASIX_AX88178}, AX178 },
{ { USB_VENDOR_ATEN, USB_PRODUCT_ATEN_UC210T}, 0 },
{ { USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F5D5055 }, AX178 },
@@ -918,12 +919,14 @@
total_len -= sizeof(hdr);
buf += sizeof(hdr);
- if ((hdr.len ^ hdr.ilen) != 0xffff) {
+ if (((le16toh(hdr.len) & AXE_RH1M_RXLEN_MASK) ^
+ (le16toh(hdr.ilen) & AXE_RH1M_RXLEN_MASK)) !=
+ AXE_RH1M_RXLEN_MASK) {
ifp->if_ierrors++;
goto done;
}
- rxlen = le16toh(hdr.len);
+ rxlen = le16toh(hdr.len & AXE_RH1M_RXLEN_MASK);
if (total_len < rxlen) {
pktlen = total_len;
total_len = 0;
@@ -1241,7 +1244,9 @@
/* Enable receiver, set RX mode */
rxmode = AXE_RXCMD_BROADCAST | AXE_RXCMD_MULTICAST | AXE_RXCMD_ENABLE;
- if (sc->axe_flags & AX178 || sc->axe_flags & AX772) {
+ if (sc->axe_flags & AX772B)
+ rxmode |= AXE_772B_RXCMD_RH1M;
+ else if (sc->axe_flags & AX178 || sc->axe_flags & AX772) {
if (sc->axe_udev->speed == USB_SPEED_HIGH) {
/* Largest possible USB buffer size for AX88178 */
rxmode |= AXE_178_RXCMD_MFB;
--- src/sys/dev/usb/if_axereg.h.orig 2012-02-02 14:43:07.000000000 -0500
+++ src/sys/dev/usb/if_axereg.h 2012-11-17 17:45:26.000000000 -0500
@@ -134,6 +134,12 @@
#define AXE_NOPHY 0xE0
#define AXE_INTPHY 0x10
+#define AXE_772B_RXCMD_RH1M 0x0100
+#define AXE_772B_RXCMD_RH2M 0x0200
+#define AXE_772B_RXCMD_RH3M 0x0400
+
+#define AXE_RH1M_RXLEN_MASK 0x07ff
+
#define AXE_TIMEOUT 1000
#define AXE_172_BUFSZ 1536
@@ -167,6 +173,7 @@
uint16_t axe_flags;
#define AX178 0x0001 /* AX88178 */
#define AX772 0x0002 /* AX88772 */
+#define AX772B 0x0004 /* AX88772B */
#define AXE_ANY_PHY 0x1000 /* Chip lies about valid phys */
#define AXE_MII 0x2000 /* Chip-specific MII handling */
};
>Release-Note:
>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/47245 CVS commit: src/sys/dev/usb
Date: Sun, 25 Nov 2012 17:22:40 -0500
Module Name: src
Committed By: christos
Date: Sun Nov 25 22:22:40 UTC 2012
Modified Files:
src/sys/dev/usb: if_axe.c if_axereg.h
Log Message:
PR/47245: Toby Karyadi: Add AX88772B support to axe(4), e.g. for DLINK
DUB-E100 C1
To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/sys/dev/usb/if_axe.c
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/usb/if_axereg.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Toby Karyadi <toby.karyadi@gmail.com>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: kern/47245
Date: Sun, 25 Nov 2012 17:58:36 -0500
Below is the patchset that includes the mapping for devices that uses
the AX88772B chip. I'm incorporating changes that were already done in
OpenBSD for the following devices:
- DLINK DUB-E100 rev C1 (if_axe.c rev 1.113)
- LENOVO USB 2.0 Ethernet (if_axe.c rev 1.112)
- ASUS UX21A/UX31A (if_axe.c rev 1.110)
The revision changes are from openbsd's cvsweb. The patchset below
assumes that the prior patchset in this PR has been applied.
Since this patchset modifies usbdevs, make sure to rerun
Makefile.usbdevs in src/sys/dev/usb to regenerate usbdevs.h and
usbdevs_data.h as such:
$ TOOLDIR=<tools dir as build by build.sh> make -f Makefile.usbdevs
Below is the patchset:
--- src/sys/dev/usb/if_axe.c.orig 2012-11-24 19:15:31.000000000 -0500
+++ src/sys/dev/usb/if_axe.c 2012-11-24 17:10:10.000000000 -0500
@@ -146,6 +146,7 @@
{ { USB_VENDOR_ASIX, USB_PRODUCT_ASIX_AX88772}, AX772 },
{ { USB_VENDOR_ASIX, USB_PRODUCT_ASIX_AX88772A},
AX772 },
{ { USB_VENDOR_ASIX, USB_PRODUCT_ASIX_AX88772B},
AX772 | AX772B },
+ { { USB_VENDOR_ASIX, USB_PRODUCT_ASIX_AX88772B_1}, AX772 | AX772B },
{ { USB_VENDOR_ASIX, USB_PRODUCT_ASIX_AX88178}, AX178 },
{ { USB_VENDOR_ATEN, USB_PRODUCT_ATEN_UC210T}, 0 },
{ { USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F5D5055 },
AX178 },
@@ -154,9 +155,11 @@
{ { USB_VENDOR_COREGA, USB_PRODUCT_COREGA_FETHER_USB2_TX }, 0},
{ { USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DUBE100}, 0 },
{ { USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DUBE100B1 },
AX772 },
+ { { USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DUBE100C1 },
AX772 | AX772B },
{ { USB_VENDOR_GOODWAY, USB_PRODUCT_GOODWAY_GWUSB2E}, 0 },
{ { USB_VENDOR_IODATA, USB_PRODUCT_IODATA_ETGUS2 },
AX178 },
{ { USB_VENDOR_JVC, USB_PRODUCT_JVC_MP_PRX1}, 0 },
+ { { USB_VENDOR_LENOVO, USB_PRODUCT_LENOVO_ETHERNET },
AX772 | AX772B },
{ { USB_VENDOR_LINKSYS2, USB_PRODUCT_LINKSYS2_USB200M}, 0 },
{ { USB_VENDOR_LINKSYS4, USB_PRODUCT_LINKSYS4_USB1000 },
AX178 },
{ { USB_VENDOR_LOGITEC, USB_PRODUCT_LOGITEC_LAN_GTJU2}, AX178 },
--- src/sys/dev/usb/usbdevs.orig 2012-11-01 20:57:57.000000000 -0400
+++ src/sys/dev/usb/usbdevs 2012-11-24 17:17:06.000000000 -0500
@@ -518,6 +518,7 @@
vendor SWEEX2 0x177f Sweex
vendor MISC 0x1781 Misc Vendors
vendor DISPLAYLINK 0x17e9 DisplayLink
+vendor LENOVO 0x17ef Lenovo
vendor E3C 0x18b4 E3C Technologies
vendor AMIT 0x18c5 AMIT
vendor QCOM 0x18e8 Qcom
@@ -867,6 +868,7 @@
product ASIX AX88772 0x7720 AX88772 USB 2.0 10/100 ethernet
controller
product ASIX AX88772A 0x772a AX88772A USB 2.0 10/100
Ethernet adapter
product ASIX AX88772B 0x772b AX88772B USB 2.0 10/100
Ethernet adapter
+product ASIX AX88772B_1 0x7e2b AX88772B USB 2.0 10/100
Ethernet adapter
/* ASUSTeK computer products */
product ASUSTEK WL167G 0x1707 WL-167g USB2.0 WLAN Adapter
@@ -1274,6 +1276,7 @@
/* D-Link products */
/*product DLINK DSBS25 0x0100 DSB-S25 serial adapter*/
product DLINK DUBE100 0x1a00 10/100 ethernet adapter
+product DLINK DUBE100C1 0x1a02 DUB-E100 rev C1
product DLINK DSB650TX4 0x200c 10/100 ethernet adapter
product DLINK DWL120E 0x3200 DWL-120 rev E
product DLINK DWA130C 0x3301 DWA-130 rev C
@@ -1883,6 +1886,9 @@
product LACIE HD 0xa601 Hard Disk
product LACIE CDRW 0xa602 CD R/W
+/* Lenovo products */
+product LENOVO ETHERNET 0x7203 USB 2.0 Ethernet
+
/* Lexar products */
product LEXAR JUMPSHOT 0x0001 jumpSHOT CompactFlash Reader
product LEXAR 2662WAR 0xa002 2662W-AR
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/47245 CVS commit: src/sys/dev/usb
Date: Mon, 26 Nov 2012 12:34:46 -0500
Module Name: src
Committed By: christos
Date: Mon Nov 26 17:34:46 UTC 2012
Modified Files:
src/sys/dev/usb: usbdevs
Log Message:
PR/47245: Toby Karyadi: More identifiers for AX88772B usb ethernet
To generate a diff of this commit:
cvs rdiff -u -r1.631 -r1.632 src/sys/dev/usb/usbdevs
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/47245 CVS commit: src/sys/dev/usb
Date: Mon, 26 Nov 2012 12:36:27 -0500
Module Name: src
Committed By: christos
Date: Mon Nov 26 17:36:27 UTC 2012
Modified Files:
src/sys/dev/usb: if_axe.c
Log Message:
PR/47245: Toby Karyadi: more matches for AX88772B usb ethernet.
To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/dev/usb/if_axe.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "David H. Gutteridge" <dhgutteridge@sympatico.ca>
To: gnats-bugs@netbsd.org
Cc: christos@netbsd.org
Subject: Re: kern/47245: Add AX88772B support to axe(4), e.g. for DLINK DUB-E100 C1
Date: Wed, 5 Dec 2012 23:18:32 -0500
This PR also relates to PR 46076. I did notice there's a remaining
difference between the fix committed in OpenBSD revision 1.109 and
NetBSD revision 1.58. While I'm hardly an expert at driver coding,
the OpenBSD version seems correct (I don't follow why a byte-swapped
value would have a non-byte-swapped bitmask applied to it):
--- if_axe.c.orig 2012-12-05 22:02:51.000000000 -0500
+++ if_axe.c 2012-12-05 22:04:36.000000000 -0500
@@ -929,7 +929,7 @@
goto done;
}
- rxlen = le16toh(hdr.len & AXE_RH1M_RXLEN_MASK);
+ rxlen = le16toh(hdr.len) & AXE_RH1M_RXLEN_MASK;
if (total_len < rxlen) {
pktlen = total_len;
total_len = 0;
Could all these fixes please be pulled up to the netbsd-6 branch?
Regards,
Dave
From: Toby Karyadi <toby.karyadi@gmail.com>
To: gnats-bugs@NetBSD.org
Cc: "David H. Gutteridge" <dhgutteridge@sympatico.ca>,
kern-bug-people@netbsd.org, gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org
Subject: Re: kern/47245: Add AX88772B support to axe(4), e.g. for DLINK DUB-E100
C1
Date: Sat, 22 Dec 2012 18:24:22 -0500
On 12/6/12 12:20 AM, David H. Gutteridge wrote:
> The following reply was made to PR kern/47245; it has been noted by GNATS.
>
> From: "David H. Gutteridge" <dhgutteridge@sympatico.ca>
> To: gnats-bugs@netbsd.org
> Cc: christos@netbsd.org
> Subject: Re: kern/47245: Add AX88772B support to axe(4), e.g. for DLINK DUB-E100 C1
> Date: Wed, 5 Dec 2012 23:18:32 -0500
>
> This PR also relates to PR 46076. I did notice there's a remaining
> difference between the fix committed in OpenBSD revision 1.109 and
> NetBSD revision 1.58. While I'm hardly an expert at driver coding,
> the OpenBSD version seems correct (I don't follow why a byte-swapped
> value would have a non-byte-swapped bitmask applied to it):
>
> --- if_axe.c.orig 2012-12-05 22:02:51.000000000 -0500
> +++ if_axe.c 2012-12-05 22:04:36.000000000 -0500
> @@ -929,7 +929,7 @@
> goto done;
> }
>
> - rxlen = le16toh(hdr.len & AXE_RH1M_RXLEN_MASK);
> + rxlen = le16toh(hdr.len) & AXE_RH1M_RXLEN_MASK;
> if (total_len < rxlen) {
> pktlen = total_len;
> total_len = 0;
>
> Could all these fixes please be pulled up to the netbsd-6 branch?
>
> Regards,
>
> Dave
>
Dave is absolutely correct, it was an oversight. Please apply his patch.
Sorry for the delay.
Toby
From: Edgar =?iso-8859-1?B?RnXf?= <ef@math.uni-bonn.de>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: kern/47245: Add AX88772B support to axe(4), e.g. for DLINK
DUB-E100 C1
Date: Sun, 20 Jan 2013 14:13:02 +0100
--jq0ap7NbKX2Kqbes
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
> Could all these fixes please be pulled up to the netbsd-6 branch?
I'm using the attached local patch to achieve this.
It's a stripped-down version of Toby Karyadi's original work, including the
le16toh fix.
--jq0ap7NbKX2Kqbes
Content-Type: text/plain; charset=us-ascii
Content-Description: NetBSD-6-axe-AX772B
Content-Disposition: attachment; filename=NetBSD-6-axe-AX772B
--- sys/dev/usb/usbdevs.orig 2013-01-02 20:31:54.000000000 +0100
+++ sys/dev/usb/usbdevs 2013-01-03 19:08:36.000000000 +0100
@@ -1,4 +1,4 @@
-$NetBSD: usbdevs,v 1.607.2.6 2012/10/24 03:45:59 riz Exp $
+$NetBSD: usbdevs,v $
/*
* Copyright (c) 1998-2004 The NetBSD Foundation, Inc.
@@ -508,6 +508,7 @@
vendor SWEEX2 0x177f Sweex
vendor MISC 0x1781 Misc Vendors
vendor DISPLAYLINK 0x17e9 DisplayLink
+vendor LENOVO 0x17ef Lenovo
vendor E3C 0x18b4 E3C Technologies
vendor AMIT 0x18c5 AMIT
vendor QCOM 0x18e8 Qcom
@@ -829,6 +830,8 @@
product ASIX AX88178 0x1780 AX88178 USB 2.0 10/100 Ethernet adapter
product ASIX AX88772 0x7720 AX88772 USB 2.0 10/100 Ethernet adapter
product ASIX AX88772A 0x772a AX88772A USB 2.0 10/100 Ethernet adapter
+product ASIX AX88772B 0x772b AX88772B USB 2.0 10/100 Ethernet adapter
+product ASIX AX88772B_1 0x7e2b AX88772B1 USB 2.0 10/100 Ethernet adapter
/* ASUSTeK computer products */
product ASUSTEK WL167G 0x1707 WL-167g USB2.0 WLAN Adapter
@@ -1194,6 +1197,7 @@
/* D-Link products */
/*product DLINK DSBS25 0x0100 DSB-S25 serial adapter*/
product DLINK DUBE100 0x1a00 10/100 ethernet adapter
+product DLINK DUBE100C1 0x1a02 DUB-E100 rev C1
product DLINK DSB650TX4 0x200c 10/100 ethernet adapter
product DLINK DWL120E 0x3200 DWL-120 rev E
product DLINK DWA130C 0x3301 DWA-130 rev C
@@ -1777,6 +1781,9 @@
product LACIE HD 0xa601 Hard Disk
product LACIE CDRW 0xa602 CD R/W
+/* Lenovo products */
+product LENOVO ETHERNET 0x7203 USB 2.0 Ethernet
+
/* Lexar products */
product LEXAR JUMPSHOT 0x0001 jumpSHOT CompactFlash Reader
product LEXAR 2662WAR 0xa002 2662W-AR
--- sys/dev/usb/usbdevs.h.orig 2013-01-02 20:31:54.000000000 +0100
+++ sys/dev/usb/usbdevs.h 2013-01-03 19:09:13.000000000 +0100
@@ -1,10 +1,10 @@
-/* $NetBSD: usbdevs.h,v 1.600.2.6 2012/10/24 03:46:49 riz Exp $ */
+/* $NetBSD$ */
/*
* THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
*
* generated from:
- * NetBSD
+ * NetBSD: usbdevs,v
*/
/*
@@ -515,6 +515,7 @@
#define USB_VENDOR_SWEEX2 0x177f /* Sweex */
#define USB_VENDOR_MISC 0x1781 /* Misc Vendors */
#define USB_VENDOR_DISPLAYLINK 0x17e9 /* DisplayLink */
+#define USB_VENDOR_LENOVO 0x17ef /* Lenovo */
#define USB_VENDOR_E3C 0x18b4 /* E3C Technologies */
#define USB_VENDOR_AMIT 0x18c5 /* AMIT */
#define USB_VENDOR_QCOM 0x18e8 /* Qcom */
@@ -836,6 +837,8 @@
#define USB_PRODUCT_ASIX_AX88178 0x1780 /* AX88178 USB 2.0 10/100 Ethernet adapter */
#define USB_PRODUCT_ASIX_AX88772 0x7720 /* AX88772 USB 2.0 10/100 Ethernet adapter */
#define USB_PRODUCT_ASIX_AX88772A 0x772a /* AX88772A USB 2.0 10/100 Ethernet adapter */
+#define USB_PRODUCT_ASIX_AX88772B 0x772b /* AX88772B USB 2.0 10/100 Ethernet adapter */
+#define USB_PRODUCT_ASIX_AX88772B_1 0x7e2b /* AX88772B1 USB 2.0 10/100 Ethernet adapter */
/* ASUSTeK computer products */
#define USB_PRODUCT_ASUSTEK_WL167G 0x1707 /* WL-167g USB2.0 WLAN Adapter */
@@ -1201,6 +1204,7 @@
/* D-Link products */
/*product DLINK DSBS25 0x0100 DSB-S25 serial adapter*/
#define USB_PRODUCT_DLINK_DUBE100 0x1a00 /* 10/100 ethernet adapter */
+#define USB_PRODUCT_DLINK_DUBE100C1 0x1a02 /* DUB-E100 rev C1 */
#define USB_PRODUCT_DLINK_DSB650TX4 0x200c /* 10/100 ethernet adapter */
#define USB_PRODUCT_DLINK_DWL120E 0x3200 /* DWL-120 rev E */
#define USB_PRODUCT_DLINK_DWA130C 0x3301 /* DWA-130 rev C */
@@ -1784,6 +1788,9 @@
#define USB_PRODUCT_LACIE_HD 0xa601 /* Hard Disk */
#define USB_PRODUCT_LACIE_CDRW 0xa602 /* CD R/W */
+/* Lenovo products */
+#define USB_PRODUCT_LENOVO_ETHERNET 0x7203 /* USB 2.0 Ethernet */
+
/* Lexar products */
#define USB_PRODUCT_LEXAR_JUMPSHOT 0x0001 /* jumpSHOT CompactFlash Reader */
#define USB_PRODUCT_LEXAR_2662WAR 0xa002 /* 2662W-AR */
--- sys/dev/usb/usbdevs_data.h.orig 2013-01-02 20:31:54.000000000 +0100
+++ sys/dev/usb/usbdevs_data.h 2013-01-03 19:09:13.000000000 +0100
@@ -1,10 +1,10 @@
-/* $NetBSD: usbdevs_data.h,v 1.601.2.6 2012/10/24 03:46:49 riz Exp $ */
+/* $NetBSD$ */
/*
* THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
*
* generated from:
- * NetBSD
+ * NetBSD: usbdevs,v
*/
/*
@@ -1839,6 +1839,10 @@
"DisplayLink",
},
{
+ USB_VENDOR_LENOVO,
+ "Lenovo",
+ },
+ {
USB_VENDOR_E3C,
"E3C Technologies",
},
@@ -2059,7 +2063,7 @@
"GNU Radio USRP",
},
};
-const int usb_nvendors = 505;
+const int usb_nvendors = 506;
const struct usb_product usb_products[] = {
{
@@ -2783,6 +2787,14 @@
"AX88772A USB 2.0 10/100 Ethernet adapter",
},
{
+ USB_VENDOR_ASIX, USB_PRODUCT_ASIX_AX88772B,
+ "AX88772B USB 2.0 10/100 Ethernet adapter",
+ },
+ {
+ USB_VENDOR_ASIX, USB_PRODUCT_ASIX_AX88772B_1,
+ "AX88772B1 USB 2.0 10/100 Ethernet adapter",
+ },
+ {
USB_VENDOR_ASUSTEK, USB_PRODUCT_ASUSTEK_WL167G,
"WL-167g USB2.0 WLAN Adapter",
},
@@ -3819,6 +3831,10 @@
"10/100 ethernet adapter",
},
{
+ USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DUBE100C1,
+ "DUB-E100 rev C1",
+ },
+ {
USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DSB650TX4,
"10/100 ethernet adapter",
},
@@ -5447,6 +5463,10 @@
"CD R/W",
},
{
+ USB_VENDOR_LENOVO, USB_PRODUCT_LENOVO_ETHERNET,
+ "USB 2.0 Ethernet",
+ },
+ {
USB_VENDOR_LEXAR, USB_PRODUCT_LEXAR_JUMPSHOT,
"jumpSHOT CompactFlash Reader",
},
@@ -9135,4 +9155,4 @@
"Prestige",
},
};
-const int usb_nproducts = 1768;
+const int usb_nproducts = 1772;
--- sys/dev/usb/if_axe.c.orig 2012-02-02 20:43:07.000000000 +0100
+++ sys/dev/usb/if_axe.c 2013-01-16 13:46:43.000000000 +0100
@@ -1,4 +1,4 @@
-/* $NetBSD: if_axe.c,v 1.51 2012/02/02 19:43:07 tls Exp $ */
+/* $NetBSD: if_axe.c $ */
/* $OpenBSD: if_axe.c,v 1.96 2010/01/09 05:33:08 jsg Exp $ */
/*
@@ -89,7 +89,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.51 2012/02/02 19:43:07 tls Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v $");
#if defined(__NetBSD__)
#ifndef _MODULE
@@ -148,6 +148,8 @@
{ { USB_VENDOR_ASIX, USB_PRODUCT_ASIX_AX88172}, 0 },
{ { USB_VENDOR_ASIX, USB_PRODUCT_ASIX_AX88772}, AX772 },
{ { USB_VENDOR_ASIX, USB_PRODUCT_ASIX_AX88772A}, AX772 },
+ { { USB_VENDOR_ASIX, USB_PRODUCT_ASIX_AX88772B}, AX772 | AX772B },
+ { { USB_VENDOR_ASIX, USB_PRODUCT_ASIX_AX88772B_1}, AX772 | AX772B },
{ { USB_VENDOR_ASIX, USB_PRODUCT_ASIX_AX88178}, AX178 },
{ { USB_VENDOR_ATEN, USB_PRODUCT_ATEN_UC210T}, 0 },
{ { USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F5D5055 }, AX178 },
@@ -156,9 +158,11 @@
{ { USB_VENDOR_COREGA, USB_PRODUCT_COREGA_FETHER_USB2_TX }, 0},
{ { USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DUBE100}, 0 },
{ { USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DUBE100B1 }, AX772 },
+ { { USB_VENDOR_DLINK, USB_PRODUCT_DLINK_DUBE100C1 }, AX772 | AX772B },
{ { USB_VENDOR_GOODWAY, USB_PRODUCT_GOODWAY_GWUSB2E}, 0 },
{ { USB_VENDOR_IODATA, USB_PRODUCT_IODATA_ETGUS2 }, AX178 },
{ { USB_VENDOR_JVC, USB_PRODUCT_JVC_MP_PRX1}, 0 },
+ { { USB_VENDOR_LENOVO, USB_PRODUCT_LENOVO_ETHERNET }, AX772 | AX772B },
{ { USB_VENDOR_LINKSYS2, USB_PRODUCT_LINKSYS2_USB200M}, 0 },
{ { USB_VENDOR_LINKSYS4, USB_PRODUCT_LINKSYS4_USB1000 }, AX178 },
{ { USB_VENDOR_LOGITEC, USB_PRODUCT_LOGITEC_LAN_GTJU2}, AX178 },
@@ -602,7 +606,8 @@
err = usbd_set_config_no(dev, AXE_CONFIG_NO, 1);
if (err) {
- aprint_error_dev(self, "getting interface handle failed\n");
+ aprint_error_dev(self, "failed to set configuration"
+ ", err=%s\n", usbd_errstr(err));
return;
}
@@ -921,12 +926,14 @@
total_len -= sizeof(hdr);
buf += sizeof(hdr);
- if ((hdr.len ^ hdr.ilen) != 0xffff) {
+ if (((le16toh(hdr.len) & AXE_RH1M_RXLEN_MASK) ^
+ (le16toh(hdr.ilen) & AXE_RH1M_RXLEN_MASK)) !=
+ AXE_RH1M_RXLEN_MASK) {
ifp->if_ierrors++;
goto done;
}
- rxlen = le16toh(hdr.len);
+ rxlen = le16toh(hdr.len) & AXE_RH1M_RXLEN_MASK;
if (total_len < rxlen) {
pktlen = total_len;
total_len = 0;
@@ -1244,7 +1251,9 @@
/* Enable receiver, set RX mode */
rxmode = AXE_RXCMD_BROADCAST | AXE_RXCMD_MULTICAST | AXE_RXCMD_ENABLE;
- if (sc->axe_flags & AX178 || sc->axe_flags & AX772) {
+ if (sc->axe_flags & AX772B)
+ rxmode |= AXE_772B_RXCMD_RH1M;
+ else if (sc->axe_flags & AX178 || sc->axe_flags & AX772) {
if (sc->axe_udev->speed == USB_SPEED_HIGH) {
/* Largest possible USB buffer size for AX88178 */
rxmode |= AXE_178_RXCMD_MFB;
--- sys/dev/usb/if_axereg.h.orig 2012-02-02 20:43:07.000000000 +0100
+++ sys/dev/usb/if_axereg.h 2013-01-03 19:12:04.000000000 +0100
@@ -1,4 +1,4 @@
-/* $NetBSD: if_axereg.h,v 1.14 2012/02/02 19:43:07 tls Exp $ */
+/* $NetBSD: if_axereg.h,v */
/*
* Copyright (c) 1997, 1998, 1999, 2000-2003
@@ -134,6 +134,12 @@
#define AXE_NOPHY 0xE0
#define AXE_INTPHY 0x10
+#define AXE_772B_RXCMD_RH1M 0x0100
+#define AXE_772B_RXCMD_RH2M 0x0200
+#define AXE_772B_RXCMD_RH3M 0x0400
+
+#define AXE_RH1M_RXLEN_MASK 0x07ff
+
#define AXE_TIMEOUT 1000
#define AXE_172_BUFSZ 1536
@@ -167,6 +173,7 @@
uint16_t axe_flags;
#define AX178 0x0001 /* AX88178 */
#define AX772 0x0002 /* AX88772 */
+#define AX772B 0x0004 /* AX88772B */
#define AXE_ANY_PHY 0x1000 /* Chip lies about valid phys */
#define AXE_MII 0x2000 /* Chip-specific MII handling */
};
--jq0ap7NbKX2Kqbes--
State-Changed-From-To: open->closed
State-Changed-By: pgoyette@NetBSD.org
State-Changed-When: Tue, 31 May 2016 07:24:18 +0000
State-Changed-Why:
iFix committed by christos@ on Nov 26 17:34:46 UTC 2012
State-Changed-From-To: closed->open
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Thu, 02 Jun 2016 02:46:52 +0000
State-Changed-Why:
the PR was open because pullup-6 was requested
State-Changed-From-To: open->closed
State-Changed-By: mrg@NetBSD.org
State-Changed-When: Sun, 28 Jul 2019 20:43:41 +0000
State-Changed-Why:
netbsd 6 is EOL.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.