usb_mbuf.c (193074) | usb_mbuf.c (194228) |
---|---|
1/* $FreeBSD: head/sys/dev/usb/usb_mbuf.c 193074 2009-05-30 00:22:57Z thompsa $ */ | 1/* $FreeBSD: head/sys/dev/usb/usb_mbuf.c 194228 2009-06-15 01:02:43Z thompsa $ */ |
2/*- 3 * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. --- 13 unchanged lines hidden (view full) --- 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <dev/usb/usb_core.h> 28#include <dev/usb/usb_mbuf.h> 29 30/*------------------------------------------------------------------------* | 2/*- 3 * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. --- 13 unchanged lines hidden (view full) --- 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <dev/usb/usb_core.h> 28#include <dev/usb/usb_mbuf.h> 29 30/*------------------------------------------------------------------------* |
31 * usb2_alloc_mbufs - allocate mbufs to an usbd interface queue | 31 * usb_alloc_mbufs - allocate mbufs to an usbd interface queue |
32 * 33 * Returns: 34 * A pointer that should be passed to "free()" when the buffer(s) 35 * should be released. 36 *------------------------------------------------------------------------*/ 37void * | 32 * 33 * Returns: 34 * A pointer that should be passed to "free()" when the buffer(s) 35 * should be released. 36 *------------------------------------------------------------------------*/ 37void * |
38usb2_alloc_mbufs(struct malloc_type *type, struct usb_ifqueue *ifq, | 38usb_alloc_mbufs(struct malloc_type *type, struct usb_ifqueue *ifq, |
39 usb_size_t block_size, uint16_t nblocks) 40{ 41 struct usb_mbuf *m_ptr; 42 uint8_t *data_ptr; 43 void *free_ptr = NULL; 44 usb_size_t alloc_size; 45 46 /* align data */ --- 31 unchanged lines hidden --- | 39 usb_size_t block_size, uint16_t nblocks) 40{ 41 struct usb_mbuf *m_ptr; 42 uint8_t *data_ptr; 43 void *free_ptr = NULL; 44 usb_size_t alloc_size; 45 46 /* align data */ --- 31 unchanged lines hidden --- |