diff options
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 |