Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 135e7d0d authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge tag 'fixes-for-v3.16-rc2' of...

Merge tag 'fixes-for-v3.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb

 into usb-linus

usb: fixes for v3.16-rc2

dwc3-omap won't crash anymore on module removal and suspend/resume won't kill
xHCI interrupts.

MUSB got a fix to handle Babble condition only in host mode, how it should be.

The f_fs function driver got a fix for a NULL pointer dereference.

Renesas gadget got a fix for Status stage handling.

Signed-of-by: default avatarFelipe Balbi <balbi@ti.com>
parents a497c3ba 5d881802
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ comment "Platform Glue Driver Support"
config USB_DWC3_OMAP
	tristate "Texas Instruments OMAP5 and similar Platforms"
	depends on EXTCON && (ARCH_OMAP2PLUS || COMPILE_TEST)
	depends on OF
	default USB_DWC3
	help
	  Some platforms from Texas Instruments like OMAP5, DRA7xxx and
+14 −3
Original line number Diff line number Diff line
@@ -322,7 +322,7 @@ static int dwc3_omap_remove_core(struct device *dev, void *c)
{
	struct platform_device *pdev = to_platform_device(dev);

	platform_device_unregister(pdev);
	of_device_unregister(pdev);

	return 0;
}
@@ -599,7 +599,7 @@ static int dwc3_omap_prepare(struct device *dev)
{
	struct dwc3_omap	*omap = dev_get_drvdata(dev);

	dwc3_omap_disable_irqs(omap);
	dwc3_omap_write_irqmisc_set(omap, 0x00);

	return 0;
}
@@ -607,8 +607,19 @@ static int dwc3_omap_prepare(struct device *dev)
static void dwc3_omap_complete(struct device *dev)
{
	struct dwc3_omap	*omap = dev_get_drvdata(dev);
	u32			reg;

	dwc3_omap_enable_irqs(omap);
	reg = (USBOTGSS_IRQMISC_OEVT |
			USBOTGSS_IRQMISC_DRVVBUS_RISE |
			USBOTGSS_IRQMISC_CHRGVBUS_RISE |
			USBOTGSS_IRQMISC_DISCHRGVBUS_RISE |
			USBOTGSS_IRQMISC_IDPULLUP_RISE |
			USBOTGSS_IRQMISC_DRVVBUS_FALL |
			USBOTGSS_IRQMISC_CHRGVBUS_FALL |
			USBOTGSS_IRQMISC_DISCHRGVBUS_FALL |
			USBOTGSS_IRQMISC_IDPULLUP_FALL);

	dwc3_omap_write_irqmisc_set(omap, reg);
}

static int dwc3_omap_suspend(struct device *dev)
+4 −4
Original line number Diff line number Diff line
@@ -828,10 +828,6 @@ static void dwc3_prepare_one_trb(struct dwc3_ep *dep,
			length, last ? " last" : "",
			chain ? " chain" : "");

	/* Skip the LINK-TRB on ISOC */
	if (((dep->free_slot & DWC3_TRB_MASK) == DWC3_TRB_NUM - 1) &&
			usb_endpoint_xfer_isoc(dep->endpoint.desc))
		dep->free_slot++;

	trb = &dep->trb_pool[dep->free_slot & DWC3_TRB_MASK];

@@ -843,6 +839,10 @@ static void dwc3_prepare_one_trb(struct dwc3_ep *dep,
	}

	dep->free_slot++;
	/* Skip the LINK-TRB on ISOC */
	if (((dep->free_slot & DWC3_TRB_MASK) == DWC3_TRB_NUM - 1) &&
			usb_endpoint_xfer_isoc(dep->endpoint.desc))
		dep->free_slot++;

	trb->size = DWC3_TRB_SIZE_LENGTH(length);
	trb->bpl = lower_32_bits(dma);
+19 −18
Original line number Diff line number Diff line
@@ -1145,14 +1145,14 @@ static struct configfs_item_operations interf_item_ops = {
	.store_attribute	= usb_os_desc_attr_store,
};

static ssize_t rndis_grp_compatible_id_show(struct usb_os_desc *desc,
static ssize_t interf_grp_compatible_id_show(struct usb_os_desc *desc,
					     char *page)
{
	memcpy(page, desc->ext_compat_id, 8);
	return 8;
}

static ssize_t rndis_grp_compatible_id_store(struct usb_os_desc *desc,
static ssize_t interf_grp_compatible_id_store(struct usb_os_desc *desc,
					      const char *page, size_t len)
{
	int l;
@@ -1171,19 +1171,19 @@ static ssize_t rndis_grp_compatible_id_store(struct usb_os_desc *desc,
	return len;
}

static struct usb_os_desc_attribute rndis_grp_attr_compatible_id =
static struct usb_os_desc_attribute interf_grp_attr_compatible_id =
	__CONFIGFS_ATTR(compatible_id, S_IRUGO | S_IWUSR,
			rndis_grp_compatible_id_show,
			rndis_grp_compatible_id_store);
			interf_grp_compatible_id_show,
			interf_grp_compatible_id_store);

static ssize_t rndis_grp_sub_compatible_id_show(struct usb_os_desc *desc,
static ssize_t interf_grp_sub_compatible_id_show(struct usb_os_desc *desc,
						 char *page)
{
	memcpy(page, desc->ext_compat_id + 8, 8);
	return 8;
}

static ssize_t rndis_grp_sub_compatible_id_store(struct usb_os_desc *desc,
static ssize_t interf_grp_sub_compatible_id_store(struct usb_os_desc *desc,
						  const char *page, size_t len)
{
	int l;
@@ -1202,20 +1202,21 @@ static ssize_t rndis_grp_sub_compatible_id_store(struct usb_os_desc *desc,
	return len;
}

static struct usb_os_desc_attribute rndis_grp_attr_sub_compatible_id =
static struct usb_os_desc_attribute interf_grp_attr_sub_compatible_id =
	__CONFIGFS_ATTR(sub_compatible_id, S_IRUGO | S_IWUSR,
			rndis_grp_sub_compatible_id_show,
			rndis_grp_sub_compatible_id_store);
			interf_grp_sub_compatible_id_show,
			interf_grp_sub_compatible_id_store);

static struct configfs_attribute *interf_grp_attrs[] = {
	&rndis_grp_attr_compatible_id.attr,
	&rndis_grp_attr_sub_compatible_id.attr,
	&interf_grp_attr_compatible_id.attr,
	&interf_grp_attr_sub_compatible_id.attr,
	NULL
};

int usb_os_desc_prepare_interf_dir(struct config_group *parent,
				   int n_interf,
				   struct usb_os_desc **desc,
				   char **names,
				   struct module *owner)
{
	struct config_group **f_default_groups, *os_desc_group,
@@ -1257,8 +1258,8 @@ int usb_os_desc_prepare_interf_dir(struct config_group *parent,
		d = desc[n_interf];
		d->owner = owner;
		config_group_init_type_name(&d->group, "", interface_type);
		config_item_set_name(&d->group.cg_item, "interface.%d",
				     n_interf);
		config_item_set_name(&d->group.cg_item, "interface.%s",
				     names[n_interf]);
		interface_groups[n_interf] = &d->group;
	}

+1 −0
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@ void unregister_gadget_item(struct config_item *item);
int usb_os_desc_prepare_interf_dir(struct config_group *parent,
				   int n_interf,
				   struct usb_os_desc **desc,
				   char **names,
				   struct module *owner);

static inline struct usb_os_desc *to_usb_os_desc(struct config_item *item)
Loading