mirror of
https://github.com/opnsense/src.git
synced 2026-06-10 17:22:46 -04:00
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.
This commit is contained in:
parent
8a8b2acc47
commit
883d14d6c6
3 changed files with 9 additions and 9 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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$ */
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue