1. 07 9月, 2011 7 次提交
    • G
      usb-host: endpoint table fixup · c0e5750b
      Gerd Hoffmann 提交于
      USB Devices can have up to 15 IN and 15 OUT endpoints, not 15 endpoints
      total.  Move from one array to two arrays (one IN, one OUT) to maintain
      the endpoint state.
      c0e5750b
    • G
      usb-host: claim port · 9516bb47
      Gerd Hoffmann 提交于
      When configured to pass through a specific host port (using hostbus and
      hostport properties), try to claim the port if supported by the kernel.
      That will avoid any kernel drivers binding to devices plugged into that
      port.  It will not stop any userspace apps (such as usb_modeswitch)
      access the device via usbfs though.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      9516bb47
    • G
      usb-host: fix configuration tracking. · eb7700bb
      Gerd Hoffmann 提交于
      It is perfectly fine to leave the usb device in unconfigured state
      (USBHostDevice->configuration == 0).  Just do that and wait for the
      guest to explicitly set a configuration.  This is closer to what real
      hardware does and it also simplifies the device initialization.  There
      is no need to figure how the device is configured on the host.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      eb7700bb
    • G
      usb-host: limit open retries · 3ee886c5
      Gerd Hoffmann 提交于
      Limit the number of times qemu tries to open host devices to three.
      Reset error counter when the device goes away, after un-plugging and
      re-plugging the device qemu will try again three times.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      3ee886c5
    • G
      usb-host: fix halted endpoints · 9b87e19b
      Gerd Hoffmann 提交于
      Two fixes for the price of one ;)
      
      First, reinitialize the endpoint table after device reset.
      This is needed anyway as the reset might have switched interfaces.
      It also clears the endpoint halted state.
      
      Second the CLEAR_HALT ioctl wants a unsigned int passed in as
      argument, not uint8_t.
      
      This gets my usb sd card reader (sandisk micromate) going.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      9b87e19b
    • G
      usb-host: reapurb error report fix · 40197c35
      Gerd Hoffmann 提交于
      Don't report errors on devices which are in disconnected
      and closing state.
      40197c35
    • G
      usb-host: start tracing support · e6a2f500
      Gerd Hoffmann 提交于
      Add a bunch of trace points to usb-linux.c  Drop a bunch of DPRINTK's in
      favor of the trace points.  Also cleanup error reporting a bit while being
      at it.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      e6a2f500
  2. 06 9月, 2011 11 次提交
  3. 04 9月, 2011 5 次提交
  4. 03 9月, 2011 2 次提交
    • S
      Use new macro QEMU_PACKED for packed structures · 541dc0d4
      Stefan Weil 提交于
      Most changes were made using these commands:
      
      git grep -la '__attribute__((packed))'|xargs perl -pi -e 's/__attribute__\(\(packed\)\)/QEMU_PACKED/'
      git grep -la '__attribute__ ((packed))'|xargs perl -pi -e 's/__attribute__ \(\(packed\)\)/QEMU_PACKED/'
      git grep -la '__attribute__((__packed__))'|xargs perl -pi -e 's/__attribute__\(\(__packed__\)\)/QEMU_PACKED/'
      git grep -la '__attribute__ ((__packed__))'|xargs perl -pi -e 's/__attribute__ \(\(__packed__\)\)/QEMU_PACKED/'
      git grep -la '__attribute((packed))'|xargs perl -pi -e 's/__attribute\(\(packed\)\)/QEMU_PACKED/'
      
      Whitespace in linux-user/syscall_defs.h was fixed manually
      to avoid warnings from scripts/checkpatch.pl.
      
      Manual changes were also applied to hw/pc.c.
      
      I did not fix indentation with tabs in block/vvfat.c.
      The patch will show 4 errors with scripts/checkpatch.pl.
      Signed-off-by: NStefan Weil <weil@mail.berlios.de>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      541dc0d4
    • S
      Add new macro QEMU_PACKED for packed C structures · 0f7fdd34
      Stefan Weil 提交于
      A packed struct needs different gcc attributes for compilations
      with MinGW compilers because glib-2.0 adds compiler flag
      -mms-bitfields which modifies the packing algorithm.
      
      Attribute gcc_struct reverses the negative effects of -mms-bitfields.
      QEMU_PACKED sets this attribute and must be used for any packed
      struct which is affected by -mms-bitfields.
      Signed-off-by: NStefan Weil <weil@mail.berlios.de>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      0f7fdd34
  5. 02 9月, 2011 12 次提交
  6. 01 9月, 2011 3 次提交