diff options
Diffstat (limited to 'include/linux/usb.h')
-rw-r--r-- | include/linux/usb.h | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h index 19fabc487beb..3b45a0d27b80 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -1036,9 +1036,10 @@ typedef void (*usb_complete_t)(struct urb *); | |||
1036 | * @transfer_flags: A variety of flags may be used to affect how URB | 1036 | * @transfer_flags: A variety of flags may be used to affect how URB |
1037 | * submission, unlinking, or operation are handled. Different | 1037 | * submission, unlinking, or operation are handled. Different |
1038 | * kinds of URB can use different flags. | 1038 | * kinds of URB can use different flags. |
1039 | * @transfer_buffer: This identifies the buffer to (or from) which | 1039 | * @transfer_buffer: This identifies the buffer to (or from) which the I/O |
1040 | * the I/O request will be performed (unless URB_NO_TRANSFER_DMA_MAP | 1040 | * request will be performed unless URB_NO_TRANSFER_DMA_MAP is set |
1041 | * is set). This buffer must be suitable for DMA; allocate it with | 1041 | * (however, do not leave garbage in transfer_buffer even then). |
1042 | * This buffer must be suitable for DMA; allocate it with | ||
1042 | * kmalloc() or equivalent. For transfers to "in" endpoints, contents | 1043 | * kmalloc() or equivalent. For transfers to "in" endpoints, contents |
1043 | * of this buffer will be modified. This buffer is used for the data | 1044 | * of this buffer will be modified. This buffer is used for the data |
1044 | * stage of control transfers. | 1045 | * stage of control transfers. |
@@ -1104,9 +1105,15 @@ typedef void (*usb_complete_t)(struct urb *); | |||
1104 | * allocate a DMA buffer with usb_buffer_alloc() or call usb_buffer_map(). | 1105 | * allocate a DMA buffer with usb_buffer_alloc() or call usb_buffer_map(). |
1105 | * When these transfer flags are provided, host controller drivers will | 1106 | * When these transfer flags are provided, host controller drivers will |
1106 | * attempt to use the dma addresses found in the transfer_dma and/or | 1107 | * attempt to use the dma addresses found in the transfer_dma and/or |
1107 | * setup_dma fields rather than determining a dma address themselves. (Note | 1108 | * setup_dma fields rather than determining a dma address themselves. |
1108 | * that transfer_buffer and setup_packet must still be set because not all | 1109 | * |
1109 | * host controllers use DMA, nor do virtual root hubs). | 1110 | * Note that transfer_buffer must still be set if the controller |
1111 | * does not support DMA (as indicated by bus.uses_dma) and when talking | ||
1112 | * to root hub. If you have to trasfer between highmem zone and the device | ||
1113 | * on such controller, create a bounce buffer or bail out with an error. | ||
1114 | * If transfer_buffer cannot be set (is in highmem) and the controller is DMA | ||
1115 | * capable, assign NULL to it, so that usbmon knows not to use the value. | ||
1116 | * The setup_packet must always be set, so it cannot be located in highmem. | ||
1110 | * | 1117 | * |
1111 | * Initialization: | 1118 | * Initialization: |
1112 | * | 1119 | * |