Changeset 1825
- Timestamp:
- 04/24/07 21:52:45 (6 years ago)
- Location:
- trunk/src/host/qemu-neo1973
- Files:
-
- 4 edited
-
Makefile.target (modified) (1 diff)
-
hw/usb-net.c (modified) (4 diffs)
-
hw/usb.h (modified) (1 diff)
-
vl.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/host/qemu-neo1973/Makefile.target
r1667 r1825 339 339 # USB layer 340 340 VL_OBJS+= usb.o usb-hub.o usb-linux.o usb-hid.o usb-ohci.o usb-msd.o usb-net.o 341 VL_OBJS+= usb-linux-gadget.o 341 342 342 343 # PCI network cards -
trunk/src/host/qemu-neo1973/hw/usb-net.c
r1640 r1825 112 112 STRING_PRODUCT, /* u8 iProduct; */ 113 113 STRING_SERIALNUMBER, /* u8 iSerialNumber; */ 114 0x0 2/* u8 bNumConfigurations; */114 0x01 /* u8 bNumConfigurations; */ 115 115 }; 116 116 … … 119 119 0x09, /* u8 bLength */ 120 120 USB_DT_CONFIG, /* u8 bDescriptorType */ 121 0x 00, 0x00, /* le16 wTotalLength */121 0x43, 0x00, /* le16 wTotalLength */ 122 122 0x02, /* u8 bNumInterfaces */ 123 123 DEV_RNDIS_CONFIG_VALUE, /* u8 bConfigurationValue */ … … 194 194 0x09, /* u8 bLength */ 195 195 USB_DT_CONFIG, /* u8 bDescriptorType */ 196 0x 00, 0x00, /* le16 wTotalLength */196 0x50, 0x00, /* le16 wTotalLength */ 197 197 0x02, /* u8 bNumInterfaces */ 198 198 DEV_RNDIS_CONFIG_VALUE, /* u8 bConfigurationValue */ … … 973 973 case USB_DT_CONFIG: 974 974 switch (value & 0xff) { 975 case 0:975 case 1: 976 976 ret = sizeof(qemu_net_rndis_config_descriptor); 977 977 memcpy(data, qemu_net_rndis_config_descriptor, ret); 978 978 break; 979 979 980 case 1:980 case 0: 981 981 ret = sizeof(qemu_net_cdc_config_descriptor); 982 982 memcpy(data, qemu_net_cdc_config_descriptor, ret); -
trunk/src/host/qemu-neo1973/hw/usb.h
r1640 r1825 215 215 void usb_host_info(void); 216 216 217 /* usb-linux-gadget.c */ 218 int usb_gadget_init(void); 219 217 220 /* usb-hid.c */ 218 221 USBDevice *usb_mouse_init(void); -
trunk/src/host/qemu-neo1973/vl.c
r1639 r1825 6136 6136 "-usb enable the USB driver (will be the default soon)\n" 6137 6137 "-usbdevice name add the host or guest USB device 'name'\n" 6138 "-usbgadget enable the linux USB GadgetFS as an HCD\n" 6138 6139 #if defined(TARGET_PPC) || defined(TARGET_SPARC) 6139 6140 "-g WxH[xDEPTH] Set the initial graphical resolution and depth\n" … … 6288 6289 QEMU_OPTION_usb, 6289 6290 QEMU_OPTION_usbdevice, 6291 QEMU_OPTION_usbgadget, 6290 6292 QEMU_OPTION_smp, 6291 6293 QEMU_OPTION_vnc, … … 6370 6372 { "win2k-hack", 0, QEMU_OPTION_win2k_hack }, 6371 6373 { "usbdevice", HAS_ARG, QEMU_OPTION_usbdevice }, 6374 { "usbgadget", 0, QEMU_OPTION_usbgadget }, 6372 6375 { "smp", HAS_ARG, QEMU_OPTION_smp }, 6373 6376 { "vnc", HAS_ARG, QEMU_OPTION_vnc }, … … 6627 6630 char usb_devices[MAX_USB_CMDLINE][128]; 6628 6631 int usb_devices_index; 6632 int usbgadget_enabled = 0; 6629 6633 int fds[2]; 6630 6634 … … 7039 7043 usb_devices_index++; 7040 7044 break; 7045 case QEMU_OPTION_usbgadget: 7046 usbgadget_enabled = 1; 7047 break; 7041 7048 case QEMU_OPTION_smp: 7042 7049 smp_cpus = atoi(optarg); … … 7325 7332 } 7326 7333 7334 if (usbgadget_enabled) { 7335 if (usb_gadget_init() < 0) { 7336 fprintf(stderr, "Warning: could not find USB gadgetfs\n"); 7337 } 7338 } 7339 7327 7340 gui_timer = qemu_new_timer(rt_clock, gui_update, NULL); 7328 7341 qemu_mod_timer(gui_timer, qemu_get_clock(rt_clock));
Note: See TracChangeset
for help on using the changeset viewer.
