2005/10/13, Alan Stern <[EMAIL PROTECTED]>:
> On Wed, 12 Oct 2005, David Brownell wrote:
> > The sl811 code should probably refuse to start() urbs it hasn't marked
> > yet (by setting urb->hcpriv) too. There's no point to maintaining a
> > parallel queue for each endpoint, but it should still ignore URBs that
> > haven't yet been set up both by usbcore and by the HCD. And setting
> > hcpriv is what marks the URB as having been set up by that HCD.
>
> If every HCD is careful not to use URBs that aren't marked (i.e., for
> which urb->hcpriv is NULL), then a single endpoint queue would be okay.
> And it wouldn't be necessary to move the usb_get_urb and atomic_inc
> statements either (or the DMA stuff).
>
Actually it won't work for me ! I use urb->hcpriv _only_ when this urb
is about to be sent by hw...
> We will still have the problem that the HCDs don't have access to the
> spinlock that protects the queue pointers. I suppose the spinlock could
> be EXPORTed.
>
obviously endpoint queues are usbcore's data but used by hcd. hcd
seems to know when an urb is active. Therefore we could export a new
usbcore's function which would be called by hcd to make an urb active:
void usb_make_active(struct usb_hos_endpoint *ep, struct *urb)
{
spin_lock(&hcd_data_lock);
usb_get_urb(urb);
atomic_inc(&urb->use_count);
list_add_tail (&urb->urb_list, &ep->urb_list);
spin_unlock(&hcd_data_lock);
}
Thanks
--
Franck
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel