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);
        }
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to