From ddf459ffdf2efda393006c0be35b7a90e6eca80f Mon Sep 17 00:00:00 2001 From: Reyk Floeter Date: Thu, 19 Dec 2019 12:04:39 +0000 Subject: poll handlers must return a poll(2) revents value, not errno(2) values. Some drivers have returned ENXIO (6) if the device is not available which incorrectly translates into POLLPRI|POLLOUT (2|4) in userland. Change it to POLLERR for now, but it might as well be POLLHUP. OK mpi@ --- sys/arch/sparc64/dev/vldcp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/arch/sparc64/dev') diff --git a/sys/arch/sparc64/dev/vldcp.c b/sys/arch/sparc64/dev/vldcp.c index fa28639dae3..91255700c5f 100644 --- a/sys/arch/sparc64/dev/vldcp.c +++ b/sys/arch/sparc64/dev/vldcp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vldcp.c,v 1.18 2019/10/12 15:55:31 cheloha Exp $ */ +/* $OpenBSD: vldcp.c,v 1.19 2019/12/19 12:04:38 reyk Exp $ */ /* * Copyright (c) 2009, 2012 Mark Kettenis * @@ -584,7 +584,7 @@ vldcppoll(dev_t dev, int events, struct proc *p) sc = vldcp_lookup(dev); if (sc == NULL) - return (ENXIO); + return (POLLERR); lc = &sc->sc_lc; s = spltty(); -- cgit v1.2.3