1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-28 16:43:09 +00:00

Reflect some changes in the NetBSD code path, and sligh adjustments to ours.

(Non-functional changes).
This commit is contained in:
Josef Karthauser 2002-05-23 00:26:06 +00:00
parent 6312146417
commit 0f19b0d03a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=97150

View File

@ -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