Module Name: src Committed By: nat Date: Tue Oct 29 15:58:14 UTC 2024
Modified Files: src/sys/dev/ic: ncr5380sbc.c Log Message: A simpler fix for handling aborted requests. >From riastradh@. To generate a diff of this commit: cvs rdiff -u -r1.73 -r1.74 src/sys/dev/ic/ncr5380sbc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/ic/ncr5380sbc.c diff -u src/sys/dev/ic/ncr5380sbc.c:1.73 src/sys/dev/ic/ncr5380sbc.c:1.74 --- src/sys/dev/ic/ncr5380sbc.c:1.73 Tue Oct 29 15:50:07 2024 +++ src/sys/dev/ic/ncr5380sbc.c Tue Oct 29 15:58:14 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: ncr5380sbc.c,v 1.73 2024/10/29 15:50:07 nat Exp $ */ +/* $NetBSD: ncr5380sbc.c,v 1.74 2024/10/29 15:58:14 nat Exp $ */ /* * Copyright (c) 1995 David Jones, Gordon W. Ross @@ -71,7 +71,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ncr5380sbc.c,v 1.73 2024/10/29 15:50:07 nat Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ncr5380sbc.c,v 1.74 2024/10/29 15:58:14 nat Exp $"); #include "opt_ddb.h" @@ -807,11 +807,18 @@ finish: sr->sr_xs = NULL; sc->sc_ncmds--; + const bool aborting = sc->sc_state & NCR_ABORTING; + if (aborting) + scsipi_channel_freeze(&sc->sc_channel, 1); + /* Tell common SCSI code it is done. */ scsipi_done(xs); sc->sc_state = NCR_IDLE; /* Now ncr5380_sched() may be called again. */ + + if (aborting) + scsipi_channel_thaw(&sc->sc_channel, 1); }