This is the 4.9.251 stable release
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAl/975QACgkQONu9yGCS aT6cQBAAvEtVuNKAW/DwHklzTtxSmzBQMRMz5kop0CXnReq0xRCc1v+YgZGvUvhK MAtlnf9T8aUGH0aK8v2NZR5CdauWAT83jbp6Kf5X19qZxj3nvXz+bhRxHuLlw+yl YgF7Nr9X/fw1utIki3Njx4dllhyMFZ5TzbThhywbn+vMEH+R+gRmnYoT04jFuyY8 itXc1DWb4GipeEsdZYybeuo/xrckCGCPizRu+9NASeblZxgoiISISHIyYEbZ78k4 UOwx7SBdUT8S8534/IBTwAKaBpuKwX5rw1dUkkWzHmBn0LMNQxjE1Eb2upBvlGmf TYQLNEuhWHbXusVor0Mdn5gUjBVq4gHvH0CobeBPw5WI4aWGrsEj5ovdW6971nVQ CE46BrTNR4cPWBmSNs6ia6pPYAfLnXtbC2/vxujSaVM6TR40yarUjNkJJstZq3zN jb1+C/t14o+nWVTQkT23Y96n73ZK92VduLMs3Jy//YvW96Flk+S57t0tlmNtmLgB ZPnb9o4Rko27vtetuGeXlaNuUdkVdzeN/eOXNAJLPnE6makOZogasp7IxikSUnCp 9LavoUniA+WzpipOi9ezh9dCb97uuIpTxs5XTuZjIwTIDABfHFCAZRxPzCdCucZH KDba/TjJ0tAgZZF28iPCdkilk/ZhwTzsQiiABaJQMjW8HWNhKIk= =k9Hj -----END PGP SIGNATURE----- Merge 4.9.251 into android-4.9-q Changes in 4.9.251 kbuild: don't hardcode depmod path workqueue: Kick a worker based on the actual activation of delayed works lib/genalloc: fix the overflow when size is too big depmod: handle the case of /sbin/depmod without /sbin in PATH ethernet: ucc_geth: fix use-after-free in ucc_geth_remove() atm: idt77252: call pci_disable_device() on error path net/ncsi: Use real net-device for response handler net: ethernet: Fix memleak in ethoc_probe ipv4: Ignore ECN bits for fib lookups in fib_compute_spec_dst() net: hns: fix return value check in __lb_other_process() net: hdlc_ppp: Fix issues when mod_timer is called while timer is running CDC-NCM: remove "connected" log message vhost_net: fix ubuf refcount incorrectly when sendmsg fails net: sched: prevent invalid Scell_log shift count virtio_net: Fix recursive call to cpus_read_lock() scripts/gdb: make lx-dmesg command work (reliably) scripts/gdb: lx-dmesg: cast log_buf to void* for addr fetch scripts/gdb: lx-dmesg: use explicit encoding=utf8 errors=replace scripts/gdb: fix lx-version string output video: hyperv_fb: Fix the mmap() regression for v5.4.y and older usb: gadget: enable super speed plus USB: cdc-acm: blacklist another IR Droid device usb: chipidea: ci_hdrc_imx: add missing put_device() call in usbmisc_get_init_data() USB: xhci: fix U1/U2 handling for hardware with XHCI_INTEL_HOST quirk set usb: uas: Add PNY USB Portable SSD to unusual_uas USB: serial: iuu_phoenix: fix DMA from stack USB: serial: option: add LongSung M5710 module support USB: yurex: fix control-URB timeout handling USB: usblp: fix DMA to stack ALSA: usb-audio: Fix UBSAN warnings for MIDI jacks usb: gadget: select CONFIG_CRC32 usb: gadget: f_uac2: reset wMaxPacketSize usb: gadget: function: printer: Fix a memory leak for interface descriptor USB: gadget: legacy: fix return error code in acm_ms_bind() usb: gadget: Fix spinlock lockup on usb_function_deactivate usb: gadget: configfs: Preserve function ordering after bind failure usb: gadget: configfs: Fix use-after-free issue with udc_name USB: serial: keyspan_pda: remove unused variable x86/mm: Fix leak of pmd ptlock ALSA: hda/conexant: add a new hda codec CX11970 Revert "device property: Keep secondary firmware node secondary by type" netfilter: ipset: fix shift-out-of-bounds in htable_bits() netfilter: xt_RATEEST: reject non-null terminated string from userspace x86/mtrr: Correct the range check before performing MTRR type lookups Linux 4.9.251 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: Ie0c2d970d2e42e8ffbc17d1e35deb63d7aaef961
This commit is contained in:
commit
353e7e75bc
44 changed files with 246 additions and 114 deletions
4
Makefile
4
Makefile
|
|
@ -1,6 +1,6 @@
|
|||
VERSION = 4
|
||||
PATCHLEVEL = 9
|
||||
SUBLEVEL = 250
|
||||
SUBLEVEL = 251
|
||||
EXTRAVERSION =
|
||||
NAME = Roaring Lionus
|
||||
|
||||
|
|
@ -350,7 +350,7 @@ OBJDUMP = $(CROSS_COMPILE)objdump
|
|||
AWK = awk
|
||||
GENKSYMS = scripts/genksyms/genksyms
|
||||
INSTALLKERNEL := installkernel
|
||||
DEPMOD = /sbin/depmod
|
||||
DEPMOD = depmod
|
||||
PERL = perl
|
||||
PYTHON = python
|
||||
CHECK = sparse
|
||||
|
|
|
|||
|
|
@ -166,9 +166,6 @@ static u8 mtrr_type_lookup_variable(u64 start, u64 end, u64 *partial_end,
|
|||
*repeat = 0;
|
||||
*uniform = 1;
|
||||
|
||||
/* Make end inclusive instead of exclusive */
|
||||
end--;
|
||||
|
||||
prev_match = MTRR_TYPE_INVALID;
|
||||
for (i = 0; i < num_var_ranges; ++i) {
|
||||
unsigned short start_state, end_state, inclusive;
|
||||
|
|
@ -260,6 +257,9 @@ u8 mtrr_type_lookup(u64 start, u64 end, u8 *uniform)
|
|||
int repeat;
|
||||
u64 partial_end;
|
||||
|
||||
/* Make end inclusive instead of exclusive */
|
||||
end--;
|
||||
|
||||
if (!mtrr_state_set)
|
||||
return MTRR_TYPE_INVALID;
|
||||
|
||||
|
|
|
|||
|
|
@ -697,6 +697,8 @@ int pud_free_pmd_page(pud_t *pud, unsigned long addr)
|
|||
}
|
||||
|
||||
free_page((unsigned long)pmd_sv);
|
||||
|
||||
pgtable_pmd_page_dtor(virt_to_page(pmd));
|
||||
free_page((unsigned long)pmd);
|
||||
|
||||
return 1;
|
||||
|
|
|
|||
|
|
@ -3615,7 +3615,7 @@ static int idt77252_init_one(struct pci_dev *pcidev,
|
|||
|
||||
if ((err = dma_set_mask_and_coherent(&pcidev->dev, DMA_BIT_MASK(32)))) {
|
||||
printk("idt77252: can't enable DMA for PCI device at %s\n", pci_name(pcidev));
|
||||
return err;
|
||||
goto err_out_disable_pdev;
|
||||
}
|
||||
|
||||
card = kzalloc(sizeof(struct idt77252_dev), GFP_KERNEL);
|
||||
|
|
|
|||
|
|
@ -2364,7 +2364,7 @@ void set_primary_fwnode(struct device *dev, struct fwnode_handle *fwnode)
|
|||
if (fwnode_is_primary(fn)) {
|
||||
dev->fwnode = fn->secondary;
|
||||
if (!(parent && fn == parent->fwnode))
|
||||
fn->secondary = ERR_PTR(-ENODEV);
|
||||
fn->secondary = NULL;
|
||||
} else {
|
||||
dev->fwnode = NULL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1190,7 +1190,7 @@ static int ethoc_probe(struct platform_device *pdev)
|
|||
ret = mdiobus_register(priv->mdio);
|
||||
if (ret) {
|
||||
dev_err(&netdev->dev, "failed to register MDIO bus\n");
|
||||
goto free2;
|
||||
goto free3;
|
||||
}
|
||||
|
||||
ret = ethoc_mdio_probe(netdev);
|
||||
|
|
@ -1222,6 +1222,7 @@ error2:
|
|||
netif_napi_del(&priv->napi);
|
||||
error:
|
||||
mdiobus_unregister(priv->mdio);
|
||||
free3:
|
||||
mdiobus_free(priv->mdio);
|
||||
free2:
|
||||
if (priv->clk)
|
||||
|
|
|
|||
|
|
@ -3939,12 +3939,12 @@ static int ucc_geth_remove(struct platform_device* ofdev)
|
|||
struct device_node *np = ofdev->dev.of_node;
|
||||
|
||||
unregister_netdev(dev);
|
||||
free_netdev(dev);
|
||||
ucc_geth_memclean(ugeth);
|
||||
if (of_phy_is_fixed_link(np))
|
||||
of_phy_deregister_fixed_link(np);
|
||||
of_node_put(ugeth->ug_info->tbi_node);
|
||||
of_node_put(ugeth->ug_info->phy_node);
|
||||
free_netdev(dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -447,6 +447,10 @@ static void __lb_other_process(struct hns_nic_ring_data *ring_data,
|
|||
/* for mutl buffer*/
|
||||
new_skb = skb_copy(skb, GFP_ATOMIC);
|
||||
dev_kfree_skb_any(skb);
|
||||
if (!new_skb) {
|
||||
netdev_err(ndev, "skb alloc failed\n");
|
||||
return;
|
||||
}
|
||||
skb = new_skb;
|
||||
|
||||
check_ok = 0;
|
||||
|
|
|
|||
|
|
@ -1602,9 +1602,6 @@ static void cdc_ncm_status(struct usbnet *dev, struct urb *urb)
|
|||
* USB_CDC_NOTIFY_NETWORK_CONNECTION notification shall be
|
||||
* sent by device after USB_CDC_NOTIFY_SPEED_CHANGE.
|
||||
*/
|
||||
netif_info(dev, link, dev->net,
|
||||
"network connection: %sconnected\n",
|
||||
!!event->wValue ? "" : "dis");
|
||||
usbnet_link_change(dev, !!event->wValue, 0);
|
||||
break;
|
||||
|
||||
|
|
|
|||
|
|
@ -1357,14 +1357,16 @@ static int virtnet_set_channels(struct net_device *dev,
|
|||
|
||||
get_online_cpus();
|
||||
err = virtnet_set_queues(vi, queue_pairs);
|
||||
if (!err) {
|
||||
netif_set_real_num_tx_queues(dev, queue_pairs);
|
||||
netif_set_real_num_rx_queues(dev, queue_pairs);
|
||||
|
||||
virtnet_set_affinity(vi);
|
||||
if (err) {
|
||||
put_online_cpus();
|
||||
goto err;
|
||||
}
|
||||
virtnet_set_affinity(vi);
|
||||
put_online_cpus();
|
||||
|
||||
netif_set_real_num_tx_queues(dev, queue_pairs);
|
||||
netif_set_real_num_rx_queues(dev, queue_pairs);
|
||||
err:
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -572,6 +572,13 @@ static void ppp_timer(unsigned long arg)
|
|||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&ppp->lock, flags);
|
||||
/* mod_timer could be called after we entered this function but
|
||||
* before we got the lock.
|
||||
*/
|
||||
if (timer_pending(&proto->timer)) {
|
||||
spin_unlock_irqrestore(&ppp->lock, flags);
|
||||
return;
|
||||
}
|
||||
switch (proto->state) {
|
||||
case STOPPING:
|
||||
case REQ_SENT:
|
||||
|
|
|
|||
|
|
@ -133,9 +133,13 @@ static struct imx_usbmisc_data *usbmisc_get_init_data(struct device *dev)
|
|||
misc_pdev = of_find_device_by_node(args.np);
|
||||
of_node_put(args.np);
|
||||
|
||||
if (!misc_pdev || !platform_get_drvdata(misc_pdev))
|
||||
if (!misc_pdev)
|
||||
return ERR_PTR(-EPROBE_DEFER);
|
||||
|
||||
if (!platform_get_drvdata(misc_pdev)) {
|
||||
put_device(&misc_pdev->dev);
|
||||
return ERR_PTR(-EPROBE_DEFER);
|
||||
}
|
||||
data->dev = &misc_pdev->dev;
|
||||
|
||||
if (of_find_property(np, "disable-over-current", NULL))
|
||||
|
|
|
|||
|
|
@ -1849,6 +1849,10 @@ static const struct usb_device_id acm_ids[] = {
|
|||
{ USB_DEVICE(0x04d8, 0x0083), /* Bootloader mode */
|
||||
.driver_info = IGNORE_DEVICE,
|
||||
},
|
||||
|
||||
{ USB_DEVICE(0x04d8, 0xf58b),
|
||||
.driver_info = IGNORE_DEVICE,
|
||||
},
|
||||
#endif
|
||||
|
||||
/*Samsung phone in firmware update mode */
|
||||
|
|
|
|||
|
|
@ -289,8 +289,25 @@ static int usblp_ctrl_msg(struct usblp *usblp, int request, int type, int dir, i
|
|||
#define usblp_reset(usblp)\
|
||||
usblp_ctrl_msg(usblp, USBLP_REQ_RESET, USB_TYPE_CLASS, USB_DIR_OUT, USB_RECIP_OTHER, 0, NULL, 0)
|
||||
|
||||
#define usblp_hp_channel_change_request(usblp, channel, buffer) \
|
||||
usblp_ctrl_msg(usblp, USBLP_REQ_HP_CHANNEL_CHANGE_REQUEST, USB_TYPE_VENDOR, USB_DIR_IN, USB_RECIP_INTERFACE, channel, buffer, 1)
|
||||
static int usblp_hp_channel_change_request(struct usblp *usblp, int channel, u8 *new_channel)
|
||||
{
|
||||
u8 *buf;
|
||||
int ret;
|
||||
|
||||
buf = kzalloc(1, GFP_KERNEL);
|
||||
if (!buf)
|
||||
return -ENOMEM;
|
||||
|
||||
ret = usblp_ctrl_msg(usblp, USBLP_REQ_HP_CHANNEL_CHANGE_REQUEST,
|
||||
USB_TYPE_VENDOR, USB_DIR_IN, USB_RECIP_INTERFACE,
|
||||
channel, buf, 1);
|
||||
if (ret == 0)
|
||||
*new_channel = buf[0];
|
||||
|
||||
kfree(buf);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* See the description for usblp_select_alts() below for the usage
|
||||
|
|
|
|||
|
|
@ -270,6 +270,7 @@ config USB_CONFIGFS_NCM
|
|||
depends on NET
|
||||
select USB_U_ETHER
|
||||
select USB_F_NCM
|
||||
select CRC32
|
||||
help
|
||||
NCM is an advanced protocol for Ethernet encapsulation, allows
|
||||
grouping of several ethernet frames into one USB transfer and
|
||||
|
|
@ -319,6 +320,7 @@ config USB_CONFIGFS_EEM
|
|||
depends on NET
|
||||
select USB_U_ETHER
|
||||
select USB_F_EEM
|
||||
select CRC32
|
||||
help
|
||||
CDC EEM is a newer USB standard that is somewhat simpler than CDC ECM
|
||||
and therefore can be supported by more hardware. Technically ECM and
|
||||
|
|
|
|||
|
|
@ -392,8 +392,11 @@ int usb_function_deactivate(struct usb_function *function)
|
|||
|
||||
spin_lock_irqsave(&cdev->lock, flags);
|
||||
|
||||
if (cdev->deactivations == 0)
|
||||
if (cdev->deactivations == 0) {
|
||||
spin_unlock_irqrestore(&cdev->lock, flags);
|
||||
status = usb_gadget_deactivate(cdev->gadget);
|
||||
spin_lock_irqsave(&cdev->lock, flags);
|
||||
}
|
||||
if (status == 0)
|
||||
cdev->deactivations++;
|
||||
|
||||
|
|
@ -424,8 +427,11 @@ int usb_function_activate(struct usb_function *function)
|
|||
status = -EINVAL;
|
||||
else {
|
||||
cdev->deactivations--;
|
||||
if (cdev->deactivations == 0)
|
||||
if (cdev->deactivations == 0) {
|
||||
spin_unlock_irqrestore(&cdev->lock, flags);
|
||||
status = usb_gadget_activate(cdev->gadget);
|
||||
spin_lock_irqsave(&cdev->lock, flags);
|
||||
}
|
||||
}
|
||||
|
||||
spin_unlock_irqrestore(&cdev->lock, flags);
|
||||
|
|
|
|||
|
|
@ -263,9 +263,16 @@ static ssize_t gadget_dev_desc_bcdUSB_store(struct config_item *item,
|
|||
|
||||
static ssize_t gadget_dev_desc_UDC_show(struct config_item *item, char *page)
|
||||
{
|
||||
char *udc_name = to_gadget_info(item)->composite.gadget_driver.udc_name;
|
||||
struct gadget_info *gi = to_gadget_info(item);
|
||||
char *udc_name;
|
||||
int ret;
|
||||
|
||||
return sprintf(page, "%s\n", udc_name ?: "");
|
||||
mutex_lock(&gi->lock);
|
||||
udc_name = gi->composite.gadget_driver.udc_name;
|
||||
ret = sprintf(page, "%s\n", udc_name ?: "");
|
||||
mutex_unlock(&gi->lock);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int unregister_gadget(struct gadget_info *gi)
|
||||
|
|
@ -1245,9 +1252,9 @@ static void purge_configs_funcs(struct gadget_info *gi)
|
|||
|
||||
cfg = container_of(c, struct config_usb_cfg, c);
|
||||
|
||||
list_for_each_entry_safe(f, tmp, &c->functions, list) {
|
||||
list_for_each_entry_safe_reverse(f, tmp, &c->functions, list) {
|
||||
|
||||
list_move_tail(&f->list, &cfg->func_list);
|
||||
list_move(&f->list, &cfg->func_list);
|
||||
if (f->unbind) {
|
||||
dev_dbg(&gi->cdev.gadget->dev,
|
||||
"unbind function '%s'/%p\n",
|
||||
|
|
@ -1664,7 +1671,7 @@ static const struct usb_gadget_driver configfs_driver_template = {
|
|||
.suspend = configfs_composite_suspend,
|
||||
.resume = configfs_composite_resume,
|
||||
|
||||
.max_speed = USB_SPEED_SUPER,
|
||||
.max_speed = USB_SPEED_SUPER_PLUS,
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "configfs-gadget",
|
||||
|
|
@ -1787,7 +1794,7 @@ static struct config_group *gadgets_make(
|
|||
gi->composite.unbind = configfs_do_nothing;
|
||||
gi->composite.suspend = NULL;
|
||||
gi->composite.resume = NULL;
|
||||
gi->composite.max_speed = USB_SPEED_SUPER;
|
||||
gi->composite.max_speed = USB_SPEED_SUPER_PLUS;
|
||||
|
||||
spin_lock_init(&gi->spinlock);
|
||||
mutex_init(&gi->lock);
|
||||
|
|
|
|||
|
|
@ -1120,6 +1120,7 @@ fail_tx_reqs:
|
|||
printer_req_free(dev->in_ep, req);
|
||||
}
|
||||
|
||||
usb_free_all_descriptors(f);
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -766,7 +766,7 @@ static struct usb_endpoint_descriptor fs_epout_desc = {
|
|||
|
||||
.bEndpointAddress = USB_DIR_OUT,
|
||||
.bmAttributes = USB_ENDPOINT_XFER_ISOC | USB_ENDPOINT_SYNC_ASYNC,
|
||||
.wMaxPacketSize = cpu_to_le16(1023),
|
||||
/* .wMaxPacketSize = DYNAMIC */
|
||||
.bInterval = 1,
|
||||
};
|
||||
|
||||
|
|
@ -775,7 +775,7 @@ static struct usb_endpoint_descriptor hs_epout_desc = {
|
|||
.bDescriptorType = USB_DT_ENDPOINT,
|
||||
|
||||
.bmAttributes = USB_ENDPOINT_XFER_ISOC | USB_ENDPOINT_SYNC_ASYNC,
|
||||
.wMaxPacketSize = cpu_to_le16(1024),
|
||||
/* .wMaxPacketSize = DYNAMIC */
|
||||
.bInterval = 4,
|
||||
};
|
||||
|
||||
|
|
@ -843,7 +843,7 @@ static struct usb_endpoint_descriptor fs_epin_desc = {
|
|||
|
||||
.bEndpointAddress = USB_DIR_IN,
|
||||
.bmAttributes = USB_ENDPOINT_XFER_ISOC | USB_ENDPOINT_SYNC_ASYNC,
|
||||
.wMaxPacketSize = cpu_to_le16(1023),
|
||||
/* .wMaxPacketSize = DYNAMIC */
|
||||
.bInterval = 1,
|
||||
};
|
||||
|
||||
|
|
@ -852,7 +852,7 @@ static struct usb_endpoint_descriptor hs_epin_desc = {
|
|||
.bDescriptorType = USB_DT_ENDPOINT,
|
||||
|
||||
.bmAttributes = USB_ENDPOINT_XFER_ISOC | USB_ENDPOINT_SYNC_ASYNC,
|
||||
.wMaxPacketSize = cpu_to_le16(1024),
|
||||
/* .wMaxPacketSize = DYNAMIC */
|
||||
.bInterval = 4,
|
||||
};
|
||||
|
||||
|
|
@ -963,12 +963,28 @@ free_ep(struct uac2_rtd_params *prm, struct usb_ep *ep)
|
|||
"%s:%d Error!\n", __func__, __LINE__);
|
||||
}
|
||||
|
||||
static void set_ep_max_packet_size(const struct f_uac2_opts *uac2_opts,
|
||||
static int set_ep_max_packet_size(const struct f_uac2_opts *uac2_opts,
|
||||
struct usb_endpoint_descriptor *ep_desc,
|
||||
unsigned int factor, bool is_playback)
|
||||
enum usb_device_speed speed, bool is_playback)
|
||||
{
|
||||
int chmask, srate, ssize;
|
||||
u16 max_packet_size;
|
||||
u16 max_size_bw, max_size_ep;
|
||||
unsigned int factor;
|
||||
|
||||
switch (speed) {
|
||||
case USB_SPEED_FULL:
|
||||
max_size_ep = 1023;
|
||||
factor = 1000;
|
||||
break;
|
||||
|
||||
case USB_SPEED_HIGH:
|
||||
max_size_ep = 1024;
|
||||
factor = 8000;
|
||||
break;
|
||||
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (is_playback) {
|
||||
chmask = uac2_opts->p_chmask;
|
||||
|
|
@ -980,10 +996,12 @@ static void set_ep_max_packet_size(const struct f_uac2_opts *uac2_opts,
|
|||
ssize = uac2_opts->c_ssize;
|
||||
}
|
||||
|
||||
max_packet_size = num_channels(chmask) * ssize *
|
||||
max_size_bw = num_channels(chmask) * ssize *
|
||||
DIV_ROUND_UP(srate, factor / (1 << (ep_desc->bInterval - 1)));
|
||||
ep_desc->wMaxPacketSize = cpu_to_le16(min_t(u16, max_packet_size,
|
||||
le16_to_cpu(ep_desc->wMaxPacketSize)));
|
||||
ep_desc->wMaxPacketSize = cpu_to_le16(min_t(u16, max_size_bw,
|
||||
max_size_ep));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
@ -1082,10 +1100,33 @@ afunc_bind(struct usb_configuration *cfg, struct usb_function *fn)
|
|||
uac2->c_prm.uac2 = uac2;
|
||||
|
||||
/* Calculate wMaxPacketSize according to audio bandwidth */
|
||||
set_ep_max_packet_size(uac2_opts, &fs_epin_desc, 1000, true);
|
||||
set_ep_max_packet_size(uac2_opts, &fs_epout_desc, 1000, false);
|
||||
set_ep_max_packet_size(uac2_opts, &hs_epin_desc, 8000, true);
|
||||
set_ep_max_packet_size(uac2_opts, &hs_epout_desc, 8000, false);
|
||||
ret = set_ep_max_packet_size(uac2_opts, &fs_epin_desc, USB_SPEED_FULL,
|
||||
true);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "%s:%d Error!\n", __func__, __LINE__);
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = set_ep_max_packet_size(uac2_opts, &fs_epout_desc, USB_SPEED_FULL,
|
||||
false);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "%s:%d Error!\n", __func__, __LINE__);
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = set_ep_max_packet_size(uac2_opts, &hs_epin_desc, USB_SPEED_HIGH,
|
||||
true);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "%s:%d Error!\n", __func__, __LINE__);
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = set_ep_max_packet_size(uac2_opts, &hs_epout_desc, USB_SPEED_HIGH,
|
||||
false);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "%s:%d Error!\n", __func__, __LINE__);
|
||||
return ret;
|
||||
}
|
||||
|
||||
hs_epout_desc.bEndpointAddress = fs_epout_desc.bEndpointAddress;
|
||||
hs_epin_desc.bEndpointAddress = fs_epin_desc.bEndpointAddress;
|
||||
|
|
|
|||
|
|
@ -207,8 +207,10 @@ static int acm_ms_bind(struct usb_composite_dev *cdev)
|
|||
struct usb_descriptor_header *usb_desc;
|
||||
|
||||
usb_desc = usb_otg_descriptor_alloc(gadget);
|
||||
if (!usb_desc)
|
||||
if (!usb_desc) {
|
||||
status = -ENOMEM;
|
||||
goto fail_string_ids;
|
||||
}
|
||||
usb_otg_descriptor_init(gadget, usb_desc);
|
||||
otg_desc[0] = usb_desc;
|
||||
otg_desc[1] = NULL;
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue