Re: functionfs on dwc3, xhci host: endpoint cannot be used in both directions ?

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

 



Hi,

(it's always a good idea to Cc maintainers of drivers you're having
trouble with :)

Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> writes:

> On Sun, 15 Jan 2017, Vincent Pelletier wrote:
>
>> > An endpoint can not work in both directions, that's not how USB
>> > endpoints work at all.  I think you are confusing the hardware with your
>> > configuration :)
>> 
>> I do agree that I have never noticed in the wild a device using a
>> non-zero endpoint (4 LSb) in both directions (1 MSb) - and maybe there
>> is no host OS support anywhere.
>
> I have seen such devices mentioned in the mailing list.  They work 
> fine.
>
>> On the spec level though, I am less sure. Quoting the USB (v2) spec:
> ...
>
> The USB spec allows such things.
>
>> So there is either a bug in the HCI side, or in the UDC side:
>> - either the HCI should support bidirectional-ish endpoints (same
>>   4 LSb, different 1 MSb). Would this limitation be a hardware one ?
>
> I don't know about DWC.  The host controllers drivers I maintain work 
> okay when two endpoints have the same number but different directions.
>
> What sort of host controller do you test with?
>
> What does usbmon show?

also, which kernel are you running on dwc3 side? Which platform is it?

In order to have any idea of what's going on, I need tracepoints from
dwc3.

# mkdir -p /t
# mount -t tracefs none /t
# cd /t
# echo 10240 > buffer_size_kb
# echo 1 > events/dwc3/enable
# echo 0 > events/dwc3/dwc3_readl/enable
# echo 0 > events/dwc3/dwc3_writel/enable

(run tests, cause it to fail)

# cp /t/trace /path/to/non-volatile/media/dwc3-trace.txt

compress and send me traces

> What happens when you run your test with dummy-hcd?

this is a good idea too.

>> - or the UDC endpoint auto-allocation mechanism must skip an endpoint
>>   when it is already used in the other direction
>
> This could be a bug in the UDC driver.

We don't even know which kernel he's running on dwc3 side :-) It could
also be a bug on his python functionfs lib. At this point, it could be
many things.

Vincent, can you compile my xhci-cleanup branch from my usb.org tree
(see MAINTAINERS file for the URL. Hint, it's on git.kernel.org) and run
it on your xHCI side and *also* capture tracepoints from xHCI?

# mkdir -p /t
# mount -t tracefs none /t
# cd /t
# echo 10240 > buffer_size_kb
# echo 1 > events/xhci-hcd/enable

(run tests, cause it to fail)

# cp /t/trace /path/to/non-volatile/media/xhci-trace.txt

again, compress and send me traces.

-- 
balbi
--
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