Re: File Storage Gadget Driver - a small doubt

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

 



On Fri, Jul 24, 2009 at 8:13 PM, Alan Stern<stern@xxxxxxxxxxxxxxxxxxx> wrote:

> dummy-hcd doesn't use buffer heads at all; it uses only usb_requests.
> There's a reason why the structures are named "fsg_buffhd" -- it's
> because they are private to the fsg driver.

Dear Alan,

Thanks for your information and help.

As I explained in my previous emails, I have implemented the multiple
threads (two threads) in the gadget driver and it is working fine when
the storage driver issues commands sequentially. However, when the
storage driver issues the multiple commands (currently 2 commands at a
time) to the gadget driver, the gadget is not able to handle them. The
issue is like this, in the gadget driver, one thread sends the status
on the bulk in pipe which is for 10 bytes where as storage requested 4
bytes and 10 bytes from two different threads. The gadget driver is
expecting 10 bytes first but the bulk_in callback gets 4 bytes which
results in a crash.

Here my question is, the gadget driver first calls (invokes) the
start_transfer method, then only the bulk_in command complete callback
is invoked. But, is there any way to invoke the callback complete
method without calling the start_transfer method. My idea is, if the
callback complete routine called first, then I will send the requested
number of bytes instead of sending the bytes to the upper layer
through start_transfer method.

Please let me know if there are any ideas.

Thanks and Regards,
Madhavi M
--
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