aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2024-06-27 13:29:23 +0000
committerAlexander Motin <mav@FreeBSD.org>2024-06-27 13:29:23 +0000
commit87085c12ba8fa51f777bc636df67008b45e20d1c (patch)
tree37254857d3942186057c824bf0842f3e4567f10d
parenta743e280ea0541163afa7d1c320504925a02f80b (diff)
downloadsrc-87085c12ba8fa51f777bc636df67008b45e20d1c.tar.gz
src-87085c12ba8fa51f777bc636df67008b45e20d1c.zip
Fix SATA NCQ error recovery after 25375b1415
Since that commit ahci(4), siis(4) and mvs(4) drivers ended up using wrong command to fetch error information for NCQ commands. Since ATA errors are not very informative to begin with, the only noticeable effect is a lack of retries on those errors by CAM. MFC after: 1 week PR: 279978
-rw-r--r--sys/dev/ahci/ahci.c2
-rw-r--r--sys/dev/mvs/mvs.c2
-rw-r--r--sys/dev/siis/siis.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/ahci/ahci.c b/sys/dev/ahci/ahci.c
index b8cca377e47f..2910247d9327 100644
--- a/sys/dev/ahci/ahci.c
+++ b/sys/dev/ahci/ahci.c
@@ -2175,7 +2175,7 @@ completeall:
}
xpt_setup_ccb(&ccb->ccb_h, ch->hold[i]->ccb_h.path,
ch->hold[i]->ccb_h.pinfo.priority);
- if (ccb->ccb_h.func_code == XPT_ATA_IO) {
+ if (ch->hold[i]->ccb_h.func_code == XPT_ATA_IO) {
/* READ LOG */
ccb->ccb_h.recovery_type = RECOVERY_READ_LOG;
ccb->ccb_h.func_code = XPT_ATA_IO;
diff --git a/sys/dev/mvs/mvs.c b/sys/dev/mvs/mvs.c
index 253fdc096475..9677d16f088c 100644
--- a/sys/dev/mvs/mvs.c
+++ b/sys/dev/mvs/mvs.c
@@ -1798,7 +1798,7 @@ completeall:
}
xpt_setup_ccb(&ccb->ccb_h, ch->hold[i]->ccb_h.path,
ch->hold[i]->ccb_h.pinfo.priority);
- if (ccb->ccb_h.func_code == XPT_ATA_IO) {
+ if (ch->hold[i]->ccb_h.func_code == XPT_ATA_IO) {
/* READ LOG */
ccb->ccb_h.recovery_type = RECOVERY_READ_LOG;
ccb->ccb_h.func_code = XPT_ATA_IO;
diff --git a/sys/dev/siis/siis.c b/sys/dev/siis/siis.c
index ad370c99f85e..e5b0b8b1f009 100644
--- a/sys/dev/siis/siis.c
+++ b/sys/dev/siis/siis.c
@@ -1394,7 +1394,7 @@ completeall:
}
xpt_setup_ccb(&ccb->ccb_h, ch->hold[i]->ccb_h.path,
ch->hold[i]->ccb_h.pinfo.priority);
- if (ccb->ccb_h.func_code == XPT_ATA_IO) {
+ if (ch->hold[i]->ccb_h.func_code == XPT_ATA_IO) {
/* READ LOG */
ccb->ccb_h.recovery_type = RECOVERY_READ_LOG;
ccb->ccb_h.func_code = XPT_ATA_IO;