1. 27 2月, 2012 1 次提交
  2. 10 2月, 2012 11 次提交
    • G
      usb: add USBBusOps->wakeup_endpoint · 37f32f0f
      Gerd Hoffmann 提交于
      Add usb bus op which is called whenever a usb endpoint becomes ready,
      so the host adapter emulation can react on that event.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      37f32f0f
    • G
      usb: pass USBEndpoint to usb_wakeup · 7567b51f
      Gerd Hoffmann 提交于
      Devices must specify which endpoint has data to transfer now.
      The plan is to use the usb_wakeup() not only for remove wakeup support,
      but for "data ready" signaling in general, so we can move away from
      constant polling to event driven usb device emulation.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      7567b51f
    • G
      usb: maintain async packet list per endpoint · db4be873
      Gerd Hoffmann 提交于
      Maintain a list of async packets per endpoint.  With the current code
      the list will never receive more than a single item.  I think you can
      guess what the future plan is though ;)
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      db4be873
    • 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: add USBEndpoint->{nr,pid} · 63095ab5
      Gerd Hoffmann 提交于
      Add a "nr" and "pid" fields to USBEndpoint so you can easily figure the
      endpoint number and direction of any given endpoint.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      63095ab5
    • G
      usb: USBPacket: add status, rename owner -> ep · f53c398a
      Gerd Hoffmann 提交于
      Add enum to track the status of USBPackets, use that instead of the
      owner pointer to figure whenever a usb packet is currently in flight
      or not.  Add some more packet status sanity checks.  Also rename the
      USBEndpoint pointer from "owner" to "ep".
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      f53c398a
    • 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
    • G
      usb: kill usb_send_msg · 70fc20d4
      Gerd Hoffmann 提交于
      No users left.  Zap it.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      70fc20d4
    • G
      usb: kill USB_MSG_RESET · d28f4e2d
      Gerd Hoffmann 提交于
      The USB subsystem pipes internal reset notifications through
      usb_handle_packet() with a special magic PID.  This indirection
      is a pretty pointless excercise as it ends up being handled by
      usb_generic_handle_packet anyway.
      
      Replace the USB_MSG_RESET with a usb_device_reset() function
      which can be called directly.  Also rename the existing usb_reset()
      function to usb_port_reset() to avoid confusion.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      d28f4e2d
    • G
      usb: kill USB_MSG_{ATTACH,DETACH} · d1f8b536
      Gerd Hoffmann 提交于
      The USB subsystem pipes internal attach/detach notifications through
      usb_handle_packet() with a special magic PID.  This indirection is a
      pretty pointless excercise as it ends up being handled by
      usb_generic_handle_packet anyway.  Remove it.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      d1f8b536
  3. 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
  4. 28 1月, 2012 1 次提交
  5. 17 1月, 2012 5 次提交
  6. 14 1月, 2012 1 次提交
  7. 13 1月, 2012 3 次提交
  8. 13 10月, 2011 1 次提交
    • G
      usb: fix port reset · e0b8e72d
      Gerd Hoffmann 提交于
      commit 891fb2cd removed the implicit
      detach before (re-)attaching in usb_attach().  Some usb host controllers
      used that behavior though to do a port reset by a detach+attach
      sequence.
      
      This patch establishes old behavior by adding a new usb_reset() function
      for port resets and putting it into use, thereby also unifying port
      reset behavior of all host controllers.  The patch also adds asserts to
      usb_attach() and usb_detach() to make sure the calls are symmetrical.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      e0b8e72d
  9. 07 9月, 2011 4 次提交
  10. 10 8月, 2011 1 次提交
  11. 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
  12. 05 7月, 2011 3 次提交
  13. 23 6月, 2011 2 次提交
  14. 14 6月, 2011 2 次提交
  15. 26 5月, 2011 2 次提交