diff options
author | joe <joe@FreeBSD.org> | 2002-05-28 20:51:43 +0000 |
---|---|---|
committer | joe <joe@FreeBSD.org> | 2002-05-28 20:51:43 +0000 |
commit | b02de3a56c91dd9d2279e6983f1eb563228c89c0 (patch) | |
tree | 3521e0bb8b935fdf5f6a09b91d4233846b17f340 /sys/dev | |
parent | 7c61addfdd151dde0aa79f6a1671237569210949 (diff) | |
download | FreeBSD-src-b02de3a56c91dd9d2279e6983f1eb563228c89c0.zip FreeBSD-src-b02de3a56c91dd9d2279e6983f1eb563228c89c0.tar.gz |
NetBSD have adopted our usage of the DMAADDR macro:
date: 2002/05/28 12:42:39; author: augustss;
Change DMAADDR macro slightly.
Update the $NetBSD$ tags to reflect this and make slight changes to
usb_mem.h so that we're in sync with each other.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/usb/ohci.c | 2 | ||||
-rw-r--r-- | sys/dev/usb/uhci.c | 2 | ||||
-rw-r--r-- | sys/dev/usb/usb_mem.h | 18 |
3 files changed, 10 insertions, 12 deletions
diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c index c17fb75..b15b178 100644 --- a/sys/dev/usb/ohci.c +++ b/sys/dev/usb/ohci.c @@ -1,4 +1,4 @@ -/* $NetBSD: ohci.c,v 1.124 2002/05/26 03:10:02 minoura Exp $ */ +/* $NetBSD: ohci.c,v 1.125 2002/05/28 12:42:38 augustss Exp $ */ /* $FreeBSD$ */ /* diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c index e01503e..06e7f92 100644 --- a/sys/dev/usb/uhci.c +++ b/sys/dev/usb/uhci.c @@ -1,4 +1,4 @@ -/* $NetBSD: uhci.c,v 1.159 2002/05/19 06:24:32 augustss Exp $ */ +/* $NetBSD: uhci.c,v 1.160 2002/05/28 12:42:39 augustss Exp $ */ /* $FreeBSD$ */ /* diff --git a/sys/dev/usb/usb_mem.h b/sys/dev/usb/usb_mem.h index eb2d99b..b3788de 100644 --- a/sys/dev/usb/usb_mem.h +++ b/sys/dev/usb/usb_mem.h @@ -1,4 +1,4 @@ -/* $NetBSD: usb_mem.h,v 1.16 2002/05/19 06:24:33 augustss Exp $ */ +/* $NetBSD: usb_mem.h,v 1.18 2002/05/28 17:45:17 augustss Exp $ */ /* $FreeBSD$ */ /* @@ -51,10 +51,9 @@ typedef struct usb_dma_block { LIST_ENTRY(usb_dma_block) next; } usb_dma_block_t; -#define DMAADDR(dma, offset) \ - ((dma)->block->map->dm_segs[0].ds_addr + (dma)->offs + (offset)) -#define KERNADDR(dma, offset) \ - ((void *)((char *)((dma)->block->kaddr + (dma)->offs) + (offset))) +#define DMAADDR(dma, o) ((dma)->block->map->dm_segs[0].ds_addr + (dma)->offs + (o)) +#define KERNADDR(dma, o) \ + ((void *)((char *)((dma)->block->kaddr + (dma)->offs) + (o))) usbd_status usb_allocmem(usbd_bus_handle,size_t,size_t, usb_dma_t *); void usb_freemem(usbd_bus_handle, usb_dma_t *); @@ -83,11 +82,10 @@ void usb_freemem(usbd_bus_handle, usb_dma_t *); #define usb_freemem(t,p) (free(*(p), M_USB)) #ifdef __alpha__ -#define DMAADDR(dma, offset) \ - (alpha_XXX_dmamap((vm_offset_t) *(dma) + (offset))) +#define DMAADDR(dma, o) (alpha_XXX_dmamap((vm_offset_t) *(dma) + (o))) #else -#define DMAADDR(dma, offset) (vtophys(*(dma) + (offset))) -#endif -#define KERNADDR(dma, offset) ((void *) (*(dma) + (offset))) +#define DMAADDR(dma, o) (vtophys(*(dma) + (o))) #endif +#define KERNADDR(dma, o) ((void *) ((char *)*(dma) + (o))) +#endif /* __FreeBSD__ */ |