1. 10 9月, 2013 1 次提交
  2. 31 8月, 2013 2 次提交
  3. 24 6月, 2013 1 次提交
  4. 23 4月, 2013 1 次提交
  5. 03 4月, 2013 1 次提交
  6. 17 1月, 2013 1 次提交
  7. 11 1月, 2013 1 次提交
    • A
      Make all static TypeInfos const · 8c43a6f0
      Andreas Färber 提交于
      Since 39bffca2 (qdev: register all
      types natively through QEMU Object Model), TypeInfo as used in
      the common, non-iterative pattern is no longer amended with information
      and should therefore be const.
      
      Fix the documented QOM examples:
      
       sed -i 's/static TypeInfo/static const TypeInfo/g' include/qom/object.h
      
      Since frequently the wrong examples are being copied by contributors of
      new devices, fix all types in the tree:
      
       sed -i 's/^static TypeInfo/static const TypeInfo/g' */*.c
       sed -i 's/^static TypeInfo/static const TypeInfo/g' */*/*.c
      
      This also avoids to piggy-back these changes onto real functional
      changes or other refactorings.
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      8c43a6f0
  8. 07 1月, 2013 1 次提交
    • H
      usb: Add an usb_device_ep_stopped USBDevice method · f79738b0
      Hans de Goede 提交于
      Some usb devices (host or network redirection) can benefit from knowing when
      the guest stops using an endpoint. Redirection may involve submitting packets
      independently from the guest (in combination with a fifo buffer between the
      redirection code and the guest), to ensure that buffers of the real usb device
      are timely emptied. This is done for example for isoc traffic and for interrupt
      input endpoints. But when the (re)submission of packets is done by the device
      code, then how does it know when to stop this?
      
      For isoc endpoints this is handled by detecting a set interface (change alt
      setting) command, which works well for isoc endpoints. But for interrupt
      endpoints currently the redirection code never stops receiving data from
      the device, which is less then ideal.
      
      However the controller emulation is aware when a guest looses interest, as
      then the qh for the endpoint gets unlinked (ehci, ohci, uhci) or the endpoint
      is explicitly stopped (xhci). This patch adds a new ep_stopped USBDevice
      method and modifies the hcd code to call this on queue unlink / ep stop.
      
      This makes it possible for the redirection code to properly stop receiving
      interrupt input (*) data when the guest no longer has interest in it.
      
      *) And in the future also buffered bulk input.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      f79738b0
  9. 19 12月, 2012 2 次提交
  10. 04 12月, 2012 1 次提交
  11. 29 11月, 2012 1 次提交
  12. 09 11月, 2012 1 次提交
    • H
      usb: split packet result into actual_length + status · 9a77a0f5
      Hans de Goede 提交于
      Since with the ehci and xhci controllers a single packet can be larger
      then maxpacketsize, it is possible for the result of a single packet
      to be both having transferred some data as well as the transfer to have
      an error.
      
      An example would be an input transfer from a bulk endpoint successfully
      receiving 1 or more maxpacketsize packets from the device, followed
      by a packet signalling halt.
      
      While already touching all the devices and controllers handle_packet /
      handle_data / handle_control code, also change the return type of
      these functions to void, solely storing the status in the packet. To
      make the code paths for regular versus async packet handling more
      uniform.
      
      This patch unfortunately is somewhat invasive, since makeing the qemu
      usb core deal with this requires changes everywhere. This patch only
      prepares the usb core for this, all the hcd / device changes are done
      in such a way that there are no functional changes.
      
      This patch has been tested with uhci and ehci hcds, together with usb-audio,
      usb-hid and usb-storage devices, as well as with usb-redir redirection
      with a wide variety of real devices.
      
      Note that there is usually no need to directly set packet->actual_length
      form devices handle_data callback, as that is done by usb_packet_copy()
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      9a77a0f5
  13. 25 10月, 2012 1 次提交
  14. 20 6月, 2012 1 次提交
  15. 18 6月, 2012 4 次提交
  16. 17 4月, 2012 1 次提交
    • G
      usb/vmstate: add parent dev path · eeb0cf9a
      Gerd Hoffmann 提交于
      ... to make vmstate id string truely unique with multiple host
      controllers, i.e. move from "1/usb-ptr" to "0000:00:01.3/1/usb-ptr"
      (usb tabled connected to piix3 uhci).
      
      This obviously breaks migration.  To handle this the usb bus
      property "full-path" is added.  When setting this to false old
      behavior is maintained.  This way current qemu will be compatible
      with old versions when started using '-M pc-$oldversion'.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      eeb0cf9a
  17. 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
  18. 27 2月, 2012 1 次提交
  19. 15 2月, 2012 1 次提交
  20. 10 2月, 2012 2 次提交
    • 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
    • G
      usb: add usb_find_device() · 73796fe6
      Gerd Hoffmann 提交于
      Add usb_find_device().  This function will check whenever a device with
      a specific address is connected to the specified port.  Usually this
      will just check state and address of the device hooked up to the port,
      but in case of a hub it will ask the hub to check all hub ports for a
      matching device.
      
      This patch doesn't put the code into use yet, see the following patches
      for details.
      
      The master plan is to separate device lookup and packet processing.
      Right now the usb code simply walks all devices, calls
      usb_handle_packet() on each until one accepts the packet (by returning
      something different that USB_RET_NODEV).  I want to have a device lookup
      first, then call usb_handle_packet() once, for the device which actually
      processes the packet.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      73796fe6
  21. 04 2月, 2012 3 次提交
  22. 28 1月, 2012 3 次提交
  23. 17 1月, 2012 1 次提交
    • G
      usb: add USBEndpoint · d8e17efd
      Gerd Hoffmann 提交于
      Start maintaining endpoint state at USBDevice level.  Add USBEndpoint
      struct and some helper functions to deal with it.  For now it contains
      the endpoint type only.  Moved over some bits from usb-linux.c
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      d8e17efd
  24. 06 1月, 2012 1 次提交
  25. 15 12月, 2011 1 次提交
  26. 22 11月, 2011 2 次提交
  27. 07 9月, 2011 1 次提交
    • G
      usb: claim port at device initialization time. · 891fb2cd
      Gerd Hoffmann 提交于
      This patch makes qemu assign a port when creating the device, not when
      attaching it.  For most usb devices this isn't a noticable difference
      because they are in attached state all the time.
      
      The change affects usb-host devices which live in detached state while
      the real device is unplugged from the host.  They have a fixed port
      assigned all the time now instead of getting grabbing one on attach and
      releasing it at detach, i.e. they stop floating around at the usb bus.
      
      The change also allows to simplify usb-hub.  It doesn't need the
      handle_attach() callback any more to configure the downstream ports.
      This can be done at device initialitation time now.  The changed
      initialization order (first grab upstream port, then register downstream
      ports) also fixes some icky corner cases.  For example it is not possible
      any more to plug the hub into one of its own downstream ports.
      
      The usb host adapters must care too.  USBPort->dev being non-NULL
      doesn't imply any more the device is in attached state.  The host
      adapters must additionally check the USBPort->dev->attached flag.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      891fb2cd
  28. 21 8月, 2011 1 次提交
  29. 08 7月, 2011 1 次提交