Date: Wed, 19 Feb 2025 00:19:11 GMT From: Warner Losh <imp@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 417e57b4764a - stable/14 - hptrr: Better error recovery Message-ID: <202502190019.51J0JBwv052983@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=417e57b4764ae29e3fbcb7e17466fa6c55fa95a1 commit 417e57b4764ae29e3fbcb7e17466fa6c55fa95a1 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2025-02-05 01:31:25 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2025-02-18 23:59:44 +0000 hptrr: Better error recovery This bug and https://www.mail-archive.com/freebsd-stable@freebsd.org/msg124458.html both have this fix. It turns unknown errors into an autosense failure, which causes us to grab the sense buffer manually. It also sets a condition that we use to retry timed out commands that jmg reports as being helpful. I'm torn on committing it. The code seems fine in terms of fixing things. But this is a 10-year-old bug with few other bugs and a short CC list for a driver that might go away in 15 anyway. I'm going to commit and close the bug, and MFC it in a week, unless someone complains (which seems unliekly, given the age of this hardware, I susepct most of it is out of service). Suggested by: jmg, Scott Long PR: 191135 MFC After: 1 week Reviewed by: imp (cherry picked from commit f52154a2044a4d1f324952af05542f93fdf0a088) --- sys/dev/hptrr/hptrr_osm_bsd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/hptrr/hptrr_osm_bsd.c b/sys/dev/hptrr/hptrr_osm_bsd.c index 055ad13b14cb..8061f7bcafb7 100644 --- a/sys/dev/hptrr/hptrr_osm_bsd.c +++ b/sys/dev/hptrr/hptrr_osm_bsd.c @@ -463,7 +463,7 @@ static void os_cmddone(PCOMMAND pCmd) ccb->ccb_h.status = CAM_BUSY; break; default: - ccb->ccb_h.status = CAM_SCSI_STATUS_ERROR; + ccb->ccb_h.status = CAM_AUTOSENSE_FAIL; break; } @@ -557,7 +557,7 @@ static void hpt_scsi_io(PVBUS_EXT vbus_ext, union ccb *ccb) ccb->ccb_h.target_id >= osm_max_targets || (ccb->ccb_h.flags & CAM_CDB_PHYS)) { - ccb->ccb_h.status = CAM_TID_INVALID; + ccb->ccb_h.status = CAM_SEL_TIMEOUT; xpt_done(ccb); return; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202502190019.51J0JBwv052983>