From 808f8a9fffb357eef8c99344ca9e32dadc538415 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Thu, 3 Jun 2010 17:48:25 +0000 Subject: take care of some half-baked CPU temperature readings seen in wild from Mikko Tolmunen --- sys/dev/isa/uguru.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sys') diff --git a/sys/dev/isa/uguru.c b/sys/dev/isa/uguru.c index cdb82a4240b..dafe8cab419 100644 --- a/sys/dev/isa/uguru.c +++ b/sys/dev/isa/uguru.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uguru.c,v 1.3 2010/04/20 06:44:49 deraadt Exp $ */ +/* $OpenBSD: uguru.c,v 1.4 2010/06/03 17:48:24 deraadt Exp $ */ /* * Copyright (c) 2010 Mikko Tolmunen @@ -1024,6 +1024,10 @@ uguru_write_multi(bus_space_tag_t iot, bus_space_handle_t ioh, goto timeout; DELAY(5); } + /* dummy read to flush the internal buffer */ + if (i == 0) + UGURU_READ(iot, ioh, UGURU_DATA); + UGURU_WRITE(iot, ioh, UGURU_DATA, *inbuf++); } return 0; -- cgit v1.2.3