1. 09 7月, 2012 12 次提交
    • A
      Merge remote-tracking branch 'kraxel/usb.55' into staging · fe0cb8ef
      Anthony Liguori 提交于
      * kraxel/usb.55:
        usb-host: add trace events for iso xfers
        usb: fix interface initialization
        usb: split endpoint init and reset
        usb-redir: Correctly handle the usb_redir_babble usbredir status
        ehci: Kick async schedule on wakeup in the non companion case
        usb-ehci: Fix an assert whenever isoc transfers are used
        ehci: don't flush cache on doorbell rings.
        ehci: fix td writeback
        ehci: fix ehci_qh_do_overlay
      fe0cb8ef
    • A
      Merge remote-tracking branch 'bonzini/scsi-next' into staging · ffd6e7a0
      Anthony Liguori 提交于
      * bonzini/scsi-next:
        scsi: Fix transfer length for READ POSITION commands.
        scsi: Add basic support for SCSI media changer commands.
        scsi: Ensure command and transfer lengths are set for all SCSI devices
        scsi: Fix LOAD_UNLOAD
        scsi: Fix data length == SCSI_SENSE_BUF_SIZE
        virtio-scsi: do not crash on adding buffers to the event queue
        megasas: LSI Megaraid SAS HBA emulation
        megasas: Add header file
        ISCSI: force use of sg for SMC and SSC devices
        ISCSI: Add SCSI passthrough via scsi-generic to libiscsi
        scsi-disk: implement READ DISC INFORMATION
        atapi: implement READ DISC INFORMATION
        scsi: add a qdev property for the disk's WWN
        scsi: simplify handling of the VPD page length field
      ffd6e7a0
    • A
      Merge remote-tracking branch 'stefanha/trivial-patches' into staging · 8665817e
      Anthony Liguori 提交于
      * stefanha/trivial-patches:
        configure: Remove help for --disable-vnc-thread, --enable-vnc-thread
        cpu-common.h: Remove a pointless ifndef CONFIG_USER_ONLY
        cpu-common.h: Remove unnecessary guard on including targphys.h
      8665817e
    • G
      usb-host: add trace events for iso xfers · c32da151
      Gerd Hoffmann 提交于
      Replace iso transfer fprintf's with trace points.  Also rename existing
      tracepoints so they all match usb_host_iso_*.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      c32da151
    • G
      usb: fix interface initialization · 7c37e6a4
      Gerd Hoffmann 提交于
      zero is a valid interface number, so don't use it when resetting the
      endpoints.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      7c37e6a4
    • G
      usb: split endpoint init and reset · 19deaa08
      Gerd Hoffmann 提交于
      Create a new usb_ep_reset() function to reset endpoint state, without
      re-initialiting the queues, so we don't unlink in-flight packets just
      because usb-host has to re-parse the descriptor tables.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      19deaa08
    • H
    • H
      ehci: Kick async schedule on wakeup in the non companion case · 37952117
      Hans de Goede 提交于
      Commit 0f588df8, added code
      to ehci_wakeup to kick the async schedule on wakeup, but the else
      was positioned wrong making it trigger for devices which are routed
      to the companion rather then to the ehci controller itself.
      
      This patch fixes this. Note that the "programming style" with using the
      return at the end of the companion block matches how the companion case
      is handled in the other ports ops, and is done this way for consistency.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      37952117
    • H
      usb-ehci: Fix an assert whenever isoc transfers are used · 7341ea07
      Hans de Goede 提交于
      hcd-ehci.c is missing an usb_packet_init() call for the ipacket UsbPacket
      it uses for isoc transfers, triggering an assert (taking the entire vm down)
      in usb_packet_setup as soon as any isoc transfers are done by a high speed
      USB device.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      7341ea07
    • G
      ehci: don't flush cache on doorbell rings. · 9bc3a3a2
      Gerd Hoffmann 提交于
      Commit 4be23939 makes ehci instantly
      zap any unlinked queue heads when the guest rings the doorbell.
      
      While hacking up uas support this turned out to be a problem.  The linux
      kernel can unlink and instantly relink the very same queue head, thereby
      killing any async packets in flight.  That alone isn't an issue yet, the
      packet will canceled and resubmitted and everything is fine.  We'll run
      into trouble though in case the async packet is completed already, so we
      can't cancel it any more.  The transaction is simply lost then.
      
      usb_ehci_qh_ptrs q (nil) - QH @ 39c4f000: next 39c4f122 qtds 00000000,00000001,39c50000
      usb_ehci_qh_fields QH @ 39c4f000 - rl 0, mplen 0, eps 0, ep 0, dev 0
      usb_ehci_qh_ptrs q 0x7f95feba90a0 - QH @ 39c4f000: next 39c4f122 qtds 00000000,00000001,39c50000
      usb_ehci_qh_fields QH @ 39c4f000 - rl 0, mplen 0, eps 0, ep 0, dev 0
      usb_ehci_qh_ptrs q 0x7f95fe515210 - QH @ 39c4f120: next 39c4f0c2 qtds 29dbce40,29dbc4e0,00000009
      usb_ehci_qh_fields QH @ 39c4f120 - rl 4, mplen 512, eps 2, ep 1, dev 2
      usb_ehci_packet_action q 0x7f95fe515210 p 0x7f95fdec32a0: alloc
      usb_packet_state_change bus 0, port 2, ep 1, packet 0x7f95fdec32e0, state undef -> setup
      usb_ehci_packet_action q 0x7f95fe515210 p 0x7f95fdec32a0: process
      usb_uas_command dev 2, tag 0x2, lun 0, lun64 00000000-00000000
      scsi_req_parsed target 0 lun 0 tag 2 command 42 dir 2 length 16384
      scsi_req_parsed_lba target 0 lun 0 tag 2 command 42 lba 5933312
      scsi_req_alloc target 0 lun 0 tag 2
      scsi_req_continue target 0 lun 0 tag 2
      scsi_req_data target 0 lun 0 tag 2 len 16384
      usb_uas_scsi_data dev 2, tag 0x2, bytes 16384
      usb_uas_write_ready dev 2, tag 0x2
      usb_packet_state_change bus 0, port 2, ep 1, packet 0x7f95fdec32e0, state setup -> complete
      usb_ehci_packet_action q 0x7f95fe515210 p 0x7f95fdec32a0: free
      usb_ehci_qh_ptrs q 0x7f95fdec3210 - QH @ 39c4f0c0: next 39c4f002 qtds 29dbce40,00000001,00000009
      usb_ehci_qh_fields QH @ 39c4f0c0 - rl 4, mplen 512, eps 2, ep 2, dev 2
      usb_ehci_queue_action q 0x7f95fe5152a0: free
      usb_packet_state_change bus 0, port 2, ep 2, packet 0x7f95feba9170, state async -> complete
      ^^^ async packets completes.
      usb_ehci_packet_action q 0x7f95fdec3210 p 0x7f95feba9130: wakeup
      
      usb_ehci_qh_ptrs q (nil) - QH @ 39c4f000: next 39c4f122 qtds 00000000,00000001,39c50000
      usb_ehci_qh_fields QH @ 39c4f000 - rl 0, mplen 0, eps 0, ep 0, dev 0
      usb_ehci_qh_ptrs q 0x7f95feba90a0 - QH @ 39c4f000: next 39c4f122 qtds 00000000,00000001,39c50000
      usb_ehci_qh_fields QH @ 39c4f000 - rl 0, mplen 0, eps 0, ep 0, dev 0
      usb_ehci_qh_ptrs q 0x7f95fe515210 - QH @ 39c4f120: next 39c4f002 qtds 29dbc4e0,29dbc8a0,00000009
      usb_ehci_qh_fields QH @ 39c4f120 - rl 4, mplen 512, eps 2, ep 1, dev 2
      usb_ehci_queue_action q 0x7f95fdec3210: free
      usb_ehci_packet_action q 0x7f95fdec3210 p 0x7f95feba9130: free
      ^^^ endpoint #2 queue head removed from schedule, doorbell makes ehci zap the queue,
          the (completed) usb packet is freed too and gets lost.
      
      usb_ehci_qh_ptrs q (nil) - QH @ 39c4f000: next 39c4f0c2 qtds 00000000,00000001,39c50000
      usb_ehci_qh_fields QH @ 39c4f000 - rl 0, mplen 0, eps 0, ep 0, dev 0
      usb_ehci_qh_ptrs q 0x7f95feba90a0 - QH @ 39c4f000: next 39c4f0c2 qtds 00000000,00000001,39c50000
      usb_ehci_qh_fields QH @ 39c4f000 - rl 0, mplen 0, eps 0, ep 0, dev 0
      usb_ehci_queue_action q 0x7f9600dff570: alloc
      usb_ehci_qh_ptrs q 0x7f9600dff570 - QH @ 39c4f0c0: next 39c4f122 qtds 29dbce40,00000001,00000009
      usb_ehci_qh_fields QH @ 39c4f0c0 - rl 4, mplen 512, eps 2, ep 2, dev 2
      usb_ehci_packet_action q 0x7f9600dff570 p 0x7f95feba9130: alloc
      usb_packet_state_change bus 0, port 2, ep 2, packet 0x7f95feba9170, state undef -> setup
      usb_ehci_packet_action q 0x7f9600dff570 p 0x7f95feba9130: process
      usb_packet_state_change bus 0, port 2, ep 2, packet 0x7f95feba9170, state setup -> async
      usb_ehci_packet_action q 0x7f9600dff570 p 0x7f95feba9130: async
      ^^^ linux kernel relinked the queue head, ehci creates a new usb packet,
          but we should have delivered the completed one instead.
      usb_ehci_qh_ptrs q 0x7f95fe515210 - QH @ 39c4f120: next 39c4f002 qtds 29dbc4e0,29dbc8a0,00000009
      usb_ehci_qh_fields QH @ 39c4f120 - rl 4, mplen 512, eps 2, ep 1, dev 2
      
      So instead of instantly zapping the queue we'll set a flag that the
      queue needs revalidation in case we'll see it again in the schedule.
      ehci then checks that the queue head fields addressing / describing the
      endpoint and the qtd pointer match the cached content before reusing it.
      
      Cc: Hans de Goede <hdegoede@redhat.com>
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      9bc3a3a2
    • G
      ehci: fix td writeback · 4ed1c57a
      Gerd Hoffmann 提交于
      Only write back the dwords the hc is supposed to update.  Should not
      make a difference in theory as the guest must not touch the td while
      it is active to avoid races.  But it is still more correct.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      4ed1c57a
    • G
      ehci: fix ehci_qh_do_overlay · a5e0139a
      Gerd Hoffmann 提交于
      Use ehci_flush_qh to make sure we touch inly the fields the hc is
      allowed to touch.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      a5e0139a
  2. 07 7月, 2012 6 次提交
  3. 06 7月, 2012 1 次提交
  4. 04 7月, 2012 10 次提交
  5. 02 7月, 2012 11 次提交