Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb Sprinkle static.



details:   https://anonhg.NetBSD.org/src/rev/3c2821523070
branches:  trunk
changeset: 749033:3c2821523070
user:      uebayasi <uebayasi%NetBSD.org@localhost>
date:      Sat Nov 14 17:06:12 2009 +0000

description:
Sprinkle static.

diffstat:

 sys/dev/usb/ehci.c |  104 +++++++++++++++++++++++++---------------------------
 1 files changed, 51 insertions(+), 53 deletions(-)

diffs (truncated from 462 to 300 lines):

diff -r 3df7432d7647 -r 3c2821523070 sys/dev/usb/ehci.c
--- a/sys/dev/usb/ehci.c        Sat Nov 14 13:31:44 2009 +0000
+++ b/sys/dev/usb/ehci.c        Sat Nov 14 17:06:12 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ehci.c,v 1.163 2009/11/12 19:46:01 dyoung Exp $ */
+/*     $NetBSD: ehci.c,v 1.164 2009/11/14 17:06:12 uebayasi Exp $ */
 
 /*
  * Copyright (c) 2004-2008 The NetBSD Foundation, Inc.
@@ -48,11 +48,11 @@
  *    to assign place in frame where different devices get to go. See chapter
  *    on hubs in USB 2.0 for details.
  *
- * 3) command failures are not recovered correctly
+ * 3) Command failures are not recovered correctly.
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.163 2009/11/12 19:46:01 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.164 2009/11/14 17:06:12 uebayasi Exp $");
 
 #include "ohci.h"
 #include "uhci.h"
@@ -636,7 +636,7 @@
 }
 
 
-void
+Static void
 ehci_pcd(ehci_softc_t *sc, usbd_xfer_handle xfer)
 {
        usbd_pipe_handle pipe;
@@ -665,7 +665,7 @@
        usb_transfer_complete(xfer);
 }
 
-void
+Static void
 ehci_softintr(void *v)
 {
        struct usbd_bus *bus = v;
@@ -705,7 +705,7 @@
 }
 
 /* Check for an interrupt. */
-void
+Static void
 ehci_check_intr(ehci_softc_t *sc, struct ehci_xfer *ex)
 {
        int attr;
@@ -721,7 +721,7 @@
        return;
 }
 
-void
+Static void
 ehci_check_qh_intr(ehci_softc_t *sc, struct ehci_xfer *ex)
 {
        ehci_soft_qtd_t *sqtd, *lsqtd;
@@ -782,7 +782,7 @@
        ehci_idone(ex);
 }
 
-void
+Static void
 ehci_check_itd_intr(ehci_softc_t *sc, struct ehci_xfer *ex) {
        ehci_soft_itd_t *itd;
        int i;
@@ -829,7 +829,7 @@
        ehci_idone(ex);
 }
 
-void
+Static void
 ehci_idone(struct ehci_xfer *ex)
 {
        usbd_xfer_handle xfer = &ex->xfer;
@@ -1014,7 +1014,7 @@
  * Then call ehci_intr and return.  Use timeout to avoid waiting
  * too long.
  */
-void
+Static void
 ehci_waitintr(ehci_softc_t *sc, usbd_xfer_handle xfer)
 {
        int timo;
@@ -1046,7 +1046,7 @@
        /* XXX should free TD */
 }
 
-void
+Static void
 ehci_poll(struct usbd_bus *bus)
 {
        ehci_softc_t *sc = bus->hci_private;
@@ -1242,7 +1242,7 @@
        return true;
 }
 
-usbd_status
+Static usbd_status
 ehci_allocm(struct usbd_bus *bus, usb_dma_t *dma, u_int32_t size)
 {
        struct ehci_softc *sc = bus->hci_private;
@@ -1258,7 +1258,7 @@
        return (err);
 }
 
-void
+Static void
 ehci_freem(struct usbd_bus *bus, usb_dma_t *dma)
 {
        struct ehci_softc *sc = bus->hci_private;
@@ -1271,7 +1271,7 @@
        usb_freemem(&sc->sc_bus, dma);
 }
 
-usbd_xfer_handle
+Static usbd_xfer_handle
 ehci_allocx(struct usbd_bus *bus)
 {
        struct ehci_softc *sc = bus->hci_private;
@@ -1299,7 +1299,7 @@
        return (xfer);
 }
 
-void
+Static void
 ehci_freex(struct usbd_bus *bus, usbd_xfer_handle xfer)
 {
        struct ehci_softc *sc = bus->hci_private;
@@ -1337,7 +1337,7 @@
 }
 
 #ifdef EHCI_DEBUG
-void
+Static void
 ehci_dump_regs(ehci_softc_t *sc)
 {
        int i;
@@ -1365,7 +1365,7 @@
        ehci_dump_regs(theehci);
 }
 
-void
+Static void
 ehci_dump_link(ehci_link_t link, int type)
 {
        link = le32toh(link);
@@ -1386,7 +1386,7 @@
        }
 }
 
-void
+Static void
 ehci_dump_sqtds(ehci_soft_qtd_t *sqtd)
 {
        int i;
@@ -1408,7 +1408,7 @@
                printf("dump aborted, too many TDs\n");
 }
 
-void
+Static void
 ehci_dump_sqtd(ehci_soft_qtd_t *sqtd)
 {
        usb_syncmem(&sqtd->dma, sqtd->offs, 
@@ -1419,7 +1419,7 @@
            sizeof(sqtd->qtd), BUS_DMASYNC_PREREAD);
 }
 
-void
+Static void
 ehci_dump_qtd(ehci_qtd_t *qtd)
 {
        u_int32_t s;
@@ -1441,7 +1441,7 @@
                printf("  buffer[%d]=0x%08x\n", s, le32toh(qtd->qtd_buffer[s]));
 }
 
-void
+Static void
 ehci_dump_sqh(ehci_soft_qh_t *sqh)
 {
        ehci_qh_t *qh = &sqh->qh;
@@ -1474,7 +1474,7 @@
 }
 
 #if notyet
-void
+Static void
 ehci_dump_itd(struct ehci_soft_itd *itd)
 {
        ehci_isoc_trans_t t;
@@ -1502,7 +1502,7 @@
            EHCI_ITD_GET_MAXPKT(b2), EHCI_ITD_GET_MULTI(b3));
 }
 
-void
+Static void
 ehci_dump_sitd(struct ehci_soft_itd *itd)
 {
        printf("SITD %p next=%p prev=%p xfernext=%p physaddr=%X slot=%d\n",
@@ -1512,7 +1512,7 @@
 #endif
 
 #ifdef DIAGNOSTIC
-void
+Static void
 ehci_dump_exfer(struct ehci_xfer *ex)
 {
        printf("ehci_dump_exfer: ex=%p sqtdstart=%p end=%p itdstart=%p end=%p isdone=%d\n", ex, ex->sqtdstart, ex->sqtdend, ex->itdstart, ex->itdend, ex->isdone);
@@ -1520,7 +1520,7 @@
 #endif
 #endif
 
-usbd_status
+Static usbd_status
 ehci_open(usbd_pipe_handle pipe)
 {
        usbd_device_handle dev = pipe->device;
@@ -1698,7 +1698,7 @@
 /*
  * Add an ED to the schedule.  Called at splusb().
  */
-void
+Static void
 ehci_add_qh(ehci_soft_qh_t *sqh, ehci_soft_qh_t *head)
 {
        SPLUSBCHECK;
@@ -1725,7 +1725,7 @@
 /*
  * Remove an ED from the schedule.  Called at splusb().
  */
-void
+Static void
 ehci_rem_qh(ehci_softc_t *sc, ehci_soft_qh_t *sqh, ehci_soft_qh_t *head)
 {
        ehci_soft_qh_t *p;
@@ -1746,7 +1746,7 @@
        ehci_sync_hc(sc);
 }
 
-void
+Static void
 ehci_set_qh_qtd(ehci_soft_qh_t *sqh, ehci_soft_qtd_t *sqtd)
 {
        int i;
@@ -1787,7 +1787,7 @@
  * the interrupt.
  * To make this easier we first obtain exclusive use of the doorbell.
  */
-void
+Static void
 ehci_sync_hc(ehci_softc_t *sc)
 {
        int s, error;
@@ -1816,7 +1816,7 @@
 }
 
 /*Call at splusb*/
-void
+Static void
 ehci_rem_free_itd_chain(ehci_softc_t *sc, struct ehci_xfer *exfer)
 {
        struct ehci_soft_itd *itd, *prev;
@@ -2213,7 +2213,7 @@
                USETW(hubd.wHubCharacteristics,
                    EHCI_HCS_PPC(v) ? UHD_PWR_INDIVIDUAL : UHD_PWR_NO_SWITCH |
                    EHCI_HCS_P_INDICATOR(EREAD4(sc, EHCI_HCSPARAMS))
-                       ? UHD_PORT_IND : 0);
+                       ? UHD_PORT_IND : 0);
                hubd.bPwrOn2PwrGood = 200; /* XXX can't find out? */
                for (i = 0, l = sc->sc_noport; l > 0; i++, l -= 8, v >>= 8)
                        hubd.DeviceRemovable[i++] = 0; /* XXX can't find out? */
@@ -2364,7 +2364,7 @@
        return (USBD_IN_PROGRESS);
 }
 
-void
+Static void
 ehci_disown(ehci_softc_t *sc, int index, int lowspeed)
 {
        int port;
@@ -2407,7 +2407,7 @@
        /* Nothing to do. */
 }
 
-void
+Static void
 ehci_root_intr_done(usbd_xfer_handle xfer)
 {
        xfer->hcpriv = NULL;
@@ -2468,7 +2468,7 @@
        sc->sc_intrxfer = NULL;
 }
 
-void
+Static void
 ehci_root_ctrl_done(usbd_xfer_handle xfer)



Home | Main Index | Thread Index | Old Index