Hi, >> I can't tell what's going on in your log. Look at the >> FSG_STATE_CONFIG_CHANGE case in handle_exception(). Here's the code: >> >> rc = do_set_config(fsg, new_config); >> if (fsg->ep0_req_tag != exception_req_tag) >> break; >> if (rc != 0) // STALL on errors >> fsg_set_halt(fsg, fsg->ep0); >> else // Complete the status stage >> ep0_queue(fsg); >> break; >> >> It calls do_set_config(). After that, fsg->ep0_req_tag should be equal >> to exception_req_tag and rc should be equal to 0. Therefore the code >> will call ep0_queue(), which calls usb_ep_queue(). > > I found out from printk, the fsg->ep0_req_tag and exception_req_tag > are not equal, and rc is 0. In standard_setup_req(), case > USB_REQ_SET_CONFIGURATION, once i add the following code > > if (w_value == 0) > fsg->config = 0; > > just before the break; statement, the "Device Descriptor > Test-Addressed State" can pass. It seems that Get-Config request from > host cannot wait, so i have to return the latest config value in > response to the request. > > Thanks, > victor
In fact, the "Device Descriptor Test-Addressed State" sometimes passes, sometimes fails after my modification. What is the reason of DELAYED_STATUS in USB_REQ_SET_CONFIGURATION, and the use of handle_exception() to call do_set_config()? Thanks, victor -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html