Skip to content

Commit

Permalink
As a minor optimization, do suspended checking more like it was origi…
Browse files Browse the repository at this point in the history
…nally

in the PR - before the while loop.
  • Loading branch information
dg authored and dg committed Sep 17, 2000
1 parent 683279a commit 46ce32e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion sys/dev/fxp/if_fxp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion sys/pci/if_fxp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 46ce32e

Please sign in to comment.