mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
Merge remote-tracking branch 'sm8350/lineage-20' into lineage-23.0
* sm8350/lineage-20: tcp: Fix compiler error due to type confusion fixup! net: usb: rtl8150: Fix frame padding Linux 5.4.302 Input: pegasus-notetaker - fix potential out-of-bounds access Input: remove third argument of usb_maxpacket() usb: deprecate the third argument of usb_maxpacket() ata: libata-scsi: Fix system suspend for a security locked drive fs/proc: fix uaf in proc_readdir_de() pmdomain: imx: Fix reference count leak in imx_gpc_remove pmdomain: arm: scmi: Fix genpd leak on provider registration failure net: netpoll: fix incorrect refcount handling causing incorrect cleanup net: qede: Initialize qede_ll_ops with designated initializer uio_hv_generic: Set event for all channels on the device net: ethernet: ti: netcp: Standardize knav_dma_open_channel to return NULL on error ALSA: usb-audio: fix uac2 clock source at terminal parser mm/page_alloc: fix hash table order logging in alloc_large_system_hash() kconfig/nconf: Initialize the default locale at startup kconfig/mconf: Initialize the default locale at startup vsock: Ignore signal/timeout on connect() if already established s390/ctcm: Fix double-kfree ... Conflicts: drivers/usb/gadget/configfs.c Change-Id: I23044bb8ce42b6bd65eb30d909c4dba15ae3f915
This commit is contained in:
commit
ad91405468
400 changed files with 2724 additions and 1715 deletions
|
|
@ -463,6 +463,8 @@ static const struct usb_device_id usb_quirk_list[] = {
|
|||
/* Huawei 4G LTE module */
|
||||
{ USB_DEVICE(0x12d1, 0x15bb), .driver_info =
|
||||
USB_QUIRK_DISCONNECT_SUSPEND },
|
||||
{ USB_DEVICE(0x12d1, 0x15c1), .driver_info =
|
||||
USB_QUIRK_DISCONNECT_SUSPEND },
|
||||
{ USB_DEVICE(0x12d1, 0x15c3), .driver_info =
|
||||
USB_QUIRK_DISCONNECT_SUSPEND },
|
||||
|
||||
|
|
|
|||
|
|
@ -1454,8 +1454,9 @@ static int configfs_composite_bind(struct usb_gadget *gadget,
|
|||
cdev->use_os_string = true;
|
||||
cdev->b_vendor_code = gi->b_vendor_code;
|
||||
memcpy(cdev->qw_sign, gi->qw_sign, OS_STRING_QW_SIGN_LEN);
|
||||
} else
|
||||
} else {
|
||||
cdev->use_os_string = false;
|
||||
}
|
||||
|
||||
if (gadget_is_otg(gadget) && !otg_desc[0]) {
|
||||
struct usb_descriptor_header *usb_desc;
|
||||
|
|
|
|||
|
|
@ -2258,7 +2258,12 @@ static int ffs_func_eps_enable(struct ffs_function *func)
|
|||
ep = func->eps;
|
||||
epfile = ffs->epfiles;
|
||||
count = ffs->eps_count;
|
||||
while(count--) {
|
||||
if (!epfile) {
|
||||
ret = -ENOMEM;
|
||||
goto done;
|
||||
}
|
||||
|
||||
while (count--) {
|
||||
ep->ep->driver_data = ep;
|
||||
|
||||
ret = config_ep_by_speed(func->gadget, &func->function, ep->ep);
|
||||
|
|
@ -2284,6 +2289,7 @@ static int ffs_func_eps_enable(struct ffs_function *func)
|
|||
}
|
||||
|
||||
wake_up_interruptible(&ffs->wait);
|
||||
done:
|
||||
spin_unlock_irqrestore(&func->ffs->eps_lock, flags);
|
||||
|
||||
return ret;
|
||||
|
|
|
|||
|
|
@ -496,7 +496,7 @@ try_again:
|
|||
}
|
||||
|
||||
req->status = 0;
|
||||
req->zero = 0;
|
||||
req->zero = 1;
|
||||
req->length = count;
|
||||
req->complete = f_hidg_req_complete;
|
||||
req->context = hidg;
|
||||
|
|
@ -767,7 +767,7 @@ stall:
|
|||
return -EOPNOTSUPP;
|
||||
|
||||
respond:
|
||||
req->zero = 0;
|
||||
req->zero = 1;
|
||||
req->length = length;
|
||||
status = usb_ep_queue(cdev->gadget->ep0, req, GFP_ATOMIC);
|
||||
if (status < 0)
|
||||
|
|
|
|||
|
|
@ -1472,6 +1472,8 @@ static int ncm_bind(struct usb_configuration *c, struct usb_function *f)
|
|||
|
||||
ncm_opts->bound = true;
|
||||
|
||||
ncm_string_defs[1].s = ncm->ethaddr;
|
||||
|
||||
us = usb_gstrings_attach(cdev, ncm_strings,
|
||||
ARRAY_SIZE(ncm_string_defs));
|
||||
if (IS_ERR(us)) {
|
||||
|
|
@ -1735,7 +1737,6 @@ static struct usb_function *ncm_alloc(struct usb_function_instance *fi)
|
|||
mutex_unlock(&opts->lock);
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
ncm_string_defs[STRING_MAC_IDX].s = ncm->ethaddr;
|
||||
|
||||
spin_lock_init(&ncm->lock);
|
||||
ncm_reset_values(ncm);
|
||||
|
|
|
|||
|
|
@ -1925,7 +1925,7 @@ error:
|
|||
if (hcd) {
|
||||
kfree(max3421_hcd->tx);
|
||||
kfree(max3421_hcd->rx);
|
||||
if (max3421_hcd->spi_thread)
|
||||
if (!IS_ERR_OR_NULL(max3421_hcd->spi_thread))
|
||||
kthread_stop(max3421_hcd->spi_thread);
|
||||
usb_put_hcd(hcd);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -975,8 +975,15 @@ int xhci_dbc_suspend(struct xhci_hcd *xhci)
|
|||
if (!dbc)
|
||||
return 0;
|
||||
|
||||
if (dbc->state == DS_CONFIGURED)
|
||||
switch (dbc->state) {
|
||||
case DS_ENABLED:
|
||||
case DS_CONNECTED:
|
||||
case DS_CONFIGURED:
|
||||
dbc->resume_required = 1;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
xhci_dbc_stop(xhci);
|
||||
|
||||
|
|
|
|||
|
|
@ -68,18 +68,20 @@
|
|||
* The magic limit was calculated so that it allows the monitoring
|
||||
* application to pick data once in two ticks. This way, another application,
|
||||
* which presumably drives the bus, gets to hog CPU, yet we collect our data.
|
||||
* If HZ is 100, a 480 mbit/s bus drives 614 KB every jiffy. USB has an
|
||||
* enormous overhead built into the bus protocol, so we need about 1000 KB.
|
||||
*
|
||||
* Originally, for a 480 Mbit/s bus this required a buffer of about 1 MB. For
|
||||
* modern 20 Gbps buses, this value increases to over 50 MB. The maximum
|
||||
* buffer size is set to 64 MiB to accommodate this.
|
||||
*
|
||||
* This is still too much for most cases, where we just snoop a few
|
||||
* descriptor fetches for enumeration. So, the default is a "reasonable"
|
||||
* amount for systems with HZ=250 and incomplete bus saturation.
|
||||
* amount for typical, low-throughput use cases.
|
||||
*
|
||||
* XXX What about multi-megabyte URBs which take minutes to transfer?
|
||||
*/
|
||||
#define BUFF_MAX CHUNK_ALIGN(1200*1024)
|
||||
#define BUFF_DFL CHUNK_ALIGN(300*1024)
|
||||
#define BUFF_MIN CHUNK_ALIGN(8*1024)
|
||||
#define BUFF_MAX CHUNK_ALIGN(64*1024*1024)
|
||||
#define BUFF_DFL CHUNK_ALIGN(300*1024)
|
||||
#define BUFF_MIN CHUNK_ALIGN(8*1024)
|
||||
|
||||
/*
|
||||
* The per-event API header (2 per URB).
|
||||
|
|
|
|||
|
|
@ -328,9 +328,8 @@ static int twl6030_set_vbus(struct phy_companion *comparator, bool enabled)
|
|||
|
||||
static int twl6030_usb_probe(struct platform_device *pdev)
|
||||
{
|
||||
u32 ret;
|
||||
struct twl6030_usb *twl;
|
||||
int status, err;
|
||||
int status, err, ret;
|
||||
struct device_node *np = pdev->dev.of_node;
|
||||
struct device *dev = &pdev->dev;
|
||||
|
||||
|
|
|
|||
|
|
@ -273,6 +273,7 @@ static void option_instat_callback(struct urb *urb);
|
|||
#define QUECTEL_PRODUCT_EM05CN 0x0312
|
||||
#define QUECTEL_PRODUCT_EM05G_GR 0x0313
|
||||
#define QUECTEL_PRODUCT_EM05G_RS 0x0314
|
||||
#define QUECTEL_PRODUCT_RG255C 0x0316
|
||||
#define QUECTEL_PRODUCT_EM12 0x0512
|
||||
#define QUECTEL_PRODUCT_RM500Q 0x0800
|
||||
#define QUECTEL_PRODUCT_RM520N 0x0801
|
||||
|
|
@ -617,6 +618,7 @@ static void option_instat_callback(struct urb *urb);
|
|||
#define UNISOC_VENDOR_ID 0x1782
|
||||
/* TOZED LT70-C based on UNISOC SL8563 uses UNISOC's vendor ID */
|
||||
#define TOZED_PRODUCT_LT70C 0x4055
|
||||
#define UNISOC_PRODUCT_UIS7720 0x4064
|
||||
/* Luat Air72*U series based on UNISOC UIS8910 uses UNISOC's vendor ID */
|
||||
#define LUAT_PRODUCT_AIR720U 0x4e00
|
||||
|
||||
|
|
@ -1270,6 +1272,9 @@ static const struct usb_device_id option_ids[] = {
|
|||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500K, 0xff, 0x00, 0x00) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RG650V, 0xff, 0xff, 0x30) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RG650V, 0xff, 0, 0) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RG255C, 0xff, 0xff, 0x30) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RG255C, 0xff, 0, 0) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RG255C, 0xff, 0xff, 0x40) },
|
||||
|
||||
{ USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6001) },
|
||||
{ USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CMU_300) },
|
||||
|
|
@ -1398,10 +1403,14 @@ static const struct usb_device_id option_ids[] = {
|
|||
.driver_info = RSVD(0) | NCTRL(3) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x10a2, 0xff), /* Telit FN920C04 (MBIM) */
|
||||
.driver_info = NCTRL(4) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x10a3, 0xff), /* Telit FN920C04 (ECM) */
|
||||
.driver_info = NCTRL(4) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x10a4, 0xff), /* Telit FN20C04 (rmnet) */
|
||||
.driver_info = RSVD(0) | NCTRL(3) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x10a7, 0xff), /* Telit FN920C04 (MBIM) */
|
||||
.driver_info = NCTRL(4) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x10a8, 0xff), /* Telit FN920C04 (ECM) */
|
||||
.driver_info = NCTRL(4) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x10a9, 0xff), /* Telit FN20C04 (rmnet) */
|
||||
.driver_info = RSVD(0) | NCTRL(2) | RSVD(3) | RSVD(4) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x10aa, 0xff), /* Telit FN920C04 (MBIM) */
|
||||
|
|
@ -2114,6 +2123,12 @@ static const struct usb_device_id option_ids[] = {
|
|||
{ USB_DEVICE_INTERFACE_CLASS(0x1e0e, 0x9003, 0xff) }, /* Simcom SIM7500/SIM7600 MBIM mode */
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x1e0e, 0x9011, 0xff), /* Simcom SIM7500/SIM7600 RNDIS mode */
|
||||
.driver_info = RSVD(7) },
|
||||
{ USB_DEVICE(0x1e0e, 0x9071), /* Simcom SIM8230 RMNET mode */
|
||||
.driver_info = RSVD(3) | RSVD(4) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x1e0e, 0x9078, 0xff), /* Simcom SIM8230 ECM mode */
|
||||
.driver_info = RSVD(5) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x1e0e, 0x907b, 0xff), /* Simcom SIM8230 RNDIS mode */
|
||||
.driver_info = RSVD(5) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x1e0e, 0x9205, 0xff) }, /* Simcom SIM7070/SIM7080/SIM7090 AT+ECM mode */
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x1e0e, 0x9206, 0xff) }, /* Simcom SIM7070/SIM7080/SIM7090 AT-only mode */
|
||||
{ USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_X060S_X200),
|
||||
|
|
@ -2460,6 +2475,7 @@ static const struct usb_device_id option_ids[] = {
|
|||
{ USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9291, 0xff, 0xff, 0x30) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9291, 0xff, 0xff, 0x40) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(UNISOC_VENDOR_ID, TOZED_PRODUCT_LT70C, 0xff, 0, 0) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(UNISOC_VENDOR_ID, UNISOC_PRODUCT_UIS7720, 0xff, 0, 0) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(UNISOC_VENDOR_ID, LUAT_PRODUCT_AIR720U, 0xff, 0, 0) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x1bbb, 0x0530, 0xff), /* TCL IK512 MBIM */
|
||||
.driver_info = NCTRL(1) },
|
||||
|
|
|
|||
|
|
@ -765,6 +765,17 @@ static int vhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flag
|
|||
ctrlreq->wValue, vdev->rhport);
|
||||
|
||||
vdev->udev = usb_get_dev(urb->dev);
|
||||
/*
|
||||
* NOTE: A similar operation has been done via
|
||||
* USB_REQ_GET_DESCRIPTOR handler below, which is
|
||||
* supposed to always precede USB_REQ_SET_ADDRESS.
|
||||
*
|
||||
* It's not entirely clear if operating on a different
|
||||
* usb_device instance here is a real possibility,
|
||||
* otherwise this call and vdev->udev assignment above
|
||||
* should be dropped.
|
||||
*/
|
||||
dev_pm_syscore_device(&vdev->udev->dev, true);
|
||||
usb_put_dev(old);
|
||||
|
||||
spin_lock(&vdev->ud.lock);
|
||||
|
|
@ -785,6 +796,17 @@ static int vhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flag
|
|||
"Not yet?:Get_Descriptor to device 0 (get max pipe size)\n");
|
||||
|
||||
vdev->udev = usb_get_dev(urb->dev);
|
||||
/*
|
||||
* Set syscore PM flag for the virtually attached
|
||||
* devices to ensure they will not enter suspend on
|
||||
* the client side.
|
||||
*
|
||||
* Note this doesn't have any impact on the physical
|
||||
* devices attached to the host system on the server
|
||||
* side, hence there is no need to undo the operation
|
||||
* on disconnect.
|
||||
*/
|
||||
dev_pm_syscore_device(&vdev->udev->dev, true);
|
||||
usb_put_dev(old);
|
||||
goto out;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue