Strange behavior of CHN bit with dwc3

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

 



Hi Felipe,
I am very sorry for the multiple sending. The previous were rejected because of HTML format because I used gmail web interface.

Hi list,
I tried to enable the high speed, high bandwidth transfer in device mode for iso type on dwc3 based soc. The platform only supports usb device 2.0.

I set the MaxPacketSize to 0x1400 so the host could allocate 3072 bytes for uframe. But when I chain three trbs together, the dwc3 behavior is quite weird:

If I set the individual trb as following:
[ 32.495556] trb: ffffff800080f1b0, trb dump: bpl: 0xec803000,bph: 0x0, size: 0x400, ctrl: 0x469 [ 32.495560] trb: ffffff800080f1c0, trb dump: bpl: 0xec803400,bph: 0x0, size: 0x400, ctrl: 0x469 [ 32.495564] trb: ffffff800080f1d0, trb dump: bpl: 0xec803800,bph: 0x0, size: 0x400, ctrl: 0xc69

It's actually not high bandwidth. Just normal ISO transfer. Everything is fine. I got following msg: [ 32.495909] dwc3_cleanup_done_reqs: trb: ffffff800080f1b0,trb->size: 0x0, trb->ctrl: 0x393dc468, trb_num: 3 [ 32.495915] dwc3_cleanup_done_reqs: trb: ffffff800080f1c0,trb->size: 0x0, trb->ctrl: 0x393e0478, trb_num: 3 [ 32.495920] dwc3_cleanup_done_reqs: trb: ffffff800080f1d0,trb->size: 0x0, trb->ctrl: 0x393e4c78, trb_num: 3

We could see every trb has size to 0 finally.

But if I set the trb chain as:
[ 42.137322] trb: ffffff800080f000, trb dump: bpl: 0xe2a8c000,bph: 0x0, size: 0x2000400, ctrl: 0x46d [ 42.137326] trb: ffffff800080f010, trb dump: bpl: 0xe2a8c400,bph: 0x0, size: 0x400, ctrl: 0x47d [ 42.137330] trb: ffffff800080f020, trb dump: bpl: 0xe2a8c800,bph: 0x0, size: 0x400, ctrl: 0xc79

There are three trbs. The first and second has CHN bit set. The first one has First-ISO type. And the PCM1 filed is set to 2 for the first one. The last one has IOC bit set. I tried to let dwc3 send the first one at DATA2 stage, the second one at DATA1 stage and the third one at DATA0
stage.

But there result is:
[ 42.137872] dwc3_cleanup_done_reqs: trb: ffffff800080f000,trb->size: 0x0, trb->ctrl: 0x2cd7c46c, trb_num: 3 [ 42.137877] dwc3_cleanup_done_reqs: trb: ffffff800080f010,trb->size: 0x400, trb->ctrl: 0x47d, trb_num: 3 [ 42.137891] dwc3_cleanup_done_reqs: trb: ffffff800080f020,trb->size: 0x10000800, trb->ctrl: 0x2cd7cc78, trb_num: 3

Only the first one is transferred correctly.

I saw the kernel code is using CHN bit. SO I believe it works fine. But it doesn't work in my environment. Did I miss some obvious registers? Any comments/hints are appreciated.


Thanks a lot
Yin, Fengwei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



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

  Powered by Linux