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

Commit 428b315a authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

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

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

Felipe writes:

usb: fixes for v4.5-rc6

The most important fixes here are:

a) yet another fix to dwc3's EP transfer resource
assignment logic. This time around we will be
pre-allocating transfer resources to avoid any
future issues;

b) two DMA fixes for the old MUSB driver.

c) dwc2's data toggle fix for FS

Other than these, we have a few other minor fixes
elsewhere.
parents e5bdfd50 3b243519
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -3444,7 +3444,6 @@ F: drivers/usb/dwc2/
DESIGNWARE USB3 DRD IP DRIVER
M:	Felipe Balbi <balbi@kernel.org>
L:	linux-usb@vger.kernel.org
L:	linux-omap@vger.kernel.org
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git
S:	Maintained
F:	drivers/usb/dwc3/
@@ -7354,7 +7353,7 @@ F: drivers/tty/isicom.c
F:	include/linux/isicom.h

MUSB MULTIPOINT HIGH SPEED DUAL-ROLE CONTROLLER
M:	Felipe Balbi <balbi@kernel.org>
M:	Bin Liu <b-liu@ti.com>
L:	linux-usb@vger.kernel.org
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git
S:	Maintained
@@ -7923,11 +7922,9 @@ F: drivers/media/platform/omap3isp/
F:	drivers/staging/media/omap4iss/

OMAP USB SUPPORT
M:	Felipe Balbi <balbi@kernel.org>
L:	linux-usb@vger.kernel.org
L:	linux-omap@vger.kernel.org
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git
S:	Maintained
S:	Orphan
F:	drivers/usb/*/*omap*
F:	arch/arm/*omap*/usb*

+1 −0
Original line number Diff line number Diff line
config USB_DWC2
	tristate "DesignWare USB2 DRD Core Support"
	depends on HAS_DMA
	depends on USB || USB_GADGET
	help
	  Say Y here if your system has a Dual Role Hi-Speed USB
+6 −0
Original line number Diff line number Diff line
@@ -619,6 +619,12 @@ void dwc2_force_dr_mode(struct dwc2_hsotg *hsotg)
			 __func__, hsotg->dr_mode);
		break;
	}

	/*
	 * NOTE: This is required for some rockchip soc based
	 * platforms.
	 */
	msleep(50);
}

/*
+11 −12
Original line number Diff line number Diff line
@@ -1174,14 +1174,11 @@ static int dwc2_process_non_isoc_desc(struct dwc2_hsotg *hsotg,
	failed = dwc2_update_non_isoc_urb_state_ddma(hsotg, chan, qtd, dma_desc,
						     halt_status, n_bytes,
						     xfer_done);
	if (*xfer_done && urb->status != -EINPROGRESS)
		failed = 1;

	if (failed) {
	if (failed || (*xfer_done && urb->status != -EINPROGRESS)) {
		dwc2_host_complete(hsotg, qtd, urb->status);
		dwc2_hcd_qtd_unlink_and_free(hsotg, qtd, qh);
		dev_vdbg(hsotg->dev, "failed=%1x xfer_done=%1x status=%08x\n",
			 failed, *xfer_done, urb->status);
		dev_vdbg(hsotg->dev, "failed=%1x xfer_done=%1x\n",
			 failed, *xfer_done);
		return failed;
	}

@@ -1236,21 +1233,23 @@ static void dwc2_complete_non_isoc_xfer_ddma(struct dwc2_hsotg *hsotg,

	list_for_each_safe(qtd_item, qtd_tmp, &qh->qtd_list) {
		int i;
		int qtd_desc_count;

		qtd = list_entry(qtd_item, struct dwc2_qtd, qtd_list_entry);
		xfer_done = 0;
		qtd_desc_count = qtd->n_desc;

		for (i = 0; i < qtd->n_desc; i++) {
		for (i = 0; i < qtd_desc_count; i++) {
			if (dwc2_process_non_isoc_desc(hsotg, chan, chnum, qtd,
						       desc_num, halt_status,
						       &xfer_done)) {
				qtd = NULL;
				break;
			}
						       &xfer_done))
				goto stop_scan;

			desc_num++;
		}
	}

stop_scan:
	if (qh->ep_type != USB_ENDPOINT_XFER_CONTROL) {
		/*
		 * Resetting the data toggle for bulk and interrupt endpoints
@@ -1258,7 +1257,7 @@ static void dwc2_complete_non_isoc_xfer_ddma(struct dwc2_hsotg *hsotg,
		 */
		if (halt_status == DWC2_HC_XFER_STALL)
			qh->data_toggle = DWC2_HC_PID_DATA0;
		else if (qtd)
		else
			dwc2_hcd_save_data_toggle(hsotg, chan, chnum, qtd);
	}

+8 −0
Original line number Diff line number Diff line
@@ -525,11 +525,19 @@ void dwc2_hcd_save_data_toggle(struct dwc2_hsotg *hsotg,
	u32 pid = (hctsiz & TSIZ_SC_MC_PID_MASK) >> TSIZ_SC_MC_PID_SHIFT;

	if (chan->ep_type != USB_ENDPOINT_XFER_CONTROL) {
		if (WARN(!chan || !chan->qh,
			 "chan->qh must be specified for non-control eps\n"))
			return;

		if (pid == TSIZ_SC_MC_PID_DATA0)
			chan->qh->data_toggle = DWC2_HC_PID_DATA0;
		else
			chan->qh->data_toggle = DWC2_HC_PID_DATA1;
	} else {
		if (WARN(!qtd,
			 "qtd must be specified for control eps\n"))
			return;

		if (pid == TSIZ_SC_MC_PID_DATA0)
			qtd->data_toggle = DWC2_HC_PID_DATA0;
		else
Loading