18 #include <linux/kernel.h>
19 #include <linux/types.h>
20 #include <linux/errno.h>
21 #include <linux/slab.h>
22 #include <linux/list.h>
28 #define DUMMY_BD_BUFFER 0xdeadbeef
29 #define DUMMY2_BD_BUFFER 0xbaadf00d
40 #define TD_RXER 0x0020
43 #define TD_STAL 0x0008
52 #define TD_ERRORS (TD_NAK | TD_STAL | TD_TO | TD_UN | \
53 TD_NO | TD_AB | TD_CR | TD_OV | TD_BOV)
55 #define TD_PID_DATA0 0x0080
56 #define TD_PID_DATA1 0x00c0
57 #define TD_PID_TOGGLE 0x00c0
59 #define TD_TOK_SETUP 0x0000
60 #define TD_TOK_OUT 0x4000
61 #define TD_TOK_IN 0x8000
63 #define TD_ENDP 0x0780
64 #define TD_ADDR 0x007f
66 #define TD_ENDP_SHIFT 7
111 for (;
size; size--) {
121 for (;
size; size--) {
131 for (;
size; size--) {
157 unsigned long ep_offset;
158 char *err_for =
"endpoint PRAM";
163 if (!(ring_len > 2)) {
164 fhci_err(usb->
fhci,
"illegal TD ring length parameters\n");
172 ep_mem_size = ring_len *
sizeof(*td) +
sizeof(
struct fhci_ep_pram);
182 err_for =
"frame_queues";
186 for (i = 0; i < (ring_len + 1); i++) {
216 for (i = 0; i < ring_len; i++) {
258 #ifdef MULTI_DATA_BUS
281 static void fhci_td_transaction_confirm(
struct fhci_usb *
usb)
304 if (!(!(td_status &
TD_R) && ((td_status & ~
TD_W) || buf)))
328 if (td_status &
TD_CR)
330 else if (td_status &
TD_AB)
332 else if (td_status &
TD_OV)
334 else if (td_status &
TD_BOV)
336 else if (td_status &
TD_NO)
341 }
else if (td_status &
TD_NAK)
343 else if (td_status &
TD_TO)
345 else if (td_status &
TD_UN)
356 if (extra_data & TD_TOK_IN)
412 switch (trans_type) {
432 switch (trans_type) {
487 if (td_status & TD_R)
493 if (td_status &
TD_W)
499 fhci_td_transaction_confirm(usb);
538 mode =
in_8(&usb->
fhci->regs->usb_usmod);
547 if (td_status & TD_R) {
560 }
while ((td_status & TD_R) || buf_ptr);
562 fhci_td_transaction_confirm(usb);
582 fhci_td_transaction_confirm(usb);