Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ic In siisata_intr_port(), skip reading the error co...



details:   https://anonhg.NetBSD.org/src/rev/298303617143
branches:  trunk
changeset: 955764:298303617143
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sat Oct 10 20:27:54 2020 +0000

description:
In siisata_intr_port(), skip reading the error condition if
ata_queue_get_active_xfer() returns NULL.

PR kern/55682.  Fix suggested by mlelstv@.

diffstat:

 sys/dev/ic/siisata.c |  11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diffs (32 lines):

diff -r 0f54decd603e -r 298303617143 sys/dev/ic/siisata.c
--- a/sys/dev/ic/siisata.c      Sat Oct 10 19:51:48 2020 +0000
+++ b/sys/dev/ic/siisata.c      Sat Oct 10 20:27:54 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: siisata.c,v 1.42 2020/04/13 10:49:34 jdolecek Exp $ */
+/* $NetBSD: siisata.c,v 1.43 2020/10/10 20:27:54 thorpej Exp $ */
 
 /* from ahcisata_core.c */
 
@@ -79,7 +79,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: siisata.c,v 1.42 2020/04/13 10:49:34 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: siisata.c,v 1.43 2020/10/10 20:27:54 thorpej Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -540,10 +540,9 @@
                tfd = ATACH_ERR_ST(WDCE_CRC, WDCS_ERR);
 
                if (ec <= PR_PCE_DATAFISERROR) {
-                       if (ec == PR_PCE_DEVICEERROR
-                           && (chp->ch_flags & ATACH_NCQ) == 0) {
-                               xfer = ata_queue_get_active_xfer(chp);
-
+                       if (ec == PR_PCE_DEVICEERROR &&
+                           (chp->ch_flags & ATACH_NCQ) == 0 &&
+                           (xfer = ata_queue_get_active_xfer(chp)) != NULL) {
                                /* read in specific information about error */
                                uint32_t prbfis = bus_space_read_stream_4(
                                    sc->sc_prt, sc->sc_prh,



Home | Main Index | Thread Index | Old Index