[PATCH] usb: core: config: fix SS companion log for interrupt endpoints

raoxu posted 1 patch 4 days, 23 hours ago
drivers/usb/core/config.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] usb: core: config: fix SS companion log for interrupt endpoints
Posted by raoxu 4 days, 23 hours ago
From: Xu Rao <raoxu@uniontech.com>

usb_parse_ss_endpoint_companion() clears bmAttributes when it is
non-zero for control or interrupt endpoints.

The diagnostic message reports Control for control endpoints and Bulk
for the other branch. However, the other branch can only be an
interrupt endpoint because bulk endpoints are handled by the following
else-if branch.

Report the endpoint type as Interrupt instead of Bulk to avoid
misleading descriptor diagnostics.

Signed-off-by: Xu Rao <raoxu@uniontech.com>
---
 drivers/usb/core/config.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c
index 417140b012bb..7ab27c371e0e 100644
--- a/drivers/usb/core/config.c
+++ b/drivers/usb/core/config.c
@@ -160,7 +160,7 @@ static void usb_parse_ss_endpoint_companion(struct device *ddev, int cfgno,
 		dev_notice(ddev, "%s endpoint with bmAttributes = %d in "
 				"config %d interface %d altsetting %d ep %d: "
 				"setting to zero\n",
-				usb_endpoint_xfer_control(&ep->desc) ? "Control" : "Bulk",
+				usb_endpoint_xfer_control(&ep->desc) ? "Control" : "Interrupt",
 				desc->bmAttributes,
 				cfgno, inum, asnum, ep->desc.bEndpointAddress);
 		ep->ss_ep_comp.bmAttributes = 0;
--
2.50.1
Re: [PATCH] usb: core: config: fix SS companion log for interrupt endpoints
Posted by Mathias Nyman 4 days, 21 hours ago
On 6/3/26 09:25, raoxu wrote:
> From: Xu Rao <raoxu@uniontech.com>
> 
> usb_parse_ss_endpoint_companion() clears bmAttributes when it is
> non-zero for control or interrupt endpoints.
> 
> The diagnostic message reports Control for control endpoints and Bulk
> for the other branch. However, the other branch can only be an
> interrupt endpoint because bulk endpoints are handled by the following
> else-if branch.
> 
> Report the endpoint type as Interrupt instead of Bulk to avoid
> misleading descriptor diagnostics.
> 
> Signed-off-by: Xu Rao <raoxu@uniontech.com>

Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>