aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/uhci-q.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2005-11-30 11:57:51 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-01-04 16:51:41 -0500
commitfa3465689f93331834a831bbe98e3863701e1068 (patch)
treef8b1186d7ef49289817d54e35cb7cca82fcc3613 /drivers/usb/host/uhci-q.c
parentf0b80fbf294bc4f6ec179b09fd5b63df25188259 (diff)
[PATCH] USB: UHCI: change uhci_explen macro
This patch (as616) changed the uhci_explen macro in uhci-hcd.h so that it now accepts the desired length, rather than length - 1 with special handling for 0. This also fixes a minor bug that would show up only when a driver submits a 0-length bulk URB. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/uhci-q.c')
-rw-r--r--drivers/usb/host/uhci-q.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/usb/host/uhci-q.c b/drivers/usb/host/uhci-q.c
index 7e46887d9e12..ace9d15f85d2 100644
--- a/drivers/usb/host/uhci-q.c
+++ b/drivers/usb/host/uhci-q.c
@@ -596,7 +596,7 @@ static int uhci_submit_control(struct uhci_hcd *uhci, struct urb *urb, struct ur
596 return -ENOMEM; 596 return -ENOMEM;
597 597
598 uhci_add_td_to_urb(urb, td); 598 uhci_add_td_to_urb(urb, td);
599 uhci_fill_td(td, status, destination | uhci_explen(7), 599 uhci_fill_td(td, status, destination | uhci_explen(8),
600 urb->setup_dma); 600 urb->setup_dma);
601 601
602 /* 602 /*
@@ -628,7 +628,7 @@ static int uhci_submit_control(struct uhci_hcd *uhci, struct urb *urb, struct ur
628 destination ^= TD_TOKEN_TOGGLE; 628 destination ^= TD_TOKEN_TOGGLE;
629 629
630 uhci_add_td_to_urb(urb, td); 630 uhci_add_td_to_urb(urb, td);
631 uhci_fill_td(td, status, destination | uhci_explen(pktsze - 1), 631 uhci_fill_td(td, status, destination | uhci_explen(pktsze),
632 data); 632 data);
633 633
634 data += pktsze; 634 data += pktsze;
@@ -658,7 +658,7 @@ static int uhci_submit_control(struct uhci_hcd *uhci, struct urb *urb, struct ur
658 658
659 uhci_add_td_to_urb(urb, td); 659 uhci_add_td_to_urb(urb, td);
660 uhci_fill_td(td, status | TD_CTRL_IOC, 660 uhci_fill_td(td, status | TD_CTRL_IOC,
661 destination | uhci_explen(UHCI_NULL_DATA_SIZE), 0); 661 destination | uhci_explen(0), 0);
662 662
663 qh = uhci_alloc_qh(uhci); 663 qh = uhci_alloc_qh(uhci);
664 if (!qh) 664 if (!qh)
@@ -864,7 +864,7 @@ static int uhci_submit_common(struct uhci_hcd *uhci, struct urb *urb, struct urb
864 return -ENOMEM; 864 return -ENOMEM;
865 865
866 uhci_add_td_to_urb(urb, td); 866 uhci_add_td_to_urb(urb, td);
867 uhci_fill_td(td, status, destination | uhci_explen(pktsze - 1) | 867 uhci_fill_td(td, status, destination | uhci_explen(pktsze) |
868 (usb_gettoggle(urb->dev, usb_pipeendpoint(urb->pipe), 868 (usb_gettoggle(urb->dev, usb_pipeendpoint(urb->pipe),
869 usb_pipeout(urb->pipe)) << TD_TOKEN_TOGGLE_SHIFT), 869 usb_pipeout(urb->pipe)) << TD_TOKEN_TOGGLE_SHIFT),
870 data); 870 data);
@@ -890,7 +890,7 @@ static int uhci_submit_common(struct uhci_hcd *uhci, struct urb *urb, struct urb
890 return -ENOMEM; 890 return -ENOMEM;
891 891
892 uhci_add_td_to_urb(urb, td); 892 uhci_add_td_to_urb(urb, td);
893 uhci_fill_td(td, status, destination | uhci_explen(UHCI_NULL_DATA_SIZE) | 893 uhci_fill_td(td, status, destination | uhci_explen(0) |
894 (usb_gettoggle(urb->dev, usb_pipeendpoint(urb->pipe), 894 (usb_gettoggle(urb->dev, usb_pipeendpoint(urb->pipe),
895 usb_pipeout(urb->pipe)) << TD_TOKEN_TOGGLE_SHIFT), 895 usb_pipeout(urb->pipe)) << TD_TOKEN_TOGGLE_SHIFT),
896 data); 896 data);
@@ -1092,7 +1092,7 @@ static int uhci_submit_isochronous(struct uhci_hcd *uhci, struct urb *urb)
1092 return -ENOMEM; 1092 return -ENOMEM;
1093 1093
1094 uhci_add_td_to_urb(urb, td); 1094 uhci_add_td_to_urb(urb, td);
1095 uhci_fill_td(td, status, destination | uhci_explen(urb->iso_frame_desc[i].length - 1), 1095 uhci_fill_td(td, status, destination | uhci_explen(urb->iso_frame_desc[i].length),
1096 urb->transfer_dma + urb->iso_frame_desc[i].offset); 1096 urb->transfer_dma + urb->iso_frame_desc[i].offset);
1097 1097
1098 if (i + 1 >= urb->number_of_packets) 1098 if (i + 1 >= urb->number_of_packets)