Date: Tue, 1 Apr 2008 20:20:58 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 139159 for review Message-ID: <200804012020.m31KKw5P099734@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200804012020.m31KKw5P099734>