From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HRsvk-0008HH-B9 for qemu-devel@nongnu.org; Thu, 15 Mar 2007 12:35:56 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HRsvj-0008EA-2k for qemu-devel@nongnu.org; Thu, 15 Mar 2007 12:35:55 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HRsvi-0008Dq-VX for qemu-devel@nongnu.org; Thu, 15 Mar 2007 11:35:54 -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 1HRsuh-0006ZI-1j for qemu-devel@nongnu.org; Thu, 15 Mar 2007 12:34:51 -0400 Received: from [172.20.0.65] (cerbere.b2i-toulouse.com [192.168.4.254]) by mail.b2i-toulouse.com (8.12.8/8.12.8) with ESMTP id l2FGsfic011676 for ; Thu, 15 Mar 2007 17:54:41 +0100 Message-ID: <45F975A3.2000301@b2i-toulouse.com> Date: Thu, 15 Mar 2007 17:34:43 +0100 From: =?UTF-8?B?QmxuY2hldC1Nb21hcyBGcsOpZMOpcmlj?= MIME-Version: 1.0 References: <45F974E1.207@b2i-toulouse.com> In-Reply-To: <45F974E1.207@b2i-toulouse.com> 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 list "Sorry if you receive double post, I don't be sure you reveived the intial post. " 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 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 ? 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