From: visa Date: Wed, 17 Aug 2022 15:26:56 +0000 (+0000) Subject: Fix vldc(4) event filters X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=ed188d6ef2504c488e4e49c3fbc1ec21fdf9910d;p=openbsd Fix vldc(4) event filters Indicate non-activeness when the device is not ready for reading or writing. This should make the event filters behave more like the old poll code. "makes sense to me" mpi@ --- diff --git a/sys/arch/sparc64/dev/vldcp.c b/sys/arch/sparc64/dev/vldcp.c index ca48a469b59..0757b3f8998 100644 --- a/sys/arch/sparc64/dev/vldcp.c +++ b/sys/arch/sparc64/dev/vldcp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vldcp.c,v 1.24 2022/07/10 08:33:00 visa Exp $ */ +/* $OpenBSD: vldcp.c,v 1.25 2022/08/17 15:26:56 visa Exp $ */ /* * Copyright (c) 2009, 2012 Mark Kettenis * @@ -617,6 +617,7 @@ filt_vldcpread(struct knote *kn, long hint) } else { cbus_intr_setenabled(sc->sc_bustag, sc->sc_rx_ino, INTR_ENABLED); + kn->kn_data = 0; } splx(s); @@ -641,6 +642,7 @@ filt_vldcwrite(struct knote *kn, long hint) } else { cbus_intr_setenabled(sc->sc_bustag, sc->sc_tx_ino, INTR_ENABLED); + kn->kn_data = 0; } splx(s);