diff options
author | joe <joe@FreeBSD.org> | 2002-05-23 00:26:06 +0000 |
---|---|---|
committer | joe <joe@FreeBSD.org> | 2002-05-23 00:26:06 +0000 |
commit | 0da89370adfe17ba00f07ee8e04cf76817c813b2 (patch) | |
tree | 5a0375adafac44912c138ce7b7eec77809d1b4bf /sys/dev | |
parent | edf0aad69ea0225357a1fafb8471d250a66041b6 (diff) | |
download | FreeBSD-src-0da89370adfe17ba00f07ee8e04cf76817c813b2.zip FreeBSD-src-0da89370adfe17ba00f07ee8e04cf76817c813b2.tar.gz |
Reflect some changes in the NetBSD code path, and sligh adjustments to ours.
(Non-functional changes).
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/usb/usb_mem.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/dev/usb/usb_mem.h b/sys/dev/usb/usb_mem.h index 11d3528..eb2d99b 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.9 1999/10/13 08:10:58 augustss Exp $ */ +/* $NetBSD: usb_mem.h,v 1.16 2002/05/19 06:24:33 augustss Exp $ */ /* $FreeBSD$ */ /* @@ -51,8 +51,10 @@ typedef struct usb_dma_block { LIST_ENTRY(usb_dma_block) next; } usb_dma_block_t; -#define DMAADDR(dma, offset) ((dma)->block->segs[0].ds_addr + (dma)->offs + (offset)) -#define KERNADDR(dma, offset) ((void *)((dma)->block->kaddr + (dma)->offs) + (offset)) +#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))) usbd_status usb_allocmem(usbd_bus_handle,size_t,size_t, usb_dma_t *); void usb_freemem(usbd_bus_handle, usb_dma_t *); @@ -81,7 +83,8 @@ 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, offset) \ + (alpha_XXX_dmamap((vm_offset_t) *(dma) + (offset))) #else #define DMAADDR(dma, offset) (vtophys(*(dma) + (offset))) #endif |