Deleted Added
full compact
usb_compat_linux.h (193045) usb_compat_linux.h (193074)
1/* $FreeBSD: head/sys/dev/usb/usb_compat_linux.h 193045 2009-05-29 18:46:57Z thompsa $ */
1/* $FreeBSD: head/sys/dev/usb/usb_compat_linux.h 193074 2009-05-30 00:22:57Z thompsa $ */
2/*-
3 * Copyright (c) 2007 Luigi Rizzo - Universita` di Pisa. All rights reserved.
4 * Copyright (c) 2007 Hans Petter Selasky. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright

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

273 struct usb_device *dev; /* (in) pointer to associated device */
274 struct usb_host_endpoint *pipe; /* (in) pipe pointer */
275 uint8_t *setup_packet; /* (in) setup packet (control only) */
276 uint8_t *bsd_data_ptr;
277 void *transfer_buffer; /* (in) associated data buffer */
278 void *context; /* (in) context for completion */
279 usb_complete_t *complete; /* (in) completion routine */
280
2/*-
3 * Copyright (c) 2007 Luigi Rizzo - Universita` di Pisa. All rights reserved.
4 * Copyright (c) 2007 Hans Petter Selasky. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright

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

273 struct usb_device *dev; /* (in) pointer to associated device */
274 struct usb_host_endpoint *pipe; /* (in) pipe pointer */
275 uint8_t *setup_packet; /* (in) setup packet (control only) */
276 uint8_t *bsd_data_ptr;
277 void *transfer_buffer; /* (in) associated data buffer */
278 void *context; /* (in) context for completion */
279 usb_complete_t *complete; /* (in) completion routine */
280
281 size_t transfer_buffer_length;/* (in) data buffer length */
282 size_t bsd_length_rem;
283 size_t actual_length; /* (return) actual transfer length */
281 usb_size_t transfer_buffer_length;/* (in) data buffer length */
282 usb_size_t bsd_length_rem;
283 usb_size_t actual_length; /* (return) actual transfer length */
284 usb_timeout_t timeout; /* FreeBSD specific */
285
286 uint16_t transfer_flags; /* (in) */
287#define URB_SHORT_NOT_OK 0x0001 /* report short transfers like errors */
288#define URB_ISO_ASAP 0x0002 /* ignore "start_frame" field */
289#define URB_ZERO_PACKET 0x0004 /* the USB transfer ends with a short
290 * packet */
291#define URB_NO_TRANSFER_DMA_MAP 0x0008 /* "transfer_dma" is valid on submit */

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

321
322struct usb_host_endpoint *usb_find_host_endpoint(struct usb_device *dev,
323 uint8_t type, uint8_t ep);
324struct urb *usb_alloc_urb(uint16_t iso_packets, uint16_t mem_flags);
325struct usb_host_interface *usb_altnum_to_altsetting(
326 const struct usb_interface *intf, uint8_t alt_index);
327struct usb_interface *usb_ifnum_to_if(struct usb_device *dev, uint8_t iface_no);
328
284 usb_timeout_t timeout; /* FreeBSD specific */
285
286 uint16_t transfer_flags; /* (in) */
287#define URB_SHORT_NOT_OK 0x0001 /* report short transfers like errors */
288#define URB_ISO_ASAP 0x0002 /* ignore "start_frame" field */
289#define URB_ZERO_PACKET 0x0004 /* the USB transfer ends with a short
290 * packet */
291#define URB_NO_TRANSFER_DMA_MAP 0x0008 /* "transfer_dma" is valid on submit */

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

321
322struct usb_host_endpoint *usb_find_host_endpoint(struct usb_device *dev,
323 uint8_t type, uint8_t ep);
324struct urb *usb_alloc_urb(uint16_t iso_packets, uint16_t mem_flags);
325struct usb_host_interface *usb_altnum_to_altsetting(
326 const struct usb_interface *intf, uint8_t alt_index);
327struct usb_interface *usb_ifnum_to_if(struct usb_device *dev, uint8_t iface_no);
328
329void *usb_buffer_alloc(struct usb_device *dev, size_t size,
329void *usb_buffer_alloc(struct usb_device *dev, usb_size_t size,
330 uint16_t mem_flags, uint8_t *dma_addr);
331void *usb_get_intfdata(struct usb_interface *intf);
332
330 uint16_t mem_flags, uint8_t *dma_addr);
331void *usb_get_intfdata(struct usb_interface *intf);
332
333void usb_buffer_free(struct usb_device *dev, size_t size, void *addr, uint8_t dma_addr);
333void usb_buffer_free(struct usb_device *dev, usb_size_t size, void *addr, uint8_t dma_addr);
334void usb_free_urb(struct urb *urb);
335void usb_init_urb(struct urb *urb);
336void usb_kill_urb(struct urb *urb);
337void usb_set_intfdata(struct usb_interface *intf, void *data);
338void usb_linux_register(void *arg);
339void usb_linux_deregister(void *arg);
340
341#define interface_to_usbdev(intf) (intf)->linux_udev
342#define interface_to_bsddev(intf) (intf)->linux_udev->bsd_udev
343
344#endif /* _USB_COMPAT_LINUX_H */
334void usb_free_urb(struct urb *urb);
335void usb_init_urb(struct urb *urb);
336void usb_kill_urb(struct urb *urb);
337void usb_set_intfdata(struct usb_interface *intf, void *data);
338void usb_linux_register(void *arg);
339void usb_linux_deregister(void *arg);
340
341#define interface_to_usbdev(intf) (intf)->linux_udev
342#define interface_to_bsddev(intf) (intf)->linux_udev->bsd_udev
343
344#endif /* _USB_COMPAT_LINUX_H */