Module Name:    src
Committed By:   dyoung
Date:           Mon Apr  4 19:58:56 UTC 2011

Modified Files:
        src/sys/arch/mips/adm5120/dev: ahci.c ahcivar.h

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


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/mips/adm5120/dev/ahci.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mips/adm5120/dev/ahcivar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/mips/adm5120/dev/ahci.c
diff -u src/sys/arch/mips/adm5120/dev/ahci.c:1.5 src/sys/arch/mips/adm5120/dev/ahci.c:1.6
--- src/sys/arch/mips/adm5120/dev/ahci.c:1.5	Tue Dec 16 22:35:24 2008
+++ src/sys/arch/mips/adm5120/dev/ahci.c	Mon Apr  4 19:58:56 2011
@@ -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 {

Index: src/sys/arch/mips/adm5120/dev/ahcivar.h
diff -u src/sys/arch/mips/adm5120/dev/ahcivar.h:1.2 src/sys/arch/mips/adm5120/dev/ahcivar.h:1.3
--- src/sys/arch/mips/adm5120/dev/ahcivar.h:1.2	Mon Apr 28 20:23:27 2008
+++ src/sys/arch/mips/adm5120/dev/ahcivar.h	Mon Apr  4 19:58:56 2011
@@ -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)

Reply via email to