diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-15 13:24:55 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-15 13:24:55 -0500 |
commit | e29876723f7cb7728f0d6a674d23f92673e9f112 (patch) | |
tree | ea1da8bf77139f6cc6de029988208a7eddaf2002 /tools | |
parent | 8c988ae787af4900bec5410658e8a82844185c85 (diff) | |
parent | 4d4bac4499e9955521af80198063ef9c2f2bd634 (diff) |
Merge tag 'usb-3.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB patches from Greg KH:
"Here's the big pull request for the USB driver tree for 3.20-rc1.
Nothing major happening here, just lots of gadget driver updates, new
device ids, and a bunch of cleanups.
All of these have been in linux-next for a while with no reported
issues"
* tag 'usb-3.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (299 commits)
usb: musb: fix device hotplug behind hub
usb: dwc2: Fix a bug in reading the endpoint directions from reg.
staging: emxx_udc: fix the build error
usb: Retry port status check on resume to work around RH bugs
Revert "usb: Reset USB-3 devices on USB-3 link bounce"
uhci-hub: use HUB_CHAR_*
usb: kconfig: replace PPC_OF with PPC
ehci-pci: disable for Intel MID platforms (update)
usb: gadget: Kconfig: use bool instead of boolean
usb: musb: blackfin: remove incorrect __exit_p()
USB: fix use-after-free bug in usb_hcd_unlink_urb()
ehci-pci: disable for Intel MID platforms
usb: host: pci_quirks: joing string literals
USB: add flag for HCDs that can't receive wakeup requests (isp1760-hcd)
USB: usbfs: allow URBs to be reaped after disconnection
cdc-acm: kill unnecessary messages
cdc-acm: add sanity checks
usb: phy: phy-generic: Fix USB PHY gpio reset
usb: dwc2: fix USB core dependencies
usb: renesas_usbhs: fix NULL pointer dereference in dma_release_channel()
...
Diffstat (limited to 'tools')
-rw-r--r-- | tools/usb/ffs-aio-example/multibuff/host_app/test.c | 14 | ||||
-rw-r--r-- | tools/usb/ffs-aio-example/simple/device_app/aio_simple.c | 2 | ||||
-rw-r--r-- | tools/usb/ffs-aio-example/simple/host_app/test.c | 17 |
3 files changed, 20 insertions, 13 deletions
diff --git a/tools/usb/ffs-aio-example/multibuff/host_app/test.c b/tools/usb/ffs-aio-example/multibuff/host_app/test.c index daa3abe6bebd..2cbcce6e8dd7 100644 --- a/tools/usb/ffs-aio-example/multibuff/host_app/test.c +++ b/tools/usb/ffs-aio-example/multibuff/host_app/test.c | |||
@@ -33,11 +33,6 @@ | |||
33 | #define VENDOR 0x1d6b | 33 | #define VENDOR 0x1d6b |
34 | #define PRODUCT 0x0105 | 34 | #define PRODUCT 0x0105 |
35 | 35 | ||
36 | /* endpoints indexes */ | ||
37 | |||
38 | #define EP_BULK_IN (1 | LIBUSB_ENDPOINT_IN) | ||
39 | #define EP_BULK_OUT (2 | LIBUSB_ENDPOINT_OUT) | ||
40 | |||
41 | #define BUF_LEN 8192 | 36 | #define BUF_LEN 8192 |
42 | 37 | ||
43 | /* | 38 | /* |
@@ -159,14 +154,21 @@ void test_exit(struct test_state *state) | |||
159 | int main(void) | 154 | int main(void) |
160 | { | 155 | { |
161 | struct test_state state; | 156 | struct test_state state; |
157 | struct libusb_config_descriptor *conf; | ||
158 | struct libusb_interface_descriptor const *iface; | ||
159 | unsigned char addr; | ||
162 | 160 | ||
163 | if (test_init(&state)) | 161 | if (test_init(&state)) |
164 | return 1; | 162 | return 1; |
165 | 163 | ||
164 | libusb_get_config_descriptor(state.found, 0, &conf); | ||
165 | iface = &conf->interface[0].altsetting[0]; | ||
166 | addr = iface->endpoint[0].bEndpointAddress; | ||
167 | |||
166 | while (1) { | 168 | while (1) { |
167 | static unsigned char buffer[BUF_LEN]; | 169 | static unsigned char buffer[BUF_LEN]; |
168 | int bytes; | 170 | int bytes; |
169 | libusb_bulk_transfer(state.handle, EP_BULK_IN, buffer, BUF_LEN, | 171 | libusb_bulk_transfer(state.handle, addr, buffer, BUF_LEN, |
170 | &bytes, 500); | 172 | &bytes, 500); |
171 | } | 173 | } |
172 | test_exit(&state); | 174 | test_exit(&state); |
diff --git a/tools/usb/ffs-aio-example/simple/device_app/aio_simple.c b/tools/usb/ffs-aio-example/simple/device_app/aio_simple.c index adc310a6d489..1f44a29818bf 100644 --- a/tools/usb/ffs-aio-example/simple/device_app/aio_simple.c +++ b/tools/usb/ffs-aio-example/simple/device_app/aio_simple.c | |||
@@ -103,12 +103,14 @@ static const struct { | |||
103 | .bDescriptorType = USB_DT_ENDPOINT, | 103 | .bDescriptorType = USB_DT_ENDPOINT, |
104 | .bEndpointAddress = 1 | USB_DIR_IN, | 104 | .bEndpointAddress = 1 | USB_DIR_IN, |
105 | .bmAttributes = USB_ENDPOINT_XFER_BULK, | 105 | .bmAttributes = USB_ENDPOINT_XFER_BULK, |
106 | .wMaxPacketSize = htole16(512), | ||
106 | }, | 107 | }, |
107 | .bulk_source = { | 108 | .bulk_source = { |
108 | .bLength = sizeof(descriptors.hs_descs.bulk_source), | 109 | .bLength = sizeof(descriptors.hs_descs.bulk_source), |
109 | .bDescriptorType = USB_DT_ENDPOINT, | 110 | .bDescriptorType = USB_DT_ENDPOINT, |
110 | .bEndpointAddress = 2 | USB_DIR_OUT, | 111 | .bEndpointAddress = 2 | USB_DIR_OUT, |
111 | .bmAttributes = USB_ENDPOINT_XFER_BULK, | 112 | .bmAttributes = USB_ENDPOINT_XFER_BULK, |
113 | .wMaxPacketSize = htole16(512), | ||
112 | }, | 114 | }, |
113 | }, | 115 | }, |
114 | }; | 116 | }; |
diff --git a/tools/usb/ffs-aio-example/simple/host_app/test.c b/tools/usb/ffs-aio-example/simple/host_app/test.c index acd6332811f3..aed86ffff280 100644 --- a/tools/usb/ffs-aio-example/simple/host_app/test.c +++ b/tools/usb/ffs-aio-example/simple/host_app/test.c | |||
@@ -33,11 +33,6 @@ | |||
33 | #define VENDOR 0x1d6b | 33 | #define VENDOR 0x1d6b |
34 | #define PRODUCT 0x0105 | 34 | #define PRODUCT 0x0105 |
35 | 35 | ||
36 | /* endpoints indexes */ | ||
37 | |||
38 | #define EP_BULK_IN (1 | LIBUSB_ENDPOINT_IN) | ||
39 | #define EP_BULK_OUT (2 | LIBUSB_ENDPOINT_OUT) | ||
40 | |||
41 | #define BUF_LEN 8192 | 36 | #define BUF_LEN 8192 |
42 | 37 | ||
43 | /* | 38 | /* |
@@ -159,16 +154,24 @@ void test_exit(struct test_state *state) | |||
159 | int main(void) | 154 | int main(void) |
160 | { | 155 | { |
161 | struct test_state state; | 156 | struct test_state state; |
157 | struct libusb_config_descriptor *conf; | ||
158 | struct libusb_interface_descriptor const *iface; | ||
159 | unsigned char in_addr, out_addr; | ||
162 | 160 | ||
163 | if (test_init(&state)) | 161 | if (test_init(&state)) |
164 | return 1; | 162 | return 1; |
165 | 163 | ||
164 | libusb_get_config_descriptor(state.found, 0, &conf); | ||
165 | iface = &conf->interface[0].altsetting[0]; | ||
166 | in_addr = iface->endpoint[0].bEndpointAddress; | ||
167 | out_addr = iface->endpoint[1].bEndpointAddress; | ||
168 | |||
166 | while (1) { | 169 | while (1) { |
167 | static unsigned char buffer[BUF_LEN]; | 170 | static unsigned char buffer[BUF_LEN]; |
168 | int bytes; | 171 | int bytes; |
169 | libusb_bulk_transfer(state.handle, EP_BULK_IN, buffer, BUF_LEN, | 172 | libusb_bulk_transfer(state.handle, in_addr, buffer, BUF_LEN, |
170 | &bytes, 500); | 173 | &bytes, 500); |
171 | libusb_bulk_transfer(state.handle, EP_BULK_OUT, buffer, BUF_LEN, | 174 | libusb_bulk_transfer(state.handle, out_addr, buffer, BUF_LEN, |
172 | &bytes, 500); | 175 | &bytes, 500); |
173 | } | 176 | } |
174 | test_exit(&state); | 177 | test_exit(&state); |