From 883d14d6c6a4e2c9be1f2a7378c49ecfa2013111 Mon Sep 17 00:00:00 2001 From: Josef Karthauser Date: Sun, 26 May 2002 22:00:06 +0000 Subject: [PATCH] MFNetBSD: ohci.c (1.124), uhci.c (1.159), usbdi.c (1.100) date: 2002/05/19 06:24:31; author: augustss; state: Exp; Update dma memory access API a little. NetBSD have adopted our way of using the KERNADDR macro. Update the revision tags to show that we're in sync, and remove the casts that they did in their adaptation. --- sys/dev/usb/ohci.c | 10 +++++----- sys/dev/usb/uhci.c | 6 +++--- sys/dev/usb/usbdi.c | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c index 24dfc852e1ae..de48324c92d6 100644 --- a/sys/dev/usb/ohci.c +++ b/sys/dev/usb/ohci.c @@ -1,4 +1,4 @@ -/* $NetBSD: ohci.c,v 1.121 2002/03/16 16:11:18 tsutsui Exp $ */ +/* $NetBSD: ohci.c,v 1.123 2002/05/19 06:24:31 augustss Exp $ */ /* $FreeBSD$ */ /* @@ -405,7 +405,7 @@ ohci_alloc_sed(ohci_softc_t *sc) return (NULL); for(i = 0; i < OHCI_SED_CHUNK; i++) { offs = i * OHCI_SED_SIZE; - sed = (ohci_soft_ed_t *)((char *)KERNADDR(&dma, offs)); + sed = KERNADDR(&dma, offs); sed->physaddr = DMAADDR(&dma, offs); sed->next = sc->sc_freeeds; sc->sc_freeeds = sed; @@ -443,7 +443,7 @@ ohci_alloc_std(ohci_softc_t *sc) s = splusb(); for(i = 0; i < OHCI_STD_CHUNK; i++) { offs = i * OHCI_STD_SIZE; - std = (ohci_soft_td_t *)((char *)KERNADDR(&dma, offs)); + std = KERNADDR(&dma, offs); std->physaddr = DMAADDR(&dma, offs); std->nexttd = sc->sc_freetds; sc->sc_freetds = std; @@ -622,7 +622,7 @@ ohci_alloc_sitd(ohci_softc_t *sc) return (NULL); for(i = 0; i < OHCI_SITD_CHUNK; i++) { offs = i * OHCI_SITD_SIZE; - sitd = (ohci_soft_itd_t *)((char*)KERNADDR(&dma, offs)); + sitd = KERNADDR(&dma, offs); sitd->physaddr = DMAADDR(&dma, offs); sitd->nextitd = sc->sc_freeitds; sc->sc_freeitds = sitd; @@ -703,7 +703,7 @@ ohci_init(ohci_softc_t *sc) OHCI_HCCA_ALIGN, &sc->sc_hccadma); if (err) return (err); - sc->sc_hcca = (struct ohci_hcca *)KERNADDR(&sc->sc_hccadma, 0); + sc->sc_hcca = KERNADDR(&sc->sc_hccadma, 0); memset(sc->sc_hcca, 0, OHCI_HCCA_SIZE); sc->sc_eintrs = OHCI_NORMAL_INTRS; diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c index 372c51cfd12d..e01503ef8199 100644 --- a/sys/dev/usb/uhci.c +++ b/sys/dev/usb/uhci.c @@ -1,4 +1,4 @@ -/* $NetBSD: uhci.c,v 1.158 2002/03/17 18:02:53 augustss Exp $ */ +/* $NetBSD: uhci.c,v 1.159 2002/05/19 06:24:32 augustss Exp $ */ /* $FreeBSD$ */ /* @@ -1627,7 +1627,7 @@ uhci_alloc_std(uhci_softc_t *sc) return (0); for(i = 0; i < UHCI_STD_CHUNK; i++) { offs = i * UHCI_STD_SIZE; - std = (uhci_soft_td_t *)((char *)KERNADDR(&dma, offs)); + std = KERNADDR(&dma, offs); std->physaddr = DMAADDR(&dma, offs); std->link.std = sc->sc_freetds; sc->sc_freetds = std; @@ -1670,7 +1670,7 @@ uhci_alloc_sqh(uhci_softc_t *sc) return (0); for(i = 0; i < UHCI_SQH_CHUNK; i++) { offs = i * UHCI_SQH_SIZE; - sqh = (uhci_soft_qh_t *)((char *)KERNADDR(&dma, offs)); + sqh = KERNADDR(&dma, offs); sqh->physaddr = DMAADDR(&dma, offs); sqh->hlink = sc->sc_freeqhs; sc->sc_freeqhs = sqh; diff --git a/sys/dev/usb/usbdi.c b/sys/dev/usb/usbdi.c index 3d4f3d9a95b0..3e50efca9ccf 100644 --- a/sys/dev/usb/usbdi.c +++ b/sys/dev/usb/usbdi.c @@ -1,4 +1,4 @@ -/* $NetBSD: usbdi.c,v 1.99 2002/02/28 04:49:16 thorpej Exp $ */ +/* $NetBSD: usbdi.c,v 1.100 2002/05/19 06:24:33 augustss Exp $ */ /* $FreeBSD$ */ /*