Message ID | cover.1609865348.git.Thinh.Nguyen@synopsys.com (mailing list archive) |
---|---|
Headers | show |
Series | usb: dwc3: gadget: Check for multiple start/stop | expand |
On 21-01-05 08:56:28, Thinh Nguyen wrote: > Add some checks to avoid going through the start/stop sequence if the gadget > had already started/stopped. This series base-commit is Greg's usb-linus > branch. > Hi Thinh, What's the sequence your could reproduce it? Peter > > > Thinh Nguyen (2): > usb: dwc3: gadget: Check if the gadget had started > usb: dwc3: gadget: Check if the gadget had stopped > > drivers/usb/dwc3/gadget.c | 28 ++++++++++++---------------- > 1 file changed, 12 insertions(+), 16 deletions(-) > > > base-commit: 96ebc9c871d8a28fb22aa758dd9188a4732df482 > -- > 2.28.0 >
Hi Peter, Peter Chen wrote: > On 21-01-05 08:56:28, Thinh Nguyen wrote: >> Add some checks to avoid going through the start/stop sequence if the gadget >> had already started/stopped. This series base-commit is Greg's usb-linus >> branch. >> > Hi Thinh, > > What's the sequence your could reproduce it? > > Peter You can test as follow: # echo connect > /sys/class/udc/<UDC>/soft_connect # echo connect > /sys/class/udc/<UDC>/soft_connect and # echo disconnect > /sys/class/udc/<UDC>/soft_connect # echo disconnect > /sys/class/udc/<UDC>/soft_connect Thinh >> >> Thinh Nguyen (2): >> usb: dwc3: gadget: Check if the gadget had started >> usb: dwc3: gadget: Check if the gadget had stopped >> >> drivers/usb/dwc3/gadget.c | 28 ++++++++++++---------------- >> 1 file changed, 12 insertions(+), 16 deletions(-) >> >> >> base-commit: 96ebc9c871d8a28fb22aa758dd9188a4732df482 >> -- >> 2.28.0 >>
On 21-01-08 02:40:55, Thinh Nguyen wrote: > Hi Peter, > > Peter Chen wrote: > > On 21-01-05 08:56:28, Thinh Nguyen wrote: > >> Add some checks to avoid going through the start/stop sequence if the gadget > >> had already started/stopped. This series base-commit is Greg's usb-linus > >> branch. > >> > > Hi Thinh, > > > > What's the sequence your could reproduce it? > > > > Peter > > You can test as follow: > > # echo connect > /sys/class/udc/<UDC>/soft_connect > # echo connect > /sys/class/udc/<UDC>/soft_connect > > and > > # echo disconnect > /sys/class/udc/<UDC>/soft_connect > # echo disconnect > /sys/class/udc/<UDC>/soft_connect > > Thinh > Thanks, now I reproduce the issue. Another improvement you might consider adding is checking return value for usb_gadget_udc_start at soft_connect_store.