Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Jan 2017 17:05:40 +0000 (UTC)
From:      Marius Strobl <marius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r311793 - head/sys/dev/mmc
Message-ID:  <201701091705.v09H5ePE083109@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marius
Date: Mon Jan  9 17:05:39 2017
New Revision: 311793
URL: https://svnweb.freebsd.org/changeset/base/311793

Log:
  In mmcsd_task(), bio_resid was not being set to 0 on a successful read
  or write, resulting in random short-read and short-write returns for
  requests. Fixing this fixes nominal block I/O via mmcsd(4).
  
  Obtained from:	DragonFlyBSD (fd4b97583be1a1e57234713c25f6e81bc0411cb0)
  MFC after:	5 days

Modified:
  head/sys/dev/mmc/mmcsd.c

Modified: head/sys/dev/mmc/mmcsd.c
==============================================================================
--- head/sys/dev/mmc/mmcsd.c	Mon Jan  9 17:04:51 2017	(r311792)
+++ head/sys/dev/mmc/mmcsd.c	Mon Jan  9 17:05:39 2017	(r311793)
@@ -545,6 +545,8 @@ mmcsd_task(void *arg)
 			bp->bio_error = EIO;
 			bp->bio_resid = (end - block) * sz;
 			bp->bio_flags |= BIO_ERROR;
+		} else {
+			bp->bio_resid = 0;
 		}
 		biodone(bp);
 	}



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