USB g_mass_storage weirdness

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi guys,

I'm getting a weird behavior with g_mass_storage which I'm yet to verify
if it's a g_mass_storage bug on XHCI bug. So far it points to
g_mass_storage. Below you can see a commented set of trace data (see the
2-patch series I just sent):

[...]

> file-storage-1252  [003] ...1   254.793660: usb_ep_queue: ep1out: length 0/16384 sgs 0/0 stream 0 zsI status -115 --> 0
> file-storage-1252  [003] ...1   254.793669: usb_ep_queue: ep1out: length 0/16384 sgs 0/0 stream 0 zsI status -115 --> 0
>  irq/17-dwc3-1253  [000] d..1   254.793717: usb_gadget_giveback_request: ep1out: length 16384/16384 sgs 0/0 stream 0 zsI status 0 --> 0
>  irq/17-dwc3-1253  [000] d..1   254.793725: usb_gadget_giveback_request: ep1out: length 16384/16384 sgs 0/0 stream 0 zsI status 0 --> 0
> file-storage-1252  [003] ...1   254.793728: usb_ep_queue: ep1out: length 0/16384 sgs 0/0 stream 0 zsI status -115 --> 0
> file-storage-1252  [003] ...1   254.793741: usb_ep_queue: ep1out: length 0/16384 sgs 0/0 stream 0 zsI status -115 --> 0
>  irq/17-dwc3-1253  [000] d..1   254.793792: usb_gadget_giveback_request: ep1out: length 16384/16384 sgs 0/0 stream 0 zsI status 0 --> 0
>  irq/17-dwc3-1253  [000] d..1   254.793799: usb_gadget_giveback_request: ep1out: length 16384/16384 sgs 0/0 stream 0 zsI status 0 --> 0
> file-storage-1252  [003] ...1   254.793807: usb_ep_queue: ep1out: length 0/16384 sgs 0/0 stream 0 zsI status -115 --> 0
> file-storage-1252  [003] ...1   254.793815: usb_ep_queue: ep1out: length 0/16384 sgs 0/0 stream 0 zsI status -115 --> 0
>  irq/17-dwc3-1253  [000] d..1   254.793863: usb_gadget_giveback_request: ep1out: length 16384/16384 sgs 0/0 stream 0 zsI status 0 --> 0
>  irq/17-dwc3-1253  [000] d..1   254.793869: usb_gadget_giveback_request: ep1out: length 16384/16384 sgs 0/0 stream 0 zsI status 0 --> 0
> file-storage-1252  [003] ...1   254.793877: usb_ep_queue: ep1out: length 0/16384 sgs 0/0 stream 0 zsI status -115 --> 0
> file-storage-1252  [003] ...1   254.793885: usb_ep_queue: ep1out: length 0/16384 sgs 0/0 stream 0 zsI status -115 --> 0
>  irq/17-dwc3-1253  [000] d..1   254.793934: usb_gadget_giveback_request: ep1out: length 16384/16384 sgs 0/0 stream 0 zsI status 0 --> 0
>  irq/17-dwc3-1253  [000] d..1   254.793941: usb_gadget_giveback_request: ep1out: length 16384/16384 sgs 0/0 stream 0 zsI status 0 --> 0
> file-storage-1252  [003] ...1   254.793950: usb_ep_queue: ep1out: length 0/16384 sgs 0/0 stream 0 zsI status -115 --> 0
>  irq/17-dwc3-1253  [000] d..1   254.794007: usb_gadget_giveback_request: ep1out: length 16384/16384 sgs 0/0 stream 0 zsI status 0 --> 0
>  irq/17-dwc3-1253  [000] d..1   254.794014: usb_gadget_giveback_request: ep1out: length 16384/16384 sgs 0/0 stream 0 zsI status 0 --> 0
>  irq/17-dwc3-1253  [000] d..1   254.794079: usb_gadget_giveback_request: ep1out: length 16384/16384 sgs 0/0 stream 0 zsI status 0 --> 0
> file-storage-1252  [003] ...1   254.794092: usb_ep_queue: ep1in: length 0/13 sgs 0/0 stream 0 zsI status -115 --> 0
> file-storage-1252  [003] ...1   254.794096: usb_ep_queue: ep1out: length 0/1024 sgs 0/0 stream 0 zsI status -115 --> 0
>  irq/17-dwc3-1253  [000] d..1   254.794159: usb_gadget_giveback_request: ep1in: length 13/13 sgs 0/0 stream 0 zsI status 0 --> 0

finished our transfer. All my transfers are 1MiB in size (2048 sectors)

>  irq/17-dwc3-1253  [000] d..1   254.794162: usb_gadget_giveback_request: ep1out: length 31/1024 sgs 0/0 stream 0 zsI status 0 --> 0

dwc3 just received CBW and gave it back to the device

>  irq/17-dwc3-1253  [000] d..1   254.804555: usb_gadget_vbus_draw: speed 5/5 state 7 0mA [sg:out_aligned:self-powered:activated:connected] --> -95

state 7 => CONNECTED, speed is gadget->speed/gadget->max_speed, both are
USB_SPEED_SUPER. In any case, we don't support usb_gadget_vbus_draw.

>  irq/17-dwc3-1253  [000] d..1   315.944886: usb_gadget_vbus_draw: speed 5/5 state 7 0mA [sg:out_aligned:self-powered:activated:connected] --> -95
> file-storage-1252  [003] ...1   315.945556: usb_ep_fifo_flush: ep1in: mps 1024/1024 streams 15 mult 0 burst 16 addr 81 released:enabled --> 1
> file-storage-1252  [003] ...1   315.945561: usb_ep_fifo_flush: ep1out: mps 1024/1024 streams 15 mult 0 burst 16 addr 01 released:enabled --> 1

after 20 seconds of nothing, host just gives up. For some reason,
g_mass_storage didn't start queueing transfers. Any idea off the top of
your heads? The remaining is just the gadget processing USB Reset.

I can gather more data if you want. Just tell me what you need.

cheers

> file-storage-1252  [003] ...1   315.945583: usb_ep_free_request: ep1in: length 13/13 sgs 0/0 stream 0 zsI status 0 --> 0
> file-storage-1252  [003] ...1   315.945585: usb_ep_free_request: ep1out: length 16384/16384 sgs 0/0 stream 0 zsI status 0 --> 0
> file-storage-1252  [003] ...1   315.945587: usb_ep_free_request: ep1in: length 13/13 sgs 0/0 stream 0 zsI status 0 --> 0
> file-storage-1252  [003] ...1   315.945588: usb_ep_free_request: ep1out: length 16384/16384 sgs 0/0 stream 0 zsI status 0 --> 0
> file-storage-1252  [003] ...1   315.945590: usb_ep_free_request: ep1in: length 16384/16384 sgs 0/0 stream 0 zsI status 0 --> 0
> file-storage-1252  [003] ...1   315.945591: usb_ep_free_request: ep1out: length 31/1024 sgs 0/0 stream 0 zsI status 0 --> 0
> file-storage-1252  [003] ...1   315.945592: usb_ep_free_request: ep1in: length 16384/16384 sgs 0/0 stream 0 zsI status 0 --> 0
> file-storage-1252  [003] ...1   315.945594: usb_ep_free_request: ep1out: length 16384/16384 sgs 0/0 stream 0 zsI status 0 --> 0
> file-storage-1252  [003] ...1   315.945606: usb_ep_disable: ep1in: mps 1024/1024 streams 15 mult 0 burst 16 addr 81 released:disabled --> 1
> file-storage-1252  [003] ...1   315.945609: usb_ep_disable: ep1out: mps 1024/1024 streams 15 mult 0 burst 16 addr 01 released:disabled --> 1
>  irq/17-dwc3-1253  [000] d..1   316.059436: usb_ep_queue: ep0out: length 0/8 sgs 0/0 stream 0 zsI status -115 --> 0
>  irq/17-dwc3-1253  [000] d..1   316.059534: usb_gadget_giveback_request: ep0out: length 8/8 sgs 0/0 stream 0 zsI status 0 --> 0
>  irq/17-dwc3-1253  [000] d..1   316.059775: usb_ep_queue: ep0out: length 0/18 sgs 0/0 stream 0 zsI status -115 --> 0
>  irq/17-dwc3-1253  [000] d..1   316.059862: usb_gadget_giveback_request: ep0out: length 18/18 sgs 0/0 stream 0 zsI status 0 --> 0
>  irq/17-dwc3-1253  [000] d..1   316.060086: usb_ep_queue: ep0out: length 0/5 sgs 0/0 stream 0 zsI status -115 --> 0
>  irq/17-dwc3-1253  [000] d..1   316.060171: usb_gadget_giveback_request: ep0out: length 5/5 sgs 0/0 stream 0 zsI status 0 --> 0
>  irq/17-dwc3-1253  [000] d..1   316.060382: usb_ep_queue: ep0out: length 0/22 sgs 0/0 stream 0 zsI status -115 --> 0
>  irq/17-dwc3-1253  [000] d..1   316.060465: usb_gadget_giveback_request: ep0out: length 22/22 sgs 0/0 stream 0 zsI status 0 --> 0
>  irq/17-dwc3-1253  [000] d..1   316.060685: usb_ep_queue: ep0out: length 0/44 sgs 0/0 stream 0 zsI status -115 --> 0
>  irq/17-dwc3-1253  [000] d..1   316.060769: usb_gadget_giveback_request: ep0out: length 44/44 sgs 0/0 stream 0 zsI status 0 --> 0
>  irq/17-dwc3-1253  [000] d..2   316.061328: usb_gadget_vbus_draw: speed 5/5 state 7 0mA [sg:out_aligned:self-powered:activated:connected] --> -95
> file-storage-1252  [003] ...1   316.061399: usb_ep_enable: ep1in: mps 1024/1024 streams 15 mult 0 burst 16 addr 81 released:enabled --> 1
> file-storage-1252  [003] ...1   316.061419: usb_ep_enable: ep1out: mps 1024/1024 streams 15 mult 0 burst 16 addr 01 released:enabled --> 1
> file-storage-1252  [003] ...1   316.061422: usb_ep_alloc_request: ep1in: length 0/0 sgs 0/0 stream 0 zsI status 0 --> 0
> file-storage-1252  [003] ...1   316.061423: usb_ep_alloc_request: ep1out: length 0/0 sgs 0/0 stream 0 zsI status 0 --> 0
> file-storage-1252  [003] ...1   316.061425: usb_ep_alloc_request: ep1in: length 0/0 sgs 0/0 stream 0 zsI status 0 --> 0
> file-storage-1252  [003] ...1   316.061426: usb_ep_alloc_request: ep1out: length 0/0 sgs 0/0 stream 0 zsI status 0 --> 0
> file-storage-1252  [003] ...1   316.061429: usb_ep_alloc_request: ep1in: length 0/0 sgs 0/0 stream 0 zsI status 0 --> 0
> file-storage-1252  [003] ...1   316.061430: usb_ep_alloc_request: ep1out: length 0/0 sgs 0/0 stream 0 zsI status 0 --> 0
> file-storage-1252  [003] ...1   316.061431: usb_ep_alloc_request: ep1in: length 0/0 sgs 0/0 stream 0 zsI status 0 --> 0
> file-storage-1252  [003] ...1   316.061432: usb_ep_alloc_request: ep1out: length 0/0 sgs 0/0 stream 0 zsI status 0 --> 0
> file-storage-1252  [003] dN.2   316.061477: usb_ep_queue: ep0out: length 0/0 sgs 0/0 stream 0 zsI status -115 --> 0
> file-storage-1252  [003] ...1   316.061523: usb_ep_queue: ep1out: length 0/1024 sgs 0/0 stream 0 zsI status -115 --> 0
>  irq/17-dwc3-1253  [000] d..1   316.061557: usb_gadget_giveback_request: ep0out: length 0/0 sgs 0/0 stream 0 zsI status 0 --> 0
>  irq/17-dwc3-1253  [000] d..1   316.061734: usb_gadget_giveback_request: ep0out: length 6/512 sgs 0/0 stream 0 zsI status 0 --> 0
>  irq/17-dwc3-1253  [000] d..1   316.062243: usb_gadget_giveback_request: ep0out: length 6/512 sgs 0/0 stream 0 zsI status 0 --> 0
>  irq/17-dwc3-1253  [000] d..1   316.068204: usb_gadget_giveback_request: ep1out: length 31/1024 sgs 0/0 stream 0 zsI status 0 --> 0
> file-storage-1252  [003] ...1   316.068324: usb_ep_queue: ep1in: length 0/13 sgs 0/0 stream 0 zsI status -115 --> 0
> file-storage-1252  [003] ...1   316.068338: usb_ep_queue: ep1out: length 0/1024 sgs 0/0 stream 0 zsI status -115 --> 0
>  irq/17-dwc3-1253  [000] d..1   316.068458: usb_gadget_giveback_request: ep1in: length 13/13 sgs 0/0 stream 0 zsI status 0 --> 0
>  irq/17-dwc3-1253  [000] d..1   316.068474: usb_gadget_giveback_request: ep1out: length 31/1024 sgs 0/0 stream 0 zsI status 0 --> 0
> file-storage-1252  [003] ...1   316.068562: usb_ep_queue: ep1in: length 0/18 sgs 0/0 stream 0 zsI status -115 --> 0
> file-storage-1252  [003] ...1   316.068570: usb_ep_queue: ep1in: length 0/13 sgs 0/0 stream 0 zsI status -115 --> 0
> file-storage-1252  [003] ...1   316.068583: usb_ep_queue: ep1out: length 0/1024 sgs 0/0 stream 0 zsI status -115 --> 0
>  irq/17-dwc3-1253  [000] d..1   316.068641: usb_gadget_giveback_request: ep1in: length 18/18 sgs 0/0 stream 0 zsI status 0 --> 0
>  irq/17-dwc3-1253  [000] d..1   316.068724: usb_gadget_giveback_request: ep1in: length 13/13 sgs 0/0 stream 0 zsI status 0 --> 0
>  irq/17-dwc3-1253  [000] d..1   316.074216: usb_gadget_giveback_request: ep1out: length 31/1024 sgs 0/0 stream 0 zsI status 0 --> 0
> file-storage-1252  [003] ...1   316.074274: usb_ep_queue: ep1in: length 0/13 sgs 0/0 stream 0 zsI status -115 --> 0
> file-storage-1252  [003] ...1   316.074281: usb_ep_queue: ep1out: length 0/1024 sgs 0/0 stream 0 zsI status -115 --> 0
>  irq/17-dwc3-1253  [000] d..1   316.074414: usb_gadget_giveback_request: ep1in: length 13/13 sgs 0/0 stream 0 zsI status 0 --> 0
>  irq/17-dwc3-1253  [000] d..1   316.075316: usb_gadget_giveback_request: ep1out: length 31/1024 sgs 0/0 stream 0 zsI status 0 --> 0
> file-storage-1252  [003] ...1   316.075365: usb_ep_queue: ep1in: length 0/13 sgs 0/0 stream 0 zsI status -115 --> 0
> file-storage-1252  [003] ...1   316.075379: usb_ep_queue: ep1out: length 0/1024 sgs 0/0 stream 0 zsI status -115 --> 0
>  irq/17-dwc3-1253  [000] d..1   316.075448: usb_gadget_giveback_request: ep1in: length 13/13 sgs 0/0 stream 0 zsI status 0 --> 0
>  irq/17-dwc3-1253  [000] d..1   316.085757: usb_gadget_vbus_draw: speed 5/5 state 7 0mA [sg:out_aligned:self-powered:activated:connected] --> -95

-- 
balbi

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux