summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/whci/whcd.h
diff options
context:
space:
mode:
authorDavid Vrabel <david.vrabel@csr.com>2009-08-24 15:02:27 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2009-12-11 11:55:14 -0800
commit294a39e7829dfd663e6c5c94cede0c6a0c13e37f (patch)
treec9157a84b52aa64f29ce445e1e86a4f4523d8d39 /drivers/usb/host/whci/whcd.h
parent4c1bd3d7a7d114dabd58f62f386ac4bfd268be1f (diff)
downloadlinux-294a39e7829dfd663e6c5c94cede0c6a0c13e37f.tar.gz
linux-294a39e7829dfd663e6c5c94cede0c6a0c13e37f.tar.bz2
linux-294a39e7829dfd663e6c5c94cede0c6a0c13e37f.zip
USB: whci-hcd: support urbs with scatter-gather lists
Support urbs with scatter-gather lists by trying to fit sg list elements into page lists in one or more qTDs. qTDs must end on a wMaxPacketSize boundary so if this isn't possible the urb's sg list must be copied into bounce buffers. Signed-off-by: David Vrabel <david.vrabel@csr.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/whci/whcd.h')
-rw-r--r--drivers/usb/host/whci/whcd.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/usb/host/whci/whcd.h b/drivers/usb/host/whci/whcd.h
index 24e94d983c5e..c80c7d93bc4a 100644
--- a/drivers/usb/host/whci/whcd.h
+++ b/drivers/usb/host/whci/whcd.h
@@ -84,6 +84,11 @@ struct whc {
* @len: the length of data in the associated TD.
* @ntds_remaining: number of TDs (starting from this one) in this transfer.
*
+ * @bounce_buf: a bounce buffer if the std was from an urb with a sg
+ * list that could not be mapped to qTDs directly.
+ * @bounce_sg: the first scatterlist element bounce_buf is for.
+ * @bounce_offset: the offset into bounce_sg for the start of bounce_buf.
+ *
* Queued URBs may require more TDs than are available in a qset so we
* use a list of these "software TDs" (sTDs) to hold per-TD data.
*/
@@ -97,6 +102,10 @@ struct whc_std {
int num_pointers;
dma_addr_t dma_addr;
struct whc_page_list_entry *pl_virt;
+
+ void *bounce_buf;
+ struct scatterlist *bounce_sg;
+ unsigned bounce_offset;
};
/**