From owner-p4-projects@FreeBSD.ORG Tue Apr 1 20:20:59 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 325AF106567D; Tue, 1 Apr 2008 20:20:59 +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 E50A21065679 for ; Tue, 1 Apr 2008 20:20:58 +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 D4E078FC36 for ; Tue, 1 Apr 2008 20:20:58 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m31KKwHd099736 for ; Tue, 1 Apr 2008 20:20:58 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m31KKw5P099734 for perforce@freebsd.org; Tue, 1 Apr 2008 20:20:58 GMT (envelope-from hselasky@FreeBSD.org) Date: Tue, 1 Apr 2008 20:20:58 GMT Message-Id: <200804012020.m31KKw5P099734@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 139159 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: Tue, 01 Apr 2008 20:20:59 -0000 http://perforce.freebsd.org/chv.cgi?CH=139159 Change 139159 by hselasky@hselasky_laptop001 on 2008/04/01 20:20:47 I have replaced a field in the USB page cache. Update the code that depended on this field, "pc->xfer". Affected files ... .. //depot/projects/usb/src/sys/dev/usb/at9100_dci.c#15 edit .. //depot/projects/usb/src/sys/dev/usb/uss820_dci.c#10 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/at9100_dci.c#15 (text+ko) ==== @@ -65,6 +65,9 @@ ((struct at9100_dci_softc *)(((uint8_t *)(bus)) - \ POINTER_TO_UNSIGNED(&(((struct at9100_dci_softc *)0)->sc_bus)))) +#define AT9100_DCI_PC2SC(pc) \ + AT9100_DCI_BUS2SC((pc)->tag_parent->info->bus) + #ifdef USB_DEBUG #define DPRINTFN(n,fmt,...) do { \ if (at9100_dcidebug > (n)) { \ @@ -367,7 +370,7 @@ td->remainder = 0; /* get pointer to softc */ - sc = td->pc->xfer->usb_sc; + sc = AT9100_DCI_PC2SC(td->pc); /* sneak peek the set address */ if ((req.bmRequestType == UT_WRITE_DEVICE) && @@ -649,7 +652,7 @@ if (!(csr & AT91_UDP_CSR_TXCOMP)) { goto not_complete; } - sc = td->pc->xfer->usb_sc; + sc = AT9100_DCI_PC2SC(td->pc); if (sc->sc_dv_addr != 0xFF) { /* * The AT91 has a special requirement with regard to ==== //depot/projects/usb/src/sys/dev/usb/uss820_dci.c#10 (text+ko) ==== @@ -51,6 +51,9 @@ ((struct uss820_dci_softc *)(((uint8_t *)(bus)) - \ POINTER_TO_UNSIGNED(&(((struct uss820_dci_softc *)0)->sc_bus)))) +#define USS820_DCI_PC2SC(pc) \ + USS820_DCI_BUS2SC((pc)->tag_parent->info->bus) + #ifdef USB_DEBUG #define DPRINTFN(n,fmt,...) do { \ if (uss820_dcidebug > (n)) { \ @@ -271,7 +274,7 @@ td->rx_stat_reg); /* get pointer to softc */ - sc = td->pc->xfer->usb_sc; + sc = USS820_DCI_PC2SC(td->pc); DPRINTFN(4, "rx_stat=0x%02x rem=%u\n", rx_stat, td->remainder); @@ -432,7 +435,7 @@ /* read out EPCON register */ /* enable RX input */ if (!td->did_stall) { - uss820_dci_update_shared_1(td->pc->xfer->usb_sc, + uss820_dci_update_shared_1(USS820_DCI_PC2SC(td->pc), USS820_EPCON, 0xFF, USS820_EPCON_RXIE); td->did_stall = 1; } @@ -595,7 +598,7 @@ * data into the FIFO. This is undocumented. */ if (!td->did_stall) { - uss820_dci_update_shared_1(td->pc->xfer->usb_sc, + uss820_dci_update_shared_1(USS820_DCI_PC2SC(td->pc), USS820_EPCON, 0xFF, USS820_EPCON_TXOE); td->did_stall = 1; } @@ -652,7 +655,7 @@ USS820_TXFLG_TXFIF1)) { return (1); /* not complete */ } - sc = td->pc->xfer->usb_sc; + sc = USS820_DCI_PC2SC(td->pc); if (sc->sc_dv_addr != 0xFF) { /* write function address */ uss820_dci_set_address(sc, sc->sc_dv_addr);