Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/mips/adm5120/dev Use callout(9) instead of the USB ...



details:   https://anonhg.NetBSD.org/src/rev/74bd05f7ad34
branches:  trunk
changeset: 763820:74bd05f7ad34
user:      dyoung <dyoung%NetBSD.org@localhost>
date:      Mon Apr 04 19:58:56 2011 +0000

description:
Use callout(9) instead of the USB compatibility junk that went away
months ago.

diffstat:

 sys/arch/mips/adm5120/dev/ahci.c    |  20 ++++++++++----------
 sys/arch/mips/adm5120/dev/ahcivar.h |   8 ++++----
 2 files changed, 14 insertions(+), 14 deletions(-)

diffs (119 lines):

diff -r bfa55f467f03 -r 74bd05f7ad34 sys/arch/mips/adm5120/dev/ahci.c
--- a/sys/arch/mips/adm5120/dev/ahci.c  Mon Apr 04 19:57:31 2011 +0000
+++ b/sys/arch/mips/adm5120/dev/ahci.c  Mon Apr 04 19:58:56 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ahci.c,v 1.5 2008/12/16 22:35:24 christos Exp $        */
+/*     $NetBSD: ahci.c,v 1.6 2011/04/04 19:58:56 dyoung Exp $  */
 
 /*-
  * Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko.
@@ -64,7 +64,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ahci.c,v 1.5 2008/12/16 22:35:24 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ahci.c,v 1.6 2011/04/04 19:58:56 dyoung Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -297,7 +297,7 @@
 
        SIMPLEQ_INIT(&sc->sc_free_xfers);
 
-       usb_callout_init(sc->sc_poll_handle);
+       callout_init(&sc->sc_poll_handle, 0);
 
        REG_WRITE(ADMHCD_REG_INTENABLE, 0); /* disable interrupts */
        REG_WRITE(ADMHCD_REG_CONTROL, ADMHCD_SW_RESET); /* reset */
@@ -437,7 +437,7 @@
        static int p0_state=0;
        static int p1_state=0;
 
-       usb_callout(sc->sc_poll_handle, sc->sc_interval, ahci_poll_hub, xfer);
+       callout_reset(&sc->sc_poll_handle, sc->sc_interval, ahci_poll_hub, xfer);
 
        /* USB spec 11.13.3 (p.260) */
        p = KERNADDR(&xfer->dmabuf, 0);
@@ -996,7 +996,7 @@
        DPRINTF(D_TRACE, ("SLRIstart "));
 
        sc->sc_interval = MS_TO_TICKS(xfer->pipe->endpoint->edesc->bInterval);
-       usb_callout(sc->sc_poll_handle, sc->sc_interval, ahci_poll_hub, xfer);
+       callout_reset(&sc->sc_poll_handle, sc->sc_interval, ahci_poll_hub, xfer);
        sc->sc_intr_xfer = xfer;
        return USBD_IN_PROGRESS;
 }
@@ -1014,7 +1014,7 @@
 
        DPRINTF(D_TRACE, ("SLRIclose "));
 
-       usb_uncallout(sc->sc_poll_handle, ahci_poll_hub, sc->sc_intr_xfer);
+       callout_stop(&sc->sc_poll_handle);
        sc->sc_intr_xfer = NULL;
 }
 
@@ -1243,8 +1243,8 @@
        xfer->hcpriv = sx;
 
        /* initialize callout */
-       usb_callout_init(sx->sx_callout_t);
-       usb_callout(sx->sx_callout_t, 
+       callout_init(&sx->sx_callout_t, 0);
+       callout_reset(&sx->sx_callout_t, 
                MS_TO_TICKS(pipe->endpoint->edesc->bInterval),
                ahci_poll_device, sx);
 
@@ -1269,7 +1269,7 @@
 
        DPRINTF(D_TRACE, ("pldev"));
 
-       usb_callout(sx->sx_callout_t,
+       callout_reset(&sx->sx_callout_t,
                MS_TO_TICKS(pipe->endpoint->edesc->bInterval),
                ahci_poll_device, sx);
 
@@ -1304,7 +1304,7 @@
 
        sx = xfer->hcpriv;
        if (sx) {
-               usb_uncallout(sx->sx_callout_t, ahci_poll_device, sx);
+               callout_stop(&sx->sx_callout_t);
                free(sx, M_USB);
                xfer->hcpriv = NULL;
        } else {
diff -r bfa55f467f03 -r 74bd05f7ad34 sys/arch/mips/adm5120/dev/ahcivar.h
--- a/sys/arch/mips/adm5120/dev/ahcivar.h       Mon Apr 04 19:57:31 2011 +0000
+++ b/sys/arch/mips/adm5120/dev/ahcivar.h       Mon Apr 04 19:58:56 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ahcivar.h,v 1.2 2008/04/28 20:23:27 martin Exp $       */
+/*     $NetBSD: ahcivar.h,v 1.3 2011/04/04 19:58:56 dyoung Exp $       */
 
 /*-
  * Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko.
@@ -71,7 +71,7 @@
 
 struct ahci_xfer {
        usbd_xfer_handle sx_xfer;
-       usb_callout_t sx_callout_t;
+       callout_t sx_callout_t;
 };
 
 struct ahci_softc {
@@ -91,7 +91,7 @@
 #define INTR_ON        (1)
 #define INTR_OFF       (0)
 
-       device_ptr_t             sc_child;
+       device_t                 sc_child;
 
        struct device           *sc_parent;     /* parent device */
 
@@ -102,7 +102,7 @@
        /* Information for the root hub interrupt pipe */
        int                      sc_interval;
        usbd_xfer_handle         sc_intr_xfer;
-       usb_callout_t            sc_poll_handle;
+       callout_t                sc_poll_handle;
 
        int                              sc_flags;
 #define AHCDF_RESET    (0x01)



Home | Main Index | Thread Index | Old Index