qemu-neo1973 and zd1211rw wifi driver

Salil Bijur salilbijur at gmail.com
Wed Sep 19 17:59:06 CEST 2007


On 9/19/07, andrzej zaborowski <balrogg at gmail.com> wrote:
> Hi,
>
> On 18/09/2007, Salil Bijur <salilbijur at gmail.com> wrote:
> > Hello,
> >
> > I'm trying out qemu-neo1973 using a Linux kernel compiled for neo1973
> > and my own file system.
> > I have been been able to detect and use USB, for instance, USB mass storage.
> >
> > The problem I'm facing is that qemu-system-arm crashes when I try to
> > use the Hawking USB Wifi dongle (which uses zd1211rw driver) connected
> > to my host machine's USB.
> > The kernel image 'uImage' I use is compiled with the necessary drivers
> > required - usb and zd1211rw
> >
> > # ./qemu-system-arm -M neo -m 130 -mtdblock  openmoko-flash.image
> > -kernel uImage -usbdevice keyboard -serial
> > telnet:localhost:1200,server -monitor telnet:localhost:1300,server
> >
> > After the kernel boots completely, I add the usb device using the
> > usb_add command in the qemu monitor. This causes the entire emulator
> > qemu-system-arm to crash with a segmentation fault.
> >
> > In the qemu monitor:
> > (qemu) info usbhost
> >   Device 5.5, speed 480 Mb/s
> >     Vendor Specific: USB device 0ace:1211, USB2.0 WLAN
> >   Device 1.2, speed 1.5 Mb/s
> >     Class 00: USB device 04b3:310b
> > (qemu) usb_add host:0ace:1211
> > (qemu) Connection closed by foreign host.
> >
> > In the serial output terminal, the kernel prints are:
> > / # usb 1-1: new full speed USB device using s3c2410-ohci and address 4
> > usb 1-1: configuration #1 chosen from 1 choice
> > hub 1-1:1.0: USB hub found
> > hub 1-1:1.0: 8 ports detected
> > usb 1-1.8: new full speed USB device using s3c2410-ohci and address 5
> > usb 1-1.8: not running at top speed; connect to a high speed hub
> > usb 1-1.8: configuration #1 chosen from 1 choice
> > usb 1-1.8: reset full speed USB device using s3c2410-ohci and address 5
> > Connection closed by foreign host.
> >
> > I haven't been able to debug this using gdb since an asynchronous
> > signal from SDL causes it to hang in a debug state.
> >
> > Can anyone explain why this is happening? Since usb_add is working
> > fine with USB mass storage and USB Bluetooth, this problem seems to be
> > specific to zd1211rw USB WiFi.
>
> Obviously this is a bug. It's hard to say where the bug is (libusb,
> qemu or local qemu-neo1973 code). I believe USB devices with
> isochronous endpoints have not been tested and may cause breakage,
> does the WiFi adapter have any ISO enpoints? Does it have more than
> one interface? (this should not cause a segfault, but it would prevent
> the USB proxy from working)
>

This USB Wifi adapter has only one interface with 4 endpoints - 2 bulk
and 2 interrupt.


> To run qemu under gdb you can tell gdb to not stop on signals, i.e.
> when gdb stops, issue:
>


The GDB problem is that it somehow enters "_dl_debug_state".

> Alternatively, run "ulimit -c 100000000" before running qemu and have
> it dump the core, then load it in gdb with
>
> (gdb) core core
>


Doing the above gives me:

(gdb) core core
Failed to read a valid object file image from memory.
Core was generated by `arm-softmmu/qemu-system-arm -M neo -m 130
-mtdblock /home/salil/qemu/qemu-neo1973'.
Program terminated with signal 11, Segmentation fault.
#0  0x92c39702 in ?? ()
(gdb)


Thanks,
Salil



More information about the openmoko-devel mailing list