1. 09 7月, 2012 2 次提交
  2. 20 6月, 2012 2 次提交
  3. 14 5月, 2012 1 次提交
    • G
      usb-host: handle guest-issued clear halt · a2498f76
      Gerd Hoffmann 提交于
      Most important here is to update our internal endpoint state so we know
      the endpoint isn't in halted state any more.  Without this usb-host
      tries to clear halt again with the next data transfer submitted.  Doing
      this twice is (a) not correct and (b) confuses some usb devices,
      rendering them non-functional in the guest.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      a2498f76
  4. 26 4月, 2012 2 次提交
  5. 17 4月, 2012 6 次提交
  6. 13 3月, 2012 1 次提交
    • G
      usb: the big rename · f1ae32a1
      Gerd Hoffmann 提交于
      Reorganize usb source files.  Create a new hw/usb/ directory and move
      all usb source code to that place.  Also make filenames a bit more
      descriptive.  Host adapters are prefixed with "hch-" now, usb device
      emulations are prefixed with "dev-".  Fixup paths Makefile and include
      paths to make it compile.  No code changes.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      f1ae32a1
  7. 07 3月, 2012 3 次提交
  8. 27 2月, 2012 1 次提交
  9. 15 2月, 2012 1 次提交
  10. 10 2月, 2012 2 次提交
    • G
      usb: Set USBEndpoint in usb_packet_setup(). · 079d0b7f
      Gerd Hoffmann 提交于
      With the separation of the device lookup (via usb_find_device) and
      packet processing we can lookup device and endpoint before setting up
      the usb packet.  So we can initialize USBPacket->ep early and keep it
      valid for the whole lifecycle of the USBPacket.  Also the devaddr and
      devep fields are not needed any more.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      079d0b7f
    • G
      usb: kill handle_packet callback · 7f74a56b
      Gerd Hoffmann 提交于
      All drivers except usb-hub use usb_generic_handle_packet.  The only
      reason the usb hub has its own function is that it used to be called
      with packets which are intended for downstream devices.  With the new,
      separate device lookup step this doesn't happen any more, so the need
      for a different handle_packet callback is gone.
      
      So we can kill the handle_packet callback and just call
      usb_generic_handle_packet directly.  The special hub handling in
      usb_handle_packet() can go away for the same reason.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      7f74a56b
  11. 04 2月, 2012 2 次提交
    • A
      qdev: register all types natively through QEMU Object Model · 39bffca2
      Anthony Liguori 提交于
      This was done in a mostly automated fashion.  I did it in three steps and then
      rebased it into a single step which avoids repeatedly touching every file in
      the tree.
      
      The first step was a sed-based addition of the parent type to the subclass
      registration functions.
      
      The second step was another sed-based removal of subclass registration functions
      while also adding virtual functions from the base class into a class_init
      function as appropriate.
      
      Finally, a python script was used to convert the DeviceInfo structures and
      qdev_register_subclass functions to TypeInfo structures, class_init functions,
      and type_register_static calls.
      
      We are almost fully converted to QOM after this commit.
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      39bffca2
    • A
      usb: separate out legacy usb registration from type registration · ba02430f
      Anthony Liguori 提交于
      Type registeration is going to get turned into a QOM call so decouple the
      legacy support.
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      ba02430f
  12. 28 1月, 2012 1 次提交
  13. 17 1月, 2012 4 次提交
  14. 13 1月, 2012 3 次提交
    • G
      usb: track altsetting in USBDevice · 1de14d43
      Gerd Hoffmann 提交于
      Also handle {GET,SET}_INTERFACE in common code (usb-desc.c).
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      1de14d43
    • G
      usb: track configuration and interface count in USBDevice. · 65360511
      Gerd Hoffmann 提交于
      Move fields from USBHostDevice to USBDevice.
      Add bits to usb-desc.c to fill them for emulated devices too.
      Also allow to set configuration 0 (== None) for emulated devices.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      65360511
    • G
      usb-host: rip out legacy procfs support · 097db438
      Gerd Hoffmann 提交于
      This patch removes support for parsing /proc/bus/usb/devices for device
      discovery.  The code lacks a few features compared to the sysfs code and
      is also bitrotting as everybody has sysfs these days.
      
      This implies having sysfs mounted is mandatory now to use the usb-host
      driver.  udev isn't required though.  qemu will prefer the udev-managed
      device nodes below /dev/bus/usb, but in case this directory isn't preset
      qemu will use the device nodes below /proc/bus/usb (default usbfs mount
      point).
      
      Bottom line: make sure you have both sysfs and usbfs mounted properly,
      and everything should continue to work as it did before.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      097db438
  15. 06 1月, 2012 1 次提交
    • G
      usb-host: properly release port on unplug & exit · c75fead6
      Gerd Hoffmann 提交于
      Factor out port release into a separate function.  Call release function
      in exit notifier too.  Add explicit call the USBDEVFS_RELEASE_PORT
      ioctl, just closing the hub file handle seems not to be enougth.  Make
      sure we release the port before resetting the device, otherwise host
      drivers will not re-attach.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      c75fead6
  16. 04 1月, 2012 1 次提交
    • C
      Fix parse of usb device description with multiple configurations · 7279a85f
      Cao,Bing Bu 提交于
      Changed From V1:
      Use DPRINTF instead of fprintf,because it is not an error.
      
      When testing ipod on QEMU by He Jie Xu<xuhj@linux.vnet.ibm.com>,qemu made a assertion.
      We found that the ipod with 2 configurations,and the usb-linux did not parse the descriptor correctly.
      The descr_len returned is the total length of the all configurations,not one configuration.
      The older version will through the other configurations instead of skip,continue parsing the descriptor of interfaces/endpoints in other configurations,then went wrong.
      
      This patch will put the configuration descriptor parse in loop outside and dispel the other configurations not requested.
      Signed-off-by: NCao,Bing Bu <mars@linux.vnet.ibm.com>
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      7279a85f
  17. 24 11月, 2011 1 次提交
    • G
      usb-host: add usb_host_do_reset function. · c7662daa
      Gerd Hoffmann 提交于
      Add a special function to reset the host usb device.  It tracks the time
      needed by the USBDEVFS_RESET ioctl and prints a warning in case it needs
      too long.  Usually it should be finished in 200 - 300 miliseconds.
      Warning threshold is one second.
      
      Intention is to help troubleshooting by indicating that the usb device
      stopped responding even to a reset request and is possibly broken.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      c7662daa
  18. 21 11月, 2011 1 次提交
  19. 01 11月, 2011 1 次提交
    • G
      usb-host: fix host close · 39fba3ad
      Gerd Hoffmann 提交于
      The whole usb_host_close() function is skipped in case the device is not
      in attached state.  This is wrong though, only then usb_device_detach()
      must be skipped, all other cleanup (especially device reset and closing
      the file handle) still needs to be done.  There are code paths where
      usb_host_close() is called with the device in detached state already.
      
      This fixes usb-host devices not being released and returned to the host
      after removing them with device_del.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      39fba3ad
  20. 13 10月, 2011 2 次提交
  21. 07 9月, 2011 2 次提交