From dcbc8e7e16d5387222e03f063c4fdd097b9109aa Mon Sep 17 00:00:00 2001 From: Visa Hankala Date: Wed, 17 Aug 2022 15:26:57 +0000 Subject: 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@ --- sys/arch/sparc64/dev/vldcp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sys') 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); -- cgit v1.2.3