usb_mbuf.h (193045) | usb_mbuf.h (193074) |
---|---|
1/* $FreeBSD: head/sys/dev/usb/usb_mbuf.h 193045 2009-05-29 18:46:57Z thompsa $ */ | 1/* $FreeBSD: head/sys/dev/usb/usb_mbuf.h 193074 2009-05-30 00:22:57Z 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. --- 22 unchanged lines hidden (view full) --- 32 * mbuf system in the kernel. 33 */ 34struct usb_mbuf { 35 uint8_t *cur_data_ptr; 36 uint8_t *min_data_ptr; 37 struct usb_mbuf *usb2_nextpkt; 38 struct usb_mbuf *usb2_next; 39 | 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. --- 22 unchanged lines hidden (view full) --- 32 * mbuf system in the kernel. 33 */ 34struct usb_mbuf { 35 uint8_t *cur_data_ptr; 36 uint8_t *min_data_ptr; 37 struct usb_mbuf *usb2_nextpkt; 38 struct usb_mbuf *usb2_next; 39 |
40 size_t cur_data_len; 41 size_t max_data_len; | 40 usb_size_t cur_data_len; 41 usb_size_t max_data_len; |
42 uint8_t last_packet:1; 43 uint8_t unused:7; 44}; 45 46/* 47 * The following structure defines a minimum re-implementation of the 48 * ifqueue structure in the kernel. 49 */ 50struct usb_ifqueue { 51 struct usb_mbuf *ifq_head; 52 struct usb_mbuf *ifq_tail; 53 | 42 uint8_t last_packet:1; 43 uint8_t unused:7; 44}; 45 46/* 47 * The following structure defines a minimum re-implementation of the 48 * ifqueue structure in the kernel. 49 */ 50struct usb_ifqueue { 51 struct usb_mbuf *ifq_head; 52 struct usb_mbuf *ifq_tail; 53 |
54 size_t ifq_len; 55 size_t ifq_maxlen; | 54 usb_size_t ifq_len; 55 usb_size_t ifq_maxlen; |
56}; 57 58#define USB_IF_ENQUEUE(ifq, m) do { \ 59 (m)->usb2_nextpkt = NULL; \ 60 if ((ifq)->ifq_tail == NULL) \ 61 (ifq)->ifq_head = (m); \ 62 else \ 63 (ifq)->ifq_tail->usb2_nextpkt = (m); \ --- 28 unchanged lines hidden (view full) --- 92#define USB_MBUF_RESET(m) do { \ 93 (m)->cur_data_ptr = (m)->min_data_ptr; \ 94 (m)->cur_data_len = (m)->max_data_len; \ 95 (m)->last_packet = 0; \ 96 } while (0) 97 98/* prototypes */ 99void *usb2_alloc_mbufs(struct malloc_type *type, struct usb_ifqueue *ifq, | 56}; 57 58#define USB_IF_ENQUEUE(ifq, m) do { \ 59 (m)->usb2_nextpkt = NULL; \ 60 if ((ifq)->ifq_tail == NULL) \ 61 (ifq)->ifq_head = (m); \ 62 else \ 63 (ifq)->ifq_tail->usb2_nextpkt = (m); \ --- 28 unchanged lines hidden (view full) --- 92#define USB_MBUF_RESET(m) do { \ 93 (m)->cur_data_ptr = (m)->min_data_ptr; \ 94 (m)->cur_data_len = (m)->max_data_len; \ 95 (m)->last_packet = 0; \ 96 } while (0) 97 98/* prototypes */ 99void *usb2_alloc_mbufs(struct malloc_type *type, struct usb_ifqueue *ifq, |
100 size_t block_size, uint16_t nblocks); | 100 usb_size_t block_size, uint16_t nblocks); |
101 102#endif /* _USB2_MBUF_H_ */ | 101 102#endif /* _USB2_MBUF_H_ */ |