usb_core.h (184824) | usb_core.h (185087) |
---|---|
1/* $FreeBSD: head/sys/dev/usb2/core/usb2_core.h 184824 2008-11-10 20:54:31Z thompsa $ */ | 1/* $FreeBSD: head/sys/dev/usb2/core/usb2_core.h 185087 2008-11-19 08:56:35Z alfred $ */ |
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#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) |
168/* structure prototypes */ 169 170struct file; 171struct usb2_bus; 172struct usb2_device; 173struct usb2_page; 174struct usb2_page_cache; 175struct usb2_xfer; --- 220 unchanged lines hidden (view full) --- 396 397struct usb2_location { 398 struct usb2_bus *bus; 399 struct usb2_device *udev; 400 struct usb2_interface *iface; 401 struct usb2_fifo *rxfifo; 402 struct usb2_fifo *txfifo; 403 uint32_t devloc; /* original devloc */ | 168/* structure prototypes */ 169 170struct file; 171struct usb2_bus; 172struct usb2_device; 173struct usb2_page; 174struct usb2_page_cache; 175struct usb2_xfer; --- 220 unchanged lines hidden (view full) --- 396 397struct usb2_location { 398 struct usb2_bus *bus; 399 struct usb2_device *udev; 400 struct usb2_interface *iface; 401 struct usb2_fifo *rxfifo; 402 struct usb2_fifo *txfifo; 403 uint32_t devloc; /* original devloc */ |
404 uint16_t bus_index; 405 uint8_t dev_index; 406 uint8_t iface_index; 407 uint8_t ep_index; 408 uint8_t is_read; 409 uint8_t is_write; 410 uint8_t is_uref; | 404 uint16_t bus_index; /* bus index */ 405 uint8_t dev_index; /* device index */ 406 uint8_t iface_index; /* interface index */ 407 uint8_t fifo_index; /* FIFO index */ 408 uint8_t is_read; /* set if location has read access */ 409 uint8_t is_write; /* set if location has write access */ 410 uint8_t is_uref; /* set if USB refcount decr. needed */ 411 uint8_t is_usbfs; /* set if USB-FS is active */ |
411}; 412 413/* external variables */ 414 415MALLOC_DECLARE(M_USB); 416MALLOC_DECLARE(M_USBDEV); 417MALLOC_DECLARE(M_USBHC); 418 --- 35 unchanged lines hidden --- | 412}; 413 414/* external variables */ 415 416MALLOC_DECLARE(M_USB); 417MALLOC_DECLARE(M_USBDEV); 418MALLOC_DECLARE(M_USBHC); 419 --- 35 unchanged lines hidden --- |