From 67af9f2b1cdcb9e0eb45c46161f6403efdac719f Mon Sep 17 00:00:00 2001 From: miod Date: Wed, 14 Jan 2015 21:14:49 +0000 Subject: [PATCH] When the outcome of the watchdog processing is a reset, do not bother checking further pending requests, since they will be forcefully failed by the reset routine. --- sys/arch/sparc/dev/xd.c | 6 ++++-- sys/arch/sparc/dev/xy.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/sys/arch/sparc/dev/xd.c b/sys/arch/sparc/dev/xd.c index 36f05375f69..8d1c1196c73 100644 --- a/sys/arch/sparc/dev/xd.c +++ b/sys/arch/sparc/dev/xd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xd.c,v 1.67 2015/01/14 21:13:46 miod Exp $ */ +/* $OpenBSD: xd.c,v 1.68 2015/01/14 21:14:49 miod Exp $ */ /* $NetBSD: xd.c,v 1.37 1997/07/29 09:58:16 fair Exp $ */ /* @@ -2088,8 +2088,10 @@ xdc_tick(arg) XD_STATE(xdcsc->reqs[lcv].mode) == XD_SUB_DONE) continue; xdcsc->reqs[lcv].ttl--; - if (xdcsc->reqs[lcv].ttl == 0) + if (xdcsc->reqs[lcv].ttl == 0) { reset = 1; + break; /* we're going to fail all requests anyway */ + } } if (reset) { printf("%s: watchdog timeout\n", xdcsc->sc_dev.dv_xname); diff --git a/sys/arch/sparc/dev/xy.c b/sys/arch/sparc/dev/xy.c index 3be42a1dfcb..e776a59d03d 100644 --- a/sys/arch/sparc/dev/xy.c +++ b/sys/arch/sparc/dev/xy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xy.c,v 1.64 2015/01/14 21:13:46 miod Exp $ */ +/* $OpenBSD: xy.c,v 1.65 2015/01/14 21:14:49 miod Exp $ */ /* $NetBSD: xy.c,v 1.26 1997/07/19 21:43:56 pk Exp $ */ /* @@ -1897,8 +1897,10 @@ xyc_tick(arg) XY_STATE(xycsc->reqs[lcv].mode) == XY_SUB_DONE) continue; xycsc->reqs[lcv].ttl--; - if (xycsc->reqs[lcv].ttl == 0) + if (xycsc->reqs[lcv].ttl == 0) { reset = 1; + break; /* we're going to fail all requests anyway */ + } } if (reset) { printf("%s: watchdog timeout\n", xycsc->sc_dev.dv_xname); -- 2.20.1