Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HRmbV-00076y-22 for qemu-devel@nongnu.org; Thu, 15 Mar 2007 05:50:37 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HRmbU-00076g-By for qemu-devel@nongnu.org; Thu, 15 Mar 2007 05:50:36 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HRmbU-00076Y-4c for qemu-devel@nongnu.org; Thu, 15 Mar 2007 04:50:36 -0500 Received: from mail.b2i-toulouse.com ([195.115.64.51]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1HRmaU-0004XC-5q for qemu-devel@nongnu.org; Thu, 15 Mar 2007 05:49:34 -0400 Message-ID: <45F916A5.4010903@b2i-toulouse.com> Date: Thu, 15 Mar 2007 10:49:25 +0100 From: =?UTF-8?B?RnLDqWTDqXJpYyBCbGFuY2hldC1Nb21hcw==?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] CDC ethernet device support ? Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Hello We would use qemu and a target Linux platform with CDC Ethernet equipment. The host is Linux or Windows with libusb. When The device is plugged to the target system, the usb0 network interface is up, like a no-virtualized system, but all frames are marked in error. ifconfig usb0 -> usb0 Link encap:Ethernet HWaddr 92:A9:08:75:E0:83 =20 inet adr:172.17.100.100 Bcast:172.17.255.255 Masque:255.255.0= .0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:687 dropped:0 overruns:0 frame:0 TX packets:0 errors:3 dropped:0 overruns:0 carrier:0 collisions:0 lg file transmission:1000 RX bytes:0 (0.0 GiB) TX bytes:0 (0.0 MiB) So I made a Linux qemu version with DEBUG_PACKET defined in the 'usb-uhci.c' file. All initialisation before loading the usbnet module, work fine, but when I load usbnet modules, It seems that usb communcation with external device and target system fails. I don't know very well USB protcols and CDC communication, so I'm not sure. My target's kernel is 2.6.12, but the problem exists with 2.6.14 and 2.6.18 too (with initial usbnet module is replaced by both usbnet and cdc_ether modules). Is anybody able to use CDC equipment with qemu subsystem ? If not, I can modify the qemu usb-uhci support. But I don't know where to begin. Can you give me some advice ? =20 =20 With the strace command on qemu system, I have see ioctl command fail. ("ioctl(8, UI_DEV_DESTROY or USBDEVFS_BULK, 0xbfeec200) =3D -1 EINVAL (Invalid argument)" I trace the same message with DEBUG defined in usb-linux.c the Bulk message fail) Thanks in advance for any help or advice. Best regards Fr=C3=A9d=C3=A9ric Blanchet-Momas =2E Message on the qemu stdout with DEBUG_PACKET defined : System intialisation ... ... frame 139: pid=3DIN addr=3D0x02 ep=3D0 len=3D64 ret=3D26 p->len =3D 64 data_in=3D 1a 03 43 00 44 00 43 00 20 00 45 00 = 74 00 68 00 65 00 72 00 6e 00 65 00 74 00 frame 140: pid=3DOUT addr=3D0x02 ep=3D0 len=3D0 p->len =3D 0 data_out=3D ret=3D0 frame 149: pid=3DSETUP addr=3D0x02 ep=3D0 len=3D8 p->len =3D 8 data_out=3D 80 06 05 03 09 04 ff 00 ret=3D54 frame 149: pid=3DIN addr=3D0x02 ep=3D0 len=3D64 ret=3D54 p->len =3D 64 data_in=3D 36 03 43 00 44 00 43 00 20 00 43 00 = 6f 00 6d 00 6d 00 75 00 6e 00 69 00 63 00 61 00 74 00 69 00 6f 00 6e 00 73 00 20 00 43 00 6f 00 6e 00 74 00 72 00 6f 00 6c 00 frame 151: pid=3DOUT addr=3D0x02 ep=3D0 len=3D0 p->len =3D 0 data_out=3D ret=3D0 //-> usbnet.ko loaded frame 1851: pid=3DSETUP addr=3D0x02 ep=3D0 len=3D8 p->len =3D 8 data_out=3D 01 0b 01 00 01 00 00 00 ret=3D0 frame 1851: pid=3DIN addr=3D0x02 ep=3D0 len=3D0 ret=3D0 frame 1910: pid=3DSETUP addr=3D0x02 ep=3D0 len=3D8 p->len =3D 8 data_out=3D 80 06 03 03 09 04 ff 00 ret=3D26 frame 1910: pid=3DIN addr=3D0x02 ep=3D0 len=3D64 ret=3D26 p->len =3D 64 data_in=3D 1a 03 39 00 32 00 41 00 39 00 30 00 = 38 00 37 00 35 00 45 00 30 00 38 00 33 00 frame 1912: pid=3DOUT addr=3D0x02 ep=3D0 len=3D0 p->len =3D 0 data_out=3D ret=3D0 frame 535: pid=3DIN addr=3D0x02 ep=3D1 len=3D64 ret=3D-3 frame 560: pid=3DIN addr=3D0x02 ep=3D3 len=3D8 ret=3D8 p->len =3D 8 data_in=3D a1 00 01 00 01 00 00 00 frame 562: pid=3DSETUP addr=3D0x02 ep=3D0 len=3D8 p->len =3D 8 data_out=3D 02 01 00 00 81 00 00 00 ret=3D0 frame 562: pid=3DIN addr=3D0x02 ep=3D0 len=3D0 ret=3D0 frame 563: pid=3DIN addr=3D0x02 ep=3D1 len=3D64 ret=3D-3 frame 564: pid=3DSETUP addr=3D0x02 ep=3D0 len=3D8 p->len =3D 8 data_out=3D 02 01 00 00 81 00 00 00 ret=3D0 frame 564: pid=3DIN addr=3D0x02 ep=3D0 len=3D0 ret=3D0 frame 565: pid=3DIN addr=3D0x02 ep=3D1 len=3D64 ret=3D-3 ... // usb message loop -> the usb0 network marks in error all packets =20