aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/mmc/mmcsd.c
diff options
context:
space:
mode:
authorMarius Strobl <marius@FreeBSD.org>2017-01-09 17:05:39 +0000
committerMarius Strobl <marius@FreeBSD.org>2017-01-09 17:05:39 +0000
commitd119f637fce3136d83eaa268cf1fdd696807f179 (patch)
treea0f8afca6c3c9bfff72e6dc326cd6e19f55915a8 /sys/dev/mmc/mmcsd.c
parent0e2d6474cae7866d73a43603a86114dc10a16dfc (diff)
downloadsrc-d119f637fce3136d83eaa268cf1fdd696807f179.tar.gz
src-d119f637fce3136d83eaa268cf1fdd696807f179.zip
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
Notes
Notes: svn path=/head/; revision=311793
Diffstat (limited to 'sys/dev/mmc/mmcsd.c')
-rw-r--r--sys/dev/mmc/mmcsd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/dev/mmc/mmcsd.c b/sys/dev/mmc/mmcsd.c
index 77491234ca85..3132c21aea01 100644
--- a/sys/dev/mmc/mmcsd.c
+++ b/sys/dev/mmc/mmcsd.c
@@ -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);
}