svn commit: r190327 - stable/7/sys/dev/usb

Andrew Thompson thompsa at FreeBSD.org
Mon Mar 23 11:13:20 PDT 2009


Author: thompsa
Date: Mon Mar 23 18:13:18 2009
New Revision: 190327
URL: http://svn.freebsd.org/changeset/base/190327

Log:
  MFC r189905
  
  Fix checking of the IGNORE_RESIDUE quirk.
  
  Submitted by:	marius

Modified:
  stable/7/sys/dev/usb/umass.c

Modified: stable/7/sys/dev/usb/umass.c
==============================================================================
--- stable/7/sys/dev/usb/umass.c	Mon Mar 23 18:04:22 2009	(r190326)
+++ stable/7/sys/dev/usb/umass.c	Mon Mar 23 18:13:18 2009	(r190327)
@@ -1872,6 +1872,7 @@ umass_bbb_state(usbd_xfer_handle xfer, u
 {
 	struct umass_softc *sc = (struct umass_softc *) priv;
 	usbd_xfer_handle next_xfer;
+	int Residue;
 
 	KASSERT(sc->proto & UMASS_PROTO_BBB,
 		("%s: umass_bbb_state: wrong sc->proto 0x%02x\n",
@@ -2056,10 +2057,8 @@ umass_bbb_state(usbd_xfer_handle xfer, u
 				USETDW(sc->csw.dCSWSignature, CSWSIGNATURE);
 		}
 
-		int Residue;
 		Residue = UGETDW(sc->csw.dCSWDataResidue);
-		if (Residue == 0 &&
-		    sc->transfer_datalen - sc->transfer_actlen != 0)
+		if (Residue == 0 || (sc->quirks & IGNORE_RESIDUE))
 			Residue = sc->transfer_datalen - sc->transfer_actlen;
 
 		/* Check CSW and handle any error */


More information about the svn-src-stable-7 mailing list