Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pad Revert to previous.



details:   https://anonhg.NetBSD.org/src/rev/7fc456a61e3b
branches:  trunk
changeset: 376027:7fc456a61e3b
user:      nat <nat%NetBSD.org@localhost>
date:      Sat May 27 14:51:47 2023 +0000

description:
Revert to previous.

This change broke the intention of recent changes to pad(4).

The solution to address PR/57436 must be done in bta2dpd(8).

diffstat:

 sys/dev/pad/pad.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (34 lines):

diff -r 7c9fc22f6bed -r 7fc456a61e3b sys/dev/pad/pad.c
--- a/sys/dev/pad/pad.c Sat May 27 10:12:11 2023 +0000
+++ b/sys/dev/pad/pad.c Sat May 27 14:51:47 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pad.c,v 1.84 2023/05/26 12:10:13 nat Exp $ */
+/* $NetBSD: pad.c,v 1.85 2023/05/27 14:51:47 nat Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pad.c,v 1.84 2023/05/26 12:10:13 nat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pad.c,v 1.85 2023/05/27 14:51:47 nat Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -515,13 +515,13 @@ pad_read(struct pad_softc *sc, off_t *of
        int err, first;
 
        err = 0;
-       first = 0;
+       first = 1;
        DPRINTF("%s: resid=%zu\n", __func__, uio->uio_resid);
        while (uio->uio_resid > 0) {
                mutex_enter(&sc->sc_intr_lock);
                err = pad_get_block(sc, &pb, MIN(uio->uio_resid, INT_MAX), first);
                mutex_exit(&sc->sc_intr_lock);
-               first = 1;
+               first = 0;
                if (err == EAGAIN) {
                        err = 0;
                        break;



Home | Main Index | Thread Index | Old Index