From 9f9102968a777cfdcf0609a5435b35406f57124c Mon Sep 17 00:00:00 2001 From: Sherry Sun Date: Wed, 31 Jul 2019 17:07:04 -0400 Subject: [PATCH] MLK-22357-3 usb: Clear the value of bEndpointAddress before refill it For one usb controller driver, the transport endpoint address won't change after the driver initialize. So the value of bEndpointAddress have no need to be cleared. But when more than one usb controller drivers are used at the same time, different endpoints address is used by different controller driver usually, it will cause confusion of endpoint address. So the value of bEndpointAddress had better been cleared everytime before we refill endpoint address to it. Signed-off-by: Sherry Sun --- drivers/usb/gadget/epautoconf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/gadget/epautoconf.c b/drivers/usb/gadget/epautoconf.c index ca916b65eb..c908d559bf 100644 --- a/drivers/usb/gadget/epautoconf.c +++ b/drivers/usb/gadget/epautoconf.c @@ -143,6 +143,7 @@ static int ep_matches( /* MATCH!! */ /* report address */ + desc->bEndpointAddress &= 0xF0; if (isdigit(ep->name[2])) { u8 num = simple_strtoul(&ep->name[2], NULL, 10); desc->bEndpointAddress |= num; -- 2.17.1