Re: [PATCH v2] usb: xhci: add debugfs support for ep with stream

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

 



>> I think this debugfs code is just called too early. It shouldn't need to check new_ring
>> pointer at all.
>>
>> I wrote a fix that changes the order and makes sure endpoint is enabled and ring
>> pointer is set correctly before we call xhci_debugfs_create_endpoint()
>>
>> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.kernel.o
>> rg%2Fpub%2Fscm%2Flinux%2Fkernel%2Fgit%2Fmnyman%2Fxhci.git%2Fcommit%2F%3Fh%3Dfo
>> r-usb-linus%26id%3Dcf99aef5624a592fd4f3374c7060bfa1a65f15df&data=02%7C01%7
>> Cjun.li%40nxp.com%7C73e4663a6f6641fbb8b308d84f3d021a%7C686ea1d3bc2b4c6fa92cd99
>> c5c301635%7C0%7C0%7C637346470803922895&sdata=i4DfCW8EVUSAWnzb8Ql4jPjAOD5wp
>> tfbaMrO8vKvtDc%3D&reserved=0
> 
> This is a good place for non-zero Eps, but does not cover ep0.
> 

ep0 is special, it's not touched in these add/drop endpoint or check bandwidth
functions.

ep0 ring is allocated earlier during slot creation in
xhci_alloc_virt_device()
  ...
  /* Allocate endpoint 0 ring */
  dev->eps[0].ring = xhci_ring_alloc(xhci, 2, 1, TYPE_CTRL, 0, flags);

and for debugfs ep00 is added manually together with the slot
xhci_debugfs_create_slot()
  ...
  xhci_debugfs_create_ring_dir(xhci, &dev->eps[0].ring, "ep00", priv->root);

So regarding ep0 the change should be ok.

-Mathias



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

  Powered by Linux