From b184b38e2b9e21afd6f3cbdeba70fea8db5bcdb6 Mon Sep 17 00:00:00 2001 From: David Greenman Date: Sun, 17 Sep 2000 23:04:57 +0000 Subject: As a minor optimization, do suspended checking more like it was originally in the PR - before the while loop. --- sys/dev/fxp/if_fxp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'sys/dev') diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c index 08dd15cc8739..f10e58c806fe 100644 --- a/sys/dev/fxp/if_fxp.c +++ b/sys/dev/fxp/if_fxp.c @@ -1218,7 +1218,12 @@ fxp_intr(arg) FXP_LOCK(sc, s); - while (!sc->suspended && (statack = CSR_READ_1(sc, FXP_CSR_SCB_STATACK)) != 0) { + if (sc->suspended) { + FXP_UNLOCK(sc, s); + return; + } + + while ((statack = CSR_READ_1(sc, FXP_CSR_SCB_STATACK)) != 0) { #if defined(__NetBSD__) claimed = 1; #endif -- cgit v1.3