From: Max Krasnyansky <maxk@qualcomm.com>
To: David Brownell <david-b@pacbell.net>
Cc: Greg KH <greg@kroah.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-usb-devel@lists.sourceforge.net
Subject: Re: [linux-usb-devel] Re: [Bluetooth] HCI USB driver update. Support for SCO over HCI USB.
Date: Tue, 29 Apr 2003 15:04:53 -0700 [thread overview]
Message-ID: <5.1.0.14.2.20030429145523.10c52e50@unixmail.qualcomm.com> (raw)
In-Reply-To: <3EAEF11B.4070000@pacbell.net>
At 02:39 PM 4/29/2003, David Brownell wrote:
>> I was actually going to ask you guys if you'd be interested
>> in generalizing this _urb_queue() stuff that I have for
>> other drivers. Current URB api does not provide any interface
>> for queueing/linking/etc of URBs in the _driver_ itself.
>
>I only saw fragments of the original patch -- could you be just
>a bit more specific?
>
>If you're suggesting adding some "struct list_head" into
>"struct urb" for exclusive use of the interface's driver
>(instead of urb_list, which is for usbcore/hcd) ... I'd
>agree that'd be a good thing.
>
>In fact I recently got around to adding that to the
>"gadget side" analogue of an URB. For much the same
>kind of reasons as you mentioned.
Basically I'd like to have same kind of API that we have for SKB without
an overhead of SKBs.
Here is what I've done for Bluetooth HCI USB driver.
struct _urb_queue {
struct list_head head;
spinlock_t lock;
};
struct _urb {
struct list_head list;
struct _urb_queue *queue;
int type;
void *priv;
struct urb urb;
};
struct _urb *_urb_alloc(int isoc, int gfp);
static inline void _urb_free(struct _urb *_urb);
static inline void _urb_queue_init(struct _urb_queue *q);
static inline void _urb_queue_head(struct _urb_queue *q, struct _urb *_urb);
static inline void _urb_queue_tail(struct _urb_queue *q, struct _urb *_urb);
static inline void _urb_unlink(struct _urb *_urb);
struct _urb *_urb_dequeue(struct _urb_queue *q);
_urb is an ugly name I know but I couldn't come up with the better one :)
It's now easy to do things like
_urb_queue_tail(&pending_q, _urb);
usb_urb_submit(&_urb->urb);
and
while (_urb = _urb_dequeue(&pending_q))
usb_unlink_urb(&_urb->urb);
etc
Max
next prev parent reply other threads:[~2003-04-29 21:53 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200304290317.h3T3HOdA027579@hera.kernel.org>
2003-04-29 4:15 ` Greg KH
2003-04-29 20:29 ` Max Krasnyansky
2003-04-29 21:15 ` Greg KH
2003-04-29 21:34 ` Oliver Neukum
2003-04-29 21:40 ` Greg KH
2003-04-29 22:24 ` [linux-usb-devel] " Oliver Neukum
2003-04-30 0:44 ` Max Krasnyansky
2003-04-30 7:06 ` Oliver Neukum
2003-04-29 21:55 ` Max Krasnyansky
2003-04-29 22:04 ` Greg KH
2003-04-29 21:39 ` [linux-usb-devel] " David Brownell
2003-04-29 21:37 ` Greg KH
2003-04-29 22:04 ` Max Krasnyansky [this message]
2003-04-30 4:55 ` David Brownell
2003-05-08 22:55 ` Max Krasnyansky
2003-05-09 19:06 ` David Brownell
2003-05-09 19:29 ` Greg KH
2003-05-09 22:35 ` Max Krasnyansky
2003-05-09 22:35 ` Max Krasnyansky
2003-05-09 23:05 ` Greg KH
2003-05-10 0:48 ` David Brownell
2003-05-10 5:06 ` Brad Hards
2003-05-10 5:40 ` Greg KH
2003-05-10 5:55 ` William Lee Irwin III
2003-05-10 6:11 ` Greg KH
2003-05-10 6:14 ` William Lee Irwin III
2003-05-12 17:53 ` Max Krasnyansky
2003-05-12 18:01 ` Greg KH
2003-05-12 18:55 ` Max Krasnyansky
2003-05-12 20:23 ` David Brownell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5.1.0.14.2.20030429145523.10c52e50@unixmail.qualcomm.com \
--to=maxk@qualcomm.com \
--cc=david-b@pacbell.net \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®