Re: Question on HCD endpoint_reset() and MSD/UB driver

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

 



On Wed, 10 Jun 2009 12:23:52 -0700, Sarah Sharp <sarah.a.sharp@xxxxxxxxxxxxxxx> wrote:

> The problem with a callback is I'm not sure if drivers would be happy
> with a callback that runs in interrupt context. []

Of course they would.

You're way overthinking it. For drivers that clear halts in process
context, you add a new function
 usb_reset_endpoint_sync
Which works just like usb_control_msg: calls the new function
 usb_reset_endpoint_submit   // name does not matter
then waits. Use a little caller-allocated struct "ep_reset" with
callback pointer, ep pointer, callback argument. What can be simpler?

Fix the usb-storage to use the sync version so you know it works.
I'll fix ub for you, so you don't need to learn its state machine.

Once all users flip over to the new functions above, just delete
the one that exists now. The gcc tells you if anything was forgotten.

-- Pete
--
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