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
This commit is contained in:
Marius Strobl 2017-01-09 17:05:39 +00:00
parent 0e2d6474ca
commit d119f637fc

View File

@ -545,6 +545,8 @@ mmcsd_task(void *arg)
bp->bio_error = EIO; bp->bio_error = EIO;
bp->bio_resid = (end - block) * sz; bp->bio_resid = (end - block) * sz;
bp->bio_flags |= BIO_ERROR; bp->bio_flags |= BIO_ERROR;
} else {
bp->bio_resid = 0;
} }
biodone(bp); biodone(bp);
} }