Hi, According to xHCI spec Rev1 page 125, Endpoint context state diagram. When reset device, the endpoint state transit to disabled state. Do I make some mistake? I'll try to figure out the endopint state transitions during the reset flow, and update information later. Thanks for the direction. Soar From: Alan Stern [mailto:stern@xxxxxxxxxxxxxxxxxxx] Sent: Thursday, January 31, 2013 12:22 AM To: 洪崇耕 Cc: linux-usb@xxxxxxxxxxxxxxx Subject: RE: Not enough resource for old configuration after USB bus reset On Wed, 30 Jan 2013, [big5] x R wrote: > Hi all, > > We try to reproduce the problem on general desktop with ubuntu 12.04.1 and 12.10, and got some information below: > > 1. If we use xHci with Ti TUSB7340 chip, do bus reset or plug/unplug 1000+ times, the host fail to configure the device. > If we use xHci with Fresco chip, it operats without error. > > 2. If the usb device contains only Control/Bulk type endpoints, it's all right. > If it contains interrupt/isoc (periodic) endpoint, it will fail with bandwidth error. > I check the source and find that the bandwidth_error is the TRB_completion_code of configure_endpoint command. > > In addition, I try to study the usb_reset_and_verify_device and want to consult the following question. > > When reseting a device, hcd will invoke usb_hcd_alloc_bandwidth, this > function will drop the endpoints and add the endpoints. > > When executing drop_endpoint, the function shows error message xHCI called with disabled ep. > And I confirm that ep_state of end point context is in disabled state this time. Why is the endpoint already disabled? It shouldn't be. > Then usb_hcd_alloc_bandwidth invokes add_endpoint. > Last, sending a configure endpoint command to complete the change. > > The xHCI spec says configure endpoint should ignore disabled endpoints drop flag and do nothing. > So the source is correct according to spec. > But the overall behavior is adding the endpoint without dropping the old endpoint. > > Is this what we want? Don't we need dropping endpoints to release the > bandwidth and/or resource before the endpoints goes to disabled state without freeing bandwidth? Yes. It would work okay if the endpoint wasn't already disabled. Can you figure out how the endpoint became disabled in the first place? Alan Stern ?頨{.n?????%??橆??w?{.n???{殺???緡w*jg炳????▏?拷G??98夸:+v??鋟喓???茶庫全??ㄑ搬?????