1. 21 2月, 2017 2 次提交
  2. 06 2月, 2017 9 次提交
    • G
      xhci: fix event queue IRQ handling · 7da76e12
      Gerd Hoffmann 提交于
      The qemu xhci emulation doesn't handle the ERDP_EHB flag correctly.
      
      When the host adapter queues a new event the ERDP_EHB flag is set.  The
      flag is cleared (via w1c) by the guest when it updates the ERDP (event
      ring dequeue pointer) register to notify the host adapter which events
      it has fetched.
      
      An IRQ must be raised in case the ERDP_EHB flag flips from clear to set.
      If the flag is set already (which implies there are events queued up
      which are not yet processed by the guest) xhci must *not* raise a IRQ.
      
      Qemu got that wrong and raised an IRQ on every event, thereby generating
      spurious interrupts in case we've queued events faster than the guest
      processed them.  This patch fixes that.
      
      With that change in place we also have to check ERDP updates, to see
      whenever the guest has fetched all queued events.  In case there are
      still pending events set ERDP_EHB and raise an IRQ again, to make sure
      the events don't linger unseen forever.
      
      The linux kernel driver and the microsoft windows driver (shipped with
      win8+) can deal with the spurious interrupts without problems.  The
      renesas windows driver (v2.1.39) which can be used on older windows
      versions is quite upset though.  It does spurious ERDP updates now and
      then (not every time, seems we must hit a race window for this to
      happen), which in turn makes the qemu xhci emulation think the event
      ring is full.  Things go south from here ...
      
      tl;dr: This is the "fix xhci on win7" patch.
      
      Cc: M.Cerveny@computer.org
      Cc: 1373228@bugs.launchpad.net
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Message-id: 1486104705-13761-1-git-send-email-kraxel@redhat.com
      7da76e12
    • P
      usb: ccid: check ccid apdu length · c7dfbf32
      Prasad J Pandit 提交于
      CCID device emulator uses Application Protocol Data Units(APDU)
      to exchange command and responses to and from the host.
      The length in these units couldn't be greater than 65536. Add
      check to ensure the same. It'd also avoid potential integer
      overflow in emulated_apdu_from_guest.
      Reported-by: NLi Qiang <liqiang6-s@360.cn>
      Signed-off-by: NPrasad J Pandit <pjp@fedoraproject.org>
      Message-id: 20170202192228.10847-1-ppandit@redhat.com
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      c7dfbf32
    • G
      xhci: guard xhci_kick_epctx against recursive calls · 96d87bdd
      Gerd Hoffmann 提交于
      Track xhci_kick_epctx processing being active in a variable.  Check the
      variable before calling xhci_kick_epctx from xhci_kick_ep.  Add an
      assert to make sure we don't call recursively into xhci_kick_epctx.
      
      Cc: 1653384@bugs.launchpad.net
      Fixes: 94b037f2Reported-by: NFabian Lesniak <fabian@lesniak-it.de>
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Message-id: 1486035372-3621-1-git-send-email-kraxel@redhat.com
      Message-id: 1485790607-31399-5-git-send-email-kraxel@redhat.com
      96d87bdd
    • G
      xhci: don't kick in xhci_submit and xhci_fire_ctl_transfer · ddb603ab
      Gerd Hoffmann 提交于
      xhci_submit and xhci_fire_ctl_transfer are is called from
      xhci_kick_epctx processing loop only, so there is no need to call
      xhci_kick_epctx make sure processing continues.  Also eecursive calls
      into xhci_kick_epctx can cause trouble.
      
      Drop the xhci_kick_epctx calls.
      
      Cc: 1653384@bugs.launchpad.net
      Fixes: 94b037f2Reported-by: NFabian Lesniak <fabian@lesniak-it.de>
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Message-id: 1485790607-31399-4-git-send-email-kraxel@redhat.com
      ddb603ab
    • G
      xhci: rename xhci_complete_packet to xhci_try_complete_packet · 13e8ff7a
      Gerd Hoffmann 提交于
      Make clear that this isn't guaranteed to actually complete the transfer,
      the usb packet can still be in flight after calling that function.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Message-id: 1485790607-31399-3-git-send-email-kraxel@redhat.com
      13e8ff7a
    • G
      xhci: only free completed transfers · f94d18d6
      Gerd Hoffmann 提交于
      Most callsites check already, one was missed.
      
      Cc: 1653384@bugs.launchpad.net
      Fixes: 94b037f2Reported-by: NFabian Lesniak <fabian@lesniak-it.de>
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Message-id: 1485790607-31399-2-git-send-email-kraxel@redhat.com
      f94d18d6
    • G
      usb: accept usb3 control requests · 811ad5d8
      Gerd Hoffmann 提交于
      Windows 10 reportedly sends these, so accept them in case
      the device in question is a superspeed (usb3) device.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Message-id: 1485870727-21956-2-git-send-email-kraxel@redhat.com
      811ad5d8
    • G
      usb/uas: more verbose error message · e306b2fd
      Gerd Hoffmann 提交于
      Print some more details in case we get a unknown
      control request, to ease trouble-shooting.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Message-id: 1485870727-21956-1-git-send-email-kraxel@redhat.com
      e306b2fd
    • P
      hw/usb/dev-hid: Improve guest compatibility of usb-tablet · 0cd089e9
      Phil Dennis-Jordan 提交于
       1. Set bInterfaceProtocol to 0x00 for usb-tablet. This should be
          non-zero for boot protocol devices only, which the usb-tablet is not.
       2. Set the usb-tablet's usage to "mouse" in the report descriptor.
      
      The boot protocol of 0x02 specifically confused OS X/macOS' HID driver
      stack, causing it to generate additional bogus HID events with relative
      motion in addition to the tablet's absolute coordinate events.
      
      Absolute pointing devices with HID Report Descriptor usage of 0x01
      (pointing) are treated by the macOS HID driver as analog sticks, and
      absolute coordinates are not directly translated to absolute mouse
      cursor positions. Changing it to 0x02 (mouse) fixes the problem, and
      does not have any adverse effect in other operating systems and
      windowing systems. (VMWare does the same thing.)
      Signed-off-by: NPhil Dennis-Jordan <phil@philjordan.eu>
      Message-id: 1485365075-32702-1-git-send-email-phil@philjordan.eu
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      0cd089e9
  3. 01 2月, 2017 3 次提交
  4. 31 1月, 2017 1 次提交
    • T
      hw/ppc/spapr: Fix boot path of usb-host storage devices · b99260eb
      Thomas Huth 提交于
      When passing through an USB storage device to a pseries guest, it
      is currently not possible to automatically boot from the device
      if the "bootindex" property has been specified, too (e.g. when using
      "-device nec-usb-xhci -device usb-host,hostbus=1,hostaddr=2,bootindex=0"
      at the command line). The problem is that QEMU builds a device tree path
      like "/pci@800000020000000/usb@0/usb-host@1" and passes it to SLOF
      in the /chosen/qemu,boot-list property. SLOF, however, probes the
      USB device, recognizes that it is a storage device and thus changes
      its name to "storage", and additionally adds a child node for the
      SCSI LUN, so the correct boot path in SLOF is something like
      "/pci@800000020000000/usb@0/storage@1/disk@101000000000000" instead.
      So when we detect an USB mass storage device with SCSI interface,
      we've got to adjust the firmware boot-device path properly that
      SLOF can automatically boot from the device.
      
      Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1354177Signed-off-by: NThomas Huth <thuth@redhat.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      b99260eb
  5. 28 1月, 2017 1 次提交
  6. 25 1月, 2017 5 次提交
  7. 17 1月, 2017 1 次提交
  8. 23 11月, 2016 1 次提交
  9. 10 11月, 2016 2 次提交
  10. 29 10月, 2016 3 次提交
  11. 28 10月, 2016 2 次提交
  12. 24 10月, 2016 6 次提交
  13. 22 10月, 2016 1 次提交
  14. 12 10月, 2016 3 次提交