1. 27 2月, 2012 1 次提交
  2. 15 2月, 2012 1 次提交
  3. 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
  4. 04 2月, 2012 3 次提交
  5. 28 1月, 2012 3 次提交
  6. 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
  7. 06 1月, 2012 1 次提交
  8. 15 12月, 2011 1 次提交
  9. 22 11月, 2011 2 次提交
  10. 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
  11. 21 8月, 2011 1 次提交
  12. 08 7月, 2011 1 次提交
  13. 05 7月, 2011 4 次提交
  14. 23 6月, 2011 3 次提交
  15. 14 6月, 2011 3 次提交
  16. 25 1月, 2011 2 次提交
    • B
      usb-bus: use snprintf · ea87e95f
      Blue Swirl 提交于
      Avoid this warning from OpenBSD linker:
        LINK  i386-softmmu/qemu
      ../usb-bus.o(.text+0x27c): In function `usb_get_fw_dev_path':
      /src/qemu/hw/usb-bus.c:294: warning: sprintf() is often misused,
      please use snprintf()
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      ea87e95f
    • G
      usb core: add migration support · c1ecb40a
      Gerd Hoffmann 提交于
      Yes, seriously.  There is no migration support at all for usb devices.
      They loose state, especially the device address, and stop responding
      because of that.  Oops.
      
      Luckily there is so much broken usb hardware out there that the guest
      usually just kicks the device hard (via port reset and
      reinitialization), then continues without a hitch.  So we got away with
      that in a surprising high number of cases.
      
      The arrival of remote wakeup (which enables autosuspend support) changes
      that picture though.  The usb devices also forget that it they are
      supposed to wakeup, so they don't do that.  The host also doesn't notice
      the device stopped working in case it suspended the device and thus
      expects it waking up instead of polling it.  Result is that your mouse
      is dead.
      
      Lets start fixing that.  Add a vmstate struct for USBDevice.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      c1ecb40a
  17. 12 1月, 2011 6 次提交
  18. 11 1月, 2011 1 次提交
  19. 12 12月, 2010 2 次提交
  20. 26 4月, 2010 1 次提交