Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Mar 2010 21:49:01 +0000 (UTC)
From:      Andrew Thompson <thompsa@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r205034 - head/sys/dev/usb/controller
Message-ID:  <201003112149.o2BLn1on063121@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: thompsa
Date: Thu Mar 11 21:49:00 2010
New Revision: 205034
URL: http://svn.freebsd.org/changeset/base/205034

Log:
  For USS820 driver we need to manually reset TX FIFO at each SETUP transaction
  because the chip doesn't do this by itself.
  
  Submitted by:	Hans Petter Selasky

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

Modified: head/sys/dev/usb/controller/uss820dci.c
==============================================================================
--- head/sys/dev/usb/controller/uss820dci.c	Thu Mar 11 21:48:10 2010	(r205033)
+++ head/sys/dev/usb/controller/uss820dci.c	Thu Mar 11 21:49:00 2010	(r205034)
@@ -333,6 +333,14 @@ uss820dci_setup_rx(struct uss820dci_td *
 	} else {
 		sc->sc_dv_addr = 0xFF;
 	}
+
+	/* reset TX FIFO */
+	temp = USS820_READ_1(sc, USS820_TXCON);
+	temp |= USS820_TXCON_TXCLR;
+	USS820_WRITE_1(sc, USS820_TXCON, temp);
+	temp &= ~USS820_TXCON_TXCLR;
+	USS820_WRITE_1(sc, USS820_TXCON, temp);
+
 	return (0);			/* complete */
 
 setup_not_complete:



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