Files
linux/drivers
William Wu a94285268a usb: xhci: fix issues introduced by enable TRB ENT
This patch fixes two bugs introduced by commit c0bd48bb3e
("usb: xhci: set xhci trb ent quirk based on platform data").

1. Connect with VFAT USB 3.0 disk, do "mount" command cause
   the error log:

   usb 8-1: reset SuperSpeed USB device number 2 using xhci-hcd
   sd 0:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
   sd 0:0:0:0: [sda] tag#0 CDB: Read(10) 28 00 00 00 0d a9 00 00 f0 00
   blk_update_request: I/O error, dev sda, sector 3497

2. Connect with USB 3.0 disks which support UAS mode, mount
   fail with the error log:

   xhci-hcd xhci-hcd.12.auto: ERROR Transfer event for disabled endpoint slot 1 ep 7 or incorrect stream ring
   xhci-hcd xhci-hcd.12.auto: @00000000f704d1c0 00000000 00000000 0a000000 01088000
   sd 0:0:0:0: [sda] tag#1 uas_eh_abort_handler 0 uas-tag 2 inflight: CMD OUT
   sd 0:0:0:0: [sda] tag#1 CDB: Write(10) 2a 00 00 60 08 06 00 00 02 00
   sd 0:0:0:0: [sda] tag#0 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD OUT
   sd 0:0:0:0: [sda] tag#0 CDB: Write(10) 2a 00 00 00 08 16 00 00 02 00
   scsi host0: uas_eh_bus_reset_handler start
   xhci-hcd xhci-hcd.12.auto: ERROR Transfer event for disabled endpoint slot 1 ep 4 or incorrect stream ring

It's because that in the above two cases, the transfer length
of the first TRB in the URB maybe not an integer multiple of
the EP maxpacket, and if we enable the ENT flag in the any
TRB of the URB, it will cause xHCI babble error.

This patch avoids to enable the ENT flag if the transfer
length of the first TRB isn't an integer multiple of the
EP maxpacket, or if the EP support bulk streaming protocol.

Fixes: c0bd48bb3e ("usb: xhci: set xhci trb ent quirk based on platform data")
Change-Id: I07fef2903bd1024f6e5aa1e253cb86f538083e31
Signed-off-by: William Wu <william.wu@rock-chips.com>
2019-01-22 14:07:54 +08:00
..
2018-07-22 14:25:52 +02:00
2018-11-10 07:41:42 -08:00
2018-11-21 09:27:36 +01:00
2018-11-27 16:08:02 +01:00
2018-10-10 08:52:04 +02:00
2018-05-23 09:26:14 +08:00