From cdb51d12a651450156caf19a79ed364676ea08e6 Mon Sep 17 00:00:00 2001 From: Nick Hibma Date: Mon, 3 Apr 2000 20:58:30 +0000 Subject: [PATCH] OpenBSD has a broken debugger that does not grok static. Use a #define Static static that the OpenBSD folks can define it to be empty if they like. --- sys/dev/usb/hid.c | 4 +- sys/dev/usb/if_aue.c | 134 +++++++++++----------- sys/dev/usb/if_cue.c | 110 +++++++++--------- sys/dev/usb/if_kue.c | 94 ++++++++-------- sys/dev/usb/kue_fw.h | 6 +- sys/dev/usb/ohci.c | 218 ++++++++++++++++++------------------ sys/dev/usb/ugen.c | 34 +++--- sys/dev/usb/uhci.c | 150 ++++++++++++------------- sys/dev/usb/uhid.c | 10 +- sys/dev/usb/uhub.c | 14 +-- sys/dev/usb/ukbd.c | 124 ++++++++++---------- sys/dev/usb/ulpt.c | 10 +- sys/dev/usb/umass.c | 114 +++++++++---------- sys/dev/usb/umodem.c | 2 +- sys/dev/usb/ums.c | 40 +++---- sys/dev/usb/urio.c | 6 +- sys/dev/usb/usb.c | 20 ++-- sys/dev/usb/usb_ethersubr.c | 10 +- sys/dev/usb/usb_port.h | 25 +++-- sys/dev/usb/usb_quirks.c | 2 +- sys/dev/usb/usb_subr.c | 24 ++-- sys/dev/usb/usbdi.c | 16 +-- sys/dev/usb/usbdi_util.c | 4 +- 23 files changed, 588 insertions(+), 583 deletions(-) diff --git a/sys/dev/usb/hid.c b/sys/dev/usb/hid.c index d99f59c57eeb..14ab0cc48c1e 100644 --- a/sys/dev/usb/hid.c +++ b/sys/dev/usb/hid.c @@ -59,7 +59,7 @@ extern int usbdebug; #define DPRINTFN(n,x) #endif -static void hid_clear_local __P((struct hid_item *)); +Static void hid_clear_local __P((struct hid_item *)); #define MAXUSAGE 100 struct hid_data { @@ -75,7 +75,7 @@ struct hid_data { int kindset; }; -static void +Static void hid_clear_local(c) struct hid_item *c; { diff --git a/sys/dev/usb/if_aue.c b/sys/dev/usb/if_aue.c index b2f3a5c4fb79..dca7239bbb90 100644 --- a/sys/dev/usb/if_aue.c +++ b/sys/dev/usb/if_aue.c @@ -103,7 +103,7 @@ static const char rcsid[] = /* * Various supported device vendors/products. */ -static struct aue_type aue_devs[] = { +Static struct aue_type aue_devs[] = { { USB_VENDOR_ADMTEK, USB_PRODUCT_ADMTEK_PEGASUS }, { USB_VENDOR_BILLIONTON, USB_PRODUCT_BILLIONTON_USB100 }, { USB_VENDOR_MELCO, USB_PRODUCT_MELCO_LUATX }, @@ -116,51 +116,51 @@ static struct aue_type aue_devs[] = { { 0, 0 } }; -static struct usb_qdat aue_qdat; +Static struct usb_qdat aue_qdat; -static int aue_match __P((device_t)); -static int aue_attach __P((device_t)); -static int aue_detach __P((device_t)); +Static int aue_match __P((device_t)); +Static int aue_attach __P((device_t)); +Static int aue_detach __P((device_t)); -static int aue_tx_list_init __P((struct aue_softc *)); -static int aue_rx_list_init __P((struct aue_softc *)); -static int aue_newbuf __P((struct aue_softc *, struct aue_chain *, +Static int aue_tx_list_init __P((struct aue_softc *)); +Static int aue_rx_list_init __P((struct aue_softc *)); +Static int aue_newbuf __P((struct aue_softc *, struct aue_chain *, struct mbuf *)); -static int aue_encap __P((struct aue_softc *, struct mbuf *, int)); -static void aue_intr __P((usbd_xfer_handle, +Static int aue_encap __P((struct aue_softc *, struct mbuf *, int)); +Static void aue_intr __P((usbd_xfer_handle, usbd_private_handle, usbd_status)); -static void aue_rxeof __P((usbd_xfer_handle, +Static void aue_rxeof __P((usbd_xfer_handle, usbd_private_handle, usbd_status)); -static void aue_txeof __P((usbd_xfer_handle, +Static void aue_txeof __P((usbd_xfer_handle, usbd_private_handle, usbd_status)); -static void aue_tick __P((void *)); -static void aue_rxstart __P((struct ifnet *)); -static void aue_start __P((struct ifnet *)); -static int aue_ioctl __P((struct ifnet *, u_long, caddr_t)); -static void aue_init __P((void *)); -static void aue_stop __P((struct aue_softc *)); -static void aue_watchdog __P((struct ifnet *)); -static void aue_shutdown __P((device_t)); -static int aue_ifmedia_upd __P((struct ifnet *)); -static void aue_ifmedia_sts __P((struct ifnet *, struct ifmediareq *)); +Static void aue_tick __P((void *)); +Static void aue_rxstart __P((struct ifnet *)); +Static void aue_start __P((struct ifnet *)); +Static int aue_ioctl __P((struct ifnet *, u_long, caddr_t)); +Static void aue_init __P((void *)); +Static void aue_stop __P((struct aue_softc *)); +Static void aue_watchdog __P((struct ifnet *)); +Static void aue_shutdown __P((device_t)); +Static int aue_ifmedia_upd __P((struct ifnet *)); +Static void aue_ifmedia_sts __P((struct ifnet *, struct ifmediareq *)); -static void aue_eeprom_getword __P((struct aue_softc *, int, u_int16_t *)); -static void aue_read_eeprom __P((struct aue_softc *, caddr_t, int, +Static void aue_eeprom_getword __P((struct aue_softc *, int, u_int16_t *)); +Static void aue_read_eeprom __P((struct aue_softc *, caddr_t, int, int, int)); -static int aue_miibus_readreg __P((device_t, int, int)); -static int aue_miibus_writereg __P((device_t, int, int, int)); -static void aue_miibus_statchg __P((device_t)); +Static int aue_miibus_readreg __P((device_t, int, int)); +Static int aue_miibus_writereg __P((device_t, int, int, int)); +Static void aue_miibus_statchg __P((device_t)); -static void aue_setmulti __P((struct aue_softc *)); -static u_int32_t aue_crc __P((caddr_t)); -static void aue_reset __P((struct aue_softc *)); +Static void aue_setmulti __P((struct aue_softc *)); +Static u_int32_t aue_crc __P((caddr_t)); +Static void aue_reset __P((struct aue_softc *)); -static int csr_read_1 __P((struct aue_softc *, int)); -static int csr_write_1 __P((struct aue_softc *, int, int)); -static int csr_read_2 __P((struct aue_softc *, int)); -static int csr_write_2 __P((struct aue_softc *, int, int)); +Static int csr_read_1 __P((struct aue_softc *, int)); +Static int csr_write_1 __P((struct aue_softc *, int, int)); +Static int csr_read_2 __P((struct aue_softc *, int)); +Static int csr_write_2 __P((struct aue_softc *, int, int)); -static device_method_t aue_methods[] = { +Static device_method_t aue_methods[] = { /* Device interface */ DEVMETHOD(device_probe, aue_match), DEVMETHOD(device_attach, aue_attach), @@ -179,13 +179,13 @@ static device_method_t aue_methods[] = { { 0, 0 } }; -static driver_t aue_driver = { +Static driver_t aue_driver = { "aue", aue_methods, sizeof(struct aue_softc) }; -static devclass_t aue_devclass; +Static devclass_t aue_devclass; DRIVER_MODULE(if_aue, uhub, aue_driver, aue_devclass, usbd_driver_load, 0); DRIVER_MODULE(miibus, aue, miibus_driver, miibus_devclass, 0, 0); @@ -196,7 +196,7 @@ DRIVER_MODULE(miibus, aue, miibus_driver, miibus_devclass, 0, 0); #define AUE_CLRBIT(sc, reg, x) \ csr_write_1(sc, reg, csr_read_1(sc, reg) & ~(x)) -static int csr_read_1(sc, reg) +Static int csr_read_1(sc, reg) struct aue_softc *sc; int reg; { @@ -227,7 +227,7 @@ static int csr_read_1(sc, reg) return(val); } -static int csr_read_2(sc, reg) +Static int csr_read_2(sc, reg) struct aue_softc *sc; int reg; { @@ -258,7 +258,7 @@ static int csr_read_2(sc, reg) return(val); } -static int csr_write_1(sc, reg, val) +Static int csr_write_1(sc, reg, val) struct aue_softc *sc; int reg, val; { @@ -288,7 +288,7 @@ static int csr_write_1(sc, reg, val) return(0); } -static int csr_write_2(sc, reg, val) +Static int csr_write_2(sc, reg, val) struct aue_softc *sc; int reg, val; { @@ -321,7 +321,7 @@ static int csr_write_2(sc, reg, val) /* * Read a word of data stored in the EEPROM at address 'addr.' */ -static void aue_eeprom_getword(sc, addr, dest) +Static void aue_eeprom_getword(sc, addr, dest) struct aue_softc *sc; int addr; u_int16_t *dest; @@ -352,7 +352,7 @@ static void aue_eeprom_getword(sc, addr, dest) /* * Read a sequence of words from the EEPROM. */ -static void aue_read_eeprom(sc, dest, off, cnt, swap) +Static void aue_read_eeprom(sc, dest, off, cnt, swap) struct aue_softc *sc; caddr_t dest; int off; @@ -374,7 +374,7 @@ static void aue_read_eeprom(sc, dest, off, cnt, swap) return; } -static int aue_miibus_readreg(dev, phy, reg) +Static int aue_miibus_readreg(dev, phy, reg) device_t dev; int phy, reg; { @@ -421,7 +421,7 @@ static int aue_miibus_readreg(dev, phy, reg) return(val); } -static int aue_miibus_writereg(dev, phy, reg, data) +Static int aue_miibus_writereg(dev, phy, reg, data) device_t dev; int phy, reg, data; { @@ -451,7 +451,7 @@ static int aue_miibus_writereg(dev, phy, reg, data) return(0); } -static void aue_miibus_statchg(dev) +Static void aue_miibus_statchg(dev) device_t dev; { struct aue_softc *sc; @@ -496,7 +496,7 @@ static void aue_miibus_statchg(dev) #define AUE_POLY 0xEDB88320 #define AUE_BITS 6 -static u_int32_t aue_crc(addr) +Static u_int32_t aue_crc(addr) caddr_t addr; { u_int32_t idx, bit, data, crc; @@ -512,7 +512,7 @@ static u_int32_t aue_crc(addr) return (crc & ((1 << AUE_BITS) - 1)); } -static void aue_setmulti(sc) +Static void aue_setmulti(sc) struct aue_softc *sc; { struct ifnet *ifp; @@ -544,7 +544,7 @@ static void aue_setmulti(sc) return; } -static void aue_reset(sc) +Static void aue_reset(sc) struct aue_softc *sc; { register int i; @@ -745,7 +745,7 @@ USB_ATTACH(aue) USB_ATTACH_SUCCESS_RETURN; } -static int aue_detach(dev) +Static int aue_detach(dev) device_t dev; { struct aue_softc *sc; @@ -777,7 +777,7 @@ static int aue_detach(dev) /* * Initialize an RX descriptor and attach an MBUF cluster. */ -static int aue_newbuf(sc, c, m) +Static int aue_newbuf(sc, c, m) struct aue_softc *sc; struct aue_chain *c; struct mbuf *m; @@ -812,7 +812,7 @@ static int aue_newbuf(sc, c, m) return(0); } -static int aue_rx_list_init(sc) +Static int aue_rx_list_init(sc) struct aue_softc *sc; { struct aue_cdata *cd; @@ -836,7 +836,7 @@ static int aue_rx_list_init(sc) return(0); } -static int aue_tx_list_init(sc) +Static int aue_tx_list_init(sc) struct aue_softc *sc; { struct aue_cdata *cd; @@ -862,7 +862,7 @@ static int aue_tx_list_init(sc) return(0); } -static void aue_intr(xfer, priv, status) +Static void aue_intr(xfer, priv, status) usbd_xfer_handle xfer; usbd_private_handle priv; usbd_status status; @@ -907,7 +907,7 @@ static void aue_intr(xfer, priv, status) return; } -static void aue_rxstart(ifp) +Static void aue_rxstart(ifp) struct ifnet *ifp; { struct aue_softc *sc; @@ -934,7 +934,7 @@ static void aue_rxstart(ifp) * A frame has been uploaded: pass the resulting mbuf chain up to * the higher level protocols. */ -static void aue_rxeof(xfer, priv, status) +Static void aue_rxeof(xfer, priv, status) usbd_xfer_handle xfer; usbd_private_handle priv; usbd_status status; @@ -1008,7 +1008,7 @@ done: * the list buffers. */ -static void aue_txeof(xfer, priv, status) +Static void aue_txeof(xfer, priv, status) usbd_xfer_handle xfer; usbd_private_handle priv; usbd_status status; @@ -1056,7 +1056,7 @@ static void aue_txeof(xfer, priv, status) return; } -static void aue_tick(xsc) +Static void aue_tick(xsc) void *xsc; { struct aue_softc *sc; @@ -1097,7 +1097,7 @@ static void aue_tick(xsc) return; } -static int aue_encap(sc, m, idx) +Static int aue_encap(sc, m, idx) struct aue_softc *sc; struct mbuf *m; int idx; @@ -1142,7 +1142,7 @@ static int aue_encap(sc, m, idx) return(0); } -static void aue_start(ifp) +Static void aue_start(ifp) struct ifnet *ifp; { struct aue_softc *sc; @@ -1183,7 +1183,7 @@ static void aue_start(ifp) return; } -static void aue_init(xsc) +Static void aue_init(xsc) void *xsc; { struct aue_softc *sc = xsc; @@ -1292,7 +1292,7 @@ static void aue_init(xsc) /* * Set media options. */ -static int aue_ifmedia_upd(ifp) +Static int aue_ifmedia_upd(ifp) struct ifnet *ifp; { struct aue_softc *sc; @@ -1316,7 +1316,7 @@ static int aue_ifmedia_upd(ifp) /* * Report current media status. */ -static void aue_ifmedia_sts(ifp, ifmr) +Static void aue_ifmedia_sts(ifp, ifmr) struct ifnet *ifp; struct ifmediareq *ifmr; { @@ -1333,7 +1333,7 @@ static void aue_ifmedia_sts(ifp, ifmr) return; } -static int aue_ioctl(ifp, command, data) +Static int aue_ioctl(ifp, command, data) struct ifnet *ifp; u_long command; caddr_t data; @@ -1390,7 +1390,7 @@ static int aue_ioctl(ifp, command, data) return(error); } -static void aue_watchdog(ifp) +Static void aue_watchdog(ifp) struct ifnet *ifp; { struct aue_softc *sc; @@ -1412,7 +1412,7 @@ static void aue_watchdog(ifp) * Stop the adapter and free any mbufs allocated to the * RX and TX lists. */ -static void aue_stop(sc) +Static void aue_stop(sc) struct aue_softc *sc; { usbd_status err; @@ -1516,7 +1516,7 @@ static void aue_stop(sc) * Stop all chip I/O so that the kernel's probe routines don't * get confused by errant DMAs when rebooting. */ -static void aue_shutdown(dev) +Static void aue_shutdown(dev) device_t dev; { struct aue_softc *sc; diff --git a/sys/dev/usb/if_cue.c b/sys/dev/usb/if_cue.c index 4dc5392c1ee3..f07899276ce7 100644 --- a/sys/dev/usb/if_cue.c +++ b/sys/dev/usb/if_cue.c @@ -85,51 +85,51 @@ static const char rcsid[] = /* * Various supported device vendors/products. */ -static struct cue_type cue_devs[] = { +Static struct cue_type cue_devs[] = { { USB_VENDOR_CATC, USB_PRODUCT_CATC_NETMATE }, { USB_VENDOR_CATC, USB_PRODUCT_CATC_NETMATE2 }, { 0, 0 } }; -static struct usb_qdat cue_qdat; +Static struct usb_qdat cue_qdat; -static int cue_match __P((device_t)); -static int cue_attach __P((device_t)); -static int cue_detach __P((device_t)); +Static int cue_match __P((device_t)); +Static int cue_attach __P((device_t)); +Static int cue_detach __P((device_t)); -static int cue_tx_list_init __P((struct cue_softc *)); -static int cue_rx_list_init __P((struct cue_softc *)); -static int cue_newbuf __P((struct cue_softc *, struct cue_chain *, +Static int cue_tx_list_init __P((struct cue_softc *)); +Static int cue_rx_list_init __P((struct cue_softc *)); +Static int cue_newbuf __P((struct cue_softc *, struct cue_chain *, struct mbuf *)); -static int cue_encap __P((struct cue_softc *, struct mbuf *, int)); -static void cue_rxeof __P((usbd_xfer_handle, +Static int cue_encap __P((struct cue_softc *, struct mbuf *, int)); +Static void cue_rxeof __P((usbd_xfer_handle, usbd_private_handle, usbd_status)); -static void cue_txeof __P((usbd_xfer_handle, +Static void cue_txeof __P((usbd_xfer_handle, usbd_private_handle, usbd_status)); -static void cue_tick __P((void *)); -static void cue_rxstart __P((struct ifnet *)); -static void cue_start __P((struct ifnet *)); -static int cue_ioctl __P((struct ifnet *, u_long, caddr_t)); -static void cue_init __P((void *)); -static void cue_stop __P((struct cue_softc *)); -static void cue_watchdog __P((struct ifnet *)); -static void cue_shutdown __P((device_t)); +Static void cue_tick __P((void *)); +Static void cue_rxstart __P((struct ifnet *)); +Static void cue_start __P((struct ifnet *)); +Static int cue_ioctl __P((struct ifnet *, u_long, caddr_t)); +Static void cue_init __P((void *)); +Static void cue_stop __P((struct cue_softc *)); +Static void cue_watchdog __P((struct ifnet *)); +Static void cue_shutdown __P((device_t)); -static void cue_setmulti __P((struct cue_softc *)); -static u_int32_t cue_crc __P((caddr_t)); -static void cue_reset __P((struct cue_softc *)); +Static void cue_setmulti __P((struct cue_softc *)); +Static u_int32_t cue_crc __P((caddr_t)); +Static void cue_reset __P((struct cue_softc *)); -static int csr_read_1 __P((struct cue_softc *, int)); -static int csr_write_1 __P((struct cue_softc *, int, int)); -static int csr_read_2 __P((struct cue_softc *, int)); +Static int csr_read_1 __P((struct cue_softc *, int)); +Static int csr_write_1 __P((struct cue_softc *, int, int)); +Static int csr_read_2 __P((struct cue_softc *, int)); #ifdef notdef -static int csr_write_2 __P((struct cue_softc *, int, int)); +Static int csr_write_2 __P((struct cue_softc *, int, int)); #endif -static int cue_mem __P((struct cue_softc *, int, +Static int cue_mem __P((struct cue_softc *, int, int, void *, int)); -static int cue_getmac __P((struct cue_softc *, void *)); +Static int cue_getmac __P((struct cue_softc *, void *)); -static device_method_t cue_methods[] = { +Static device_method_t cue_methods[] = { /* Device interface */ DEVMETHOD(device_probe, cue_match), DEVMETHOD(device_attach, cue_attach), @@ -139,13 +139,13 @@ static device_method_t cue_methods[] = { { 0, 0 } }; -static driver_t cue_driver = { +Static driver_t cue_driver = { "cue", cue_methods, sizeof(struct cue_softc) }; -static devclass_t cue_devclass; +Static devclass_t cue_devclass; DRIVER_MODULE(if_cue, uhub, cue_driver, cue_devclass, usbd_driver_load, 0); @@ -155,7 +155,7 @@ DRIVER_MODULE(if_cue, uhub, cue_driver, cue_devclass, usbd_driver_load, 0); #define CUE_CLRBIT(sc, reg, x) \ csr_write_1(sc, reg, csr_read_1(sc, reg) & ~(x)) -static int csr_read_1(sc, reg) +Static int csr_read_1(sc, reg) struct cue_softc *sc; int reg; { @@ -186,7 +186,7 @@ static int csr_read_1(sc, reg) return(val); } -static int csr_read_2(sc, reg) +Static int csr_read_2(sc, reg) struct cue_softc *sc; int reg; { @@ -217,7 +217,7 @@ static int csr_read_2(sc, reg) return(val); } -static int csr_write_1(sc, reg, val) +Static int csr_write_1(sc, reg, val) struct cue_softc *sc; int reg, val; { @@ -248,7 +248,7 @@ static int csr_write_1(sc, reg, val) } #ifdef notdef -static int csr_write_2(sc, reg, val) +Static int csr_write_2(sc, reg, val) struct cue_softc *sc; int reg, val; { @@ -279,7 +279,7 @@ static int csr_write_2(sc, reg, val) } #endif -static int cue_mem(sc, cmd, addr, buf, len) +Static int cue_mem(sc, cmd, addr, buf, len) struct cue_softc *sc; int cmd; int addr; @@ -315,7 +315,7 @@ static int cue_mem(sc, cmd, addr, buf, len) return(0); } -static int cue_getmac(sc, buf) +Static int cue_getmac(sc, buf) struct cue_softc *sc; void *buf; { @@ -350,7 +350,7 @@ static int cue_getmac(sc, buf) #define CUE_POLY 0xEDB88320 #define CUE_BITS 9 -static u_int32_t cue_crc(addr) +Static u_int32_t cue_crc(addr) caddr_t addr; { u_int32_t idx, bit, data, crc; @@ -366,7 +366,7 @@ static u_int32_t cue_crc(addr) return (crc & ((1 << CUE_BITS) - 1)); } -static void cue_setmulti(sc) +Static void cue_setmulti(sc) struct cue_softc *sc; { struct ifnet *ifp; @@ -411,7 +411,7 @@ static void cue_setmulti(sc) return; } -static void cue_reset(sc) +Static void cue_reset(sc) struct cue_softc *sc; { usb_device_request_t req; @@ -567,7 +567,7 @@ USB_ATTACH(cue) USB_ATTACH_SUCCESS_RETURN; } -static int cue_detach(dev) +Static int cue_detach(dev) device_t dev; { struct cue_softc *sc; @@ -599,7 +599,7 @@ static int cue_detach(dev) /* * Initialize an RX descriptor and attach an MBUF cluster. */ -static int cue_newbuf(sc, c, m) +Static int cue_newbuf(sc, c, m) struct cue_softc *sc; struct cue_chain *c; struct mbuf *m; @@ -634,7 +634,7 @@ static int cue_newbuf(sc, c, m) return(0); } -static int cue_rx_list_init(sc) +Static int cue_rx_list_init(sc) struct cue_softc *sc; { struct cue_cdata *cd; @@ -658,7 +658,7 @@ static int cue_rx_list_init(sc) return(0); } -static int cue_tx_list_init(sc) +Static int cue_tx_list_init(sc) struct cue_softc *sc; { struct cue_cdata *cd; @@ -684,7 +684,7 @@ static int cue_tx_list_init(sc) return(0); } -static void cue_rxstart(ifp) +Static void cue_rxstart(ifp) struct ifnet *ifp; { struct cue_softc *sc; @@ -711,7 +711,7 @@ static void cue_rxstart(ifp) * A frame has been uploaded: pass the resulting mbuf chain up to * the higher level protocols. */ -static void cue_rxeof(xfer, priv, status) +Static void cue_rxeof(xfer, priv, status) usbd_xfer_handle xfer; usbd_private_handle priv; usbd_status status; @@ -777,7 +777,7 @@ done: * the list buffers. */ -static void cue_txeof(xfer, priv, status) +Static void cue_txeof(xfer, priv, status) usbd_xfer_handle xfer; usbd_private_handle priv; usbd_status status; @@ -825,7 +825,7 @@ static void cue_txeof(xfer, priv, status) return; } -static void cue_tick(xsc) +Static void cue_tick(xsc) void *xsc; { struct cue_softc *sc; @@ -857,7 +857,7 @@ static void cue_tick(xsc) return; } -static int cue_encap(sc, m, idx) +Static int cue_encap(sc, m, idx) struct cue_softc *sc; struct mbuf *m; int idx; @@ -896,7 +896,7 @@ static int cue_encap(sc, m, idx) return(0); } -static void cue_start(ifp) +Static void cue_start(ifp) struct ifnet *ifp; { struct cue_softc *sc; @@ -934,7 +934,7 @@ static void cue_start(ifp) return; } -static void cue_init(xsc) +Static void cue_init(xsc) void *xsc; { struct cue_softc *sc = xsc; @@ -1037,7 +1037,7 @@ static void cue_init(xsc) return; } -static int cue_ioctl(ifp, command, data) +Static int cue_ioctl(ifp, command, data) struct ifnet *ifp; u_long command; caddr_t data; @@ -1089,7 +1089,7 @@ static int cue_ioctl(ifp, command, data) return(error); } -static void cue_watchdog(ifp) +Static void cue_watchdog(ifp) struct ifnet *ifp; { struct cue_softc *sc; @@ -1111,7 +1111,7 @@ static void cue_watchdog(ifp) * Stop the adapter and free any mbufs allocated to the * RX and TX lists. */ -static void cue_stop(sc) +Static void cue_stop(sc) struct cue_softc *sc; { usbd_status err; @@ -1209,7 +1209,7 @@ static void cue_stop(sc) * Stop all chip I/O so that the kernel's probe routines don't * get confused by errant DMAs when rebooting. */ -static void cue_shutdown(dev) +Static void cue_shutdown(dev) device_t dev; { struct cue_softc *sc; diff --git a/sys/dev/usb/if_kue.c b/sys/dev/usb/if_kue.c index 24b3aa7c25ef..540f51729bf2 100644 --- a/sys/dev/usb/if_kue.c +++ b/sys/dev/usb/if_kue.c @@ -101,7 +101,7 @@ static const char rcsid[] = /* * Various supported device vendors/products. */ -static struct kue_type kue_devs[] = { +Static struct kue_type kue_devs[] = { { USB_VENDOR_AOX, USB_PRODUCT_AOX_USB101 }, { USB_VENDOR_KLSI, USB_PRODUCT_AOX_USB101 }, { USB_VENDOR_ADS, USB_PRODUCT_ADS_UBS10BT }, @@ -120,40 +120,40 @@ static struct kue_type kue_devs[] = { { 0, 0 } }; -static struct usb_qdat kue_qdat; +Static struct usb_qdat kue_qdat; -static int kue_match __P((device_t)); -static int kue_attach __P((device_t)); -static int kue_detach __P((device_t)); -static void kue_shutdown __P((device_t)); -static int kue_tx_list_init __P((struct kue_softc *)); -static int kue_rx_list_init __P((struct kue_softc *)); -static int kue_newbuf __P((struct kue_softc *, struct kue_chain *, +Static int kue_match __P((device_t)); +Static int kue_attach __P((device_t)); +Static int kue_detach __P((device_t)); +Static void kue_shutdown __P((device_t)); +Static int kue_tx_list_init __P((struct kue_softc *)); +Static int kue_rx_list_init __P((struct kue_softc *)); +Static int kue_newbuf __P((struct kue_softc *, struct kue_chain *, struct mbuf *)); -static int kue_encap __P((struct kue_softc *, struct mbuf *, int)); -static void kue_rxeof __P((usbd_xfer_handle, +Static int kue_encap __P((struct kue_softc *, struct mbuf *, int)); +Static void kue_rxeof __P((usbd_xfer_handle, usbd_private_handle, usbd_status)); -static void kue_txeof __P((usbd_xfer_handle, +Static void kue_txeof __P((usbd_xfer_handle, usbd_private_handle, usbd_status)); -static void kue_start __P((struct ifnet *)); -static void kue_rxstart __P((struct ifnet *)); -static int kue_ioctl __P((struct ifnet *, u_long, caddr_t)); -static void kue_init __P((void *)); -static void kue_stop __P((struct kue_softc *)); -static void kue_watchdog __P((struct ifnet *)); +Static void kue_start __P((struct ifnet *)); +Static void kue_rxstart __P((struct ifnet *)); +Static int kue_ioctl __P((struct ifnet *, u_long, caddr_t)); +Static void kue_init __P((void *)); +Static void kue_stop __P((struct kue_softc *)); +Static void kue_watchdog __P((struct ifnet *)); -static void kue_setmulti __P((struct kue_softc *)); -static void kue_reset __P((struct kue_softc *)); +Static void kue_setmulti __P((struct kue_softc *)); +Static void kue_reset __P((struct kue_softc *)); -static usbd_status kue_do_request +Static usbd_status kue_do_request __P((usbd_device_handle, usb_device_request_t *, void *)); -static usbd_status kue_ctl __P((struct kue_softc *, int, u_int8_t, +Static usbd_status kue_ctl __P((struct kue_softc *, int, u_int8_t, u_int16_t, char *, int)); -static usbd_status kue_setword __P((struct kue_softc *, u_int8_t, u_int16_t)); -static int kue_load_fw __P((struct kue_softc *)); +Static usbd_status kue_setword __P((struct kue_softc *, u_int8_t, u_int16_t)); +Static int kue_load_fw __P((struct kue_softc *)); -static device_method_t kue_methods[] = { +Static device_method_t kue_methods[] = { /* Device interface */ DEVMETHOD(device_probe, kue_match), DEVMETHOD(device_attach, kue_attach), @@ -163,13 +163,13 @@ static device_method_t kue_methods[] = { { 0, 0 } }; -static driver_t kue_driver = { +Static driver_t kue_driver = { "kue", kue_methods, sizeof(struct kue_softc) }; -static devclass_t kue_devclass; +Static devclass_t kue_devclass; DRIVER_MODULE(if_kue, uhub, kue_driver, kue_devclass, usbd_driver_load, 0); @@ -180,7 +180,7 @@ DRIVER_MODULE(if_kue, uhub, kue_driver, kue_devclass, usbd_driver_load, 0); * to download the firmware to the device, which can take longer * than the default timeout. */ -static usbd_status kue_do_request(dev, req, data) +Static usbd_status kue_do_request(dev, req, data) usbd_device_handle dev; usb_device_request_t *req; void *data; @@ -196,7 +196,7 @@ static usbd_status kue_do_request(dev, req, data) return(err); } -static usbd_status kue_setword(sc, breq, word) +Static usbd_status kue_setword(sc, breq, word) struct kue_softc *sc; u_int8_t breq; u_int16_t word; @@ -227,7 +227,7 @@ static usbd_status kue_setword(sc, breq, word) return(err); } -static usbd_status kue_ctl(sc, rw, breq, val, data, len) +Static usbd_status kue_ctl(sc, rw, breq, val, data, len) struct kue_softc *sc; int rw; u_int8_t breq; @@ -264,7 +264,7 @@ static usbd_status kue_ctl(sc, rw, breq, val, data, len) return(err); } -static int kue_load_fw(sc) +Static int kue_load_fw(sc) struct kue_softc *sc; { usbd_status err; @@ -321,7 +321,7 @@ static int kue_load_fw(sc) return(0); } -static void kue_setmulti(sc) +Static void kue_setmulti(sc) struct kue_softc *sc; { struct ifnet *ifp; @@ -372,7 +372,7 @@ static void kue_setmulti(sc) * done after the firmware is loaded into the adapter in order to * bring it into proper operation. */ -static void kue_reset(sc) +Static void kue_reset(sc) struct kue_softc *sc; { if (usbd_set_config_no(sc->kue_udev, KUE_CONFIG_NO, 0)) { @@ -512,7 +512,7 @@ USB_ATTACH(kue) USB_ATTACH_SUCCESS_RETURN; } -static int kue_detach(dev) +Static int kue_detach(dev) device_t dev; { struct kue_softc *sc; @@ -549,7 +549,7 @@ static int kue_detach(dev) /* * Initialize an RX descriptor and attach an MBUF cluster. */ -static int kue_newbuf(sc, c, m) +Static int kue_newbuf(sc, c, m) struct kue_softc *sc; struct kue_chain *c; struct mbuf *m; @@ -583,7 +583,7 @@ static int kue_newbuf(sc, c, m) return(0); } -static int kue_rx_list_init(sc) +Static int kue_rx_list_init(sc) struct kue_softc *sc; { struct kue_cdata *cd; @@ -607,7 +607,7 @@ static int kue_rx_list_init(sc) return(0); } -static int kue_tx_list_init(sc) +Static int kue_tx_list_init(sc) struct kue_softc *sc; { struct kue_cdata *cd; @@ -633,7 +633,7 @@ static int kue_tx_list_init(sc) return(0); } -static void kue_rxstart(ifp) +Static void kue_rxstart(ifp) struct ifnet *ifp; { struct kue_softc *sc; @@ -660,7 +660,7 @@ static void kue_rxstart(ifp) * A frame has been uploaded: pass the resulting mbuf chain up to * the higher level protocols. */ -static void kue_rxeof(xfer, priv, status) +Static void kue_rxeof(xfer, priv, status) usbd_xfer_handle xfer; usbd_private_handle priv; usbd_status status; @@ -729,7 +729,7 @@ done: * the list buffers. */ -static void kue_txeof(xfer, priv, status) +Static void kue_txeof(xfer, priv, status) usbd_xfer_handle xfer; usbd_private_handle priv; usbd_status status; @@ -777,7 +777,7 @@ static void kue_txeof(xfer, priv, status) return; } -static int kue_encap(sc, m, idx) +Static int kue_encap(sc, m, idx) struct kue_softc *sc; struct mbuf *m; int idx; @@ -817,7 +817,7 @@ static int kue_encap(sc, m, idx) return(0); } -static void kue_start(ifp) +Static void kue_start(ifp) struct ifnet *ifp; { struct kue_softc *sc; @@ -855,7 +855,7 @@ static void kue_start(ifp) return; } -static void kue_init(xsc) +Static void kue_init(xsc) void *xsc; { struct kue_softc *sc = xsc; @@ -944,7 +944,7 @@ static void kue_init(xsc) return; } -static int kue_ioctl(ifp, command, data) +Static int kue_ioctl(ifp, command, data) struct ifnet *ifp; u_long command; caddr_t data; @@ -998,7 +998,7 @@ static int kue_ioctl(ifp, command, data) return(error); } -static void kue_watchdog(ifp) +Static void kue_watchdog(ifp) struct ifnet *ifp; { struct kue_softc *sc; @@ -1020,7 +1020,7 @@ static void kue_watchdog(ifp) * Stop the adapter and free any mbufs allocated to the * RX and TX lists. */ -static void kue_stop(sc) +Static void kue_stop(sc) struct kue_softc *sc; { usbd_status err; @@ -1114,7 +1114,7 @@ static void kue_stop(sc) * Stop all chip I/O so that the kernel's probe routines don't * get confused by errant DMAs when rebooting. */ -static void kue_shutdown(dev) +Static void kue_shutdown(dev) device_t dev; { struct kue_softc *sc; diff --git a/sys/dev/usb/kue_fw.h b/sys/dev/usb/kue_fw.h index 65b34b217c07..8d8c1e1f2f0c 100644 --- a/sys/dev/usb/kue_fw.h +++ b/sys/dev/usb/kue_fw.h @@ -85,7 +85,7 @@ #define KUE_QTINTR_LOAD_CODE_HIGH 0x9C /* Firmware code segment */ -static unsigned char kue_code_seg[] = +Static unsigned char kue_code_seg[] = { /******************************************/ /* NOTE: B6/C3 is data header signature */ @@ -577,7 +577,7 @@ static unsigned char kue_code_seg[] = }; /* Firmware fixup (data?) segment */ -static unsigned char kue_fix_seg[] = +Static unsigned char kue_fix_seg[] = { /******************************************/ /* NOTE: B6/C3 is data header signature */ @@ -680,6 +680,6 @@ static unsigned char kue_fix_seg[] = /* Fixup command. */ #define KUE_TRIGCMD_OFFSET 5 -static unsigned char kue_trig_seg[] = { +Static unsigned char kue_trig_seg[] = { 0xb6, 0xc3, 0x01, 0x00, 0x06, 0x64, 0x00, 0x00 }; diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c index 855a11830844..208c891a1311 100644 --- a/sys/dev/usb/ohci.c +++ b/sys/dev/usb/ohci.c @@ -109,112 +109,112 @@ int ohcidebug = 1; struct ohci_pipe; -static ohci_soft_ed_t *ohci_alloc_sed __P((ohci_softc_t *)); -static void ohci_free_sed __P((ohci_softc_t *, ohci_soft_ed_t *)); +Static ohci_soft_ed_t *ohci_alloc_sed __P((ohci_softc_t *)); +Static void ohci_free_sed __P((ohci_softc_t *, ohci_soft_ed_t *)); -static ohci_soft_td_t *ohci_alloc_std __P((ohci_softc_t *)); -static void ohci_free_std __P((ohci_softc_t *, ohci_soft_td_t *)); +Static ohci_soft_td_t *ohci_alloc_std __P((ohci_softc_t *)); +Static void ohci_free_std __P((ohci_softc_t *, ohci_soft_td_t *)); -static ohci_soft_itd_t *ohci_alloc_sitd __P((ohci_softc_t *)); -static void ohci_free_sitd __P((ohci_softc_t *,ohci_soft_itd_t *)); +Static ohci_soft_itd_t *ohci_alloc_sitd __P((ohci_softc_t *)); +Static void ohci_free_sitd __P((ohci_softc_t *,ohci_soft_itd_t *)); #if 0 -static void ohci_free_std_chain __P((ohci_softc_t *, +Static void ohci_free_std_chain __P((ohci_softc_t *, ohci_soft_td_t *, ohci_soft_td_t *)); #endif -static usbd_status ohci_alloc_std_chain __P((struct ohci_pipe *, +Static usbd_status ohci_alloc_std_chain __P((struct ohci_pipe *, ohci_softc_t *, int, int, u_int16_t, usb_dma_t *, ohci_soft_td_t *, ohci_soft_td_t **)); #if defined(__NetBSD__) || defined(__OpenBSD__) -static void ohci_shutdown __P((void *v)); -static void ohci_power __P((int, void *)); +Static void ohci_shutdown __P((void *v)); +Static void ohci_power __P((int, void *)); #endif -static usbd_status ohci_open __P((usbd_pipe_handle)); -static void ohci_poll __P((struct usbd_bus *)); -static void ohci_waitintr __P((ohci_softc_t *, +Static usbd_status ohci_open __P((usbd_pipe_handle)); +Static void ohci_poll __P((struct usbd_bus *)); +Static void ohci_waitintr __P((ohci_softc_t *, usbd_xfer_handle)); -static void ohci_rhsc __P((ohci_softc_t *, usbd_xfer_handle)); -static void ohci_process_done __P((ohci_softc_t *, +Static void ohci_rhsc __P((ohci_softc_t *, usbd_xfer_handle)); +Static void ohci_process_done __P((ohci_softc_t *, ohci_physaddr_t)); -static usbd_status ohci_device_request __P((usbd_xfer_handle xfer)); -static void ohci_add_ed __P((ohci_soft_ed_t *, ohci_soft_ed_t *)); -static void ohci_rem_ed __P((ohci_soft_ed_t *, ohci_soft_ed_t *)); -static void ohci_hash_add_td __P((ohci_softc_t *, +Static usbd_status ohci_device_request __P((usbd_xfer_handle xfer)); +Static void ohci_add_ed __P((ohci_soft_ed_t *, ohci_soft_ed_t *)); +Static void ohci_rem_ed __P((ohci_soft_ed_t *, ohci_soft_ed_t *)); +Static void ohci_hash_add_td __P((ohci_softc_t *, ohci_soft_td_t *)); -static void ohci_hash_rem_td __P((ohci_softc_t *, +Static void ohci_hash_rem_td __P((ohci_softc_t *, ohci_soft_td_t *)); -static ohci_soft_td_t *ohci_hash_find_td __P((ohci_softc_t *, +Static ohci_soft_td_t *ohci_hash_find_td __P((ohci_softc_t *, ohci_physaddr_t)); -static usbd_status ohci_setup_isoc __P((usbd_pipe_handle pipe)); -static void ohci_device_isoc_enter __P((usbd_xfer_handle)); +Static usbd_status ohci_setup_isoc __P((usbd_pipe_handle pipe)); +Static void ohci_device_isoc_enter __P((usbd_xfer_handle)); -static usbd_status ohci_allocm __P((struct usbd_bus *, usb_dma_t *, +Static usbd_status ohci_allocm __P((struct usbd_bus *, usb_dma_t *, u_int32_t)); -static void ohci_freem __P((struct usbd_bus *, usb_dma_t *)); +Static void ohci_freem __P((struct usbd_bus *, usb_dma_t *)); -static usbd_xfer_handle ohci_allocx __P((struct usbd_bus *)); -static void ohci_freex __P((struct usbd_bus *, usbd_xfer_handle)); +Static usbd_xfer_handle ohci_allocx __P((struct usbd_bus *)); +Static void ohci_freex __P((struct usbd_bus *, usbd_xfer_handle)); -static usbd_status ohci_root_ctrl_transfer __P((usbd_xfer_handle)); -static usbd_status ohci_root_ctrl_start __P((usbd_xfer_handle)); -static void ohci_root_ctrl_abort __P((usbd_xfer_handle)); -static void ohci_root_ctrl_close __P((usbd_pipe_handle)); +Static usbd_status ohci_root_ctrl_transfer __P((usbd_xfer_handle)); +Static usbd_status ohci_root_ctrl_start __P((usbd_xfer_handle)); +Static void ohci_root_ctrl_abort __P((usbd_xfer_handle)); +Static void ohci_root_ctrl_close __P((usbd_pipe_handle)); -static usbd_status ohci_root_intr_transfer __P((usbd_xfer_handle)); -static usbd_status ohci_root_intr_start __P((usbd_xfer_handle)); -static void ohci_root_intr_abort __P((usbd_xfer_handle)); -static void ohci_root_intr_close __P((usbd_pipe_handle)); -static void ohci_root_intr_done __P((usbd_xfer_handle)); +Static usbd_status ohci_root_intr_transfer __P((usbd_xfer_handle)); +Static usbd_status ohci_root_intr_start __P((usbd_xfer_handle)); +Static void ohci_root_intr_abort __P((usbd_xfer_handle)); +Static void ohci_root_intr_close __P((usbd_pipe_handle)); +Static void ohci_root_intr_done __P((usbd_xfer_handle)); -static usbd_status ohci_device_ctrl_transfer __P((usbd_xfer_handle)); -static usbd_status ohci_device_ctrl_start __P((usbd_xfer_handle)); -static void ohci_device_ctrl_abort __P((usbd_xfer_handle)); -static void ohci_device_ctrl_close __P((usbd_pipe_handle)); -static void ohci_device_ctrl_done __P((usbd_xfer_handle)); +Static usbd_status ohci_device_ctrl_transfer __P((usbd_xfer_handle)); +Static usbd_status ohci_device_ctrl_start __P((usbd_xfer_handle)); +Static void ohci_device_ctrl_abort __P((usbd_xfer_handle)); +Static void ohci_device_ctrl_close __P((usbd_pipe_handle)); +Static void ohci_device_ctrl_done __P((usbd_xfer_handle)); -static usbd_status ohci_device_bulk_transfer __P((usbd_xfer_handle)); -static usbd_status ohci_device_bulk_start __P((usbd_xfer_handle)); -static void ohci_device_bulk_abort __P((usbd_xfer_handle)); -static void ohci_device_bulk_close __P((usbd_pipe_handle)); -static void ohci_device_bulk_done __P((usbd_xfer_handle)); +Static usbd_status ohci_device_bulk_transfer __P((usbd_xfer_handle)); +Static usbd_status ohci_device_bulk_start __P((usbd_xfer_handle)); +Static void ohci_device_bulk_abort __P((usbd_xfer_handle)); +Static void ohci_device_bulk_close __P((usbd_pipe_handle)); +Static void ohci_device_bulk_done __P((usbd_xfer_handle)); -static usbd_status ohci_device_intr_transfer __P((usbd_xfer_handle)); -static usbd_status ohci_device_intr_start __P((usbd_xfer_handle)); -static void ohci_device_intr_abort __P((usbd_xfer_handle)); -static void ohci_device_intr_close __P((usbd_pipe_handle)); -static void ohci_device_intr_done __P((usbd_xfer_handle)); +Static usbd_status ohci_device_intr_transfer __P((usbd_xfer_handle)); +Static usbd_status ohci_device_intr_start __P((usbd_xfer_handle)); +Static void ohci_device_intr_abort __P((usbd_xfer_handle)); +Static void ohci_device_intr_close __P((usbd_pipe_handle)); +Static void ohci_device_intr_done __P((usbd_xfer_handle)); -static usbd_status ohci_device_isoc_transfer __P((usbd_xfer_handle)); -static usbd_status ohci_device_isoc_start __P((usbd_xfer_handle)); -static void ohci_device_isoc_abort __P((usbd_xfer_handle)); -static void ohci_device_isoc_close __P((usbd_pipe_handle)); -static void ohci_device_isoc_done __P((usbd_xfer_handle)); +Static usbd_status ohci_device_isoc_transfer __P((usbd_xfer_handle)); +Static usbd_status ohci_device_isoc_start __P((usbd_xfer_handle)); +Static void ohci_device_isoc_abort __P((usbd_xfer_handle)); +Static void ohci_device_isoc_close __P((usbd_pipe_handle)); +Static void ohci_device_isoc_done __P((usbd_xfer_handle)); -static usbd_status ohci_device_setintr __P((ohci_softc_t *sc, +Static usbd_status ohci_device_setintr __P((ohci_softc_t *sc, struct ohci_pipe *pipe, int ival)); -static int ohci_str __P((usb_string_descriptor_t *, int, char *)); +Static int ohci_str __P((usb_string_descriptor_t *, int, char *)); -static void ohci_timeout __P((void *)); -static void ohci_rhsc_able __P((ohci_softc_t *, int)); +Static void ohci_timeout __P((void *)); +Static void ohci_rhsc_able __P((ohci_softc_t *, int)); -static void ohci_close_pipe __P((usbd_pipe_handle pipe, +Static void ohci_close_pipe __P((usbd_pipe_handle pipe, ohci_soft_ed_t *head)); -static void ohci_abort_xfer __P((usbd_xfer_handle xfer, +Static void ohci_abort_xfer __P((usbd_xfer_handle xfer, usbd_status status)); -static void ohci_abort_xfer_end __P((void *)); +Static void ohci_abort_xfer_end __P((void *)); -static void ohci_device_clear_toggle __P((usbd_pipe_handle pipe)); -static void ohci_noop __P((usbd_pipe_handle pipe)); +Static void ohci_device_clear_toggle __P((usbd_pipe_handle pipe)); +Static void ohci_noop __P((usbd_pipe_handle pipe)); #ifdef OHCI_DEBUG -static void ohci_dumpregs __P((ohci_softc_t *)); -static void ohci_dump_tds __P((ohci_soft_td_t *)); -static void ohci_dump_td __P((ohci_soft_td_t *)); -static void ohci_dump_ed __P((ohci_soft_ed_t *)); +Static void ohci_dumpregs __P((ohci_softc_t *)); +Static void ohci_dump_tds __P((ohci_soft_td_t *)); +Static void ohci_dump_td __P((ohci_soft_td_t *)); +Static void ohci_dump_ed __P((ohci_soft_ed_t *)); #endif #define OWRITE4(sc, r, x) bus_space_write_4((sc)->iot, (sc)->ioh, (r), (x)) @@ -222,7 +222,7 @@ static void ohci_dump_ed __P((ohci_soft_ed_t *)); #define OREAD2(sc, r) bus_space_read_2((sc)->iot, (sc)->ioh, (r)) /* Reverse the bits in a value 0 .. 31 */ -static u_int8_t revbits[OHCI_NO_INTRS] = +Static u_int8_t revbits[OHCI_NO_INTRS] = { 0x00, 0x10, 0x08, 0x18, 0x04, 0x14, 0x0c, 0x1c, 0x02, 0x12, 0x0a, 0x1a, 0x06, 0x16, 0x0e, 0x1e, 0x01, 0x11, 0x09, 0x19, 0x05, 0x15, 0x0d, 0x1d, @@ -262,7 +262,7 @@ struct ohci_pipe { #define OHCI_INTR_ENDPT 1 -static struct usbd_bus_methods ohci_bus_methods = { +Static struct usbd_bus_methods ohci_bus_methods = { ohci_open, ohci_poll, ohci_allocm, @@ -271,7 +271,7 @@ static struct usbd_bus_methods ohci_bus_methods = { ohci_freex, }; -static struct usbd_pipe_methods ohci_root_ctrl_methods = { +Static struct usbd_pipe_methods ohci_root_ctrl_methods = { ohci_root_ctrl_transfer, ohci_root_ctrl_start, ohci_root_ctrl_abort, @@ -280,7 +280,7 @@ static struct usbd_pipe_methods ohci_root_ctrl_methods = { 0, }; -static struct usbd_pipe_methods ohci_root_intr_methods = { +Static struct usbd_pipe_methods ohci_root_intr_methods = { ohci_root_intr_transfer, ohci_root_intr_start, ohci_root_intr_abort, @@ -289,7 +289,7 @@ static struct usbd_pipe_methods ohci_root_intr_methods = { ohci_root_intr_done, }; -static struct usbd_pipe_methods ohci_device_ctrl_methods = { +Static struct usbd_pipe_methods ohci_device_ctrl_methods = { ohci_device_ctrl_transfer, ohci_device_ctrl_start, ohci_device_ctrl_abort, @@ -298,7 +298,7 @@ static struct usbd_pipe_methods ohci_device_ctrl_methods = { ohci_device_ctrl_done, }; -static struct usbd_pipe_methods ohci_device_intr_methods = { +Static struct usbd_pipe_methods ohci_device_intr_methods = { ohci_device_intr_transfer, ohci_device_intr_start, ohci_device_intr_abort, @@ -307,7 +307,7 @@ static struct usbd_pipe_methods ohci_device_intr_methods = { ohci_device_intr_done, }; -static struct usbd_pipe_methods ohci_device_bulk_methods = { +Static struct usbd_pipe_methods ohci_device_bulk_methods = { ohci_device_bulk_transfer, ohci_device_bulk_start, ohci_device_bulk_abort, @@ -316,7 +316,7 @@ static struct usbd_pipe_methods ohci_device_bulk_methods = { ohci_device_bulk_done, }; -static struct usbd_pipe_methods ohci_device_isoc_methods = { +Static struct usbd_pipe_methods ohci_device_isoc_methods = { ohci_device_isoc_transfer, ohci_device_isoc_start, ohci_device_isoc_abort, @@ -576,7 +576,7 @@ ohci_alloc_std_chain(opipe, sc, len, rd, flags, dma, std, rstd) } #if 0 -static void +Static void ohci_free_std_chain(sc, std, stdend) ohci_softc_t *sc; ohci_soft_td_t *std; @@ -975,7 +975,7 @@ ohci_dumpregs(sc) } #endif -static int ohci_intr1 __P((ohci_softc_t *)); +Static int ohci_intr1 __P((ohci_softc_t *)); int ohci_intr(p) @@ -994,7 +994,7 @@ ohci_intr(p) return (ohci_intr1(sc)); } -static int +Static int ohci_intr1(sc) ohci_softc_t *sc; { @@ -1942,7 +1942,7 @@ ohci_abort_xfer_end(v) /* * Data structures and routines to emulate the root hub. */ -static usb_device_descriptor_t ohci_devd = { +Static usb_device_descriptor_t ohci_devd = { USB_DEVICE_DESCRIPTOR_SIZE, UDESC_DEVICE, /* type */ {0x00, 0x01}, /* USB version */ @@ -1955,7 +1955,7 @@ static usb_device_descriptor_t ohci_devd = { 1 /* # of configurations */ }; -static usb_config_descriptor_t ohci_confd = { +Static usb_config_descriptor_t ohci_confd = { USB_CONFIG_DESCRIPTOR_SIZE, UDESC_CONFIG, {USB_CONFIG_DESCRIPTOR_SIZE + @@ -1968,7 +1968,7 @@ static usb_config_descriptor_t ohci_confd = { 0 /* max power */ }; -static usb_interface_descriptor_t ohci_ifcd = { +Static usb_interface_descriptor_t ohci_ifcd = { USB_INTERFACE_DESCRIPTOR_SIZE, UDESC_INTERFACE, 0, @@ -1980,7 +1980,7 @@ static usb_interface_descriptor_t ohci_ifcd = { 0 }; -static usb_endpoint_descriptor_t ohci_endpd = { +Static usb_endpoint_descriptor_t ohci_endpd = { USB_ENDPOINT_DESCRIPTOR_SIZE, UDESC_ENDPOINT, UE_DIR_IN | OHCI_INTR_ENDPT, @@ -1989,7 +1989,7 @@ static usb_endpoint_descriptor_t ohci_endpd = { 255 }; -static usb_hub_descriptor_t ohci_hubd = { +Static usb_hub_descriptor_t ohci_hubd = { USB_HUB_DESCRIPTOR_SIZE, UDESC_HUB, 0, @@ -1999,7 +1999,7 @@ static usb_hub_descriptor_t ohci_hubd = { {0}, }; -static int +Static int ohci_str(p, l, s) usb_string_descriptor_t *p; int l; @@ -2022,7 +2022,7 @@ ohci_str(p, l, s) /* * Simulate a hardware hub by handling all the necessary requests. */ -static usbd_status +Static usbd_status ohci_root_ctrl_transfer(xfer) usbd_xfer_handle xfer; { @@ -2037,7 +2037,7 @@ ohci_root_ctrl_transfer(xfer) return (ohci_root_ctrl_start(SIMPLEQ_FIRST(&xfer->pipe->queue))); } -static usbd_status +Static usbd_status ohci_root_ctrl_start(xfer) usbd_xfer_handle xfer; { @@ -2337,7 +2337,7 @@ ohci_root_ctrl_start(xfer) } /* Abort a root control request. */ -static void +Static void ohci_root_ctrl_abort(xfer) usbd_xfer_handle xfer; { @@ -2345,7 +2345,7 @@ ohci_root_ctrl_abort(xfer) } /* Close the root pipe. */ -static void +Static void ohci_root_ctrl_close(pipe) usbd_pipe_handle pipe; { @@ -2353,7 +2353,7 @@ ohci_root_ctrl_close(pipe) /* Nothing to do. */ } -static usbd_status +Static usbd_status ohci_root_intr_transfer(xfer) usbd_xfer_handle xfer; { @@ -2368,7 +2368,7 @@ ohci_root_intr_transfer(xfer) return (ohci_root_intr_start(SIMPLEQ_FIRST(&xfer->pipe->queue))); } -static usbd_status +Static usbd_status ohci_root_intr_start(xfer) usbd_xfer_handle xfer; { @@ -2381,7 +2381,7 @@ ohci_root_intr_start(xfer) } /* Abort a root interrupt request. */ -static void +Static void ohci_root_intr_abort(xfer) usbd_xfer_handle xfer; { @@ -2398,7 +2398,7 @@ ohci_root_intr_abort(xfer) } /* Close the root pipe. */ -static void +Static void ohci_root_intr_close(pipe) usbd_pipe_handle pipe; { @@ -2411,7 +2411,7 @@ ohci_root_intr_close(pipe) /************************/ -static usbd_status +Static usbd_status ohci_device_ctrl_transfer(xfer) usbd_xfer_handle xfer; { @@ -2426,7 +2426,7 @@ ohci_device_ctrl_transfer(xfer) return (ohci_device_ctrl_start(SIMPLEQ_FIRST(&xfer->pipe->queue))); } -static usbd_status +Static usbd_status ohci_device_ctrl_start(xfer) usbd_xfer_handle xfer; { @@ -2451,7 +2451,7 @@ ohci_device_ctrl_start(xfer) } /* Abort a device control request. */ -static void +Static void ohci_device_ctrl_abort(xfer) usbd_xfer_handle xfer; { @@ -2460,7 +2460,7 @@ ohci_device_ctrl_abort(xfer) } /* Close a device control pipe. */ -static void +Static void ohci_device_ctrl_close(pipe) usbd_pipe_handle pipe; { @@ -2474,7 +2474,7 @@ ohci_device_ctrl_close(pipe) /************************/ -static void +Static void ohci_device_clear_toggle(pipe) usbd_pipe_handle pipe; { @@ -2483,13 +2483,13 @@ ohci_device_clear_toggle(pipe) opipe->sed->ed.ed_headp &= LE(~OHCI_TOGGLECARRY); } -static void +Static void ohci_noop(pipe) usbd_pipe_handle pipe; { } -static usbd_status +Static usbd_status ohci_device_bulk_transfer(xfer) usbd_xfer_handle xfer; { @@ -2504,7 +2504,7 @@ ohci_device_bulk_transfer(xfer) return (ohci_device_bulk_start(SIMPLEQ_FIRST(&xfer->pipe->queue))); } -static usbd_status +Static usbd_status ohci_device_bulk_start(xfer) usbd_xfer_handle xfer; { @@ -2595,7 +2595,7 @@ ohci_device_bulk_start(xfer) return (USBD_IN_PROGRESS); } -static void +Static void ohci_device_bulk_abort(xfer) usbd_xfer_handle xfer; { @@ -2606,7 +2606,7 @@ ohci_device_bulk_abort(xfer) /* * Close a device bulk pipe. */ -static void +Static void ohci_device_bulk_close(pipe) usbd_pipe_handle pipe; { @@ -2620,7 +2620,7 @@ ohci_device_bulk_close(pipe) /************************/ -static usbd_status +Static usbd_status ohci_device_intr_transfer(xfer) usbd_xfer_handle xfer; { @@ -2635,7 +2635,7 @@ ohci_device_intr_transfer(xfer) return (ohci_device_intr_start(SIMPLEQ_FIRST(&xfer->pipe->queue))); } -static usbd_status +Static usbd_status ohci_device_intr_start(xfer) usbd_xfer_handle xfer; { @@ -2713,7 +2713,7 @@ ohci_device_intr_start(xfer) } /* Abort a device control request. */ -static void +Static void ohci_device_intr_abort(xfer) usbd_xfer_handle xfer; { @@ -2725,7 +2725,7 @@ ohci_device_intr_abort(xfer) } /* Close a device interrupt pipe. */ -static void +Static void ohci_device_intr_close(pipe) usbd_pipe_handle pipe; { @@ -2768,7 +2768,7 @@ ohci_device_intr_close(pipe) ohci_free_sed(sc, opipe->sed); } -static usbd_status +Static usbd_status ohci_device_setintr(sc, opipe, ival) ohci_softc_t *sc; struct ohci_pipe *opipe; diff --git a/sys/dev/usb/ugen.c b/sys/dev/usb/ugen.c index c012df12ed10..319ddde7a642 100644 --- a/sys/dev/usb/ugen.c +++ b/sys/dev/usb/ugen.c @@ -117,7 +117,7 @@ d_poll_t ugenpoll; #define UGEN_CDEV_MAJOR 114 -static struct cdevsw ugen_cdevsw = { +Static struct cdevsw ugen_cdevsw = { /* open */ ugenopen, /* close */ ugenclose, /* read */ ugenread, @@ -135,18 +135,18 @@ static struct cdevsw ugen_cdevsw = { }; #endif -static void ugenintr __P((usbd_xfer_handle xfer, usbd_private_handle addr, +Static void ugenintr __P((usbd_xfer_handle xfer, usbd_private_handle addr, usbd_status status)); -static int ugen_do_read __P((struct ugen_softc *, int, struct uio *, int)); -static int ugen_do_write __P((struct ugen_softc *, int, struct uio *, int)); -static int ugen_do_ioctl __P((struct ugen_softc *, int, u_long, +Static int ugen_do_read __P((struct ugen_softc *, int, struct uio *, int)); +Static int ugen_do_write __P((struct ugen_softc *, int, struct uio *, int)); +Static int ugen_do_ioctl __P((struct ugen_softc *, int, u_long, caddr_t, int, struct proc *)); -static int ugen_set_config __P((struct ugen_softc *sc, int configno)); -static usb_config_descriptor_t *ugen_get_cdesc __P((struct ugen_softc *sc, +Static int ugen_set_config __P((struct ugen_softc *sc, int configno)); +Static usb_config_descriptor_t *ugen_get_cdesc __P((struct ugen_softc *sc, int index, int *lenp)); -static usbd_status ugen_set_interface __P((struct ugen_softc *, int, int)); -static int ugen_get_alt_index __P((struct ugen_softc *sc, int ifaceidx)); +Static usbd_status ugen_set_interface __P((struct ugen_softc *, int, int)); +Static int ugen_get_alt_index __P((struct ugen_softc *sc, int ifaceidx)); #define UGENUNIT(n) ((minor(n) >> 4) & 0xf) #define UGENENDPOINT(n) (minor(n) & 0xf) @@ -188,7 +188,7 @@ USB_ATTACH(ugen) USB_ATTACH_SUCCESS_RETURN; } -static int +Static int ugen_set_config(sc, configno) struct ugen_softc *sc; int configno; @@ -424,7 +424,7 @@ ugenclose(dev, flag, mode, p) return (0); } -static int +Static int ugen_do_read(sc, endpt, uio, flag) struct ugen_softc *sc; int endpt; @@ -550,7 +550,7 @@ ugenread(dev, uio, flag) return (error); } -static int +Static int ugen_do_write(sc, endpt, uio, flag) struct ugen_softc *sc; int endpt; @@ -734,7 +734,7 @@ USB_DETACH(ugen) return (0); } -static void +Static void ugenintr(xfer, addr, status) usbd_xfer_handle xfer; usbd_private_handle addr; @@ -772,7 +772,7 @@ ugenintr(xfer, addr, status) selwakeup(&sce->rsel); } -static usbd_status +Static usbd_status ugen_set_interface(sc, ifaceidx, altno) struct ugen_softc *sc; int ifaceidx, altno; @@ -829,7 +829,7 @@ ugen_set_interface(sc, ifaceidx, altno) } /* Retrieve a complete descriptor for a certain device and index. */ -static usb_config_descriptor_t * +Static usb_config_descriptor_t * ugen_get_cdesc(sc, index, lenp) struct ugen_softc *sc; int index; @@ -865,7 +865,7 @@ ugen_get_cdesc(sc, index, lenp) return (cdesc); } -static int +Static int ugen_get_alt_index(sc, ifaceidx) struct ugen_softc *sc; int ifaceidx; @@ -879,7 +879,7 @@ ugen_get_alt_index(sc, ifaceidx) return (usbd_get_interface_altindex(iface)); } -static int +Static int ugen_do_ioctl(sc, endpt, cmd, addr, flag, p) struct ugen_softc *sc; int endpt; diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c index 6c0b74db57d7..0d46903bcb38 100644 --- a/sys/dev/usb/uhci.c +++ b/sys/dev/usb/uhci.c @@ -149,109 +149,109 @@ struct uhci_pipe { */ LIST_HEAD(, uhci_intr_info) uhci_ii_free; -static void uhci_busreset __P((uhci_softc_t *)); -static usbd_status uhci_run __P((uhci_softc_t *, int run)); -static uhci_soft_td_t *uhci_alloc_std __P((uhci_softc_t *)); -static void uhci_free_std __P((uhci_softc_t *, uhci_soft_td_t *)); -static uhci_soft_qh_t *uhci_alloc_sqh __P((uhci_softc_t *)); -static void uhci_free_sqh __P((uhci_softc_t *, uhci_soft_qh_t *)); -static uhci_intr_info_t *uhci_alloc_intr_info __P((uhci_softc_t *)); -static void uhci_free_intr_info __P((uhci_intr_info_t *ii)); +Static void uhci_busreset __P((uhci_softc_t *)); +Static usbd_status uhci_run __P((uhci_softc_t *, int run)); +Static uhci_soft_td_t *uhci_alloc_std __P((uhci_softc_t *)); +Static void uhci_free_std __P((uhci_softc_t *, uhci_soft_td_t *)); +Static uhci_soft_qh_t *uhci_alloc_sqh __P((uhci_softc_t *)); +Static void uhci_free_sqh __P((uhci_softc_t *, uhci_soft_qh_t *)); +Static uhci_intr_info_t *uhci_alloc_intr_info __P((uhci_softc_t *)); +Static void uhci_free_intr_info __P((uhci_intr_info_t *ii)); #if 0 -static void uhci_enter_ctl_q __P((uhci_softc_t *, uhci_soft_qh_t *, +Static void uhci_enter_ctl_q __P((uhci_softc_t *, uhci_soft_qh_t *, uhci_intr_info_t *)); -static void uhci_exit_ctl_q __P((uhci_softc_t *, uhci_soft_qh_t *)); +Static void uhci_exit_ctl_q __P((uhci_softc_t *, uhci_soft_qh_t *)); #endif -static void uhci_free_std_chain __P((uhci_softc_t *, +Static void uhci_free_std_chain __P((uhci_softc_t *, uhci_soft_td_t *, uhci_soft_td_t *)); -static usbd_status uhci_alloc_std_chain __P((struct uhci_pipe *, +Static usbd_status uhci_alloc_std_chain __P((struct uhci_pipe *, uhci_softc_t *, int, int, u_int16_t, usb_dma_t *, uhci_soft_td_t **, uhci_soft_td_t **)); -static void uhci_timo __P((void *)); -static void uhci_waitintr __P((uhci_softc_t *, +Static void uhci_timo __P((void *)); +Static void uhci_waitintr __P((uhci_softc_t *, usbd_xfer_handle)); -static void uhci_check_intr __P((uhci_softc_t *, +Static void uhci_check_intr __P((uhci_softc_t *, uhci_intr_info_t *)); -static void uhci_idone __P((uhci_intr_info_t *)); -static void uhci_abort_xfer __P((usbd_xfer_handle, +Static void uhci_idone __P((uhci_intr_info_t *)); +Static void uhci_abort_xfer __P((usbd_xfer_handle, usbd_status status)); -static void uhci_abort_xfer_end __P((void *v)); -static void uhci_timeout __P((void *)); -static void uhci_lock_frames __P((uhci_softc_t *)); -static void uhci_unlock_frames __P((uhci_softc_t *)); -static void uhci_add_ctrl __P((uhci_softc_t *, uhci_soft_qh_t *)); -static void uhci_add_bulk __P((uhci_softc_t *, uhci_soft_qh_t *)); -static void uhci_remove_ctrl __P((uhci_softc_t *,uhci_soft_qh_t *)); -static void uhci_remove_bulk __P((uhci_softc_t *,uhci_soft_qh_t *)); -static int uhci_str __P((usb_string_descriptor_t *, int, char *)); +Static void uhci_abort_xfer_end __P((void *v)); +Static void uhci_timeout __P((void *)); +Static void uhci_lock_frames __P((uhci_softc_t *)); +Static void uhci_unlock_frames __P((uhci_softc_t *)); +Static void uhci_add_ctrl __P((uhci_softc_t *, uhci_soft_qh_t *)); +Static void uhci_add_bulk __P((uhci_softc_t *, uhci_soft_qh_t *)); +Static void uhci_remove_ctrl __P((uhci_softc_t *,uhci_soft_qh_t *)); +Static void uhci_remove_bulk __P((uhci_softc_t *,uhci_soft_qh_t *)); +Static int uhci_str __P((usb_string_descriptor_t *, int, char *)); -static usbd_status uhci_setup_isoc __P((usbd_pipe_handle pipe)); -static void uhci_device_isoc_enter __P((usbd_xfer_handle)); +Static usbd_status uhci_setup_isoc __P((usbd_pipe_handle pipe)); +Static void uhci_device_isoc_enter __P((usbd_xfer_handle)); -static usbd_status uhci_allocm __P((struct usbd_bus *, usb_dma_t *, +Static usbd_status uhci_allocm __P((struct usbd_bus *, usb_dma_t *, u_int32_t)); -static void uhci_freem __P((struct usbd_bus *, usb_dma_t *)); +Static void uhci_freem __P((struct usbd_bus *, usb_dma_t *)); -static usbd_xfer_handle uhci_allocx __P((struct usbd_bus *)); -static void uhci_freex __P((struct usbd_bus *, usbd_xfer_handle)); +Static usbd_xfer_handle uhci_allocx __P((struct usbd_bus *)); +Static void uhci_freex __P((struct usbd_bus *, usbd_xfer_handle)); -static usbd_status uhci_device_ctrl_transfer __P((usbd_xfer_handle)); -static usbd_status uhci_device_ctrl_start __P((usbd_xfer_handle)); -static void uhci_device_ctrl_abort __P((usbd_xfer_handle)); -static void uhci_device_ctrl_close __P((usbd_pipe_handle)); -static void uhci_device_ctrl_done __P((usbd_xfer_handle)); +Static usbd_status uhci_device_ctrl_transfer __P((usbd_xfer_handle)); +Static usbd_status uhci_device_ctrl_start __P((usbd_xfer_handle)); +Static void uhci_device_ctrl_abort __P((usbd_xfer_handle)); +Static void uhci_device_ctrl_close __P((usbd_pipe_handle)); +Static void uhci_device_ctrl_done __P((usbd_xfer_handle)); -static usbd_status uhci_device_intr_transfer __P((usbd_xfer_handle)); -static usbd_status uhci_device_intr_start __P((usbd_xfer_handle)); -static void uhci_device_intr_abort __P((usbd_xfer_handle)); -static void uhci_device_intr_close __P((usbd_pipe_handle)); -static void uhci_device_intr_done __P((usbd_xfer_handle)); +Static usbd_status uhci_device_intr_transfer __P((usbd_xfer_handle)); +Static usbd_status uhci_device_intr_start __P((usbd_xfer_handle)); +Static void uhci_device_intr_abort __P((usbd_xfer_handle)); +Static void uhci_device_intr_close __P((usbd_pipe_handle)); +Static void uhci_device_intr_done __P((usbd_xfer_handle)); -static usbd_status uhci_device_bulk_transfer __P((usbd_xfer_handle)); -static usbd_status uhci_device_bulk_start __P((usbd_xfer_handle)); -static void uhci_device_bulk_abort __P((usbd_xfer_handle)); -static void uhci_device_bulk_close __P((usbd_pipe_handle)); -static void uhci_device_bulk_done __P((usbd_xfer_handle)); +Static usbd_status uhci_device_bulk_transfer __P((usbd_xfer_handle)); +Static usbd_status uhci_device_bulk_start __P((usbd_xfer_handle)); +Static void uhci_device_bulk_abort __P((usbd_xfer_handle)); +Static void uhci_device_bulk_close __P((usbd_pipe_handle)); +Static void uhci_device_bulk_done __P((usbd_xfer_handle)); -static usbd_status uhci_device_isoc_transfer __P((usbd_xfer_handle)); -static usbd_status uhci_device_isoc_start __P((usbd_xfer_handle)); -static void uhci_device_isoc_abort __P((usbd_xfer_handle)); -static void uhci_device_isoc_close __P((usbd_pipe_handle)); -static void uhci_device_isoc_done __P((usbd_xfer_handle)); +Static usbd_status uhci_device_isoc_transfer __P((usbd_xfer_handle)); +Static usbd_status uhci_device_isoc_start __P((usbd_xfer_handle)); +Static void uhci_device_isoc_abort __P((usbd_xfer_handle)); +Static void uhci_device_isoc_close __P((usbd_pipe_handle)); +Static void uhci_device_isoc_done __P((usbd_xfer_handle)); -static usbd_status uhci_root_ctrl_transfer __P((usbd_xfer_handle)); -static usbd_status uhci_root_ctrl_start __P((usbd_xfer_handle)); -static void uhci_root_ctrl_abort __P((usbd_xfer_handle)); -static void uhci_root_ctrl_close __P((usbd_pipe_handle)); +Static usbd_status uhci_root_ctrl_transfer __P((usbd_xfer_handle)); +Static usbd_status uhci_root_ctrl_start __P((usbd_xfer_handle)); +Static void uhci_root_ctrl_abort __P((usbd_xfer_handle)); +Static void uhci_root_ctrl_close __P((usbd_pipe_handle)); -static usbd_status uhci_root_intr_transfer __P((usbd_xfer_handle)); -static usbd_status uhci_root_intr_start __P((usbd_xfer_handle)); -static void uhci_root_intr_abort __P((usbd_xfer_handle)); -static void uhci_root_intr_close __P((usbd_pipe_handle)); -static void uhci_root_intr_done __P((usbd_xfer_handle)); +Static usbd_status uhci_root_intr_transfer __P((usbd_xfer_handle)); +Static usbd_status uhci_root_intr_start __P((usbd_xfer_handle)); +Static void uhci_root_intr_abort __P((usbd_xfer_handle)); +Static void uhci_root_intr_close __P((usbd_pipe_handle)); +Static void uhci_root_intr_done __P((usbd_xfer_handle)); -static usbd_status uhci_open __P((usbd_pipe_handle)); -static void uhci_poll __P((struct usbd_bus *)); +Static usbd_status uhci_open __P((usbd_pipe_handle)); +Static void uhci_poll __P((struct usbd_bus *)); -static usbd_status uhci_device_request __P((usbd_xfer_handle xfer)); +Static usbd_status uhci_device_request __P((usbd_xfer_handle xfer)); -static void uhci_add_intr __P((uhci_softc_t *, int, +Static void uhci_add_intr __P((uhci_softc_t *, int, uhci_soft_qh_t *)); -static void uhci_remove_intr __P((uhci_softc_t *, int, +Static void uhci_remove_intr __P((uhci_softc_t *, int, uhci_soft_qh_t *)); -static usbd_status uhci_device_setintr __P((uhci_softc_t *sc, +Static usbd_status uhci_device_setintr __P((uhci_softc_t *sc, struct uhci_pipe *pipe, int ival)); -static void uhci_device_clear_toggle __P((usbd_pipe_handle pipe)); -static void uhci_noop __P((usbd_pipe_handle pipe)); +Static void uhci_device_clear_toggle __P((usbd_pipe_handle pipe)); +Static void uhci_noop __P((usbd_pipe_handle pipe)); #ifdef UHCI_DEBUG -static void uhci_dumpregs __P((uhci_softc_t *)); -static void uhci_dump_qhs __P((uhci_soft_qh_t *)); -static void uhci_dump_qh __P((uhci_soft_qh_t *)); -static void uhci_dump_tds __P((uhci_soft_td_t *)); -static void uhci_dump_td __P((uhci_soft_td_t *)); +Static void uhci_dumpregs __P((uhci_softc_t *)); +Static void uhci_dump_qhs __P((uhci_soft_qh_t *)); +Static void uhci_dump_qh __P((uhci_soft_qh_t *)); +Static void uhci_dump_tds __P((uhci_soft_td_t *)); +Static void uhci_dump_td __P((uhci_soft_td_t *)); #endif #define UWRITE2(sc, r, x) bus_space_write_2((sc)->iot, (sc)->ioh, (r), (x)) @@ -625,7 +625,7 @@ uhci_power(why, v) } #ifdef UHCI_DEBUG -static void +Static void uhci_dumpregs(sc) uhci_softc_t *sc; { diff --git a/sys/dev/usb/uhid.c b/sys/dev/usb/uhid.c index 702a5b7a46de..76d822be0be4 100644 --- a/sys/dev/usb/uhid.c +++ b/sys/dev/usb/uhid.c @@ -132,7 +132,7 @@ d_poll_t uhidpoll; #define UHID_CDEV_MAJOR 122 -static struct cdevsw uhid_cdevsw = { +Static struct cdevsw uhid_cdevsw = { /* open */ uhidopen, /* close */ uhidclose, /* read */ uhidread, @@ -150,12 +150,12 @@ static struct cdevsw uhid_cdevsw = { }; #endif -static void uhid_intr __P((usbd_xfer_handle, usbd_private_handle, +Static void uhid_intr __P((usbd_xfer_handle, usbd_private_handle, usbd_status)); -static int uhid_do_read __P((struct uhid_softc *, struct uio *uio, int)); -static int uhid_do_write __P((struct uhid_softc *, struct uio *uio, int)); -static int uhid_do_ioctl __P((struct uhid_softc *, u_long, caddr_t, int, +Static int uhid_do_read __P((struct uhid_softc *, struct uio *uio, int)); +Static int uhid_do_write __P((struct uhid_softc *, struct uio *uio, int)); +Static int uhid_do_ioctl __P((struct uhid_softc *, u_long, caddr_t, int, struct proc *)); USB_DECLARE_DRIVER(uhid); diff --git a/sys/dev/usb/uhub.c b/sys/dev/usb/uhub.c index 8b1edbb1ef7a..e2530418e7e7 100644 --- a/sys/dev/usb/uhub.c +++ b/sys/dev/usb/uhub.c @@ -79,12 +79,12 @@ struct uhub_softc { u_char sc_running; }; -static usbd_status uhub_init_port __P((struct usbd_port *)); -static usbd_status uhub_explore __P((usbd_device_handle hub)); -static void uhub_intr __P((usbd_xfer_handle, usbd_private_handle,usbd_status)); +Static usbd_status uhub_init_port __P((struct usbd_port *)); +Static usbd_status uhub_explore __P((usbd_device_handle hub)); +Static void uhub_intr __P((usbd_xfer_handle, usbd_private_handle,usbd_status)); #if defined(__FreeBSD__) -static bus_child_detached_t uhub_child_detached; +Static bus_child_detached_t uhub_child_detached; #endif @@ -113,7 +113,7 @@ USB_DECLARE_DRIVER_INIT(uhub, /* Create the driver instance for the hub connected to usb case. */ devclass_t uhubroot_devclass; -static device_method_t uhubroot_methods[] = { +Static device_method_t uhubroot_methods[] = { DEVMETHOD(device_probe, uhub_match), DEVMETHOD(device_attach, uhub_attach), /* detach is not allowed for a root hub */ @@ -123,7 +123,7 @@ static device_method_t uhubroot_methods[] = { {0,0} }; -static driver_t uhubroot_driver = { +Static driver_t uhubroot_driver = { "uhub", uhubroot_methods, sizeof(struct uhub_softc) @@ -537,7 +537,7 @@ USB_DETACH(uhub) #if defined(__FreeBSD__) /* Called when a device has been detached from it */ -static void +Static void uhub_child_detached(self, child) device_t self; device_t child; diff --git a/sys/dev/usb/ukbd.c b/sys/dev/usb/ukbd.c index 4c9c2288d2a4..9fa6bfd349fd 100644 --- a/sys/dev/usb/ukbd.c +++ b/sys/dev/usb/ukbd.c @@ -111,8 +111,8 @@ typedef struct ukbd_softc { typedef void usbd_intr_t(usbd_xfer_handle, usbd_private_handle, usbd_status); typedef void usbd_disco_t(void *); -static usbd_intr_t ukbd_intr; -static int ukbd_driver_load(module_t mod, int what, void *arg); +Static usbd_intr_t ukbd_intr; +Static int ukbd_driver_load(module_t mod, int what, void *arg); USB_DECLARE_DRIVER(ukbd); @@ -238,7 +238,7 @@ DRIVER_MODULE(ukbd, uhub, ukbd_driver, ukbd_devclass, ukbd_driver_load, 0); #define SCAN_CHAR(c) ((c) & 0x7f) #define NMOD 8 -static struct { +Static struct { int mask, key; } ukbd_mods[NMOD] = { { MOD_CONTROL_L, 0xe0 }, @@ -264,7 +264,7 @@ static struct { * 0x69: F14 * 0x6a: F15 */ -static u_int8_t ukbd_trtab[256] = { +Static u_int8_t ukbd_trtab[256] = { 0, 0, 0, 0, 30, 48, 46, 32, /* 00 - 07 */ 18, 33, 34, 35, 23, 36, 37, 38, /* 08 - 0F */ 50, 49, 24, 25, 16, 19, 31, 20, /* 10 - 17 */ @@ -335,24 +335,24 @@ typedef struct ukbd_state { } ukbd_state_t; /* keyboard driver declaration */ -static int ukbd_configure(int flags); -static kbd_probe_t ukbd_probe; -static kbd_init_t ukbd_init; -static kbd_term_t ukbd_term; -static kbd_intr_t ukbd_interrupt; -static kbd_test_if_t ukbd_test_if; -static kbd_enable_t ukbd_enable; -static kbd_disable_t ukbd_disable; -static kbd_read_t ukbd_read; -static kbd_check_t ukbd_check; -static kbd_read_char_t ukbd_read_char; -static kbd_check_char_t ukbd_check_char; -static kbd_ioctl_t ukbd_ioctl; -static kbd_lock_t ukbd_lock; -static kbd_clear_state_t ukbd_clear_state; -static kbd_get_state_t ukbd_get_state; -static kbd_set_state_t ukbd_set_state; -static kbd_poll_mode_t ukbd_poll; +Static int ukbd_configure(int flags); +Static kbd_probe_t ukbd_probe; +Static kbd_init_t ukbd_init; +Static kbd_term_t ukbd_term; +Static kbd_intr_t ukbd_interrupt; +Static kbd_test_if_t ukbd_test_if; +Static kbd_enable_t ukbd_enable; +Static kbd_disable_t ukbd_disable; +Static kbd_read_t ukbd_read; +Static kbd_check_t ukbd_check; +Static kbd_read_char_t ukbd_read_char; +Static kbd_check_char_t ukbd_check_char; +Static kbd_ioctl_t ukbd_ioctl; +Static kbd_lock_t ukbd_lock; +Static kbd_clear_state_t ukbd_clear_state; +Static kbd_get_state_t ukbd_get_state; +Static kbd_set_state_t ukbd_set_state; +Static kbd_poll_mode_t ukbd_poll; keyboard_switch_t ukbdsw = { ukbd_probe, @@ -379,18 +379,18 @@ keyboard_switch_t ukbdsw = { KEYBOARD_DRIVER(ukbd, ukbdsw, ukbd_configure); /* local functions */ -static int ukbd_enable_intr(keyboard_t *kbd, int on, +Static int ukbd_enable_intr(keyboard_t *kbd, int on, usbd_intr_t *func); -static timeout_t ukbd_timeout; +Static timeout_t ukbd_timeout; -static int ukbd_getc(ukbd_state_t *state); -static int probe_keyboard(struct usb_attach_arg *uaa, int flags); -static int init_keyboard(ukbd_state_t *state, int *type, +Static int ukbd_getc(ukbd_state_t *state); +Static int probe_keyboard(struct usb_attach_arg *uaa, int flags); +Static int init_keyboard(ukbd_state_t *state, int *type, int flags); -static void set_leds(ukbd_state_t *state, int leds); -static int set_typematic(keyboard_t *kbd, int code); +Static void set_leds(ukbd_state_t *state, int leds); +Static int set_typematic(keyboard_t *kbd, int code); #ifdef UKBD_EMULATE_ATSCANCODE -static int keycode2scancode(int keycode, int shift, int up); +Static int keycode2scancode(int keycode, int shift, int up); #endif /* local variables */ @@ -403,11 +403,11 @@ static int keycode2scancode(int keycode, int shift, int up); #include /* structures for the default keyboard */ -static keyboard_t default_kbd; -static ukbd_state_t default_kbd_state; -static keymap_t default_keymap; -static accentmap_t default_accentmap; -static fkeytab_t default_fkeytab[NUM_FKEYS]; +Static keyboard_t default_kbd; +Static ukbd_state_t default_kbd_state; +Static keymap_t default_keymap; +Static accentmap_t default_accentmap; +Static fkeytab_t default_fkeytab[NUM_FKEYS]; /* * The back door to the keyboard driver! @@ -418,7 +418,7 @@ static fkeytab_t default_fkeytab[NUM_FKEYS]; * NOTE: because of the way the low-level conole is initialized, this routine * may be called more than once!! */ -static int +Static int ukbd_configure(int flags) { return 0; @@ -453,7 +453,7 @@ ukbd_configure(int flags) /* low-level functions */ /* detect a keyboard */ -static int +Static int ukbd_probe(int unit, void *arg, int flags) { void **data; @@ -473,7 +473,7 @@ ukbd_probe(int unit, void *arg, int flags) } /* reset and initialize the device */ -static int +Static int ukbd_init(int unit, keyboard_t **kbdp, void *arg, int flags) { keyboard_t *kbd; @@ -575,7 +575,7 @@ ukbd_init(int unit, keyboard_t **kbdp, void *arg, int flags) return 0; } -static int +Static int ukbd_enable_intr(keyboard_t *kbd, int on, usbd_intr_t *func) { ukbd_state_t *state = (ukbd_state_t *)kbd->kb_data; @@ -607,7 +607,7 @@ ukbd_enable_intr(keyboard_t *kbd, int on, usbd_intr_t *func) } /* finish using this keyboard */ -static int +Static int ukbd_term(keyboard_t *kbd) { ukbd_state_t *state; @@ -650,7 +650,7 @@ ukbd_term(keyboard_t *kbd) /* keyboard interrupt routine */ -static void +Static void ukbd_timeout(void *arg) { keyboard_t *kbd; @@ -665,7 +665,7 @@ ukbd_timeout(void *arg) splx(s); } -static int +Static int ukbd_interrupt(keyboard_t *kbd, void *arg) { usbd_status status = (usbd_status)arg; @@ -787,7 +787,7 @@ ukbd_interrupt(keyboard_t *kbd, void *arg) return 0; } -static int +Static int ukbd_getc(ukbd_state_t *state) { int c; @@ -813,7 +813,7 @@ ukbd_getc(ukbd_state_t *state) } /* test the interface to the device */ -static int +Static int ukbd_test_if(keyboard_t *kbd) { return 0; @@ -823,7 +823,7 @@ ukbd_test_if(keyboard_t *kbd) * Enable the access to the device; until this function is called, * the client cannot read from the keyboard. */ -static int +Static int ukbd_enable(keyboard_t *kbd) { int s; @@ -835,7 +835,7 @@ ukbd_enable(keyboard_t *kbd) } /* disallow the access to the device */ -static int +Static int ukbd_disable(keyboard_t *kbd) { int s; @@ -847,7 +847,7 @@ ukbd_disable(keyboard_t *kbd) } /* read one byte from the keyboard if it's allowed */ -static int +Static int ukbd_read(keyboard_t *kbd, int wait) { ukbd_state_t *state; @@ -907,7 +907,7 @@ ukbd_read(keyboard_t *kbd, int wait) } /* check if data is waiting */ -static int +Static int ukbd_check(keyboard_t *kbd) { if (!KBD_IS_ACTIVE(kbd)) @@ -922,7 +922,7 @@ ukbd_check(keyboard_t *kbd) } /* read char from the keyboard */ -static u_int +Static u_int ukbd_read_char(keyboard_t *kbd, int wait) { ukbd_state_t *state; @@ -1108,7 +1108,7 @@ next_code: } /* check if char is waiting */ -static int +Static int ukbd_check_char(keyboard_t *kbd) { ukbd_state_t *state; @@ -1124,7 +1124,7 @@ ukbd_check_char(keyboard_t *kbd) } /* some useful control functions */ -static int +Static int ukbd_ioctl(keyboard_t *kbd, u_long cmd, caddr_t arg) { /* trasnlate LED_XXX bits into the device specific bits */ @@ -1241,7 +1241,7 @@ ukbd_ioctl(keyboard_t *kbd, u_long cmd, caddr_t arg) } /* lock the access to the keyboard */ -static int +Static int ukbd_lock(keyboard_t *kbd, int lock) { /* XXX ? */ @@ -1249,7 +1249,7 @@ ukbd_lock(keyboard_t *kbd, int lock) } /* clear the internal state of the keyboard */ -static void +Static void ukbd_clear_state(keyboard_t *kbd) { ukbd_state_t *state; @@ -1271,7 +1271,7 @@ ukbd_clear_state(keyboard_t *kbd) } /* save the internal state */ -static int +Static int ukbd_get_state(keyboard_t *kbd, void *buf, size_t len) { if (len == 0) @@ -1283,7 +1283,7 @@ ukbd_get_state(keyboard_t *kbd, void *buf, size_t len) } /* set the internal state */ -static int +Static int ukbd_set_state(keyboard_t *kbd, void *buf, size_t len) { if (len < sizeof(ukbd_state_t)) @@ -1292,7 +1292,7 @@ ukbd_set_state(keyboard_t *kbd, void *buf, size_t len) return 0; } -static int +Static int ukbd_poll(keyboard_t *kbd, int on) { ukbd_state_t *state; @@ -1316,7 +1316,7 @@ ukbd_poll(keyboard_t *kbd, int on) /* local functions */ -static int +Static int probe_keyboard(struct usb_attach_arg *uaa, int flags) { usb_interface_descriptor_t *id; @@ -1335,7 +1335,7 @@ probe_keyboard(struct usb_attach_arg *uaa, int flags) return EINVAL; } -static int +Static int init_keyboard(ukbd_state_t *state, int *type, int flags) { usb_endpoint_descriptor_t *ed; @@ -1382,7 +1382,7 @@ bLength=%d bDescriptorType=%d bEndpointAddress=%d-%s bmAttributes=%d wMaxPacketS return 0; } -static void +Static void set_leds(ukbd_state_t *state, int leds) { u_int8_t res = leds; @@ -1392,7 +1392,7 @@ set_leds(ukbd_state_t *state, int leds) usbd_set_report_async(state->ks_iface, UHID_OUTPUT_REPORT, 0, &res, 1); } -static int +Static int set_typematic(keyboard_t *kbd, int code) { static int delays[] = { 250, 500, 750, 1000 }; @@ -1409,7 +1409,7 @@ set_typematic(keyboard_t *kbd, int code) } #ifdef UKBD_EMULATE_ATSCANCODE -static int +Static int keycode2scancode(int keycode, int shift, int up) { static int scan[] = { @@ -1434,7 +1434,7 @@ keycode2scancode(int keycode, int shift, int up) } #endif /* UKBD_EMULATE_ATSCANCODE */ -static int +Static int ukbd_driver_load(module_t mod, int what, void *arg) { switch (what) { diff --git a/sys/dev/usb/ulpt.c b/sys/dev/usb/ulpt.c index 2388f3028cef..8c74207c0946 100644 --- a/sys/dev/usb/ulpt.c +++ b/sys/dev/usb/ulpt.c @@ -120,14 +120,14 @@ struct ulpt_softc { #if defined(__NetBSD__) || defined(__OpenBSD__) cdev_decl(ulpt); #elif defined(__FreeBSD__) -static d_open_t ulptopen; -static d_close_t ulptclose; -static d_write_t ulptwrite; -static d_ioctl_t ulptioctl; +Static d_open_t ulptopen; +Static d_close_t ulptclose; +Static d_write_t ulptwrite; +Static d_ioctl_t ulptioctl; #define ULPT_CDEV_MAJOR 113 -static struct cdevsw ulpt_cdevsw = { +Static struct cdevsw ulpt_cdevsw = { /* open */ ulptopen, /* close */ ulptclose, /* read */ noread, diff --git a/sys/dev/usb/umass.c b/sys/dev/usb/umass.c index a7a94183a5a2..74f6905d269d 100644 --- a/sys/dev/usb/umass.c +++ b/sys/dev/usb/umass.c @@ -430,90 +430,90 @@ struct cam_sim *umass_sim; /* SCSI Interface Module */ /* USB device probe/attach/detach functions */ USB_DECLARE_DRIVER(umass); -static int umass_match_proto __P((struct umass_softc *sc, +Static int umass_match_proto __P((struct umass_softc *sc, usbd_interface_handle iface)); /* generic transfer functions */ -static usbd_status umass_setup_transfer __P((struct umass_softc *sc, +Static usbd_status umass_setup_transfer __P((struct umass_softc *sc, usbd_pipe_handle pipe, void *buffer, int buflen, int flags, usbd_xfer_handle xfer)); -static usbd_status umass_setup_ctrl_transfer __P((struct umass_softc *sc, +Static usbd_status umass_setup_ctrl_transfer __P((struct umass_softc *sc, usbd_device_handle dev, usb_device_request_t *req, void *buffer, int buflen, int flags, usbd_xfer_handle xfer)); -static void umass_clear_endpoint_stall __P((struct umass_softc *sc, +Static void umass_clear_endpoint_stall __P((struct umass_softc *sc, u_int8_t endpt, usbd_pipe_handle pipe, int state, usbd_xfer_handle xfer)); -static void umass_reset __P((struct umass_softc *sc, +Static void umass_reset __P((struct umass_softc *sc, transfer_cb_f cb, void *priv)); /* Bulk-Only related functions */ -static void umass_bbb_reset __P((struct umass_softc *sc, int status)); -static void umass_bbb_transfer __P((struct umass_softc *sc, int lun, +Static void umass_bbb_reset __P((struct umass_softc *sc, int status)); +Static void umass_bbb_transfer __P((struct umass_softc *sc, int lun, void *cmd, int cmdlen, void *data, int datalen, int dir, transfer_cb_f cb, void *priv)); -static void umass_bbb_state __P((usbd_xfer_handle xfer, +Static void umass_bbb_state __P((usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status err)); /* CBI related functions */ -static int umass_cbi_adsc __P((struct umass_softc *sc, char *buffer,int buflen, +Static int umass_cbi_adsc __P((struct umass_softc *sc, char *buffer,int buflen, usbd_xfer_handle xfer)); -static void umass_cbi_reset __P((struct umass_softc *sc, int status)); -static void umass_cbi_transfer __P((struct umass_softc *sc, int lun, +Static void umass_cbi_reset __P((struct umass_softc *sc, int status)); +Static void umass_cbi_transfer __P((struct umass_softc *sc, int lun, void *cmd, int cmdlen, void *data, int datalen, int dir, transfer_cb_f cb, void *priv)); -static void umass_cbi_state __P((usbd_xfer_handle xfer, +Static void umass_cbi_state __P((usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status err)); /* CAM related functions */ -static void umass_cam_action __P((struct cam_sim *sim, union ccb *ccb)); -static void umass_cam_poll __P((struct cam_sim *sim)); +Static void umass_cam_action __P((struct cam_sim *sim, union ccb *ccb)); +Static void umass_cam_poll __P((struct cam_sim *sim)); -static void umass_cam_cb __P((struct umass_softc *sc, void *priv, +Static void umass_cam_cb __P((struct umass_softc *sc, void *priv, int residue, int status)); -static void umass_cam_sense_cb __P((struct umass_softc *sc, void *priv, +Static void umass_cam_sense_cb __P((struct umass_softc *sc, void *priv, int residue, int status)); -static void umass_cam_rescan_callback +Static void umass_cam_rescan_callback __P((struct cam_periph *periph,union ccb *ccb)); -static void umass_cam_rescan __P((struct umass_softc *sc)); +Static void umass_cam_rescan __P((struct umass_softc *sc)); -static int umass_cam_attach_sim __P((void)); -static int umass_cam_attach __P((struct umass_softc *sc)); -static int umass_cam_detach_sim __P((void)); -static int umass_cam_detach __P((struct umass_softc *sc)); +Static int umass_cam_attach_sim __P((void)); +Static int umass_cam_attach __P((struct umass_softc *sc)); +Static int umass_cam_detach_sim __P((void)); +Static int umass_cam_detach __P((struct umass_softc *sc)); /* SCSI specific functions */ -static int umass_scsi_transform __P((struct umass_softc *sc, +Static int umass_scsi_transform __P((struct umass_softc *sc, unsigned char *cmd, int cmdlen, unsigned char **rcmd, int *rcmdlen)); /* UFI specific functions */ #define UFI_COMMAND_LENGTH 12 /* UFI commands are always 12b */ -static int umass_ufi_transform __P((struct umass_softc *sc, +Static int umass_ufi_transform __P((struct umass_softc *sc, unsigned char *cmd, int cmdlen, unsigned char **rcmd, int *rcmdlen)); /* ATAPI (8070i) specific functions */ #define ATAPI_COMMAND_LENGTH 12 /* ATAPI commands are always 12b */ -static int umass_atapi_transform __P((struct umass_softc *sc, +Static int umass_atapi_transform __P((struct umass_softc *sc, unsigned char *cmd, int cmdlen, unsigned char **rcmd, int *rcmdlen)); #ifdef UMASS_DEBUG /* General debugging functions */ -static void umass_bbb_dump_cbw __P((struct umass_softc *sc, +Static void umass_bbb_dump_cbw __P((struct umass_softc *sc, umass_bbb_cbw_t *cbw)); -static void umass_bbb_dump_csw __P((struct umass_softc *sc, +Static void umass_bbb_dump_csw __P((struct umass_softc *sc, umass_bbb_csw_t *csw)); -static void umass_dump_buffer __P((struct umass_softc *sc, u_int8_t *buffer, +Static void umass_dump_buffer __P((struct umass_softc *sc, u_int8_t *buffer, int buflen, int printlen)); #endif @@ -528,7 +528,7 @@ static void umass_dump_buffer __P((struct umass_softc *sc, u_int8_t *buffer, * This function is called from both probe and attach. */ -static int +Static int umass_match_proto(struct umass_softc *sc, usbd_interface_handle iface) { usbd_device_handle dev; @@ -904,7 +904,7 @@ USB_DETACH(umass) * Generic functions to handle transfers */ -static usbd_status +Static usbd_status umass_setup_transfer(struct umass_softc *sc, usbd_pipe_handle pipe, void *buffer, int buflen, int flags, usbd_xfer_handle xfer) @@ -927,7 +927,7 @@ umass_setup_transfer(struct umass_softc *sc, usbd_pipe_handle pipe, } -static usbd_status +Static usbd_status umass_setup_ctrl_transfer(struct umass_softc *sc, usbd_device_handle dev, usb_device_request_t *req, void *buffer, int buflen, int flags, @@ -952,7 +952,7 @@ umass_setup_ctrl_transfer(struct umass_softc *sc, usbd_device_handle dev, return (USBD_NORMAL_COMPLETION); } -static void +Static void umass_clear_endpoint_stall(struct umass_softc *sc, u_int8_t endpt, usbd_pipe_handle pipe, int state, usbd_xfer_handle xfer) @@ -976,7 +976,7 @@ umass_clear_endpoint_stall(struct umass_softc *sc, umass_setup_ctrl_transfer(sc, dev, &sc->request, NULL, 0, 0, xfer); } -static void +Static void umass_reset(struct umass_softc *sc, transfer_cb_f cb, void *priv) { sc->transfer_cb = cb; @@ -990,7 +990,7 @@ umass_reset(struct umass_softc *sc, transfer_cb_f cb, void *priv) * Bulk protocol specific functions */ -static void +Static void umass_bbb_reset(struct umass_softc *sc, int status) { usbd_device_handle dev; @@ -1032,7 +1032,7 @@ umass_bbb_reset(struct umass_softc *sc, int status) sc->transfer_xfer[XFER_BBB_RESET1]); } -static void +Static void umass_bbb_transfer(struct umass_softc *sc, int lun, void *cmd, int cmdlen, void *data, int datalen, int dir, transfer_cb_f cb, void *priv) @@ -1138,7 +1138,7 @@ umass_bbb_transfer(struct umass_softc *sc, int lun, void *cmd, int cmdlen, } -static void +Static void umass_bbb_state(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status err) { @@ -1435,7 +1435,7 @@ umass_bbb_state(usbd_xfer_handle xfer, usbd_private_handle priv, * Command/Bulk/Interrupt (CBI) specific functions */ -static int +Static int umass_cbi_adsc(struct umass_softc *sc, char *buffer, int buflen, usbd_xfer_handle xfer) { @@ -1456,7 +1456,7 @@ umass_cbi_adsc(struct umass_softc *sc, char *buffer, int buflen, } -static void +Static void umass_cbi_reset(struct umass_softc *sc, int status) { int i; @@ -1504,7 +1504,7 @@ umass_cbi_reset(struct umass_softc *sc, int status) /* XXX if the command fails we should reset the port on the bub */ } -static void +Static void umass_cbi_transfer(struct umass_softc *sc, int lun, void *cmd, int cmdlen, void *data, int datalen, int dir, transfer_cb_f cb, void *priv) @@ -1554,7 +1554,7 @@ umass_cbi_transfer(struct umass_softc *sc, int lun, umass_cbi_reset(sc, STATUS_WIRE_FAILED); } -static void +Static void umass_cbi_state(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status err) { @@ -1826,7 +1826,7 @@ umass_cbi_state(usbd_xfer_handle xfer, usbd_private_handle priv, * CAM specific functions (used by SCSI, UFI, 8070 (ATAPI)) */ -static int +Static int umass_cam_attach_sim() { struct cam_devq *devq; /* Per device Queue */ @@ -1857,7 +1857,7 @@ umass_cam_attach_sim() return(0); } -static void +Static void umass_cam_rescan_callback(struct cam_periph *periph, union ccb *ccb) { #ifdef UMASS_DEBUG @@ -1875,7 +1875,7 @@ umass_cam_rescan_callback(struct cam_periph *periph, union ccb *ccb) free(ccb, M_USBDEV); } -static void +Static void umass_cam_rescan(struct umass_softc *sc) { struct cam_path *path; @@ -1902,7 +1902,7 @@ umass_cam_rescan(struct umass_softc *sc) /* The scan is in progress now. */ } -static int +Static int umass_cam_attach(struct umass_softc *sc) { /* SIM already attached at module load. The device is a target on the @@ -1944,7 +1944,7 @@ umass_cam_attach(struct umass_softc *sc) * detach from the CAM layer */ -static int +Static int umass_cam_detach_sim() { if (umass_sim) @@ -1962,7 +1962,7 @@ umass_cam_detach_sim() return(0); } -static int +Static int umass_cam_detach(struct umass_softc *sc) { struct cam_path *path; @@ -1988,7 +1988,7 @@ umass_cam_detach(struct umass_softc *sc) * CAM requests for action come through here */ -static void +Static void umass_cam_action(struct cam_sim *sim, union ccb *ccb) { struct umass_softc *sc = devclass_get_softc(umass_devclass, @@ -2268,7 +2268,7 @@ umass_cam_action(struct cam_sim *sim, union ccb *ccb) * all requests are handled through umass_cam_action, requests * are never pending. So, nothing to do here. */ -static void +Static void umass_cam_poll(struct cam_sim *sim) { #ifdef UMASS_DEBUG @@ -2286,7 +2286,7 @@ umass_cam_poll(struct cam_sim *sim) * finalise a completed CAM command */ -static void +Static void umass_cam_cb(struct umass_softc *sc, void *priv, int residue, int status) { union ccb *ccb = (union ccb *) priv; @@ -2358,7 +2358,7 @@ umass_cam_cb(struct umass_softc *sc, void *priv, int residue, int status) /* Finalise a completed autosense operation */ -static void +Static void umass_cam_sense_cb(struct umass_softc *sc, void *priv, int residue, int status) { union ccb *ccb = (union ccb *) priv; @@ -2404,7 +2404,7 @@ umass_cam_sense_cb(struct umass_softc *sc, void *priv, int residue, int status) } -static int +Static int umass_driver_load(module_t mod, int what, void *arg) { int err; @@ -2430,7 +2430,7 @@ umass_driver_load(module_t mod, int what, void *arg) * SCSI specific functions */ -static int +Static int umass_scsi_transform(struct umass_softc *sc, unsigned char *cmd, int cmdlen, unsigned char **rcmd, int *rcmdlen) { @@ -2444,7 +2444,7 @@ umass_scsi_transform(struct umass_softc *sc, unsigned char *cmd, int cmdlen, * UFI specific functions */ -static int +Static int umass_ufi_transform(struct umass_softc *sc, unsigned char *cmd, int cmdlen, unsigned char **rcmd, int *rcmdlen) { @@ -2516,7 +2516,7 @@ umass_ufi_transform(struct umass_softc *sc, unsigned char *cmd, int cmdlen, /* * 8070 (ATAPI) specific functions */ -static int +Static int umass_atapi_transform(struct umass_softc *sc, unsigned char *cmd, int cmdlen, unsigned char **rcmd, int *rcmdlen) { @@ -2575,7 +2575,7 @@ DRIVER_MODULE(umass, uhub, umass_driver, umass_devclass, umass_driver_load, 0); #ifdef UMASS_DEBUG -static void +Static void umass_bbb_dump_cbw(struct umass_softc *sc, umass_bbb_cbw_t *cbw) { int clen = cbw->bCDBLength; @@ -2593,7 +2593,7 @@ umass_bbb_dump_cbw(struct umass_softc *sc, umass_bbb_cbw_t *cbw) (flags == CBWFLAGS_OUT? "out":"")))); } -static void +Static void umass_bbb_dump_csw(struct umass_softc *sc, umass_bbb_csw_t *csw) { int sig = UGETDW(csw->dCSWSignature); @@ -2610,7 +2610,7 @@ umass_bbb_dump_csw(struct umass_softc *sc, umass_bbb_csw_t *csw) (status == CSWSTATUS_PHASE? "phase":""))))); } -static void +Static void umass_dump_buffer(struct umass_softc *sc, u_int8_t *buffer, int buflen, int printlen) { diff --git a/sys/dev/usb/umodem.c b/sys/dev/usb/umodem.c index 6da367372d87..643ffb01a45c 100644 --- a/sys/dev/usb/umodem.c +++ b/sys/dev/usb/umodem.c @@ -123,7 +123,7 @@ USB_ATTACH(umodem) } #if defined(__FreeBSD__) -static int +Static int umodem_detach(device_t self) { DPRINTF(("%s: disconnected\n", USBDEVNAME(self))); diff --git a/sys/dev/usb/ums.c b/sys/dev/usb/ums.c index 3eed7aa2fe12..9b77579fe26d 100644 --- a/sys/dev/usb/ums.c +++ b/sys/dev/usb/ums.c @@ -123,25 +123,25 @@ struct ums_softc { #define MOUSE_FLAGS_MASK (HIO_CONST|HIO_RELATIVE) #define MOUSE_FLAGS (HIO_RELATIVE) -static void ums_intr __P((usbd_xfer_handle xfer, +Static void ums_intr __P((usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status)); -static void ums_add_to_queue __P((struct ums_softc *sc, +Static void ums_add_to_queue __P((struct ums_softc *sc, int dx, int dy, int dz, int buttons)); -static void ums_add_to_queue_timeout __P((void *priv)); +Static void ums_add_to_queue_timeout __P((void *priv)); -static int ums_enable __P((void *)); -static void ums_disable __P((void *)); +Static int ums_enable __P((void *)); +Static void ums_disable __P((void *)); -static d_open_t ums_open; -static d_close_t ums_close; -static d_read_t ums_read; -static d_ioctl_t ums_ioctl; -static d_poll_t ums_poll; +Static d_open_t ums_open; +Static d_close_t ums_close; +Static d_read_t ums_read; +Static d_ioctl_t ums_ioctl; +Static d_poll_t ums_poll; #define UMS_CDEV_MAJOR 111 -static struct cdevsw ums_cdevsw = { +Static struct cdevsw ums_cdevsw = { /* open */ ums_open, /* close */ ums_close, /* read */ ums_read, @@ -356,7 +356,7 @@ USB_ATTACH(ums) } -static int +Static int ums_detach(device_t self) { struct ums_softc *sc = device_get_softc(self); @@ -473,7 +473,7 @@ ums_intr(xfer, addr, status) } } -static void +Static void ums_add_to_queue_timeout(void *priv) { struct ums_softc *sc = priv; @@ -484,7 +484,7 @@ ums_add_to_queue_timeout(void *priv) splx(s); } -static void +Static void ums_add_to_queue(struct ums_softc *sc, int dx, int dy, int dz, int buttons) { /* Discard data in case of full buffer */ @@ -530,7 +530,7 @@ ums_add_to_queue(struct ums_softc *sc, int dx, int dy, int dz, int buttons) selwakeup(&sc->rsel); } } -static int +Static int ums_enable(v) void *v; { @@ -564,7 +564,7 @@ ums_enable(v) return (0); } -static void +Static void ums_disable(priv) void *priv; { @@ -582,7 +582,7 @@ ums_disable(priv) DPRINTF(("Discarded %d bytes in queue\n", sc->qcount)); } -static int +Static int ums_open(dev_t dev, int flag, int fmt, struct proc *p) { struct ums_softc *sc; @@ -592,7 +592,7 @@ ums_open(dev_t dev, int flag, int fmt, struct proc *p) return ums_enable(sc); } -static int +Static int ums_close(dev_t dev, int flag, int fmt, struct proc *p) { struct ums_softc *sc; @@ -608,7 +608,7 @@ ums_close(dev_t dev, int flag, int fmt, struct proc *p) return 0; } -static int +Static int ums_read(dev_t dev, struct uio *uio, int flag) { struct ums_softc *sc; @@ -678,7 +678,7 @@ ums_read(dev_t dev, struct uio *uio, int flag) return 0; } -static int +Static int ums_poll(dev_t dev, int events, struct proc *p) { struct ums_softc *sc; diff --git a/sys/dev/usb/urio.c b/sys/dev/usb/urio.c index 8a87682f7661..120befdd5224 100644 --- a/sys/dev/usb/urio.c +++ b/sys/dev/usb/urio.c @@ -89,7 +89,7 @@ d_ioctl_t urioioctl; #define RIO_NODIR 2 #if (__FreeBSD__ >= 4) -static struct cdevsw urio_cdevsw = { +Static struct cdevsw urio_cdevsw = { urioopen, urioclose, urioread, uriowrite, urioioctl, nopoll, nommap, nostrategy, "urio", URIO_CDEV_MAJOR,nodump, nopsize, @@ -99,7 +99,7 @@ static struct cdevsw urio_cdevsw = { ((UE_GET_DIR(p) == UE_DIR_OUT) ? RIO_OUT :\ RIO_NODIR)) #else -static struct cdevsw urio_cdevsw = { +Static struct cdevsw urio_cdevsw = { urioopen, urioclose, urioread, uriowrite, urioioctl, nostop, nullreset, nodevtotty, seltrue, nommap, nostrat, @@ -546,7 +546,7 @@ ret: #if defined(__FreeBSD__) -static int +Static int urio_detach(device_t self) { DPRINTF(("%s: disconnected\n", USBDEVNAME(self))); diff --git a/sys/dev/usb/usb.c b/sys/dev/usb/usb.c index 4a166db0f418..e99bb7117928 100644 --- a/sys/dev/usb/usb.c +++ b/sys/dev/usb/usb.c @@ -147,10 +147,10 @@ struct cdevsw usb_cdevsw = { }; #endif -static usbd_status usb_discover __P((struct usb_softc *)); +Static usbd_status usb_discover __P((struct usb_softc *)); #if defined(__NetBSD__) || defined(__OpenBSD__) -static void usb_create_event_thread __P((void *)); -static void usb_event_thread __P((void *)); +Static void usb_create_event_thread __P((void *)); +Static void usb_event_thread __P((void *)); #endif #define USB_MAX_EVENTS 50 @@ -158,21 +158,21 @@ struct usb_event_q { struct usb_event ue; SIMPLEQ_ENTRY(usb_event_q) next; }; -static SIMPLEQ_HEAD(, usb_event_q) usb_events = +Static SIMPLEQ_HEAD(, usb_event_q) usb_events = SIMPLEQ_HEAD_INITIALIZER(usb_events); -static int usb_nevents = 0; -static struct selinfo usb_selevent; -static struct proc *usb_async_proc; /* process who wants USB SIGIO */ -static int usb_dev_open = 0; +Static int usb_nevents = 0; +Static struct selinfo usb_selevent; +Static struct proc *usb_async_proc; /* process who wants USB SIGIO */ +Static int usb_dev_open = 0; -static int usb_get_next_event __P((struct usb_event *)); +Static int usb_get_next_event __P((struct usb_event *)); #if defined(__NetBSD__) || defined(__OpenBSD__) /* Flag to see if we are in the cold boot process. */ extern int cold; #endif -static const char *usbrev_str[] = USBREV_STR; +Static const char *usbrev_str[] = USBREV_STR; USB_DECLARE_DRIVER_INIT(usb, DEVMETHOD(device_suspend, bus_generic_suspend), diff --git a/sys/dev/usb/usb_ethersubr.c b/sys/dev/usb/usb_ethersubr.c index 569b4bf6fb0c..35a7db64a1fa 100644 --- a/sys/dev/usb/usb_ethersubr.c +++ b/sys/dev/usb/usb_ethersubr.c @@ -69,16 +69,16 @@ #include #ifndef lint -static const char rcsid[] = +Static const char rcsid[] = "$FreeBSD$"; #endif -static struct ifqueue usbq_rx; -static struct ifqueue usbq_tx; +Static struct ifqueue usbq_rx; +Static struct ifqueue usbq_tx; -static void usbintr __P((void)); +Static void usbintr __P((void)); -static void usbintr() +Static void usbintr() { struct ether_header *eh; struct mbuf *m; diff --git a/sys/dev/usb/usb_port.h b/sys/dev/usb/usb_port.h index e6d266c57519..f3705ace7e7d 100644 --- a/sys/dev/usb/usb_port.h +++ b/sys/dev/usb/usb_port.h @@ -60,6 +60,8 @@ #define UAUDIO_DEBUG 1 #endif +#define Static static + typedef struct device *device_ptr_t; #define USBBASEDEVICE struct device #define USBDEV(bdev) (&(bdev)) @@ -159,6 +161,8 @@ __CONCAT(dname,_detach)(self, flags) \ #define ULPT_DEBUG 1 #endif +#define Static static + #define memcpy(d, s, l) bcopy((s),(d),(l)) #define memset(d, v, l) bzero((d),(l)) #define bswap32(x) swap32(x) @@ -267,6 +271,8 @@ __CONCAT(dname,_detach)(self, flags) \ #define USBVERBOSE +#define Static static + #define device_ptr_t device_t #define USBBASEDEVICE device_t #define USBDEV(bdev) (bdev) @@ -294,13 +300,13 @@ __CONCAT(dname,_detach)(self, flags) \ #define PWR_SUSPEND 1 #define USB_DECLARE_DRIVER_INIT(dname, init...) \ -static device_probe_t __CONCAT(dname,_match); \ -static device_attach_t __CONCAT(dname,_attach); \ -static device_detach_t __CONCAT(dname,_detach); \ +Static device_probe_t __CONCAT(dname,_match); \ +Static device_attach_t __CONCAT(dname,_attach); \ +Static device_detach_t __CONCAT(dname,_detach); \ \ -static devclass_t __CONCAT(dname,_devclass); \ +Static devclass_t __CONCAT(dname,_devclass); \ \ -static device_method_t __CONCAT(dname,_methods)[] = { \ +Static device_method_t __CONCAT(dname,_methods)[] = { \ DEVMETHOD(device_probe, __CONCAT(dname,_match)), \ DEVMETHOD(device_attach, __CONCAT(dname,_attach)), \ DEVMETHOD(device_detach, __CONCAT(dname,_detach)), \ @@ -308,7 +314,7 @@ static device_method_t __CONCAT(dname,_methods)[] = { \ {0,0} \ }; \ \ -static driver_t __CONCAT(dname,_driver) = { \ +Static driver_t __CONCAT(dname,_driver) = { \ #dname, \ __CONCAT(dname,_methods), \ sizeof(struct __CONCAT(dname,_softc)) \ @@ -316,16 +322,15 @@ static driver_t __CONCAT(dname,_driver) = { \ #define METHODS_NONE {0,0} #define USB_DECLARE_DRIVER(dname) USB_DECLARE_DRIVER_INIT(dname, METHODS_NONE) - #define USB_MATCH(dname) \ -static int \ +Static int \ __CONCAT(dname,_match)(device_t self) #define USB_MATCH_START(dname, uaa) \ struct usb_attach_arg *uaa = device_get_ivars(self) #define USB_ATTACH(dname) \ -static int \ +Static int \ __CONCAT(dname,_attach)(device_t self) #define USB_ATTACH_START(dname, sc, uaa) \ @@ -341,7 +346,7 @@ __CONCAT(dname,_attach)(device_t self) device_set_desc_copy(self, devinfo) #define USB_DETACH(dname) \ -static int \ +Static int \ __CONCAT(dname,_detach)(device_t self) #define USB_DETACH_START(dname, sc) \ diff --git a/sys/dev/usb/usb_quirks.c b/sys/dev/usb/usb_quirks.c index f99d3c3064e3..1e4d4de23c2c 100644 --- a/sys/dev/usb/usb_quirks.c +++ b/sys/dev/usb/usb_quirks.c @@ -50,7 +50,7 @@ extern int usbdebug; #endif -static struct usbd_quirk_entry { +Static struct usbd_quirk_entry { u_int16_t idVendor; u_int16_t idProduct; u_int16_t bcdDevice; diff --git a/sys/dev/usb/usb_subr.c b/sys/dev/usb/usb_subr.c index a1bb06c5943d..7fc358bf43af 100644 --- a/sys/dev/usb/usb_subr.c +++ b/sys/dev/usb/usb_subr.c @@ -75,21 +75,21 @@ extern int usbdebug; #define DPRINTFN(n,x) #endif -static usbd_status usbd_set_config __P((usbd_device_handle, int)); -static char *usbd_get_string __P((usbd_device_handle, int, char *)); -static int usbd_getnewaddr __P((usbd_bus_handle bus)); +Static usbd_status usbd_set_config __P((usbd_device_handle, int)); +Static char *usbd_get_string __P((usbd_device_handle, int, char *)); +Static int usbd_getnewaddr __P((usbd_bus_handle bus)); #if defined(__NetBSD__) -static int usbd_print __P((void *aux, const char *pnp)); -static int usbd_submatch __P((device_ptr_t, struct cfdata *cf, void *)); +Static int usbd_print __P((void *aux, const char *pnp)); +Static int usbd_submatch __P((device_ptr_t, struct cfdata *cf, void *)); #elif defined(__OpenBSD__) -static int usbd_submatch __P((device_ptr_t, void *, void *)); +Static int usbd_submatch __P((device_ptr_t, void *, void *)); #endif -static void usbd_free_iface_data __P((usbd_device_handle dev, int ifcno)); -static void usbd_kill_pipe __P((usbd_pipe_handle)); -static usbd_status usbd_probe_and_attach +Static void usbd_free_iface_data __P((usbd_device_handle dev, int ifcno)); +Static void usbd_kill_pipe __P((usbd_pipe_handle)); +Static usbd_status usbd_probe_and_attach __P((device_ptr_t parent, usbd_device_handle dev, int port, int addr)); -static u_int32_t usb_cookie_no = 0; +Static u_int32_t usb_cookie_no = 0; #ifdef USBVERBOSE typedef u_int16_t usb_vendor_id_t; @@ -109,7 +109,7 @@ struct usb_knowndev { #include #endif /* USBVERBOSE */ -static const char *usbd_error_strs[] = { +Static const char *usbd_error_strs[] = { "NORMAL_COMPLETION", "IN_PROGRESS", "PENDING_REQUESTS", @@ -510,7 +510,7 @@ usbd_free_iface_data(dev, ifcno) free(ifc->endpoints, M_USB); } -static usbd_status +Static usbd_status usbd_set_config(dev, conf) usbd_device_handle dev; int conf; diff --git a/sys/dev/usb/usbdi.c b/sys/dev/usb/usbdi.c index 41df7277ef6b..1c7144fac76e 100644 --- a/sys/dev/usb/usbdi.c +++ b/sys/dev/usb/usbdi.c @@ -78,14 +78,14 @@ extern int usbdebug; #define DPRINTFN(n,x) #endif -static usbd_status usbd_ar_pipe __P((usbd_pipe_handle pipe)); -static void usbd_do_request_async_cb +Static usbd_status usbd_ar_pipe __P((usbd_pipe_handle pipe)); +Static void usbd_do_request_async_cb __P((usbd_xfer_handle, usbd_private_handle, usbd_status)); -static void usbd_start_next __P((usbd_pipe_handle pipe)); -static usbd_status usbd_open_pipe_ival +Static void usbd_start_next __P((usbd_pipe_handle pipe)); +Static usbd_status usbd_open_pipe_ival __P((usbd_interface_handle, u_int8_t, u_int8_t, usbd_pipe_handle *, int)); -static int usbd_nbuses = 0; +Static int usbd_nbuses = 0; void usbd_init() @@ -99,8 +99,8 @@ usbd_finish() --usbd_nbuses; } -static __inline int usbd_xfer_isread __P((usbd_xfer_handle xfer)); -static __inline int +Static __inline int usbd_xfer_isread __P((usbd_xfer_handle xfer)); +Static __inline int usbd_xfer_isread(xfer) usbd_xfer_handle xfer; { @@ -741,7 +741,7 @@ usbd_get_interface(iface, aiface) /*** Internal routines ***/ /* Dequeue all pipe operations, called at splusb(). */ -static usbd_status +Static usbd_status usbd_ar_pipe(pipe) usbd_pipe_handle pipe; { diff --git a/sys/dev/usb/usbdi_util.c b/sys/dev/usb/usbdi_util.c index 1bdef6e53fa3..b8b51d0d29fb 100644 --- a/sys/dev/usb/usbdi_util.c +++ b/sys/dev/usb/usbdi_util.c @@ -480,9 +480,9 @@ usbd_get_config(dev, conf) return (usbd_do_request(dev, &req, conf)); } -static void usbd_bulk_transfer_cb __P((usbd_xfer_handle xfer, +Static void usbd_bulk_transfer_cb __P((usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status)); -static void +Static void usbd_bulk_transfer_cb(xfer, priv, status) usbd_xfer_handle xfer; usbd_private_handle priv;