1. 31 8月, 2013 1 次提交
  2. 23 8月, 2013 1 次提交
  3. 27 7月, 2013 1 次提交
  4. 04 7月, 2013 3 次提交
  5. 24 6月, 2013 3 次提交
  6. 20 6月, 2013 1 次提交
  7. 23 4月, 2013 1 次提交
    • H
      ehci_free_packet: Discard finished packets when the queue is halted · e449f26b
      Hans de Goede 提交于
      With pipelining it is possible to encounter a finished packet when cleaning
      the queue due to a halt. This happens when a non stall error happens while
      talking to a real device. In this case the queue on the usb-host side will
      continue processing packets, and we can have completed packets waiting in
      the queue after an error condition packet causing a halt.
      
      There are 2 reasons to discard the completed packets at this point, rather
      then trying to writing them back to the guest:
      
      1) The guest expect to be able to cancel and/or change packets after the
      packet with the error without doing an unlink, so writing them back may
      confuse the guest.
      
      2) Since the queue does not advance when halted, the writing back of these
      packets will fail anyways since p->qtdaddr != q->qtdaddr, so the
      ehci_verify_qtd call in ehci_writeback_async_complete_packet will fail.
      
      Note that 2) means that then only functional change this patch introduces
      is the printing of a warning when this scenario happens.
      
      Note that discarding these packets means that the guest driver and the device
      will get out of sync! This is unfortunate, but should not be a problem since
      with a non stall error (iow an io-error) the 2 are out of sync already anyways.
      Still this patch adds a warning to signal this happening.
      
      Note that sofar this has only been seen with a DVB-T receiver, which gives
      of a MPEG-2 stream, which allows for recovering from lost packets, see:
      https://bugzilla.redhat.com/show_bug.cgi?id=890320Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      e449f26b
  8. 19 2月, 2013 1 次提交
  9. 14 1月, 2013 1 次提交
  10. 07 1月, 2013 12 次提交
  11. 04 12月, 2012 1 次提交
    • H
      ehci: Lower timer freq when the periodic schedule is idle · 80826240
      Hans de Goede 提交于
      Lower the timer freq if no iso schedule packets complete for 64 frames in
      a row.
      
      We can safely do this, without adding latency, because:
      1) If there is isoc traffic this will never trigger
      2) For async handled interrupt packets (only usb-host), the completion handler
         will immediately schedule the frame_timer from a bh
      3) All devices using NAK to signal no data for interrupt endpoints now use
         wakeup, which will immediately schedule the frame_timer from a bh
      
      The advantage of this is that when we only have interrupt packets in the
      periodic schedule, async_stepdown can do its work and significantly lower
      the frequency at which the frame_timer runs.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      80826240
  12. 16 11月, 2012 6 次提交
  13. 09 11月, 2012 3 次提交
    • H
    • H
      ehci: Get rid of the magical PROC_ERR status · 01e26b0e
      Hans de Goede 提交于
      Instead make ehci_execute and ehci_fill_queue return the again value.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      01e26b0e
    • 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
  14. 01 11月, 2012 5 次提交