aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorJosef Karthauser <joe@FreeBSD.org>2002-05-28 20:51:43 +0000
committerJosef Karthauser <joe@FreeBSD.org>2002-05-28 20:51:43 +0000
commit43c6b63e827871b777a37732b7f68f2e6e594f7d (patch)
tree3521e0bb8b935fdf5f6a09b91d4233846b17f340 /sys/dev/usb
parentafad6c6529380683dc036d9564066b3631114bcf (diff)
Notes
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/ohci.c2
-rw-r--r--sys/dev/usb/uhci.c2
-rw-r--r--sys/dev/usb/usb_mem.h18
3 files changed, 10 insertions, 12 deletions
diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c
index c17fb75db9220..b15b178541b72 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 e01503ef81996..06e7f923e0782 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 eb2d99b3f2768..b3788de2e7d48 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__ */