Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Jun 2014 10:29:01 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r267044 - head/sys/dev/usb/controller
Message-ID:  <201406041029.s54AT1DV017602@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Wed Jun  4 10:29:01 2014
New Revision: 267044
URL: http://svnweb.freebsd.org/changeset/base/267044

Log:
  The external USB HUB in the RPI-B rejects control endpoint traffic
  using the BULK endpoint type, while other USB HUBs do not. Disable
  endpoint type workaround for TT traffic.
  
  MFC after:	3 days

Modified:
  head/sys/dev/usb/controller/dwc_otg.c

Modified: head/sys/dev/usb/controller/dwc_otg.c
==============================================================================
--- head/sys/dev/usb/controller/dwc_otg.c	Wed Jun  4 09:54:01 2014	(r267043)
+++ head/sys/dev/usb/controller/dwc_otg.c	Wed Jun  4 10:29:01 2014	(r267044)
@@ -3161,11 +3161,20 @@ dwc_otg_setup_standard_chain(struct usb_
 			(xfer->max_packet_size << HCCHAR_MPS_SHIFT) |
 			HCCHAR_CHENA;
 
-		/* XXX stability hack - possible HW issue */
-		if (td->ep_type == UE_CONTROL)
+		/*
+		 * XXX stability hack - possible HW issue
+		 *
+		 * Disable workaround when using a transaction
+		 * translator, hence some TTs reject control endpoint
+		 * traffic using BULK endpoint type:
+		 */
+		if (td->ep_type == UE_CONTROL &&
+		    (xfer->xroot->udev->speed == USB_SPEED_HIGH ||
+		     xfer->xroot->udev->parent_hs_hub == NULL)) {
 			hcchar |= (UE_BULK << HCCHAR_EPTYPE_SHIFT);
-		else
+		} else {
 			hcchar |= (td->ep_type << HCCHAR_EPTYPE_SHIFT);
+		}
 
 		if (usbd_get_speed(xfer->xroot->udev) == USB_SPEED_LOW)
 			hcchar |= HCCHAR_LSPDDEV;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201406041029.s54AT1DV017602>