aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-q.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor_core@ameritech.net>2006-01-05 22:25:13 -0500
committerDmitry Torokhov <dtor_core@ameritech.net>2006-01-05 22:25:13 -0500
commitfed8bf19ec20efc0641740b2d10aa589dbd6d1ab (patch)
treec104a13c7b8cb7f4152b15729dc5aede7c063e91 /drivers/usb/host/ehci-q.c
parente7c3aad53dba54d375b632f2a21b680546828dec (diff)
parent46f25dffbaba48c571d75f5f574f31978287b8d2 (diff)
Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/usb/host/ehci-q.c')
-rw-r--r--drivers/usb/host/ehci-q.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c
index bf03ec0d8ee2..9b13bf2fa98d 100644
--- a/drivers/usb/host/ehci-q.c
+++ b/drivers/usb/host/ehci-q.c
@@ -514,18 +514,18 @@ qh_urb_transaction (
514 qtd->urb = urb; 514 qtd->urb = urb;
515 qtd_prev->hw_next = QTD_NEXT (qtd->qtd_dma); 515 qtd_prev->hw_next = QTD_NEXT (qtd->qtd_dma);
516 list_add_tail (&qtd->qtd_list, head); 516 list_add_tail (&qtd->qtd_list, head);
517
518 /* for zero length DATA stages, STATUS is always IN */
519 if (len == 0)
520 token |= (1 /* "in" */ << 8);
517 } 521 }
518 522
519 /* 523 /*
520 * data transfer stage: buffer setup 524 * data transfer stage: buffer setup
521 */ 525 */
522 if (likely (len > 0)) 526 buf = urb->transfer_dma;
523 buf = urb->transfer_dma;
524 else
525 buf = 0;
526 527
527 /* for zero length DATA stages, STATUS is always IN */ 528 if (is_input)
528 if (!buf || is_input)
529 token |= (1 /* "in" */ << 8); 529 token |= (1 /* "in" */ << 8);
530 /* else it's already initted to "out" pid (0 << 8) */ 530 /* else it's already initted to "out" pid (0 << 8) */
531 531
@@ -572,7 +572,7 @@ qh_urb_transaction (
572 * control requests may need a terminating data "status" ack; 572 * control requests may need a terminating data "status" ack;
573 * bulk ones may need a terminating short packet (zero length). 573 * bulk ones may need a terminating short packet (zero length).
574 */ 574 */
575 if (likely (buf != 0)) { 575 if (likely (urb->transfer_buffer_length != 0)) {
576 int one_more = 0; 576 int one_more = 0;
577 577
578 if (usb_pipecontrol (urb->pipe)) { 578 if (usb_pipecontrol (urb->pipe)) {