Re: Linux USB file storage gadget with new UDC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux