Date: Fri, 20 Mar 2009 18:04:27 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 159529 for review Message-ID: <200903201804.n2KI4RZt023273@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=159529 Change 159529 by hselasky@hselasky_laptop001 on 2009/03/20 18:03:50 USB controller: - correctly setup alt_next - remove checking of ED_SKIP in OHCI, hence this flag is only writable by software and we never set it! Affected files ... .. //depot/projects/usb/src/sys/dev/usb/controller/at91dci.c#7 edit .. //depot/projects/usb/src/sys/dev/usb/controller/atmegadci.c#10 edit .. //depot/projects/usb/src/sys/dev/usb/controller/ehci.c#10 edit .. //depot/projects/usb/src/sys/dev/usb/controller/musb_otg.c#5 edit .. //depot/projects/usb/src/sys/dev/usb/controller/ohci.c#8 edit .. //depot/projects/usb/src/sys/dev/usb/controller/uhci.c#6 edit .. //depot/projects/usb/src/sys/dev/usb/controller/uss820dci.c#6 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/controller/at91dci.c#7 (text+ko) ==== @@ -888,6 +888,7 @@ temp.td = NULL; temp.td_next = xfer->td_start[0]; temp.offset = 0; + temp.setup_alt_next = xfer->flags_int.short_frames_ok; sc = AT9100_DCI_BUS2SC(xfer->xroot->bus); ep_no = (xfer->endpoint & UE_ADDR); @@ -901,7 +902,12 @@ temp.len = xfer->frlengths[0]; temp.pc = xfer->frbuffers + 0; temp.short_pkt = temp.len ? 1 : 0; - temp.setup_alt_next = 0; + /* check for last frame */ + if (xfer->nframes == 1) { + /* no STATUS stage yet, SETUP is last */ + if (xfer->flags_int.control_act) + temp.setup_alt_next = 0; + } at91dci_setup_standard_chain_sub(&temp); } @@ -910,8 +916,6 @@ x = 0; } - temp.setup_alt_next = xfer->flags_int.short_frames_ok; - if (x != xfer->nframes) { if (xfer->endpoint & UE_DIR_IN) { temp.func = &at91dci_data_tx; ==== //depot/projects/usb/src/sys/dev/usb/controller/atmegadci.c#10 (text+ko) ==== @@ -792,6 +792,7 @@ temp.td = NULL; temp.td_next = xfer->td_start[0]; temp.offset = 0; + temp.setup_alt_next = xfer->flags_int.short_frames_ok; sc = ATMEGA_BUS2SC(xfer->xroot->bus); ep_no = (xfer->endpoint & UE_ADDR); @@ -805,7 +806,12 @@ temp.len = xfer->frlengths[0]; temp.pc = xfer->frbuffers + 0; temp.short_pkt = temp.len ? 1 : 0; - temp.setup_alt_next = 0; + /* check for last frame */ + if (xfer->nframes == 1) { + /* no STATUS stage yet, SETUP is last */ + if (xfer->flags_int.control_act) + temp.setup_alt_next = 0; + } atmegadci_setup_standard_chain_sub(&temp); } @@ -814,8 +820,6 @@ x = 0; } - temp.setup_alt_next = xfer->flags_int.short_frames_ok; - if (x != xfer->nframes) { if (xfer->endpoint & UE_DIR_IN) { temp.func = &atmegadci_data_tx; ==== //depot/projects/usb/src/sys/dev/usb/controller/ehci.c#10 (text+ko) ==== @@ -1752,6 +1752,7 @@ temp.td_next = td; temp.qtd_status = 0; temp.last_frame = 0; + temp.setup_alt_next = xfer->flags_int.short_frames_ok; if (xfer->flags_int.control_xfr) { if (xfer->pipe->toggle_next) { @@ -1784,12 +1785,13 @@ temp.len = xfer->frlengths[0]; temp.pc = xfer->frbuffers + 0; temp.shortpkt = temp.len ? 1 : 0; - temp.setup_alt_next = 0; /* check for last frame */ if (xfer->nframes == 1) { /* no STATUS stage yet, SETUP is last */ - if (xfer->flags_int.control_act) + if (xfer->flags_int.control_act) { temp.last_frame = 1; + temp.setup_alt_next = 0; + } } ehci_setup_standard_chain_sub(&temp); } @@ -1798,8 +1800,6 @@ x = 0; } - temp.setup_alt_next = xfer->flags_int.short_frames_ok; - while (x != xfer->nframes) { /* DATA0 / DATA1 message */ ==== //depot/projects/usb/src/sys/dev/usb/controller/musb_otg.c#5 (text+ko) ==== @@ -1133,6 +1133,7 @@ temp.td = NULL; temp.td_next = xfer->td_start[0]; temp.offset = 0; + temp.setup_alt_next = xfer->flags_int.short_frames_ok; sc = MUSBOTG_BUS2SC(xfer->xroot->bus); ep_no = (xfer->endpoint & UE_ADDR); @@ -1146,7 +1147,6 @@ temp.len = xfer->frlengths[0]; temp.pc = xfer->frbuffers + 0; temp.short_pkt = temp.len ? 1 : 0; - temp.setup_alt_next = 0; musbotg_setup_standard_chain_sub(&temp); } @@ -1155,8 +1155,6 @@ x = 0; } - temp.setup_alt_next = xfer->flags_int.short_frames_ok; - if (x != xfer->nframes) { if (xfer->endpoint & UE_DIR_IN) { if (xfer->flags_int.control_xfr) ==== //depot/projects/usb/src/sys/dev/usb/controller/ohci.c#8 (text+ko) ==== @@ -1051,7 +1051,6 @@ ohci_check_transfer(struct usb2_xfer *xfer) { ohci_ed_t *ed; - uint32_t ed_flags; uint32_t ed_headp; uint32_t ed_tailp; @@ -1060,12 +1059,10 @@ ed = xfer->qh_start[xfer->flags_int.curr_dma_set]; usb2_pc_cpu_invalidate(ed->page_cache); - ed_flags = le32toh(ed->ed_flags); ed_headp = le32toh(ed->ed_headp); ed_tailp = le32toh(ed->ed_tailp); - if ((ed_flags & OHCI_ED_SKIP) || - (ed_headp & OHCI_HALTED) || + if ((ed_headp & OHCI_HALTED) || (((ed_headp ^ ed_tailp) & (~0xF)) == 0)) { if (xfer->pipe->methods == &ohci_device_isoc_methods) { /* isochronous transfer */ @@ -1442,6 +1439,7 @@ temp.td = NULL; temp.td_next = td; temp.last_frame = 0; + temp.setup_alt_next = xfer->flags_int.short_frames_ok; methods = xfer->pipe->methods; @@ -1456,12 +1454,13 @@ temp.len = xfer->frlengths[0]; temp.pc = xfer->frbuffers + 0; temp.shortpkt = temp.len ? 1 : 0; - temp.setup_alt_next = 0; /* check for last frame */ if (xfer->nframes == 1) { /* no STATUS stage yet, SETUP is last */ - if (xfer->flags_int.control_act) + if (xfer->flags_int.control_act) { temp.last_frame = 1; + temp.setup_alt_next = 0; + } } ohci_setup_standard_chain_sub(&temp); @@ -1476,7 +1475,6 @@ x = 0; } temp.td_flags = htole32(OHCI_TD_NOCC | OHCI_TD_NOINTR); - temp.setup_alt_next = xfer->flags_int.short_frames_ok; /* set data toggle */ ==== //depot/projects/usb/src/sys/dev/usb/controller/uhci.c#6 (text+ko) ==== @@ -1675,6 +1675,7 @@ temp.td = NULL; temp.td_next = td; temp.last_frame = 0; + temp.setup_alt_next = xfer->flags_int.short_frames_ok; uhci_mem_layout_init(&temp.ml, xfer); @@ -1707,12 +1708,13 @@ temp.len = xfer->frlengths[0]; temp.ml.buf_pc = xfer->frbuffers + 0; temp.shortpkt = temp.len ? 1 : 0; - temp.setup_alt_next = 0; /* check for last frame */ if (xfer->nframes == 1) { /* no STATUS stage yet, SETUP is last */ - if (xfer->flags_int.control_act) + if (xfer->flags_int.control_act) { temp.last_frame = 1; + temp.setup_alt_next = 0; + } } uhci_setup_standard_chain_sub(&temp); } @@ -1721,8 +1723,6 @@ x = 0; } - temp.setup_alt_next = xfer->flags_int.short_frames_ok; - while (x != xfer->nframes) { /* DATA0 / DATA1 message */ ==== //depot/projects/usb/src/sys/dev/usb/controller/uss820dci.c#6 (text+ko) ==== @@ -837,6 +837,7 @@ temp.td = NULL; temp.td_next = xfer->td_start[0]; temp.offset = 0; + temp.setup_alt_next = xfer->flags_int.short_frames_ok; sc = USS820_DCI_BUS2SC(xfer->xroot->bus); ep_no = (xfer->endpoint & UE_ADDR); @@ -850,7 +851,12 @@ temp.len = xfer->frlengths[0]; temp.pc = xfer->frbuffers + 0; temp.short_pkt = temp.len ? 1 : 0; - temp.setup_alt_next = 0; + /* check for last frame */ + if (xfer->nframes == 1) { + /* no STATUS stage yet, SETUP is last */ + if (xfer->flags_int.control_act) + temp.setup_alt_next = 0; + } uss820dci_setup_standard_chain_sub(&temp); } @@ -859,8 +865,6 @@ x = 0; } - temp.setup_alt_next = xfer->flags_int.short_frames_ok; - if (x != xfer->nframes) { if (xfer->endpoint & UE_DIR_IN) { temp.func = &uss820dci_data_tx;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903201804.n2KI4RZt023273>