Questions on submitting multiple URBs in an IrDA dongle driver
Alex Villacís Lasso <[email protected]>
| Newsgroups | gmane.linux.usb.devel |
|---|---|
| Message-ID | <[email protected]> |
I was reviewing chapter 13 of Linux Device Drivers, the one about USB.
If I read it correctly, it states that any endpoint of an USB device
supports a queue of URBs, so that a driver can submit several of them
before the first one is finished. I was pondering on this since the IrDA
drivers I have (kingsun-sir in mainline, and ks959-sir/ksdazzle-sir
being reviewed for 2.6.24) follow a simple pattern of submitting at most
one URB for each endpoint of interest (one for reading, one for
writing), or in the case of ks959-sir, one URB per required direction.
Now that kingsun-sir and ks959-sir seem to work without problems, I was
thinking whether I could expect to improve the throughtput for these
dongles by submitting several queued URBs for reading and writing. I
must note that all of these devices are low-speed, and that
kingsun-sir/ksdazzle-sir use interrupt transfers, while ks959-sir uses
control URBs.
1) This might seem to be a stupid question, but is there a hard
guarantee that (in the absence of USB errors) callbacks for queued URBs
(within a single endpoint) will be called in the exact same order on
which the URBs were queued? The chapter on USB in the Linux Device
Drivers book is silent on this.
2) In the case of transmission, all of my drivers issue
netif_stop_queue() when it is time to send a packet
(kingsun_hard_xmit()), leave it stopped after submitting the URB, and
only issue netif_wake_queue() in the callback routine for the Tx URB
used to transmit the wrapped packet. Can I expect any increase of speed
if the driver allocates URBs to be queued at the endpoint, and calls
netif_wake_queue() right after submitting the URB? If so, what steps
should I take to avoid filling up the queue with URBs waiting to be sent?
3) In the case of reception, should I expect any increase of speed if I
submit multiple URBs to poll for available data in the dongle?
I ask this because examination of SnoopyPro logs (even if not completely
reliable) suggests that the Windows drivers do submit more than one URB
for reading and for writing, and I was wondering whether this could be
implemented in the Linux drivers, and whether any speedups are to be
expected.
--
perl -e '$x=2.4;print sprintf("%.0f + %.0f = %.0f\n",$x,$x,$x+$x);'
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel