• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/drivers/usb/host/

Lines Matching refs:td

21  * Technically, updating td->status here is a race, but it's not really a
109 struct uhci_td *td;
111 td = dma_pool_alloc(uhci->td_pool, GFP_ATOMIC, &dma_handle);
112 if (!td)
115 td->dma_handle = dma_handle;
116 td->frame = -1;
118 INIT_LIST_HEAD(&td->list);
119 INIT_LIST_HEAD(&td->fl_list);
121 return td;
124 static void uhci_free_td(struct uhci_hcd *uhci, struct uhci_td *td)
126 if (!list_empty(&td->list)) {
127 dev_warn(uhci_dev(uhci), "td %p still in list!\n", td);
130 if (!list_empty(&td->fl_list)) {
131 dev_warn(uhci_dev(uhci), "td %p still in fl_list!\n", td);
135 dma_pool_free(uhci->td_pool, td, td->dma_handle);
138 static inline void uhci_fill_td(struct uhci_td *td, u32 status,
141 td->status = cpu_to_le32(status);
142 td->token = cpu_to_le32(token);
143 td->buffer = cpu_to_le32(buffer);
146 static void uhci_add_td_to_urbp(struct uhci_td *td, struct urb_priv *urbp)
148 list_add_tail(&td->list, &urbp->td_list);
151 static void uhci_remove_td_from_urbp(struct uhci_td *td)
153 list_del_init(&td->list);
160 struct uhci_td *td, unsigned framenum)
164 td->frame = framenum;
173 list_add_tail(&td->fl_list, &ftd->fl_list);
175 td->link = ltd->link;
177 ltd->link = LINK_TO_TD(td);
179 td->link = uhci->frame[framenum];
181 uhci->frame[framenum] = LINK_TO_TD(td);
182 uhci->frame_cpu[framenum] = td;
187 struct uhci_td *td)
190 if (td->frame == -1) {
191 WARN_ON(!list_empty(&td->fl_list));
195 if (uhci->frame_cpu[td->frame] == td) {
196 if (list_empty(&td->fl_list)) {
197 uhci->frame[td->frame] = td->link;
198 uhci->frame_cpu[td->frame] = NULL;
202 ntd = list_entry(td->fl_list.next, struct uhci_td, fl_list);
203 uhci->frame[td->frame] = LINK_TO_TD(ntd);
204 uhci->frame_cpu[td->frame] = ntd;
209 ptd = list_entry(td->fl_list.prev, struct uhci_td, fl_list);
210 ptd->link = td->link;
213 list_del_init(&td->fl_list);
214 td->frame = -1;
241 struct uhci_td *td;
243 list_for_each_entry(td, &urbp->td_list, list)
244 uhci_remove_td_from_frame_list(uhci, td);
323 struct uhci_td *td;
347 td = list_entry(urbp->td_list.prev, struct uhci_td,
349 ptd->link = td->link;
365 td = list_entry(urbp->td_list.next, struct uhci_td, list);
367 qh->initial_toggle = uhci_toggle(td_token(td));
380 struct uhci_td *td;
402 td = list_entry(urbp->td_list.next, struct uhci_td, list);
403 if (toggle > 1 || uhci_toggle(td_token(td)) == toggle) {
404 td = list_entry(urbp->td_list.prev, struct uhci_td,
406 toggle = uhci_toggle(td_token(td)) ^ 1;
410 list_for_each_entry(td, &urbp->td_list, list) {
411 td->token ^= __constant_cpu_to_le32(
493 struct uhci_td *td = list_entry(urbp->td_list.next,
496 qh->element = LINK_TO_TD(td);
747 struct uhci_td *td, *tmp;
755 list_for_each_entry_safe(td, tmp, &urbp->td_list, list) {
756 uhci_remove_td_from_urbp(td);
757 uhci_free_td(uhci, td);
767 * <status> is (td_status(td) & 0xF60000), a.k.a.
768 * uhci_status_bits(td_status(td)).
799 struct uhci_td *td;
819 td = qh->dummy_td;
820 uhci_add_td_to_urbp(td, urbp);
821 uhci_fill_td(td, status, destination | uhci_explen(8),
823 plink = &td->link;
844 td = uhci_alloc_td(uhci);
845 if (!td)
847 *plink = LINK_TO_TD(td);
852 uhci_add_td_to_urbp(td, urbp);
853 uhci_fill_td(td, status, destination | uhci_explen(pktsze),
855 plink = &td->link;
864 td = uhci_alloc_td(uhci);
865 if (!td)
867 *plink = LINK_TO_TD(td);
883 uhci_add_td_to_urbp(td, urbp);
884 uhci_fill_td(td, status | TD_CTRL_IOC,
886 plink = &td->link;
891 td = uhci_alloc_td(uhci);
892 if (!td)
894 *plink = LINK_TO_TD(td);
896 uhci_fill_td(td, 0, USB_PID_OUT | uhci_explen(0), 0);
899 qh->dummy_td = td;
930 struct uhci_td *td;
958 td = qh->dummy_td;
969 td = uhci_alloc_td(uhci);
970 if (!td)
972 *plink = LINK_TO_TD(td);
974 uhci_add_td_to_urbp(td, urbp);
975 uhci_fill_td(td, status,
979 plink = &td->link;
997 td = uhci_alloc_td(uhci);
998 if (!td)
1000 *plink = LINK_TO_TD(td);
1002 uhci_add_td_to_urbp(td, urbp);
1003 uhci_fill_td(td, status,
1007 plink = &td->link;
1018 td->status |= __constant_cpu_to_le32(TD_CTRL_IOC);
1023 td = uhci_alloc_td(uhci);
1024 if (!td)
1026 *plink = LINK_TO_TD(td);
1028 uhci_fill_td(td, 0, USB_PID_OUT | uhci_explen(0), 0);
1031 qh->dummy_td = td;
1107 struct uhci_td *td;
1111 td = list_entry(urbp->td_list.prev, struct uhci_td, list);
1118 qh->element = LINK_TO_TD(td);
1119 tmp = td->list.prev;
1131 td = qh->post_td;
1132 qh->element = td->link;
1139 td = list_entry(tmp, struct uhci_td, list);
1142 uhci_remove_td_from_urbp(td);
1143 uhci_free_td(uhci, td);
1155 struct uhci_td *td, *tmp;
1159 list_for_each_entry_safe(td, tmp, &urbp->td_list, list) {
1163 ctrlstat = td_status(td);
1173 uhci_packetout(td_token(td)));
1188 } else if (len < uhci_expected_length(td_token(td))) {
1195 else if (&td->list != urbp->td_list.prev)
1199 uhci_remove_td_from_urbp(td);
1202 qh->post_td = td;
1220 qh->initial_toggle = uhci_toggle(td_token(td)) ^
1234 struct uhci_td *td = NULL; /* Since urb->number_of_packets > 0 */
1302 td = uhci_alloc_td(uhci);
1303 if (!td)
1306 uhci_add_td_to_urbp(td, urbp);
1307 uhci_fill_td(td, status, destination |
1314 td->status |= __constant_cpu_to_le32(TD_CTRL_IOC);
1318 list_for_each_entry(td, &urbp->td_list, list) {
1319 uhci_insert_td_in_frame_list(uhci, td, frame);
1337 struct uhci_td *td, *tmp;
1341 list_for_each_entry_safe(td, tmp, &urbp->td_list, list) {
1351 ctrlstat = td_status(td);
1369 uhci_remove_td_from_urbp(td);
1370 uhci_free_td(uhci, td);
1611 struct uhci_td *td = list_entry(urbp->td_list.next,
1614 td->status |= __cpu_to_le32(TD_CTRL_IOC);
1639 struct uhci_td *td;
1660 td = list_entry(urbp->td_list.next, struct uhci_td, list);
1661 status = td_status(td);