opnsense-src/sys/cam/scsi
Warner Losh 6a0afbcbf6 cam: Add 3e/3 as a fatal code
We see this error:

(da4:mps0:0:3:0): SCSI sense: HARDWARE FAILURE asc:3e,3 (Logical unit failed self-test)

for drives that have failed. Our vendor tells us there's no recovery
from that state, though we can still grab logs from the drives and run
their diagnostics. Drives in this state need to bascially be
remanufactured because some part of them has failed. The prior default
behavior is to retry, and retrying takes a long time to work
out. Instead, short-circuit the retries and fail right away. I selected
ENXIO because no I/O to LBAs is possible for drives in this state (both
my experience and per vendor). Some googling suggests that other vendors
behave identically, but it was inconclusive. Should this be too
pessimistic, we can adjust in the future. Also, this is with some aging
drives in our fleet, and if we have more than one drive in this state,
our systems take so long to get to mountroot that the watchdog fires
sometimes. Adding this patch makes them boot reliably again.

MFC After:		1 week
Sponsored by:		Netflix
Reviewed by:		mav
Differential Revision:	https://reviews.freebsd.org/D48505

(cherry picked from commit a8b49e7c66)
2025-01-24 15:34:19 -07:00
..
scsi_all.c cam: Add 3e/3 as a fatal code 2025-01-24 15:34:19 -07:00
scsi_all.h cam: Make <cam/scsi/scsi_all.h> more self-contained 2024-01-02 11:20:36 -08:00
scsi_cd.c scsi_cd: Remove commented-out code 2024-02-09 09:55:45 -05:00
scsi_cd.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
scsi_ch.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
scsi_ch.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
scsi_da.c da: Add quirk for ADATA USB Drive 2024-11-12 21:55:04 -07:00
scsi_da.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
scsi_enc.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
scsi_enc.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
scsi_enc_internal.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
scsi_enc_safte.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
scsi_enc_ses.c ses: Add error checking for copyout() calls 2024-01-01 19:29:50 -05:00
scsi_iu.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
scsi_message.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
scsi_pass.c kern: Make fileops and filterops tables const where possible 2024-12-03 01:03:42 +00:00
scsi_pass.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
scsi_pt.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
scsi_pt.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
scsi_sa.c sa: Make sa_param_table[] const and static 2024-01-04 08:42:35 -05:00
scsi_sa.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
scsi_ses.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
scsi_sg.c cam: Let cam_periph_unmapmem() return an error 2024-01-11 09:22:37 -05:00
scsi_sg.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
scsi_targ_bh.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
scsi_target.c kern: Make fileops and filterops tables const where possible 2024-12-03 01:03:42 +00:00
scsi_targetio.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
scsi_xpt.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
smp_all.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
smp_all.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00