NetBSD Problem Report #45591
From www@NetBSD.org Tue Nov 8 19:17:43 2011
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id 6564763C429
for <gnats-bugs@gnats.NetBSD.org>; Tue, 8 Nov 2011 19:17:43 +0000 (UTC)
Message-Id: <20111108191742.5EA2663C39E@www.NetBSD.org>
Date: Tue, 8 Nov 2011 19:17:42 +0000 (UTC)
From: jdbaker@mylinuxisp.com
Reply-To: jdbaker@mylinuxisp.com
To: gnats-bugs@NetBSD.org
Subject: cdce attaches to OpenMoko Freerunner, fails, attaches 2nd instance, neither works
X-Send-Pr-Version: www-1.0
>Number: 45591
>Category: kern
>Synopsis: cdce attaches to OpenMoko Freerunner, fails, attaches 2nd instance, neither works
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: kern-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Nov 08 19:20:00 +0000 2011
>Closed-Date: Tue Jan 10 11:33:49 +0000 2012
>Last-Modified: Tue Jan 10 11:35:01 +0000 2012
>Originator: John D. Baker
>Release: NetBSD-5.99.56/amd64
>Organization:
>Environment:
NetBSD host02.cis.sac.alamo.edu 5.99.56 NetBSD 5.99.56 (GENERIC) #7: Thu Nov 3 11:42:31 CDT 2011 dino@host02.cis.sac.alamo.edu:/d0/build/current/obj/amd64/sys/arch/amd64/compile/GENERIC amd64
>Description:
As first described here:
http://mail-index.netbsd.org/current-users/2011/08/16/msg017376.html
Upon plugging my OpenMoko Neo Freerunner into a USB port of a system
running -current/amd64 (and /i386), the following messages are logged:
[...]
Nov 8 09:27:06 host02 /netbsd: ehci1: handing over full speed device on port 2
to uhci3
Nov 8 09:27:08 host02 /netbsd: cdce0 at uhub4 port 2 configuration 2 interface 0
Nov 8 09:27:08 host02 /netbsd: cdce0: Linux 2.6.34.7-v31 with s3c2410_udc RNDIS/Ethernet Gadget, rev 2.00/3.12, addr 2
Nov 8 09:27:08 host02 /netbsd: cdce0: could not find data bulk in
Nov 8 09:27:08 host02 /netbsd: cdce1 at uhub4 port 2 configuration 2 interface 1
Nov 8 09:27:08 host02 /netbsd: cdce1: Linux 2.6.34.7-v31 with s3c2410_udc RNDIS/Ethernet Gadget, rev 2.00/3.12, addr 2
Nov 8 09:27:08 host02 /netbsd: cdce1: faking address
Nov 8 09:27:08 host02 /netbsd: cdce1: address 2a:db:25:00:00:01
[...]
The output of 'ifconfig' lists only the "cdce1" instance.
'ifconfig -v cdce1' shows:
cdce1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
address: 2a:db:25:00:00:01
input: 0 packets, 0 bytes
output: 0 packets, 0 bytes
Configuring manually and attempting to ssh into the Freerunner times
out. Interface statistics are as follows:
cdce1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
address: 2a:db:25:00:00:01
input: 0 packets, 0 bytes
output: 10 packets, 632 bytes, 5 multicasts
inet 192.168.0.200 netmask 0xffffff00 broadcast 192.168.0.255
inet6 fe80::28db:25ff:fe00:1%cdce1 prefixlen 64 scopeid 0x6
Similarly, attempting to contact the NetBSD host from the Freerunner
fails with "Host Unreachable".
>How-To-Repeat:
On a NetBSD-5.99.56/amd (or /i386) host (others?) attach an OpenMoko
Neo Freerunner to an available USB port. Configure the resulting
"cdceN" device and attempt to communicate between the systems.
>Fix:
>Release-Note:
>Audit-Trail:
From: Wolfgang Solfrank <Wolfgang@Solfrank.net>
To: gnats-bugs@NetBSD.org
Cc: jdbaker@mylinuxisp.com, kern-bug-people@netbsd.org,
gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: kern/45591: cdce attaches to OpenMoko Freerunner, fails, attaches
2nd instance, neither works
Date: Sat, 12 Nov 2011 13:20:17 +0100
This is a multi-part message in MIME format.
--------------080906030005000506090207
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Hi,
could you try to comment out the entry in the cdce_devs array that
tries to do some special handling of that gadget? You may use the
attached patch for this.
Ciao,
Wolfgang
--
Wolfgang@Solfrank.net Wolfgang Solfrank
--------------080906030005000506090207
Content-Type: text/plain;
name="diffs"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="diffs"
Index: sys/dev/usb/if_cdce.c
===================================================================
RCS file: /cvsroot/src/sys/dev/usb/if_cdce.c,v
retrieving revision 1.33
diff -u -r1.33 if_cdce.c
--- sys/dev/usb/if_cdce.c 7 Jun 2011 05:46:00 -0000 1.33
+++ sys/dev/usb/if_cdce.c 12 Nov 2011 12:16:54 -0000
@@ -100,7 +100,9 @@
{{ USB_VENDOR_GMATE, USB_PRODUCT_GMATE_YP3X00 }, CDCE_NO_UNION },
{{ USB_VENDOR_MOTOROLA2, USB_PRODUCT_MOTOROLA2_USBLAN }, CDCE_ZAURUS | CDCE_NO_UNION },
{{ USB_VENDOR_MOTOROLA2, USB_PRODUCT_MOTOROLA2_USBLAN2 }, CDCE_ZAURUS | CDCE_NO_UNION },
+#if 0
{{ USB_VENDOR_NETCHIP, USB_PRODUCT_NETCHIP_ETHERNETGADGET }, CDCE_NO_UNION },
+#endif
{{ USB_VENDOR_PROLIFIC, USB_PRODUCT_PROLIFIC_PL2501 }, CDCE_NO_UNION },
{{ USB_VENDOR_SHARP, USB_PRODUCT_SHARP_SL5500 }, CDCE_ZAURUS },
{{ USB_VENDOR_SHARP, USB_PRODUCT_SHARP_A300 }, CDCE_ZAURUS | CDCE_NO_UNION },
--------------080906030005000506090207--
From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: kern/45591: cdce attaches to OpenMoko Freerunner, fails, attaches
2nd instance, neither worksk
Date: Tue, 15 Nov 2011 23:01:44 -0600 (CST)
On Sat, 12 Nov 2011, Wolfgang Solfrank wrote:
> could you try to comment out the entry in the cdce_devs array that
> tries to do some special handling of that gadget? You may use the
> attached patch for this.
I applied the patch and rebuilt. Now my Freerunner attaches at
"cdce0" without errors or duplicates. I was able to configure
and communicate through the interface without problems.
--
|/"\ John D. Baker, KN5UKS NetBSD Darwin/MacOS X
|\ / jdbaker[snail]mylinuxisp[flyspeck]com OpenBSD FreeBSD
| X No HTML/proprietary data in email. BSD just sits there and works!
|/ \ GPGkeyID: D703 4A7E 479F 63F8 D3F4 BD99 9572 8F23 E4AD 1645
From: Wolfgang Solfrank <Wolfgang@Solfrank.net>
To: gnats-bugs@NetBSD.org
Cc: "John D. Baker" <jdbaker@mylinuxisp.com>, kern-bug-people@netbsd.org,
gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,
NetBSD Current Users <current-users@NetBSD.org>
Subject: Re: kern/45591: cdce attaches to OpenMoko Freerunner, fails, attaches
2nd instance, neither worksk
Date: Wed, 16 Nov 2011 18:29:03 +0100
Hi all,
the problem described in this PR results from the import of some
"new devices" from OpenBSD. Before the import, the OpenMoko
Freerunner worked perfectly with the cdce driver. After the import,
the device is marked as not supporting the UDESCSUB_CDC_UNION
descriptor, and thus the driver cannot detect the master/slave
relationship of the two interfaces of the device.
Commenting out/deleting the entry in cdce_devs fixes the problem
for the OpenMoko Freerunner.
Now the problem is that, as far as I can tell anyway, the vendor/
device ids for the Freerunner may be used on other gadgets using
Linux as their embedded OS, and those may indeed need that other
handling of the interface(s).
So the question is, is anyone using this driver with some other
device that attaches as "cdce0: Linux 2.6.34.8 with s3c2410_udc
RNDIS/Ethernet Gadget, rev 2.00/3.12, addr 5" (the various version
numbers/addresses may be different depending on your configuration)
and got it working after the import? Or can I safely remove the
offending entry from the driver?
Ciao,
Wolfgang
--
Wolfgang@Solfrank.net Wolfgang Solfrank
State-Changed-From-To: open->closed
State-Changed-By: ws@NetBSD.org
State-Changed-When: Tue, 10 Jan 2012 11:33:49 +0000
State-Changed-Why:
Deleted the offending entry in the special handling table.
From: "Wolfgang Solfrank" <ws@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/45591 CVS commit: src/sys/dev/usb
Date: Tue, 10 Jan 2012 11:32:25 +0000
Module Name: src
Committed By: ws
Date: Tue Jan 10 11:32:25 UTC 2012
Modified Files:
src/sys/dev/usb: if_cdce.c
Log Message:
Delete Linux Ethernet Gadget from special handling.
This makes at least the Openmoko Freerunner work again.
Fixes PR kern/45591.
Ok Jeff Rizzo (releng).
To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/dev/usb/if_cdce.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.