Merge tag 'v4.7-rc6' into patchwork
Linux 4.7-rc6 * tag 'v4.7-rc6': (1245 commits) Linux 4.7-rc6 ovl: warn instead of error if d_type is not supported MIPS: Fix possible corruption of cache mode by mprotect. locks: use file_inode() usb: dwc3: st: Use explicit reset_control_get_exclusive() API phy: phy-stih407-usb: Use explicit reset_control_get_exclusive() API phy: miphy28lp: Inform the reset framework that our reset line may be shared namespace: update event counter when umounting a deleted dentry 9p: use file_dentry() lockd: unregister notifier blocks if the service fails to come up completely ACPI,PCI,IRQ: correct operator precedence fuse: serialize dirops by default drm/i915: Fix missing unlock on error in i915_ppgtt_info() powerpc: Initialise pci_io_base as early as possible mfd: da9053: Fix compiler warning message for uninitialised variable mfd: max77620: Fix FPS switch statements phy: phy-stih407-usb: Inform the reset framework that our reset line may be shared usb: dwc3: st: Inform the reset framework that our reset line may be shared usb: host: ehci-st: Inform the reset framework that our reset line may be shared usb: host: ohci-st: Inform the reset framework that our reset line may be shared ...
This commit is contained in:
@@ -2051,7 +2051,7 @@ static int __ffs_data_do_os_desc(enum ffs_os_desc_type type,
|
||||
|
||||
if (len < sizeof(*d) ||
|
||||
d->bFirstInterfaceNumber >= ffs->interfaces_count ||
|
||||
d->Reserved1)
|
||||
!d->Reserved1)
|
||||
return -EINVAL;
|
||||
for (i = 0; i < ARRAY_SIZE(d->Reserved2); ++i)
|
||||
if (d->Reserved2[i])
|
||||
@@ -2729,6 +2729,7 @@ static int _ffs_func_bind(struct usb_configuration *c,
|
||||
func->ffs->ss_descs_count;
|
||||
|
||||
int fs_len, hs_len, ss_len, ret, i;
|
||||
struct ffs_ep *eps_ptr;
|
||||
|
||||
/* Make it a single chunk, less management later on */
|
||||
vla_group(d);
|
||||
@@ -2777,12 +2778,9 @@ static int _ffs_func_bind(struct usb_configuration *c,
|
||||
ffs->raw_descs_length);
|
||||
|
||||
memset(vla_ptr(vlabuf, d, inums), 0xff, d_inums__sz);
|
||||
for (ret = ffs->eps_count; ret; --ret) {
|
||||
struct ffs_ep *ptr;
|
||||
|
||||
ptr = vla_ptr(vlabuf, d, eps);
|
||||
ptr[ret].num = -1;
|
||||
}
|
||||
eps_ptr = vla_ptr(vlabuf, d, eps);
|
||||
for (i = 0; i < ffs->eps_count; i++)
|
||||
eps_ptr[i].num = -1;
|
||||
|
||||
/* Save pointers
|
||||
* d_eps == vlabuf, func->eps used to kfree vlabuf later
|
||||
@@ -2851,7 +2849,7 @@ static int _ffs_func_bind(struct usb_configuration *c,
|
||||
goto error;
|
||||
|
||||
func->function.os_desc_table = vla_ptr(vlabuf, d, os_desc_table);
|
||||
if (c->cdev->use_os_string)
|
||||
if (c->cdev->use_os_string) {
|
||||
for (i = 0; i < ffs->interfaces_count; ++i) {
|
||||
struct usb_os_desc *desc;
|
||||
|
||||
@@ -2862,13 +2860,15 @@ static int _ffs_func_bind(struct usb_configuration *c,
|
||||
vla_ptr(vlabuf, d, ext_compat) + i * 16;
|
||||
INIT_LIST_HEAD(&desc->ext_prop);
|
||||
}
|
||||
ret = ffs_do_os_descs(ffs->ms_os_descs_count,
|
||||
vla_ptr(vlabuf, d, raw_descs) +
|
||||
fs_len + hs_len + ss_len,
|
||||
d_raw_descs__sz - fs_len - hs_len - ss_len,
|
||||
__ffs_func_bind_do_os_desc, func);
|
||||
if (unlikely(ret < 0))
|
||||
goto error;
|
||||
ret = ffs_do_os_descs(ffs->ms_os_descs_count,
|
||||
vla_ptr(vlabuf, d, raw_descs) +
|
||||
fs_len + hs_len + ss_len,
|
||||
d_raw_descs__sz - fs_len - hs_len -
|
||||
ss_len,
|
||||
__ffs_func_bind_do_os_desc, func);
|
||||
if (unlikely(ret < 0))
|
||||
goto error;
|
||||
}
|
||||
func->function.os_desc_n =
|
||||
c->cdev->use_os_string ? ffs->interfaces_count : 0;
|
||||
|
||||
|
@@ -161,14 +161,6 @@ static struct usb_endpoint_descriptor hs_ep_out_desc = {
|
||||
.wMaxPacketSize = cpu_to_le16(512)
|
||||
};
|
||||
|
||||
static struct usb_qualifier_descriptor dev_qualifier = {
|
||||
.bLength = sizeof(dev_qualifier),
|
||||
.bDescriptorType = USB_DT_DEVICE_QUALIFIER,
|
||||
.bcdUSB = cpu_to_le16(0x0200),
|
||||
.bDeviceClass = USB_CLASS_PRINTER,
|
||||
.bNumConfigurations = 1
|
||||
};
|
||||
|
||||
static struct usb_descriptor_header *hs_printer_function[] = {
|
||||
(struct usb_descriptor_header *) &intf_desc,
|
||||
(struct usb_descriptor_header *) &hs_ep_in_desc,
|
||||
|
@@ -1445,16 +1445,18 @@ static void usbg_drop_tpg(struct se_portal_group *se_tpg)
|
||||
for (i = 0; i < TPG_INSTANCES; ++i)
|
||||
if (tpg_instances[i].tpg == tpg)
|
||||
break;
|
||||
if (i < TPG_INSTANCES)
|
||||
if (i < TPG_INSTANCES) {
|
||||
tpg_instances[i].tpg = NULL;
|
||||
opts = container_of(tpg_instances[i].func_inst,
|
||||
struct f_tcm_opts, func_inst);
|
||||
mutex_lock(&opts->dep_lock);
|
||||
if (opts->has_dep)
|
||||
module_put(opts->dependent);
|
||||
else
|
||||
configfs_undepend_item_unlocked(&opts->func_inst.group.cg_item);
|
||||
mutex_unlock(&opts->dep_lock);
|
||||
opts = container_of(tpg_instances[i].func_inst,
|
||||
struct f_tcm_opts, func_inst);
|
||||
mutex_lock(&opts->dep_lock);
|
||||
if (opts->has_dep)
|
||||
module_put(opts->dependent);
|
||||
else
|
||||
configfs_undepend_item_unlocked(
|
||||
&opts->func_inst.group.cg_item);
|
||||
mutex_unlock(&opts->dep_lock);
|
||||
}
|
||||
mutex_unlock(&tpg_instances_lock);
|
||||
|
||||
kfree(tpg);
|
||||
|
@@ -598,18 +598,6 @@ static struct usb_gadget_strings *fn_strings[] = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
static struct usb_qualifier_descriptor devqual_desc = {
|
||||
.bLength = sizeof devqual_desc,
|
||||
.bDescriptorType = USB_DT_DEVICE_QUALIFIER,
|
||||
|
||||
.bcdUSB = cpu_to_le16(0x200),
|
||||
.bDeviceClass = USB_CLASS_MISC,
|
||||
.bDeviceSubClass = 0x02,
|
||||
.bDeviceProtocol = 0x01,
|
||||
.bNumConfigurations = 1,
|
||||
.bRESERVED = 0,
|
||||
};
|
||||
|
||||
static struct usb_interface_assoc_descriptor iad_desc = {
|
||||
.bLength = sizeof iad_desc,
|
||||
.bDescriptorType = USB_DT_INTERFACE_ASSOCIATION,
|
||||
@@ -1292,6 +1280,7 @@ in_rq_cur(struct usb_function *fn, const struct usb_ctrlrequest *cr)
|
||||
|
||||
if (control_selector == UAC2_CS_CONTROL_SAM_FREQ) {
|
||||
struct cntrl_cur_lay3 c;
|
||||
memset(&c, 0, sizeof(struct cntrl_cur_lay3));
|
||||
|
||||
if (entity_id == USB_IN_CLK_ID)
|
||||
c.dCUR = p_srate;
|
||||
|
@@ -83,9 +83,7 @@ EXPORT_SYMBOL_GPL(fsg_fs_function);
|
||||
* USB 2.0 devices need to expose both high speed and full speed
|
||||
* descriptors, unless they only run at full speed.
|
||||
*
|
||||
* That means alternate endpoint descriptors (bigger packets)
|
||||
* and a "device qualifier" ... plus more construction options
|
||||
* for the configuration descriptor.
|
||||
* That means alternate endpoint descriptors (bigger packets).
|
||||
*/
|
||||
struct usb_endpoint_descriptor fsg_hs_bulk_in_desc = {
|
||||
.bLength = USB_DT_ENDPOINT_SIZE,
|
||||
|
Reference in New Issue
Block a user