Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 280796
b: refs/heads/master
c: bc677d5
h: refs/heads/master
v: v3
  • Loading branch information
Clemens Ladisch authored and Greg Kroah-Hartman committed Dec 10, 2011
1 parent ef0eeaa commit 7172a61
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8ad028bd973ec1ead4982e21ab0400c956aff4b5
refs/heads/master: bc677d5b64644c399cd3db6a905453e611f402ab
5 changes: 2 additions & 3 deletions trunk/drivers/usb/core/hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1398,11 +1398,10 @@ int usb_hcd_map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb,
ret = -EAGAIN;
else
urb->transfer_flags |= URB_DMA_MAP_SG;
if (n != urb->num_sgs) {
urb->num_sgs = n;
urb->num_mapped_sgs = n;
if (n != urb->num_sgs)
urb->transfer_flags |=
URB_DMA_SG_COMBINED;
}
} else if (urb->sg) {
struct scatterlist *sg = urb->sg;
urb->transfer_dma = dma_map_page(
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/usb/host/ehci-q.c
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ qh_urb_transaction (
/*
* data transfer stage: buffer setup
*/
i = urb->num_sgs;
i = urb->num_mapped_sgs;
if (len > 0 && i > 0) {
sg = urb->sg;
buf = sg_dma_address(sg);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/usb/host/uhci-q.c
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,7 @@ static int uhci_submit_common(struct uhci_hcd *uhci, struct urb *urb,
if (usb_pipein(urb->pipe))
status |= TD_CTRL_SPD;

i = urb->num_sgs;
i = urb->num_mapped_sgs;
if (len > 0 && i > 0) {
sg = urb->sg;
data = sg_dma_address(sg);
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/usb/host/whci/qset.c
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ static int qset_add_urb_sg(struct whc *whc, struct whc_qset *qset, struct urb *u

remaining = urb->transfer_buffer_length;

for_each_sg(urb->sg, sg, urb->num_sgs, i) {
for_each_sg(urb->sg, sg, urb->num_mapped_sgs, i) {
dma_addr_t dma_addr;
size_t dma_remaining;
dma_addr_t sp, ep;
Expand Down Expand Up @@ -561,7 +561,7 @@ static int qset_add_urb_sg_linearize(struct whc *whc, struct whc_qset *qset,

remaining = urb->transfer_buffer_length;

for_each_sg(urb->sg, sg, urb->num_sgs, i) {
for_each_sg(urb->sg, sg, urb->num_mapped_sgs, i) {
size_t len;
size_t sg_remaining;
void *orig;
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/usb/host/xhci-ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -2551,7 +2551,7 @@ static unsigned int count_sg_trbs_needed(struct xhci_hcd *xhci, struct urb *urb)
struct scatterlist *sg;

sg = NULL;
num_sgs = urb->num_sgs;
num_sgs = urb->num_mapped_sgs;
temp = urb->transfer_buffer_length;

xhci_dbg(xhci, "count sg list trbs: \n");
Expand Down Expand Up @@ -2735,7 +2735,7 @@ static int queue_bulk_sg_tx(struct xhci_hcd *xhci, gfp_t mem_flags,
return -EINVAL;

num_trbs = count_sg_trbs_needed(xhci, urb);
num_sgs = urb->num_sgs;
num_sgs = urb->num_mapped_sgs;
total_packet_count = roundup(urb->transfer_buffer_length,
usb_endpoint_maxp(&urb->ep->desc));

Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -1221,6 +1221,7 @@ struct urb {
void *transfer_buffer; /* (in) associated data buffer */
dma_addr_t transfer_dma; /* (in) dma addr for transfer_buffer */
struct scatterlist *sg; /* (in) scatter gather buffer list */
int num_mapped_sgs; /* (internal) mapped sg entries */
int num_sgs; /* (in) number of entries in the sg list */
u32 transfer_buffer_length; /* (in) data buffer length */
u32 actual_length; /* (return) actual transfer length */
Expand Down

0 comments on commit 7172a61

Please sign in to comment.