Date: Thu, 7 Sep 2006 04:42:01 GMT From: Matt Jacob <mjacob@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 105762 for review Message-ID: <200609070442.k874g1x7039830@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=105762 Change 105762 by mjacob@newisp on 2006/09/07 04:41:53 IFC. Affected files ... .. //depot/projects/newisp/dev/usb/ehci.c#2 integrate .. //depot/projects/newisp/dev/usb/ehci_pci.c#2 integrate .. //depot/projects/newisp/dev/usb/ehcivar.h#2 integrate .. //depot/projects/newisp/dev/usb/hid.c#2 integrate .. //depot/projects/newisp/dev/usb/if_aue.c#2 integrate .. //depot/projects/newisp/dev/usb/if_axe.c#2 integrate .. //depot/projects/newisp/dev/usb/if_cdce.c#2 integrate .. //depot/projects/newisp/dev/usb/if_cue.c#2 integrate .. //depot/projects/newisp/dev/usb/if_kue.c#2 integrate .. //depot/projects/newisp/dev/usb/if_rue.c#2 integrate .. //depot/projects/newisp/dev/usb/if_udav.c#2 integrate .. //depot/projects/newisp/dev/usb/if_udavreg.h#2 integrate .. //depot/projects/newisp/dev/usb/if_ural.c#2 integrate .. //depot/projects/newisp/dev/usb/if_uralvar.h#2 integrate .. //depot/projects/newisp/dev/usb/kue_fw.h#2 integrate .. //depot/projects/newisp/dev/usb/ohci.c#2 integrate .. //depot/projects/newisp/dev/usb/ohcivar.h#2 integrate .. //depot/projects/newisp/dev/usb/sl811hs.c#2 integrate .. //depot/projects/newisp/dev/usb/sl811hsvar.h#2 integrate .. //depot/projects/newisp/dev/usb/ubsa.c#2 integrate .. //depot/projects/newisp/dev/usb/ubser.c#2 integrate .. //depot/projects/newisp/dev/usb/ucom.c#2 integrate .. //depot/projects/newisp/dev/usb/ucomvar.h#2 integrate .. //depot/projects/newisp/dev/usb/udbp.c#2 integrate .. //depot/projects/newisp/dev/usb/ufm.c#2 integrate .. //depot/projects/newisp/dev/usb/ufoma.c#2 integrate .. //depot/projects/newisp/dev/usb/uftdi.c#2 integrate .. //depot/projects/newisp/dev/usb/ugen.c#3 integrate .. //depot/projects/newisp/dev/usb/uhci.c#2 integrate .. //depot/projects/newisp/dev/usb/uhcivar.h#2 integrate .. //depot/projects/newisp/dev/usb/uhid.c#2 integrate .. //depot/projects/newisp/dev/usb/uhub.c#2 integrate .. //depot/projects/newisp/dev/usb/ukbd.c#2 integrate .. //depot/projects/newisp/dev/usb/ulpt.c#2 integrate .. //depot/projects/newisp/dev/usb/umass.c#2 integrate .. //depot/projects/newisp/dev/usb/umct.c#2 integrate .. //depot/projects/newisp/dev/usb/umodem.c#2 integrate .. //depot/projects/newisp/dev/usb/ums.c#2 integrate .. //depot/projects/newisp/dev/usb/uplcom.c#2 integrate .. //depot/projects/newisp/dev/usb/urio.c#2 integrate .. //depot/projects/newisp/dev/usb/usb.c#2 integrate .. //depot/projects/newisp/dev/usb/usb.h#2 integrate .. //depot/projects/newisp/dev/usb/usb_ethersubr.c#2 integrate .. //depot/projects/newisp/dev/usb/usb_mem.c#2 integrate .. //depot/projects/newisp/dev/usb/usb_port.h#2 integrate .. //depot/projects/newisp/dev/usb/usb_quirks.c#2 integrate .. //depot/projects/newisp/dev/usb/usb_subr.c#2 integrate .. //depot/projects/newisp/dev/usb/usbdi.c#2 integrate .. //depot/projects/newisp/dev/usb/usbdi.h#2 integrate .. //depot/projects/newisp/dev/usb/usbdi_util.c#2 integrate .. //depot/projects/newisp/dev/usb/usbdi_util.h#2 integrate .. //depot/projects/newisp/dev/usb/usbdivar.h#2 integrate .. //depot/projects/newisp/dev/usb/uscanner.c#2 integrate .. //depot/projects/newisp/dev/usb/uvisor.c#2 integrate .. //depot/projects/newisp/dev/usb/uvscom.c#2 integrate .. //depot/projects/newisp/sys/mbuf.h#3 integrate Differences ... ==== //depot/projects/newisp/dev/usb/ehci.c#2 (text+ko) ==== @@ -59,7 +59,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/usb/ehci.c,v 1.47 2006/05/28 23:37:04 iedowse Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/usb/ehci.c,v 1.49 2006/09/07 00:06:41 imp Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -142,105 +142,105 @@ } u; }; -Static usbd_status ehci_open(usbd_pipe_handle); -Static void ehci_poll(struct usbd_bus *); -Static void ehci_softintr(void *); -Static int ehci_intr1(ehci_softc_t *); -Static void ehci_waitintr(ehci_softc_t *, usbd_xfer_handle); -Static void ehci_check_intr(ehci_softc_t *, struct ehci_xfer *); -Static void ehci_idone(struct ehci_xfer *); -Static void ehci_timeout(void *); -Static void ehci_timeout_task(void *); -Static void ehci_intrlist_timeout(void *); +static usbd_status ehci_open(usbd_pipe_handle); +static void ehci_poll(struct usbd_bus *); +static void ehci_softintr(void *); +static int ehci_intr1(ehci_softc_t *); +static void ehci_waitintr(ehci_softc_t *, usbd_xfer_handle); +static void ehci_check_intr(ehci_softc_t *, struct ehci_xfer *); +static void ehci_idone(struct ehci_xfer *); +static void ehci_timeout(void *); +static void ehci_timeout_task(void *); +static void ehci_intrlist_timeout(void *); -Static usbd_status ehci_allocm(struct usbd_bus *, usb_dma_t *, u_int32_t); -Static void ehci_freem(struct usbd_bus *, usb_dma_t *); +static usbd_status ehci_allocm(struct usbd_bus *, usb_dma_t *, u_int32_t); +static void ehci_freem(struct usbd_bus *, usb_dma_t *); -Static usbd_xfer_handle ehci_allocx(struct usbd_bus *); -Static void ehci_freex(struct usbd_bus *, usbd_xfer_handle); +static usbd_xfer_handle ehci_allocx(struct usbd_bus *); +static void ehci_freex(struct usbd_bus *, usbd_xfer_handle); -Static usbd_status ehci_root_ctrl_transfer(usbd_xfer_handle); -Static usbd_status ehci_root_ctrl_start(usbd_xfer_handle); -Static void ehci_root_ctrl_abort(usbd_xfer_handle); -Static void ehci_root_ctrl_close(usbd_pipe_handle); -Static void ehci_root_ctrl_done(usbd_xfer_handle); +static usbd_status ehci_root_ctrl_transfer(usbd_xfer_handle); +static usbd_status ehci_root_ctrl_start(usbd_xfer_handle); +static void ehci_root_ctrl_abort(usbd_xfer_handle); +static void ehci_root_ctrl_close(usbd_pipe_handle); +static void ehci_root_ctrl_done(usbd_xfer_handle); -Static usbd_status ehci_root_intr_transfer(usbd_xfer_handle); -Static usbd_status ehci_root_intr_start(usbd_xfer_handle); -Static void ehci_root_intr_abort(usbd_xfer_handle); -Static void ehci_root_intr_close(usbd_pipe_handle); -Static void ehci_root_intr_done(usbd_xfer_handle); +static usbd_status ehci_root_intr_transfer(usbd_xfer_handle); +static usbd_status ehci_root_intr_start(usbd_xfer_handle); +static void ehci_root_intr_abort(usbd_xfer_handle); +static void ehci_root_intr_close(usbd_pipe_handle); +static void ehci_root_intr_done(usbd_xfer_handle); -Static usbd_status ehci_device_ctrl_transfer(usbd_xfer_handle); -Static usbd_status ehci_device_ctrl_start(usbd_xfer_handle); -Static void ehci_device_ctrl_abort(usbd_xfer_handle); -Static void ehci_device_ctrl_close(usbd_pipe_handle); -Static void ehci_device_ctrl_done(usbd_xfer_handle); +static usbd_status ehci_device_ctrl_transfer(usbd_xfer_handle); +static usbd_status ehci_device_ctrl_start(usbd_xfer_handle); +static void ehci_device_ctrl_abort(usbd_xfer_handle); +static void ehci_device_ctrl_close(usbd_pipe_handle); +static void ehci_device_ctrl_done(usbd_xfer_handle); -Static usbd_status ehci_device_bulk_transfer(usbd_xfer_handle); -Static usbd_status ehci_device_bulk_start(usbd_xfer_handle); -Static void ehci_device_bulk_abort(usbd_xfer_handle); -Static void ehci_device_bulk_close(usbd_pipe_handle); -Static void ehci_device_bulk_done(usbd_xfer_handle); +static usbd_status ehci_device_bulk_transfer(usbd_xfer_handle); +static usbd_status ehci_device_bulk_start(usbd_xfer_handle); +static void ehci_device_bulk_abort(usbd_xfer_handle); +static void ehci_device_bulk_close(usbd_pipe_handle); +static void ehci_device_bulk_done(usbd_xfer_handle); -Static usbd_status ehci_device_intr_transfer(usbd_xfer_handle); -Static usbd_status ehci_device_intr_start(usbd_xfer_handle); -Static void ehci_device_intr_abort(usbd_xfer_handle); -Static void ehci_device_intr_close(usbd_pipe_handle); -Static void ehci_device_intr_done(usbd_xfer_handle); +static usbd_status ehci_device_intr_transfer(usbd_xfer_handle); +static usbd_status ehci_device_intr_start(usbd_xfer_handle); +static void ehci_device_intr_abort(usbd_xfer_handle); +static void ehci_device_intr_close(usbd_pipe_handle); +static void ehci_device_intr_done(usbd_xfer_handle); -Static usbd_status ehci_device_isoc_transfer(usbd_xfer_handle); -Static usbd_status ehci_device_isoc_start(usbd_xfer_handle); -Static void ehci_device_isoc_abort(usbd_xfer_handle); -Static void ehci_device_isoc_close(usbd_pipe_handle); -Static void ehci_device_isoc_done(usbd_xfer_handle); +static usbd_status ehci_device_isoc_transfer(usbd_xfer_handle); +static usbd_status ehci_device_isoc_start(usbd_xfer_handle); +static void ehci_device_isoc_abort(usbd_xfer_handle); +static void ehci_device_isoc_close(usbd_pipe_handle); +static void ehci_device_isoc_done(usbd_xfer_handle); -Static void ehci_device_clear_toggle(usbd_pipe_handle pipe); -Static void ehci_noop(usbd_pipe_handle pipe); +static void ehci_device_clear_toggle(usbd_pipe_handle pipe); +static void ehci_noop(usbd_pipe_handle pipe); -Static int ehci_str(usb_string_descriptor_t *, int, char *); -Static void ehci_pcd(ehci_softc_t *, usbd_xfer_handle); -Static void ehci_pcd_able(ehci_softc_t *, int); -Static void ehci_pcd_enable(void *); -Static void ehci_disown(ehci_softc_t *, int, int); +static int ehci_str(usb_string_descriptor_t *, int, char *); +static void ehci_pcd(ehci_softc_t *, usbd_xfer_handle); +static void ehci_pcd_able(ehci_softc_t *, int); +static void ehci_pcd_enable(void *); +static void ehci_disown(ehci_softc_t *, int, int); -Static ehci_soft_qh_t *ehci_alloc_sqh(ehci_softc_t *); -Static void ehci_free_sqh(ehci_softc_t *, ehci_soft_qh_t *); +static ehci_soft_qh_t *ehci_alloc_sqh(ehci_softc_t *); +static void ehci_free_sqh(ehci_softc_t *, ehci_soft_qh_t *); -Static ehci_soft_qtd_t *ehci_alloc_sqtd(ehci_softc_t *); -Static void ehci_free_sqtd(ehci_softc_t *, ehci_soft_qtd_t *); -Static usbd_status ehci_alloc_sqtd_chain(struct ehci_pipe *, +static ehci_soft_qtd_t *ehci_alloc_sqtd(ehci_softc_t *); +static void ehci_free_sqtd(ehci_softc_t *, ehci_soft_qtd_t *); +static usbd_status ehci_alloc_sqtd_chain(struct ehci_pipe *, ehci_softc_t *, int, int, usbd_xfer_handle, ehci_soft_qtd_t *, ehci_soft_qtd_t *, ehci_soft_qtd_t **, ehci_soft_qtd_t **); -Static void ehci_free_sqtd_chain(ehci_softc_t *, ehci_soft_qh_t *, +static void ehci_free_sqtd_chain(ehci_softc_t *, ehci_soft_qh_t *, ehci_soft_qtd_t *, ehci_soft_qtd_t *); -Static usbd_status ehci_device_request(usbd_xfer_handle xfer); +static usbd_status ehci_device_request(usbd_xfer_handle xfer); -Static usbd_status ehci_device_setintr(ehci_softc_t *, ehci_soft_qh_t *, +static usbd_status ehci_device_setintr(ehci_softc_t *, ehci_soft_qh_t *, int ival); -Static void ehci_add_qh(ehci_soft_qh_t *, ehci_soft_qh_t *); -Static void ehci_rem_qh(ehci_softc_t *, ehci_soft_qh_t *, +static void ehci_add_qh(ehci_soft_qh_t *, ehci_soft_qh_t *); +static void ehci_rem_qh(ehci_softc_t *, ehci_soft_qh_t *, ehci_soft_qh_t *); -Static void ehci_activate_qh(ehci_soft_qh_t *, ehci_soft_qtd_t *); -Static void ehci_sync_hc(ehci_softc_t *); +static void ehci_activate_qh(ehci_soft_qh_t *, ehci_soft_qtd_t *); +static void ehci_sync_hc(ehci_softc_t *); -Static void ehci_close_pipe(usbd_pipe_handle, ehci_soft_qh_t *); -Static void ehci_abort_xfer(usbd_xfer_handle, usbd_status); +static void ehci_close_pipe(usbd_pipe_handle, ehci_soft_qh_t *); +static void ehci_abort_xfer(usbd_xfer_handle, usbd_status); #ifdef EHCI_DEBUG -Static void ehci_dump_regs(ehci_softc_t *); +static void ehci_dump_regs(ehci_softc_t *); void ehci_dump(void); -Static ehci_softc_t *theehci; -Static void ehci_dump_link(ehci_link_t, int); -Static void ehci_dump_sqtds(ehci_soft_qtd_t *); -Static void ehci_dump_sqtd(ehci_soft_qtd_t *); -Static void ehci_dump_qtd(ehci_qtd_t *); -Static void ehci_dump_sqh(ehci_soft_qh_t *); +static ehci_softc_t *theehci; +static void ehci_dump_link(ehci_link_t, int); +static void ehci_dump_sqtds(ehci_soft_qtd_t *); +static void ehci_dump_sqtd(ehci_soft_qtd_t *); +static void ehci_dump_qtd(ehci_qtd_t *); +static void ehci_dump_sqh(ehci_soft_qh_t *); #ifdef DIAGNOSTIC -Static void ehci_dump_exfer(struct ehci_xfer *); +static void ehci_dump_exfer(struct ehci_xfer *); #endif #endif @@ -257,7 +257,7 @@ } while (0) #define ehci_active_intr_list(ex) ((ex)->inext.le_prev != NULL) -Static struct usbd_bus_methods ehci_bus_methods = { +static struct usbd_bus_methods ehci_bus_methods = { ehci_open, ehci_softintr, ehci_poll, @@ -267,7 +267,7 @@ ehci_freex, }; -Static struct usbd_pipe_methods ehci_root_ctrl_methods = { +static struct usbd_pipe_methods ehci_root_ctrl_methods = { ehci_root_ctrl_transfer, ehci_root_ctrl_start, ehci_root_ctrl_abort, @@ -276,7 +276,7 @@ ehci_root_ctrl_done, }; -Static struct usbd_pipe_methods ehci_root_intr_methods = { +static struct usbd_pipe_methods ehci_root_intr_methods = { ehci_root_intr_transfer, ehci_root_intr_start, ehci_root_intr_abort, @@ -285,7 +285,7 @@ ehci_root_intr_done, }; -Static struct usbd_pipe_methods ehci_device_ctrl_methods = { +static struct usbd_pipe_methods ehci_device_ctrl_methods = { ehci_device_ctrl_transfer, ehci_device_ctrl_start, ehci_device_ctrl_abort, @@ -294,7 +294,7 @@ ehci_device_ctrl_done, }; -Static struct usbd_pipe_methods ehci_device_intr_methods = { +static struct usbd_pipe_methods ehci_device_intr_methods = { ehci_device_intr_transfer, ehci_device_intr_start, ehci_device_intr_abort, @@ -303,7 +303,7 @@ ehci_device_intr_done, }; -Static struct usbd_pipe_methods ehci_device_bulk_methods = { +static struct usbd_pipe_methods ehci_device_bulk_methods = { ehci_device_bulk_transfer, ehci_device_bulk_start, ehci_device_bulk_abort, @@ -312,7 +312,7 @@ ehci_device_bulk_done, }; -Static struct usbd_pipe_methods ehci_device_isoc_methods = { +static struct usbd_pipe_methods ehci_device_isoc_methods = { ehci_device_isoc_transfer, ehci_device_isoc_start, ehci_device_isoc_abort, @@ -339,7 +339,7 @@ sc->sc_offs = EREAD1(sc, EHCI_CAPLENGTH); version = EREAD2(sc, EHCI_HCIVERSION); - printf("%s: EHCI version %x.%x\n", USBDEVNAME(sc->sc_bus.bdev), + printf("%s: EHCI version %x.%x\n", device_get_nameunit(sc->sc_bus.bdev), version >> 8, version & 0xff); sparams = EREAD4(sc, EHCI_HCSPARAMS); @@ -348,18 +348,18 @@ ncomp = EHCI_HCS_N_CC(sparams); if (ncomp != sc->sc_ncomp) { printf("%s: wrong number of companions (%d != %d)\n", - USBDEVNAME(sc->sc_bus.bdev), + device_get_nameunit(sc->sc_bus.bdev), ncomp, sc->sc_ncomp); if (ncomp < sc->sc_ncomp) sc->sc_ncomp = ncomp; } if (sc->sc_ncomp > 0) { printf("%s: companion controller%s, %d port%s each:", - USBDEVNAME(sc->sc_bus.bdev), sc->sc_ncomp!=1 ? "s" : "", + device_get_nameunit(sc->sc_bus.bdev), sc->sc_ncomp!=1 ? "s" : "", EHCI_HCS_N_PCC(sparams), EHCI_HCS_N_PCC(sparams)!=1 ? "s" : ""); for (i = 0; i < sc->sc_ncomp; i++) - printf(" %s", USBDEVNAME(sc->sc_comps[i]->bdev)); + printf(" %s", device_get_nameunit(sc->sc_comps[i]->bdev)); printf("\n"); } sc->sc_noport = EHCI_HCS_N_PORTS(sparams); @@ -374,7 +374,7 @@ sc->sc_bus.usbrev = USBREV_2_0; /* Reset the controller */ - DPRINTF(("%s: resetting\n", USBDEVNAME(sc->sc_bus.bdev))); + DPRINTF(("%s: resetting\n", device_get_nameunit(sc->sc_bus.bdev))); EOWRITE4(sc, EHCI_USBCMD, 0); /* Halt controller */ usb_delay_ms(&sc->sc_bus, 1); EOWRITE4(sc, EHCI_USBCMD, EHCI_CMD_HCRESET); @@ -386,7 +386,7 @@ } if (hcr) { printf("%s: reset timeout\n", - USBDEVNAME(sc->sc_bus.bdev)); + device_get_nameunit(sc->sc_bus.bdev)); return (USBD_IOERROR); } @@ -401,7 +401,7 @@ EHCI_FLALIGN_ALIGN, &sc->sc_fldma); if (err) return (err); - DPRINTF(("%s: flsize=%d\n", USBDEVNAME(sc->sc_bus.bdev),sc->sc_flsize)); + DPRINTF(("%s: flsize=%d\n", device_get_nameunit(sc->sc_bus.bdev),sc->sc_flsize)); sc->sc_flist = KERNADDR(&sc->sc_fldma, 0); EOWRITE4(sc, EHCI_PERIODICLISTBASE, DMAADDR(&sc->sc_fldma, 0)); @@ -512,7 +512,7 @@ break; } if (hcr) { - printf("%s: run timeout\n", USBDEVNAME(sc->sc_bus.bdev)); + printf("%s: run timeout\n", device_get_nameunit(sc->sc_bus.bdev)); return (USBD_IOERROR); } @@ -550,7 +550,7 @@ return (ehci_intr1(sc)); } -Static int +static int ehci_intr1(ehci_softc_t *sc) { u_int32_t intrs, eintrs; @@ -593,7 +593,7 @@ } if (eintrs & EHCI_STS_HSE) { printf("%s: unrecoverable error, controller halted\n", - USBDEVNAME(sc->sc_bus.bdev)); + device_get_nameunit(sc->sc_bus.bdev)); /* XXX what else */ } if (eintrs & EHCI_STS_PCD) { @@ -615,7 +615,7 @@ sc->sc_eintrs &= ~eintrs; EOWRITE4(sc, EHCI_USBINTR, sc->sc_eintrs); printf("%s: blocking intrs 0x%x\n", - USBDEVNAME(sc->sc_bus.bdev), eintrs); + device_get_nameunit(sc->sc_bus.bdev), eintrs); } return (1); @@ -675,7 +675,7 @@ ehci_softc_t *sc = v; struct ehci_xfer *ex, *nextex; - DPRINTFN(10,("%s: ehci_softintr (%d)\n", USBDEVNAME(sc->sc_bus.bdev), + DPRINTFN(10,("%s: ehci_softintr (%d)\n", device_get_nameunit(sc->sc_bus.bdev), sc->sc_bus.intr_context)); sc->sc_bus.intr_context++; @@ -967,7 +967,7 @@ #if defined(__NetBSD__) || defined(__OpenBSD__) int -ehci_activate(device_ptr_t self, enum devact act) +ehci_activate(device_t self, enum devact act) { struct ehci_softc *sc = (struct ehci_softc *)self; int rv = 0; @@ -1037,7 +1037,7 @@ } if (hcr != 0) { printf("%s: reset timeout\n", - USBDEVNAME(sc->sc_bus.bdev)); + device_get_nameunit(sc->sc_bus.bdev)); } cmd &= ~EHCI_CMD_RS; @@ -1052,7 +1052,7 @@ } if (hcr != EHCI_STS_HCH) { printf("%s: config timeout\n", - USBDEVNAME(sc->sc_bus.bdev)); + device_get_nameunit(sc->sc_bus.bdev)); } sc->sc_bus.use_polling--; @@ -1102,7 +1102,7 @@ } if (hcr == EHCI_STS_HCH) { printf("%s: config timeout\n", - USBDEVNAME(sc->sc_bus.bdev)); + device_get_nameunit(sc->sc_bus.bdev)); } usb_delay_ms(&sc->sc_bus, USB_RESUME_WAIT); @@ -1163,9 +1163,9 @@ struct ehci_softc *sc = (struct ehci_softc *)bus; usbd_xfer_handle xfer; - xfer = SIMPLEQ_FIRST(&sc->sc_free_xfers); + xfer = STAILQ_FIRST(&sc->sc_free_xfers); if (xfer != NULL) { - SIMPLEQ_REMOVE_HEAD(&sc->sc_free_xfers, next); + STAILQ_REMOVE_HEAD(&sc->sc_free_xfers, next); #ifdef DIAGNOSTIC if (xfer->busy_free != XFER_FREE) { printf("ehci_allocx: xfer=%p not free, 0x%08x\n", xfer, @@ -1205,10 +1205,10 @@ return; } #endif - SIMPLEQ_INSERT_HEAD(&sc->sc_free_xfers, xfer, next); + STAILQ_INSERT_HEAD(&sc->sc_free_xfers, xfer, next); } -Static void +static void ehci_device_clear_toggle(usbd_pipe_handle pipe) { struct ehci_pipe *epipe = (struct ehci_pipe *)pipe; @@ -1225,7 +1225,7 @@ epipe->sqh->qh.qh_qtd.qtd_status &= htole32(~EHCI_QTD_TOGGLE_MASK); } -Static void +static void ehci_noop(usbd_pipe_handle pipe) { } @@ -1354,7 +1354,7 @@ } #ifdef DIAGNOSTIC -Static void +static void ehci_dump_exfer(struct ehci_xfer *ex) { printf("ehci_dump_exfer: ex=%p\n", ex); @@ -1415,7 +1415,7 @@ if (speed != EHCI_QH_SPEED_HIGH && xfertype == UE_ISOCHRONOUS) { printf("%s: *** WARNING: opening low/full speed device, this " "does not work yet.\n", - USBDEVNAME(sc->sc_bus.bdev)); + device_get_nameunit(sc->sc_bus.bdev)); DPRINTFN(1,("ehci_open: hshubaddr=%d hshubport=%d\n", hshubaddr, hshubport)); return USBD_INVAL; @@ -1608,7 +1608,7 @@ /* * Data structures and routines to emulate the root hub. */ -Static usb_device_descriptor_t ehci_devd = { +static usb_device_descriptor_t ehci_devd = { USB_DEVICE_DESCRIPTOR_SIZE, UDESC_DEVICE, /* type */ {0x00, 0x02}, /* USB version */ @@ -1621,7 +1621,7 @@ 1 /* # of configurations */ }; -Static usb_device_qualifier_t ehci_odevd = { +static usb_device_qualifier_t ehci_odevd = { USB_DEVICE_DESCRIPTOR_SIZE, UDESC_DEVICE_QUALIFIER, /* type */ {0x00, 0x02}, /* USB version */ @@ -1633,7 +1633,7 @@ 0 }; -Static usb_config_descriptor_t ehci_confd = { +static usb_config_descriptor_t ehci_confd = { USB_CONFIG_DESCRIPTOR_SIZE, UDESC_CONFIG, {USB_CONFIG_DESCRIPTOR_SIZE + @@ -1646,7 +1646,7 @@ 0 /* max power */ }; -Static usb_interface_descriptor_t ehci_ifcd = { +static usb_interface_descriptor_t ehci_ifcd = { USB_INTERFACE_DESCRIPTOR_SIZE, UDESC_INTERFACE, 0, @@ -1658,7 +1658,7 @@ 0 }; -Static usb_endpoint_descriptor_t ehci_endpd = { +static usb_endpoint_descriptor_t ehci_endpd = { USB_ENDPOINT_DESCRIPTOR_SIZE, UDESC_ENDPOINT, UE_DIR_IN | EHCI_INTR_ENDPT, @@ -1667,7 +1667,7 @@ 255 }; -Static usb_hub_descriptor_t ehci_hubd = { +static usb_hub_descriptor_t ehci_hubd = { USB_HUB_DESCRIPTOR_SIZE, UDESC_HUB, 0, @@ -1677,7 +1677,7 @@ {0}, }; -Static int +static int ehci_str(usb_string_descriptor_t *p, int l, char *s) { int i; @@ -1697,7 +1697,7 @@ /* * Simulate a hardware hub by handling all the necessary requests. */ -Static usbd_status +static usbd_status ehci_root_ctrl_transfer(usbd_xfer_handle xfer) { usbd_status err; @@ -1708,10 +1708,10 @@ return (err); /* Pipe isn't running, start first */ - return (ehci_root_ctrl_start(SIMPLEQ_FIRST(&xfer->pipe->queue))); + return (ehci_root_ctrl_start(STAILQ_FIRST(&xfer->pipe->queue))); } -Static usbd_status +static usbd_status ehci_root_ctrl_start(usbd_xfer_handle xfer) { ehci_softc_t *sc = (ehci_softc_t *)xfer->pipe->device->bus; @@ -2050,7 +2050,7 @@ DPRINTF(("ehci after reset, status=0x%08x\n", v)); if (v & EHCI_PS_PR) { printf("%s: port reset timeout\n", - USBDEVNAME(sc->sc_bus.bdev)); + device_get_nameunit(sc->sc_bus.bdev)); return (USBD_TIMEOUT); } if (!(v & EHCI_PS_PE)) { @@ -2112,15 +2112,15 @@ int i = (index-1) / sc->sc_npcomp; if (i >= sc->sc_ncomp) printf("%s: strange port\n", - USBDEVNAME(sc->sc_bus.bdev)); + device_get_nameunit(sc->sc_bus.bdev)); else printf("%s: handing over %s speed device on " "port %d to %s\n", - USBDEVNAME(sc->sc_bus.bdev), + device_get_nameunit(sc->sc_bus.bdev), lowspeed ? "low" : "full", - index, USBDEVNAME(sc->sc_comps[i]->bdev)); + index, device_get_nameunit(sc->sc_comps[i]->bdev)); } else { - printf("%s: npcomp == 0\n", USBDEVNAME(sc->sc_bus.bdev)); + printf("%s: npcomp == 0\n", device_get_nameunit(sc->sc_bus.bdev)); } #endif port = EHCI_PORTSC(index); @@ -2129,14 +2129,14 @@ } /* Abort a root control request. */ -Static void +static void ehci_root_ctrl_abort(usbd_xfer_handle xfer) { /* Nothing to do, all transfers are synchronous. */ } /* Close the root pipe. */ -Static void +static void ehci_root_ctrl_close(usbd_pipe_handle pipe) { DPRINTF(("ehci_root_ctrl_close\n")); @@ -2148,7 +2148,7 @@ { } -Static usbd_status +static usbd_status ehci_root_intr_transfer(usbd_xfer_handle xfer) { usbd_status err; @@ -2159,10 +2159,10 @@ return (err); /* Pipe isn't running, start first */ - return (ehci_root_intr_start(SIMPLEQ_FIRST(&xfer->pipe->queue))); + return (ehci_root_intr_start(STAILQ_FIRST(&xfer->pipe->queue))); } -Static usbd_status +static usbd_status ehci_root_intr_start(usbd_xfer_handle xfer) { usbd_pipe_handle pipe = xfer->pipe; @@ -2177,7 +2177,7 @@ } /* Abort a root interrupt request. */ -Static void +static void ehci_root_intr_abort(usbd_xfer_handle xfer) { int s; @@ -2193,7 +2193,7 @@ } /* Close the root pipe. */ -Static void +static void ehci_root_intr_close(usbd_pipe_handle pipe) { ehci_softc_t *sc = (ehci_softc_t *)pipe->device->bus; @@ -2485,7 +2485,7 @@ } /* Free the chain starting at sqtd and end at the qTD before sqtdend */ -Static void +static void ehci_free_sqtd_chain(ehci_softc_t *sc, ehci_soft_qh_t *sqh, ehci_soft_qtd_t *sqtd, ehci_soft_qtd_t *sqtdend) { @@ -2776,7 +2776,7 @@ /************************/ -Static usbd_status +static usbd_status ehci_device_ctrl_transfer(usbd_xfer_handle xfer) { usbd_status err; @@ -2787,10 +2787,10 @@ return (err); /* Pipe isn't running, start first */ - return (ehci_device_ctrl_start(SIMPLEQ_FIRST(&xfer->pipe->queue))); + return (ehci_device_ctrl_start(STAILQ_FIRST(&xfer->pipe->queue))); } -Static usbd_status +static usbd_status ehci_device_ctrl_start(usbd_xfer_handle xfer) { ehci_softc_t *sc = (ehci_softc_t *)xfer->pipe->device->bus; @@ -2841,7 +2841,7 @@ } /* Abort a device control request. */ -Static void +static void ehci_device_ctrl_abort(usbd_xfer_handle xfer) { DPRINTF(("ehci_device_ctrl_abort: xfer=%p\n", xfer)); @@ -2849,7 +2849,7 @@ } /* Close a device control pipe. */ -Static void +static void ehci_device_ctrl_close(usbd_pipe_handle pipe) { ehci_softc_t *sc = (ehci_softc_t *)pipe->device->bus; @@ -3019,7 +3019,7 @@ /************************/ -Static usbd_status +static usbd_status ehci_device_bulk_transfer(usbd_xfer_handle xfer) { usbd_status err; @@ -3030,7 +3030,7 @@ return (err); /* Pipe isn't running, start first */ - return (ehci_device_bulk_start(SIMPLEQ_FIRST(&xfer->pipe->queue))); + return (ehci_device_bulk_start(STAILQ_FIRST(&xfer->pipe->queue))); } usbd_status @@ -3140,7 +3140,7 @@ #undef exfer } -Static void +static void ehci_device_bulk_abort(usbd_xfer_handle xfer) { DPRINTF(("ehci_device_bulk_abort: xfer=%p\n", xfer)); @@ -3150,7 +3150,7 @@ /* * Close a device bulk pipe. */ -Static void +static void ehci_device_bulk_close(usbd_pipe_handle pipe) { ehci_softc_t *sc = (ehci_softc_t *)pipe->device->bus; @@ -3180,7 +3180,7 @@ /************************/ -Static usbd_status +static usbd_status ehci_device_setintr(ehci_softc_t *sc, ehci_soft_qh_t *sqh, int ival) { struct ehci_soft_islot *isp; @@ -3202,7 +3202,7 @@ return (USBD_NORMAL_COMPLETION); } -Static usbd_status +static usbd_status ehci_device_intr_transfer(usbd_xfer_handle xfer) { usbd_status err; @@ -3216,10 +3216,10 @@ * Pipe isn't running (otherwise err would be USBD_INPROG), * so start it first. */ - return (ehci_device_intr_start(SIMPLEQ_FIRST(&xfer->pipe->queue))); + return (ehci_device_intr_start(STAILQ_FIRST(&xfer->pipe->queue))); } -Static usbd_status +static usbd_status ehci_device_intr_start(usbd_xfer_handle xfer) { #define exfer EXFER(xfer) @@ -3321,7 +3321,7 @@ #undef exfer } -Static void +static void ehci_device_intr_abort(usbd_xfer_handle xfer) { DPRINTFN(1, ("ehci_device_intr_abort: xfer=%p\n", xfer)); @@ -3332,7 +3332,7 @@ ehci_abort_xfer(xfer, USBD_CANCELLED); } -Static void +static void ehci_device_intr_close(usbd_pipe_handle pipe) { ehci_softc_t *sc = (ehci_softc_t *)pipe->device->bus; @@ -3343,7 +3343,7 @@ ehci_close_pipe(pipe, isp->sqh); } -Static void +static void ehci_device_intr_done(usbd_xfer_handle xfer) { #define exfer EXFER(xfer) @@ -3421,8 +3421,8 @@ /************************/ -Static usbd_status ehci_device_isoc_transfer(usbd_xfer_handle xfer) { return USBD_IOERROR; } -Static usbd_status ehci_device_isoc_start(usbd_xfer_handle xfer) { return USBD_IOERROR; } -Static void ehci_device_isoc_abort(usbd_xfer_handle xfer) { } -Static void ehci_device_isoc_close(usbd_pipe_handle pipe) { } -Static void ehci_device_isoc_done(usbd_xfer_handle xfer) { } +static usbd_status ehci_device_isoc_transfer(usbd_xfer_handle xfer) { return USBD_IOERROR; } +static usbd_status ehci_device_isoc_start(usbd_xfer_handle xfer) { return USBD_IOERROR; } +static void ehci_device_isoc_abort(usbd_xfer_handle xfer) { } +static void ehci_device_isoc_close(usbd_pipe_handle pipe) { } +static void ehci_device_isoc_done(usbd_xfer_handle xfer) { } ==== //depot/projects/newisp/dev/usb/ehci_pci.c#2 (text+ko) ==== @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/usb/ehci_pci.c,v 1.22 2006/05/28 05:27:08 iedowse Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/usb/ehci_pci.c,v 1.23 2006/09/07 00:06:41 imp Exp $"); /* * USB Enhanced Host Controller Driver, a.k.a. USB 2.0 controller. @@ -414,7 +414,7 @@ continue; bsc = device_get_softc(nbus[0]); DPRINTF(("ehci_pci_attach: companion %s\n", - USBDEVNAME(bsc->bdev))); + device_get_nameunit(bsc->bdev))); sc->sc_comps[ncomp++] = bsc; if (ncomp >= EHCI_COMPANION_MAX) break; @@ -526,7 +526,7 @@ pci_write_config(self, eecp, legsup | EHCI_LEGSUP_OSOWNED, 4); if (legsup & EHCI_LEGSUP_BIOSOWNED) { printf("%s: waiting for BIOS to give up control\n", - USBDEVNAME(sc->sc_bus.bdev)); + device_get_nameunit(sc->sc_bus.bdev)); for (i = 0; i < 5000; i++) { legsup = pci_read_config(self, eecp, 4); if ((legsup & EHCI_LEGSUP_BIOSOWNED) == 0) @@ -535,7 +535,7 @@ } if (legsup & EHCI_LEGSUP_BIOSOWNED) printf("%s: timed out waiting for BIOS\n", - USBDEVNAME(sc->sc_bus.bdev)); + device_get_nameunit(sc->sc_bus.bdev)); } } } ==== //depot/projects/newisp/dev/usb/ehcivar.h#2 (text+ko) ==== @@ -1,5 +1,5 @@ /* $NetBSD: ehcivar.h,v 1.19 2005/04/29 15:04:29 augustss Exp $ */ -/* $FreeBSD: src/sys/dev/usb/ehcivar.h,v 1.14 2006/05/24 03:04:11 iedowse Exp $ */ +/* $FreeBSD: src/sys/dev/usb/ehcivar.h,v 1.16 2006/09/07 00:06:41 imp Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -150,7 +150,7 @@ u_int32_t sc_eintrs; ehci_soft_qh_t *sc_async_head; - SIMPLEQ_HEAD(, usbd_xfer) sc_free_xfers; /* free xfers */ + STAILQ_HEAD(, usbd_xfer) sc_free_xfers; /* free xfers */ struct lock sc_doorbell_lock; @@ -158,7 +158,7 @@ usb_callout_t sc_tmo_intrlist; #if defined(__NetBSD__) || defined(__OpenBSD__) - device_ptr_t sc_child; /* /dev/usb# device */ + device_t sc_child; /* /dev/usb# device */ #endif char sc_dying; #if defined(__NetBSD__) @@ -183,7 +183,7 @@ int ehci_intr(void *); int ehci_detach(ehci_softc_t *, int); #if defined(__NetBSD__) || defined(__OpenBSD__) -int ehci_activate(device_ptr_t, enum devact); +int ehci_activate(device_t, enum devact); #endif void ehci_power(int state, void *priv); void ehci_shutdown(void *v); ==== //depot/projects/newisp/dev/usb/hid.c#2 (text+ko) ==== @@ -2,7 +2,7 @@ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/usb/hid.c,v 1.26 2006/03/22 02:04:12 iedowse Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/usb/hid.c,v 1.27 2006/09/06 23:44:23 imp Exp $"); /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. @@ -61,7 +61,7 @@ #define DPRINTFN(n,x) #endif -Static void hid_clear_local(struct hid_item *); +static void hid_clear_local(struct hid_item *); #define MAXUSAGE 100 struct hid_data { @@ -77,7 +77,7 @@ int kindset; }; -Static void +static void hid_clear_local(struct hid_item *c) { ==== //depot/projects/newisp/dev/usb/if_aue.c#2 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/usb/if_aue.c,v 1.97 2006/07/05 00:49:26 thompsa Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/usb/if_aue.c,v 1.99 2006/09/07 00:06:41 imp Exp $"); /* * ADMtek AN986 Pegasus and AN8511 Pegasus II USB to ethernet driver. @@ -116,7 +116,7 @@ #define PII 0x0004 /* Pegasus II chip */ }; -Static const struct aue_type aue_devs[] = { +static const struct aue_type aue_devs[] = { {{ USB_VENDOR_3COM, USB_PRODUCT_3COM_3C460B}, PII }, {{ USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_XX1}, PNA|PII }, {{ USB_VENDOR_ABOCOM, USB_PRODUCT_ABOCOM_XX2}, PII }, @@ -177,43 +177,43 @@ }; #define aue_lookup(v, p) ((const struct aue_type *)usb_lookup(aue_devs, v, p)) -Static int aue_match(device_ptr_t); -Static int aue_attach(device_ptr_t); -Static int aue_detach(device_ptr_t); +static int aue_match(device_t); +static int aue_attach(device_t); +static int aue_detach(device_t); -Static void aue_reset_pegasus_II(struct aue_softc *sc); -Static int aue_encap(struct aue_softc *, struct mbuf *, int); +static void aue_reset_pegasus_II(struct aue_softc *sc); +static int aue_encap(struct aue_softc *, struct mbuf *, int); #ifdef AUE_INTR_PIPE -Static void aue_intr(usbd_xfer_handle, usbd_private_handle, usbd_status); +static void aue_intr(usbd_xfer_handle, usbd_private_handle, usbd_status); #endif -Static void aue_rxeof(usbd_xfer_handle, usbd_private_handle, usbd_status); -Static void aue_txeof(usbd_xfer_handle, usbd_private_handle, usbd_status); -Static void aue_tick(void *); -Static void aue_rxstart(struct ifnet *); -Static void aue_start(struct ifnet *); -Static int aue_ioctl(struct ifnet *, u_long, caddr_t); -Static void aue_init(void *); -Static void aue_stop(struct aue_softc *); -Static void aue_watchdog(struct ifnet *); -Static void aue_shutdown(device_ptr_t); -Static int aue_ifmedia_upd(struct ifnet *); -Static void aue_ifmedia_sts(struct ifnet *, struct ifmediareq *); +static void aue_rxeof(usbd_xfer_handle, usbd_private_handle, usbd_status); +static void aue_txeof(usbd_xfer_handle, usbd_private_handle, usbd_status); +static void aue_tick(void *); +static void aue_rxstart(struct ifnet *); +static void aue_start(struct ifnet *); >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200609070442.k874g1x7039830>