[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
PR/56403 CVS commit: src/sys/dev
The following reply was made to PR kern/56403; it has been noted by GNATS.
From: "Rin Okuyama" <rin%netbsd.org@localhost>
Subject: PR/56403 CVS commit: src/sys/dev
Date: Tue, 5 Oct 2021 08:01:06 +0000
Module Name: src
Committed By: rin
Date: Tue Oct 5 08:01:05 UTC 2021
src/sys/dev/ata: ata.c ata_wdc.c atavar.h
src/sys/dev/ic: ahcisata_core.c mvsata.c siisata.c wdc.c
Fix kernel freeze for wdc(4) variants with ATAC_CAP_NOIRQ:
(1) Change ata_xfer_ops:c_poll from void to int function. When it returns
ATAPOLL_AGAIN, let ata_xfer_start() iterate itself again.
(2) Let wdc_ata_bio_poll() return ATAPOLL_AGAIN until ATA_ITSDONE is
A similar change has been made for mvsata(4) (see mvsata_bio_poll()),
and no functional changes for other devices.
This is how the drivers worked before jdolecek-ncq branch was merged.
Note that this changes are less likely to cause infinite recursion:
(1) wdc_ata_bio_intr() called from wdc_ata_bio_poll() asserts ATA_ITSDONE
in its error handling paths via wdc_ata_bio_done().
(2) Return value from c_start (= wdc_ata_bio_start()) is checked in
Therefore, errors encountered in ata_xfer_ops:c_poll and c_start routines
terminate the recursion for wdc(4). The situation is similar for mvsata(4).
Still, there is a possibility where ata_xfer_start() takes long time to
finish a normal operation. This can result in a delayed response for lower
priority interrupts. But, I've never observed such a situation, even when
heavy thrashing takes place for swap partition in wd(4).
"Go ahead" by jdolecek@.
To generate a diff of this commit:
cvs rdiff -u -r1.163 -r1.164 src/sys/dev/ata/ata.c
cvs rdiff -u -r1.119 -r1.120 src/sys/dev/ata/ata_wdc.c
cvs rdiff -u -r1.108 -r1.109 src/sys/dev/ata/atavar.h
cvs rdiff -u -r1.101 -r1.102 src/sys/dev/ic/ahcisata_core.c
cvs rdiff -u -r1.60 -r1.61 src/sys/dev/ic/mvsata.c
cvs rdiff -u -r1.48 -r1.49 src/sys/dev/ic/siisata.c
cvs rdiff -u -r1.307 -r1.308 src/sys/dev/ic/wdc.c
cvs rdiff -u -r1.140 -r1.141 src/sys/dev/scsipi/atapi_wdc.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Main Index |
Thread Index |