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

Commit 6b98174b authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge tag 'fixes-for-v4.8-rc6' of...

Merge tag 'fixes-for-v4.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus

Felipe writes:

usb: fixes for v4.8-rc6

Unfortunately we have a bogus dwc3 patch leaked through the cracks and
got merged into Linus' HEAD. That patch ended up causing off-by-1 error
in our TRB accounting logic. Thankfully John Youn found out the problem
and we provided a revert to the bogus dwc3 patch in no time.

Apart from this off-by-1 error, we have two fixes to the Renesas drivers,
a small fix to our generic phy driver, a NULL pointer dereference fix for
f_eem and a build warning fix in dwc3.
parents 1b49dae1 696118c0
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -249,7 +249,9 @@ static int dwc3_pci_runtime_resume(struct device *dev)

	return pm_runtime_get(&dwc3->dev);
}
#endif /* CONFIG_PM */

#ifdef CONFIG_PM_SLEEP
static int dwc3_pci_pm_dummy(struct device *dev)
{
	/*
@@ -262,7 +264,7 @@ static int dwc3_pci_pm_dummy(struct device *dev)
	 */
	return 0;
}
#endif /* CONFIG_PM */
#endif /* CONFIG_PM_SLEEP */

static struct dev_pm_ops dwc3_pci_dev_pm_ops = {
	SET_SYSTEM_SLEEP_PM_OPS(dwc3_pci_pm_dummy, dwc3_pci_pm_dummy)
+4 −1
Original line number Diff line number Diff line
@@ -884,9 +884,12 @@ static u32 dwc3_calc_trbs_left(struct dwc3_ep *dep)
		return DWC3_TRB_NUM - 1;
	}

	trbs_left = dep->trb_dequeue - dep->trb_enqueue - 1;
	trbs_left = dep->trb_dequeue - dep->trb_enqueue;
	trbs_left &= (DWC3_TRB_NUM - 1);

	if (dep->trb_dequeue < dep->trb_enqueue)
		trbs_left--;

	return trbs_left;
}

+1 −1
Original line number Diff line number Diff line
@@ -342,7 +342,7 @@ static struct sk_buff *eem_wrap(struct gether *port, struct sk_buff *skb)
	struct sk_buff	*skb2 = NULL;
	struct usb_ep	*in = port->in_ep;
	int		headroom, tailroom, padlen = 0;
	u16		len = skb->len;
	u16		len;

	if (!skb)
		return NULL;
+2 −0
Original line number Diff line number Diff line
@@ -106,6 +106,7 @@

/* DRD_CON */
#define DRD_CON_PERI_CON	BIT(24)
#define DRD_CON_VBOUT		BIT(0)

/* USB_INT_ENA_1 and USB_INT_STA_1 */
#define USB_INT_1_B3_PLLWKUP	BIT(31)
@@ -363,6 +364,7 @@ static void usb3_init_epc_registers(struct renesas_usb3 *usb3)
{
	/* FIXME: How to change host / peripheral mode as well? */
	usb3_set_bit(usb3, DRD_CON_PERI_CON, USB3_DRD_CON);
	usb3_clear_bit(usb3, DRD_CON_VBOUT, USB3_DRD_CON);

	usb3_write(usb3, ~0, USB3_USB_INT_STA_1);
	usb3_enable_irq_1(usb3, USB_INT_1_VBUS_CNG);
+6 −2
Original line number Diff line number Diff line
@@ -144,14 +144,18 @@ static irqreturn_t nop_gpio_vbus_thread(int irq, void *data)
int usb_gen_phy_init(struct usb_phy *phy)
{
	struct usb_phy_generic *nop = dev_get_drvdata(phy->dev);
	int ret;

	if (!IS_ERR(nop->vcc)) {
		if (regulator_enable(nop->vcc))
			dev_err(phy->dev, "Failed to enable power\n");
	}

	if (!IS_ERR(nop->clk))
		clk_prepare_enable(nop->clk);
	if (!IS_ERR(nop->clk)) {
		ret = clk_prepare_enable(nop->clk);
		if (ret)
			return ret;
	}

	nop_reset(nop);

Loading