1. 05 6月, 2012 2 次提交
  2. 26 4月, 2012 1 次提交
    • G
      usb: add serial number generator · 9d55d1ad
      Gerd Hoffmann 提交于
      This patch adds a function which creates unique serial numbers for usb
      devices and puts it into use.  Windows guests tend to become unhappy if
      they find two identical usb devices in the system.  Effects range from
      non-functional devices (with yellow exclamation mark in device manager)
      to BSODs.  Handing out unique serial numbers to devices fixes this.
      
      With this patch applied almost all emulated devices get a generated,
      unique serial number.  There are two exceptions:
      
       * usb-storage devices will prefer a user-specified serial number
         and will only get a generated number in case the serial property
         is unset.
       * usb-hid devices keep the fixed serial number "42" as it is used
         to signal "remote wakeup actually works".
         See commit 7b074a22Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      9d55d1ad
  3. 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
  4. 27 2月, 2012 1 次提交
  5. 15 2月, 2012 1 次提交
  6. 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
  7. 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
  8. 28 1月, 2012 3 次提交
  9. 13 1月, 2012 2 次提交
  10. 13 12月, 2011 1 次提交
  11. 15 11月, 2011 1 次提交
  12. 14 11月, 2011 1 次提交
  13. 21 8月, 2011 1 次提交
  14. 04 8月, 2011 1 次提交
    • G
      usb: use iovecs in USBPacket · 4f4321c1
      Gerd Hoffmann 提交于
      Zap data pointer from USBPacket, add a QEMUIOVector instead.
      Add a bunch of helper functions to manage USBPacket data.
      Switch over users to the new interface.
      
      Note that USBPacket->len was used for two purposes:  First to
      pass in the buffer size and second to return the number of
      transfered bytes or the status code on async transfers.  There
      is a new result variable for the latter.  A new status code
      was added to catch uninitialized result.
      
      Nobody creates iovecs with more than one element (yet).
      Some users are (temporarely) limited to iovecs with a single
      element to keep the patch size as small as possible.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      4f4321c1
  15. 20 7月, 2011 1 次提交
  16. 26 5月, 2011 1 次提交
  17. 11 1月, 2011 4 次提交
  18. 12 12月, 2010 2 次提交
  19. 17 11月, 2010 1 次提交
  20. 23 8月, 2010 1 次提交
  21. 26 4月, 2010 1 次提交
  22. 01 4月, 2010 1 次提交
    • M
      usb: class specific interface requests · f3571b1a
      Max Reitz 提交于
      Mass Storage Reset and Get Max LUN are class specific requests, but
      they were not marked as such in hw/usb-msd.c, moved therefore
      ClassInterfaceRequest and ClassInterfaceOutRequest from hw/usb-net.c
      to hw/usb.h.
      Furthermore there was a problem in hw/usb-ohci.c when using DEBUG
      concerning systems where size_t is a 32 bit integer (printf resulted
      in a segmentation fault).
      Signed-off-by: NMax Reitz <max@tyndur.org>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      f3571b1a
  23. 17 3月, 2010 1 次提交
    • M
      qemu-option: Move the implied first name into QemuOptsList · 8212c64f
      Markus Armbruster 提交于
      We sometimes permit omitting the first option name, for example
      -device foo is short for -device driver=foo.  The name to use
      ("driver" in the example) is passed as argument to qemu_opts_parse().
      For each QemuOptsList, we use at most one such name.
      
      Move the name into QemuOptsList, and pass whether to permit the
      abbreviation.  This ensures continued consistency, and simplifies the
      commit after next in this series.
      8212c64f
  24. 25 2月, 2010 1 次提交
    • P
      Fix -usbdevice crash · d44168ff
      Paul Brook 提交于
      If -usbdevice is used on a machine with no USB busses, usb_create
      will fail and return NULL.  Patch below handles this failure gracefully
      rather than crashing when we try to init the device.
      Signed-off-by: NPaul Brook <paul@codesourcery.com>
      d44168ff
  25. 20 1月, 2010 1 次提交
    • K
      Fix QEMU_WARN_UNUSED_RESULT · beb6f0de
      Kevin Wolf 提交于
      Since commit 747bbdf7 QEMU_WARN_UNUSED_RESULT is never defined as it is
      conditional on a define from config-host.h which is included only later.
      Include that file earlier to get the warnings back.
      
      Reactivating it unfortunately leads to some warnings about unused qdev_init
      results. These calls are changed to qdev_init_nofail to avoid build failures.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      beb6f0de
  26. 19 12月, 2009 1 次提交
  27. 12 12月, 2009 2 次提交
  28. 03 12月, 2009 2 次提交