usb_transfer.h (193045) | usb_transfer.h (193074) |
---|---|
1/* $FreeBSD: head/sys/dev/usb/usb_transfer.h 193045 2009-05-29 18:46:57Z thompsa $ */ | 1/* $FreeBSD: head/sys/dev/usb/usb_transfer.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. --- 52 unchanged lines hidden (view full) --- 62 struct usb_page_cache *dma_page_cache_start; 63 struct usb_page_cache *dma_page_cache_end; 64#endif 65 struct usb_page_cache *xfer_page_cache_start; 66 struct usb_page_cache *xfer_page_cache_end; 67 struct usb_bus *bus; /* pointer to USB bus (cached) */ 68 struct usb_device *udev; /* pointer to USB device */ 69 | 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. --- 52 unchanged lines hidden (view full) --- 62 struct usb_page_cache *dma_page_cache_start; 63 struct usb_page_cache *dma_page_cache_end; 64#endif 65 struct usb_page_cache *xfer_page_cache_start; 66 struct usb_page_cache *xfer_page_cache_end; 67 struct usb_bus *bus; /* pointer to USB bus (cached) */ 68 struct usb_device *udev; /* pointer to USB device */ 69 |
70 size_t memory_size; 71 size_t setup_refcount; | 70 usb_size_t memory_size; 71 usb_size_t setup_refcount; |
72#if USB_HAVE_BUSDMA 73 usb_frcount_t dma_nframes; /* number of page caches to load */ 74 usb_frcount_t dma_currframe; /* currect page cache number */ 75 usb_frlength_t dma_frlength_0; /* length of page cache zero */ 76 uint8_t dma_error; /* set if virtual memory could not be 77 * loaded */ 78#endif 79 uint8_t done_sleep; /* set if done thread is sleeping */ --- 12 unchanged lines hidden (view full) --- 92 * auto-freed */ 93 struct usb_device *udev; 94 struct usb_xfer *curr_xfer; 95 const struct usb_config *curr_setup; 96 const struct usb_pipe_methods *methods; 97 void *buf; 98 usb_frlength_t *xfer_length_ptr; 99 | 72#if USB_HAVE_BUSDMA 73 usb_frcount_t dma_nframes; /* number of page caches to load */ 74 usb_frcount_t dma_currframe; /* currect page cache number */ 75 usb_frlength_t dma_frlength_0; /* length of page cache zero */ 76 uint8_t dma_error; /* set if virtual memory could not be 77 * loaded */ 78#endif 79 uint8_t done_sleep; /* set if done thread is sleeping */ --- 12 unchanged lines hidden (view full) --- 92 * auto-freed */ 93 struct usb_device *udev; 94 struct usb_xfer *curr_xfer; 95 const struct usb_config *curr_setup; 96 const struct usb_pipe_methods *methods; 97 void *buf; 98 usb_frlength_t *xfer_length_ptr; 99 |
100 size_t size[7]; | 100 usb_size_t size[7]; |
101 usb_frlength_t bufsize; 102 usb_frlength_t bufsize_max; 103 104 uint16_t hc_max_frame_size; 105 uint16_t hc_max_packet_size; 106 uint8_t hc_max_packet_count; 107 enum usb_dev_speed speed; 108 uint8_t dma_tag_max; 109 usb_error_t err; 110}; 111 112/* function prototypes */ 113 114uint8_t usb2_transfer_setup_sub_malloc(struct usb_setup_params *parm, | 101 usb_frlength_t bufsize; 102 usb_frlength_t bufsize_max; 103 104 uint16_t hc_max_frame_size; 105 uint16_t hc_max_packet_size; 106 uint8_t hc_max_packet_count; 107 enum usb_dev_speed speed; 108 uint8_t dma_tag_max; 109 usb_error_t err; 110}; 111 112/* function prototypes */ 113 114uint8_t usb2_transfer_setup_sub_malloc(struct usb_setup_params *parm, |
115 struct usb_page_cache **ppc, size_t size, size_t align, 116 size_t count); | 115 struct usb_page_cache **ppc, usb_size_t size, usb_size_t align, 116 usb_size_t count); |
117void usb2_command_wrapper(struct usb_xfer_queue *pq, 118 struct usb_xfer *xfer); 119void usb2_pipe_enter(struct usb_xfer *xfer); 120void usb2_pipe_start(struct usb_xfer_queue *pq); 121void usb2_transfer_dequeue(struct usb_xfer *xfer); 122void usb2_transfer_done(struct usb_xfer *xfer, usb_error_t error); 123void usb2_transfer_enqueue(struct usb_xfer_queue *pq, 124 struct usb_xfer *xfer); --- 14 unchanged lines hidden --- | 117void usb2_command_wrapper(struct usb_xfer_queue *pq, 118 struct usb_xfer *xfer); 119void usb2_pipe_enter(struct usb_xfer *xfer); 120void usb2_pipe_start(struct usb_xfer_queue *pq); 121void usb2_transfer_dequeue(struct usb_xfer *xfer); 122void usb2_transfer_done(struct usb_xfer *xfer, usb_error_t error); 123void usb2_transfer_enqueue(struct usb_xfer_queue *pq, 124 struct usb_xfer *xfer); --- 14 unchanged lines hidden --- |