Re: Linux USB file storage gadget with new UDC

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

 



Hi,

On Sat, Mar 16, 2013 at 1:49 AM, Felipe Balbi <balbi@xxxxxx> wrote:
> On Fri, Mar 15, 2013 at 11:00:45AM -0400, Alan Stern wrote:
>> On Fri, 15 Mar 2013, Felipe Balbi wrote:
>>
>> > On Fri, Mar 15, 2013 at 04:26:10PM +0800, victor yeo wrote:
>> > > Hi,
>> > >
>> > > > On Fri, Mar 15, 2013 at 01:59:30PM +0800, victor yeo wrote:
>> > > >> For bulk transfer, the new UDC driver has one problem. When SCSI
>> > > >> Inquiry command is received, the UDC driver interrupt routine will
>> > > >> receive it first. However, the queue function is not yet called, and
>> > > >> queue buffer is not yet added. Thus, interrupt routine is not able to
>> > > >> store the SCSI Inquiry command to the queue buffer.
>> > > >>
>> > > >> This is a serious problem, what is the way to synchronise UDC driver
>> > > >> and file storage gadget driver for SCSI command bulk transfer?
>> > > >
>> > > > don't process the interrupt until you receive a queue. Data will be
>> > > > pending in controller's FIFO until then.
>> > > >
>> > >
>> > > change to do exactly that, bulk transfer interrupt come in, don't
>> > > process, then queue function is called to add  queue buffer. After
>> > > that, no more bulk transfer interrupt come in.
>> >
>> > did you process the pending data from FIFO after queue was called ?
>>
>> I'm not sure about the details of how the controller hardware works.
>> But what should happen is this: When the controller receives the bulk
>> packet containing the INQUIRY command, it should send back NAK until it
>> has a buffer ready to store the packet.
>
> right, with all controllers I have seen so far, this means just not
> processing the interrupt, AKA not starting a transfer.
>

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. How can i solve it?

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


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

  Powered by Linux