free0: free(p, M_USB);
Static LIST_HEAD(, usb_dma_block) usb_blk_freelist =	LIST_HEAD_INITIALIZER(usb_blk_freelist);Static int usb_blk_nfree = 0;/* XXX should have different free list for different tags (for speed) */Static LIST_HEAD(, usb_frag_dma) usb_frag_freelist =	LIST_HEAD_INITIALIZER(usb_frag_freelist);Static usbd_statususb_block_allocmem(bus_dma_tag_t tag, size_t size, size_t align,		   usb_dma_block_t **dmap){	int error;        usb_dma_block_t *p;	int s;	DPRINTFN(5, ("usb_block_allocmem: size=%lu align=%lu\n",		     (u_long)size, (u_long)align));#ifdef DIAGNOSTIC	if (!curproc) {		printf("usb_block_allocmem: in interrupt context, size=%lu\n",		    (unsigned long) size);	}#endif	s = splusb();	/* First check the free list. */	for (p = LIST_FIRST(&usb_blk_freelist); p; p = LIST_NEXT(p, next)) {		if (p->tag == tag && p->size >= size && p->align >= align) {			LIST_REMOVE(p, next);			usb_blk_nfree--;			splx(s);			*dmap = p;			DPRINTFN(6,("usb_block_allocmem: free list size=%lu\n",				    (u_long)p->size));			return (USBD_NORMAL_COMPLETION);		}	}	splx(s);#ifdef DIAGNOSTIC	if (!curproc) {		printf("usb_block_allocmem: in interrupt context, failed\n");		return (USBD_NOMEM);	}#endif	DPRINTFN(6, ("usb_block_allocmem: no free\n"));	p = malloc(sizeof *p, M_USB, M_NOWAIT);	if (p == NULL)		return (USBD_NOMEM);	*dmap = p;	p->tag = tag;	p->size = size;	p->align = align;	error = bus_dmamem_alloc(tag, p->size, align, 0,				 p->segs, sizeof(p->segs)/sizeof(p->segs[0]),				 &p->nsegs, BUS_DMA_NOWAIT);	if (error)		return (USBD_NOMEM);	error = bus_dmamem_map(tag, p->segs, p->nsegs, p->size,			       &p->kaddr, BUS_DMA_NOWAIT|BUS_DMA_COHERENT);	if (error)		goto free;	error = bus_dmamap_create(tag, p->size, 1, p->size,				  0, BUS_DMA_NOWAIT, &p->map);	if (error)		goto unmap;	error = bus_dmamap_load(tag, p->map, p->kaddr, p->size, NULL,				BUS_DMA_NOWAIT);	if (error)		goto destroy;	return (USBD_NORMAL_COMPLETION);destroy:	bus_dmamap_destroy(tag, p->map);unmap:	bus_dmamem_unmap(tag, p->kaddr, p->size);free:	bus_dmamem_free(tag, p->segs, p->nsegs);	return (USBD_NOMEM);}