diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-09 15:09:47 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-09 15:09:47 -0500 |
commit | 55b81e6f2795484ea8edf5805c95c007cacfa736 (patch) | |
tree | c3724975107857fcc03b5dd649c462e4f72397be /include/linux/usb.h | |
parent | 5983faf942f260023e547f3c5f38c1033c35cc9b (diff) | |
parent | 08e87d0d773dc9ca5faf4c3306e238ed0ea129b0 (diff) |
Merge branch 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
* 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (232 commits)
USB: Add USB-ID for Multiplex RC serial adapter to cp210x.c
xhci: Clean up 32-bit build warnings.
USB: update documentation for usbmon
usb: usb-storage doesn't support dynamic id currently, the patch disables the feature to fix an oops
drivers/usb/class/cdc-acm.c: clear dangling pointer
drivers/usb/dwc3/dwc3-pci.c: introduce missing kfree
drivers/usb/host/isp1760-if.c: introduce missing kfree
usb: option: add ZD Incorporated HSPA modem
usb: ch9: fix up MaxStreams helper
USB: usb-skeleton.c: cleanup open_count
USB: usb-skeleton.c: fix open/disconnect race
xhci: Properly handle COMP_2ND_BW_ERR
USB: remove dead code from suspend/resume path
USB: add quirk for another camera
drivers: usb: wusbcore: Fix dependency for USB_WUSB
xhci: Better debugging for critical host errors.
xhci: Be less verbose during URB cancellation.
xhci: Remove debugging about ring structure allocation.
xhci: Remove debugging about toggling cycle bits.
xhci: Remove debugging for individual transfers.
...
Diffstat (limited to 'include/linux/usb.h')
-rw-r--r-- | include/linux/usb.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h index 7f8d4d61ca47..27a4e16d2bf1 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -1233,6 +1233,7 @@ struct urb { | |||
1233 | void *transfer_buffer; /* (in) associated data buffer */ | 1233 | void *transfer_buffer; /* (in) associated data buffer */ |
1234 | dma_addr_t transfer_dma; /* (in) dma addr for transfer_buffer */ | 1234 | dma_addr_t transfer_dma; /* (in) dma addr for transfer_buffer */ |
1235 | struct scatterlist *sg; /* (in) scatter gather buffer list */ | 1235 | struct scatterlist *sg; /* (in) scatter gather buffer list */ |
1236 | int num_mapped_sgs; /* (internal) mapped sg entries */ | ||
1236 | int num_sgs; /* (in) number of entries in the sg list */ | 1237 | int num_sgs; /* (in) number of entries in the sg list */ |
1237 | u32 transfer_buffer_length; /* (in) data buffer length */ | 1238 | u32 transfer_buffer_length; /* (in) data buffer length */ |
1238 | u32 actual_length; /* (return) actual transfer length */ | 1239 | u32 actual_length; /* (return) actual transfer length */ |
@@ -1610,6 +1611,19 @@ usb_maxpacket(struct usb_device *udev, int pipe, int is_out) | |||
1610 | 1611 | ||
1611 | /* ----------------------------------------------------------------------- */ | 1612 | /* ----------------------------------------------------------------------- */ |
1612 | 1613 | ||
1614 | /* translate USB error codes to codes user space understands */ | ||
1615 | static inline int usb_translate_errors(int error_code) | ||
1616 | { | ||
1617 | switch (error_code) { | ||
1618 | case 0: | ||
1619 | case -ENOMEM: | ||
1620 | case -ENODEV: | ||
1621 | return error_code; | ||
1622 | default: | ||
1623 | return -EIO; | ||
1624 | } | ||
1625 | } | ||
1626 | |||
1613 | /* Events from the usb core */ | 1627 | /* Events from the usb core */ |
1614 | #define USB_DEVICE_ADD 0x0001 | 1628 | #define USB_DEVICE_ADD 0x0001 |
1615 | #define USB_DEVICE_REMOVE 0x0002 | 1629 | #define USB_DEVICE_REMOVE 0x0002 |