Hi, On Wed, Mar 20, 2013 at 10:22 PM, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote: > On Wed, 20 Mar 2013, victor yeo wrote: > >> Thanks, i add processing the pending data from FIFO after queue was >> called. The UDC driver can process the SCSI INQUIRY command and SCSI >> READ FORMAT CAPACITIES command now. >> >> In the processing of SCSI READ FORMAT CAPACITIES command, there is >> attention condition. Then the bulk transfer stops completely and >> control transfer is repeated. > > What control transfer? those get descriptor requests. >> How can i solve it? > > First you have to figure out why it isn't working. What does the > debugging information show? Here is some debugging information: receive GET_DESCRIPTOR, 80, 6 index 0 value 200 len 20 receive SET_CONFIGURATION, 0, 9 index 0 value 1 len 0 set curlun->unit_attention_data to SS_NO_SENSE do_set_config() is called because of FSG_STATE_CONFIG_CHANGE do_set_interface() is called set curlun->unit_attention_data to SS_RESET_OCCURRED receive *UNKNOWN*, a1, fe index 0 value 0 len 1 receive SCSI Inquiry receive SCSI read format capacities, get attention condition, curlun->unit_attention_data is 062900 (SS_RESET_OCCURRED) The gadget code is able to process SCSI Inquiry because it does not fulfill the if-condition: if (curlun && curlun->unit_attention_data != SS_NO_SENSE && fsg->cmnd[0] != INQUIRY && fsg->cmnd[0] != REQUEST_SENSE) { Why is curlun->unit_attention_data set to SS_RESET_OCCURRED? Regards, 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