From owner-p4-projects@FreeBSD.ORG Fri Mar 20 18:04:28 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7926D10656E2; Fri, 20 Mar 2009 18:04:28 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3297910656CF for ; Fri, 20 Mar 2009 18:04:27 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 2D97B8FC12 for ; Fri, 20 Mar 2009 18:04:27 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n2KI4RuJ023275 for ; Fri, 20 Mar 2009 18:04:27 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n2KI4RZt023273 for perforce@freebsd.org; Fri, 20 Mar 2009 18:04:27 GMT (envelope-from hselasky@FreeBSD.org) Date: Fri, 20 Mar 2009 18:04:27 GMT Message-Id: <200903201804.n2KI4RZt023273@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 159529 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Mar 2009 18:04:29 -0000 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;