1. 29 8月, 2014 1 次提交
  2. 18 7月, 2014 1 次提交
  3. 24 6月, 2014 1 次提交
  4. 05 5月, 2014 1 次提交
  5. 27 3月, 2014 1 次提交
  6. 10 2月, 2014 1 次提交
  7. 14 10月, 2013 1 次提交
  8. 03 10月, 2013 1 次提交
  9. 31 8月, 2013 1 次提交
  10. 23 8月, 2013 1 次提交
  11. 30 7月, 2013 1 次提交
    • A
      hcd-ohci: add dma error handling · cf66ee8e
      Alexey Kardashevskiy 提交于
      Current hcd-ohci does not handle DMA errors. However they may happen
      so here we introduce simple error handling.
      
      On such errors, a typical OHCI will stop operating, signal the guest
      about the error by sending "UnrecoverableError Event", set itself into
      error state and set "Detected Parity Error" in its PCI config space
      to signal that it got an error and so does the patch.
      
      This also adds ohci_die() call to ohci_bus_start() to handle possible
      failure of qemu_new_timer_ns().
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      cf66ee8e
  12. 29 7月, 2013 1 次提交
  13. 23 7月, 2013 2 次提交
  14. 04 7月, 2013 2 次提交
  15. 20 6月, 2013 1 次提交
  16. 19 2月, 2013 1 次提交
  17. 22 1月, 2013 1 次提交
  18. 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
  19. 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
  20. 19 12月, 2012 1 次提交
  21. 17 12月, 2012 1 次提交
  22. 29 11月, 2012 1 次提交
  23. 12 11月, 2012 1 次提交
  24. 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
  25. 25 10月, 2012 3 次提交
  26. 23 10月, 2012 1 次提交
    • A
      Rename target_phys_addr_t to hwaddr · a8170e5e
      Avi Kivity 提交于
      target_phys_addr_t is unwieldly, violates the C standard (_t suffixes are
      reserved) and its purpose doesn't match the name (most target_phys_addr_t
      addresses are not target specific).  Replace it with a finger-friendly,
      standards conformant hwaddr.
      
      Outstanding patchsets can be fixed up with the command
      
        git rebase -i --exec 'find -name "*.[ch]"
                              | xargs s/target_phys_addr_t/hwaddr/g' origin
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      a8170e5e
  27. 05 10月, 2012 1 次提交
  28. 31 8月, 2012 1 次提交
    • G
      usb: unique packet ids · e983395d
      Gerd Hoffmann 提交于
      This patch adds IDs to usb packets.  Those IDs are (a) supposed to be
      unique for the lifecycle of a packet (from packet setup until the packet
      is either completed or canceled) and (b) stable across migration.
      
      uhci, ohci, ehci and xhci use the guest physical address of the transfer
      descriptor for this.
      
      musb needs a different approach because there is no transfer descriptor.
      But musb also doesn't support pipelining, so we have never more than one
      packet per endpoint in flight.  So we go create an ID based on endpoint
      and device address.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      e983395d
  29. 28 6月, 2012 1 次提交
  30. 13 3月, 2012 3 次提交
    • W
      usb-ohci: DMA writeback bug fixes · 86e18cae
      Wei Yang 提交于
      This patch fixes two bugs in the OHCI device where the device writes
      back data to system memory that should be exclusively under the
      control of the guest side driver.
      
      In OHCI specification Section 5.2.7, it mentioned "In all cases, Host
      Controller Driver is responsible for the insertion and removal of all
      Endpoint Descriptors in the various Host Controller Endpoint
      Descriptor lists".  In the ohci_frame_boundary(), ohci_put_hcca()
      writes the entire hcca back including the interrupt ED lists which
      should be under driver control. This violates the specification and
      can race with a host driver updating that list at the same time.
      
      In the OHCI Spec Section 4.6, Transfer Descriptor Queue Processing, it
      mentioned "Since the TD pointed to by TailP is not accessed by the HC,
      the Host Controller Driver can initialize that TD and link at least
      one other to it without creating a coherency or synchronization
      problem".  While the function ohci_put_ed() writes the entire endpoint
      descriptor back including the TailP which should under driver
      control. This violate the specification and can race with a host
      driver updating the TD list at the same time.
      
      In each case the solution is to make sure we don't write data which is
      under driver control.
      
      Cc: Gerd Hoffman <kraxel@redhat.com>
      Signed-off-by: NWei Yang <weiyang@linux.vnet.ibm.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      86e18cae
    • G
      usb: zap hw/ush-{ohic,uhci}.h + init wrappers · afb9a60e
      Gerd Hoffmann 提交于
      Remove the uhci and ohci init wrappers, which all wrapped a
      pci_create_simple() one-liner.  Switch callsites to call
      pci_create_simple directly.  Remove the header files where
      the wrappers where declared.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      afb9a60e
    • 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
  31. 07 3月, 2012 1 次提交
    • H
      usb: add USB_RET_IOERROR · d61000a8
      Hans de Goede 提交于
      We already have USB_RET_NAK, but that means that a device does not want
      to send/receive right now. But with host / network redirection we can
      actually have a transaction fail due to some io error, rather then ie
      the device just not having any data atm.
      
      This patch adds a new error code named USB_RET_IOERROR for this, and uses
      it were appropriate.
      
      Notes:
      -Currently all usb-controllers handle this the same as NODEV, but that
       may change in the future, OHCI could indicate a CRC error instead for example.
      -This patch does not touch hw/usb-musb.c, that is because the code in there
       handles STALL and NAK specially and has a if status < 0 generic catch all
       for all other errors
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      d61000a8
  32. 15 2月, 2012 1 次提交
  33. 10 2月, 2012 2 次提交