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() ...
This commit is contained in:
@@ -33,11 +33,6 @@
|
||||
#define VENDOR 0x1d6b
|
||||
#define PRODUCT 0x0105
|
||||
|
||||
/* endpoints indexes */
|
||||
|
||||
#define EP_BULK_IN (1 | LIBUSB_ENDPOINT_IN)
|
||||
#define EP_BULK_OUT (2 | LIBUSB_ENDPOINT_OUT)
|
||||
|
||||
#define BUF_LEN 8192
|
||||
|
||||
/*
|
||||
@@ -159,14 +154,21 @@ void test_exit(struct test_state *state)
|
||||
int main(void)
|
||||
{
|
||||
struct test_state state;
|
||||
struct libusb_config_descriptor *conf;
|
||||
struct libusb_interface_descriptor const *iface;
|
||||
unsigned char addr;
|
||||
|
||||
if (test_init(&state))
|
||||
return 1;
|
||||
|
||||
libusb_get_config_descriptor(state.found, 0, &conf);
|
||||
iface = &conf->interface[0].altsetting[0];
|
||||
addr = iface->endpoint[0].bEndpointAddress;
|
||||
|
||||
while (1) {
|
||||
static unsigned char buffer[BUF_LEN];
|
||||
int bytes;
|
||||
libusb_bulk_transfer(state.handle, EP_BULK_IN, buffer, BUF_LEN,
|
||||
libusb_bulk_transfer(state.handle, addr, buffer, BUF_LEN,
|
||||
&bytes, 500);
|
||||
}
|
||||
test_exit(&state);
|
||||
|
@@ -103,12 +103,14 @@ static const struct {
|
||||
.bDescriptorType = USB_DT_ENDPOINT,
|
||||
.bEndpointAddress = 1 | USB_DIR_IN,
|
||||
.bmAttributes = USB_ENDPOINT_XFER_BULK,
|
||||
.wMaxPacketSize = htole16(512),
|
||||
},
|
||||
.bulk_source = {
|
||||
.bLength = sizeof(descriptors.hs_descs.bulk_source),
|
||||
.bDescriptorType = USB_DT_ENDPOINT,
|
||||
.bEndpointAddress = 2 | USB_DIR_OUT,
|
||||
.bmAttributes = USB_ENDPOINT_XFER_BULK,
|
||||
.wMaxPacketSize = htole16(512),
|
||||
},
|
||||
},
|
||||
};
|
||||
|
@@ -33,11 +33,6 @@
|
||||
#define VENDOR 0x1d6b
|
||||
#define PRODUCT 0x0105
|
||||
|
||||
/* endpoints indexes */
|
||||
|
||||
#define EP_BULK_IN (1 | LIBUSB_ENDPOINT_IN)
|
||||
#define EP_BULK_OUT (2 | LIBUSB_ENDPOINT_OUT)
|
||||
|
||||
#define BUF_LEN 8192
|
||||
|
||||
/*
|
||||
@@ -159,16 +154,24 @@ void test_exit(struct test_state *state)
|
||||
int main(void)
|
||||
{
|
||||
struct test_state state;
|
||||
struct libusb_config_descriptor *conf;
|
||||
struct libusb_interface_descriptor const *iface;
|
||||
unsigned char in_addr, out_addr;
|
||||
|
||||
if (test_init(&state))
|
||||
return 1;
|
||||
|
||||
libusb_get_config_descriptor(state.found, 0, &conf);
|
||||
iface = &conf->interface[0].altsetting[0];
|
||||
in_addr = iface->endpoint[0].bEndpointAddress;
|
||||
out_addr = iface->endpoint[1].bEndpointAddress;
|
||||
|
||||
while (1) {
|
||||
static unsigned char buffer[BUF_LEN];
|
||||
int bytes;
|
||||
libusb_bulk_transfer(state.handle, EP_BULK_IN, buffer, BUF_LEN,
|
||||
libusb_bulk_transfer(state.handle, in_addr, buffer, BUF_LEN,
|
||||
&bytes, 500);
|
||||
libusb_bulk_transfer(state.handle, EP_BULK_OUT, buffer, BUF_LEN,
|
||||
libusb_bulk_transfer(state.handle, out_addr, buffer, BUF_LEN,
|
||||
&bytes, 500);
|
||||
}
|
||||
test_exit(&state);
|
||||
|
Reference in New Issue
Block a user