aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci-ring.c
diff options
context:
space:
mode:
authorMatthew Wilcox <matthew@wil.cx>2010-05-01 14:20:01 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-20 16:21:41 -0400
commit910f8d0cede74beff1eee93cf9cf2a28d7600e66 (patch)
tree663cd91c3d4ca2a71937b0dcaad51b02cae3c9c6 /drivers/usb/host/xhci-ring.c
parent1e429018b646bdf903554e92ead1cda96cc552dc (diff)
USB: Change the scatterlist type in struct urb
Change the type of the URB's 'sg' pointer from a usb_sg_request to a scatterlist. This allows drivers to submit scatter-gather lists without using the usb_sg_wait() interface. It has the added benefit of removing the typecasts that were added as part of patch as1368 (and slightly decreasing the number of pointer dereferences). Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Reviewed-by: Alan Stern <stern@rowland.harvard.edu> Tested-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/xhci-ring.c')
-rw-r--r--drivers/usb/host/xhci-ring.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index 9e27eb0c7004..a67caef265b1 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -1788,7 +1788,7 @@ static unsigned int count_sg_trbs_needed(struct xhci_hcd *xhci, struct urb *urb)
1788 1788
1789 xhci_dbg(xhci, "count sg list trbs: \n"); 1789 xhci_dbg(xhci, "count sg list trbs: \n");
1790 num_trbs = 0; 1790 num_trbs = 0;
1791 for_each_sg(urb->sg->sg, sg, num_sgs, i) { 1791 for_each_sg(urb->sg, sg, num_sgs, i) {
1792 unsigned int previous_total_trbs = num_trbs; 1792 unsigned int previous_total_trbs = num_trbs;
1793 unsigned int len = sg_dma_len(sg); 1793 unsigned int len = sg_dma_len(sg);
1794 1794
@@ -1951,7 +1951,7 @@ static int queue_bulk_sg_tx(struct xhci_hcd *xhci, gfp_t mem_flags,
1951 * the amount of memory allocated for this scatter-gather list. 1951 * the amount of memory allocated for this scatter-gather list.
1952 * 3. TRBs buffers can't cross 64KB boundaries. 1952 * 3. TRBs buffers can't cross 64KB boundaries.
1953 */ 1953 */
1954 sg = urb->sg->sg; 1954 sg = urb->sg;
1955 addr = (u64) sg_dma_address(sg); 1955 addr = (u64) sg_dma_address(sg);
1956 this_sg_len = sg_dma_len(sg); 1956 this_sg_len = sg_dma_len(sg);
1957 trb_buff_len = TRB_MAX_BUFF_SIZE - 1957 trb_buff_len = TRB_MAX_BUFF_SIZE -