Deleted Added
full compact
usb_core.h (184610) usb_core.h (184824)
1/* $FreeBSD: head/sys/dev/usb2/core/usb2_core.h 184610 2008-11-04 02:31:03Z alfred $ */
1/* $FreeBSD: head/sys/dev/usb2/core/usb2_core.h 184824 2008-11-10 20:54:31Z 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.

--- 144 unchanged lines hidden (view full) ---

154/* macros */
155
156#define usb2_callout_init_mtx(c,m,f) callout_init_mtx(&(c)->co,m,f)
157#define usb2_callout_reset(c,t,f,d) callout_reset(&(c)->co,t,f,d)
158#define usb2_callout_stop(c) callout_stop(&(c)->co)
159#define usb2_callout_drain(c) callout_drain(&(c)->co)
160#define usb2_callout_pending(c) callout_pending(&(c)->co)
161
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.

--- 144 unchanged lines hidden (view full) ---

154/* macros */
155
156#define usb2_callout_init_mtx(c,m,f) callout_init_mtx(&(c)->co,m,f)
157#define usb2_callout_reset(c,t,f,d) callout_reset(&(c)->co,t,f,d)
158#define usb2_callout_stop(c) callout_stop(&(c)->co)
159#define usb2_callout_drain(c) callout_drain(&(c)->co)
160#define usb2_callout_pending(c) callout_pending(&(c)->co)
161
162#define USB_BUS_LOCK(_b) mtx_lock(&(_b)->bus_mtx)
163#define USB_BUS_UNLOCK(_b) mtx_unlock(&(_b)->bus_mtx)
164#define USB_BUS_LOCK_ASSERT(_b, _t) mtx_assert(&(_b)->bus_mtx, _t)
165#define USB_XFER_LOCK(_x) mtx_lock((_x)->xfer_mtx)
166#define USB_XFER_UNLOCK(_x) mtx_unlock((_x)->xfer_mtx)
167#define USB_XFER_LOCK_ASSERT(_x, _t) mtx_assert((_x)->xfer_mtx, _t)
162/* structure prototypes */
163
164struct file;
165struct usb2_bus;
166struct usb2_device;
167struct usb2_page;
168struct usb2_page_cache;
169struct usb2_xfer;

--- 129 unchanged lines hidden (view full) ---

299 TAILQ_ENTRY(usb2_xfer) wait_entry; /* used at various places */
300
301 struct usb2_page_cache *buf_fixup; /* fixup buffer(s) */
302 struct usb2_xfer_queue *wait_queue; /* pointer to queue that we
303 * are waiting on */
304 struct usb2_page *dma_page_ptr;
305 struct usb2_pipe *pipe; /* our USB pipe */
306 struct usb2_device *udev;
168/* structure prototypes */
169
170struct file;
171struct usb2_bus;
172struct usb2_device;
173struct usb2_page;
174struct usb2_page_cache;
175struct usb2_xfer;

--- 129 unchanged lines hidden (view full) ---

305 TAILQ_ENTRY(usb2_xfer) wait_entry; /* used at various places */
306
307 struct usb2_page_cache *buf_fixup; /* fixup buffer(s) */
308 struct usb2_xfer_queue *wait_queue; /* pointer to queue that we
309 * are waiting on */
310 struct usb2_page *dma_page_ptr;
311 struct usb2_pipe *pipe; /* our USB pipe */
312 struct usb2_device *udev;
307 struct mtx *priv_mtx; /* cannot be changed during operation */
308 struct mtx *usb2_mtx; /* used by HC driver */
313 struct mtx *xfer_mtx; /* cannot be changed during operation */
309 struct usb2_xfer_root *usb2_root; /* used by HC driver */
310 void *usb2_sc; /* used by HC driver */
311 void *qh_start[2]; /* used by HC driver */
312 void *td_start[2]; /* used by HC driver */
313 void *td_transfer_first; /* used by HC driver */
314 void *td_transfer_last; /* used by HC driver */
315 void *td_transfer_cache; /* used by HC driver */
316 void *priv_sc; /* device driver data pointer 1 */

--- 132 unchanged lines hidden ---
314 struct usb2_xfer_root *usb2_root; /* used by HC driver */
315 void *usb2_sc; /* used by HC driver */
316 void *qh_start[2]; /* used by HC driver */
317 void *td_start[2]; /* used by HC driver */
318 void *td_transfer_first; /* used by HC driver */
319 void *td_transfer_last; /* used by HC driver */
320 void *td_transfer_cache; /* used by HC driver */
321 void *priv_sc; /* device driver data pointer 1 */

--- 132 unchanged lines hidden ---