Media error or link error? What SCSI sense codes and Linux ATA log lines can and cannot tell apart
Published 2026-10-10 | Updated 2026-11-14
ATA registers, Linux's error mask and SCSI sense data describe different layers. They can distinguish a reported media error from a transfer error, but do not uniquely identify the failed component. Recovery thresholds produce conditional verdicts, not guaranteed actions: the audited libata path does not force a SATA ATA disk into PIO. A reproducible comparison also shows why decoding must be tied to a kernel revision.
On this page19 sections
- Path analysed
- SATA drive behind a Linux libata host: ATA status and error registers, then libata's own error mask, then the SCSI sense data the SCSI layer sees
- Standard reference
- T10 numeric ASC/ASCQ assignment list, as of 2024-11-28
- Kernel reference
- Linux commit 3857c2fe5449, compared with v6.12 (adc218676eef); full commit IDs in the downloadable results
- Not covered
- SAS-native sense reporting from real drives, hardware RAID controllers, tape drive logs, any measured rates
Status, category and detail are different fields
SCSI is a command architecture as well as a standards family, not just the old parallel bus. SAS and iSCSI carry SCSI commands. T10's standards structure and RFC 7143 distinguish the commands from their transport.
CHECK CONDITION is status 02h, not a diagnosis. The sense key identifies a broad category; the ASC and ASCQ refine it as a pair. An invalid request or a changed device state is not automatically a hardware failure. iSCSI returns sense data with CHECK CONDITION through Autosense, so a separate REQUEST SENSE exchange is not universal.
Zero-based byte offsets for the four response formats. Extract the response code from byte 0 with 0x7f; the sense key occupies the low four bits of its byte, while ASC and ASCQ each occupy one byte. Sources: Linux v6.12 decoder and Seagate reference, section 2.4.1.
| Format | Response | Sense-key byte | ASC byte | ASCQ byte |
|---|---|---|---|---|
| Fixed, current | 70h | 2 | 12 | 13 |
| Fixed, deferred | 71h | 2 | 12 | 13 |
| Descriptor, current | 72h | 1 | 2 | 3 |
| Descriptor, deferred | 73h | 1 | 2 | 3 |
Check the received length and the format's declared length before decoding fields. Linux's helper initializes its output to zero and conditionally copies available bytes. Our interpretation: an omitted field is unknown, not an observed 00h/00h pair. Retain raw bytes and length when investigating incomplete reports.
Current and deferred describe command context, not logging delay. A deferred report can concern an earlier command already reported completed; the command receiving that report need not be its cause. Check device-type applicability and vendor documentation before assigning a physical cause to an ASC/ASCQ pair. T10's web tables are informative: the applicable written standard takes precedence.
Discovery: a short list is not a missing device
REPORT LUNS reports addresses accessible through an initiator-target nexus, filtered by SELECT REPORT. Even 02h means all accessible LUNs, not every unit in an array. A missing entry therefore needs its discovery context before it becomes a failure diagnosis. See Seagate Rev. M, section 3.36.
Oracle's documented two-LUN example separates allocation from inventory: a 16-byte buffer receives an eight-byte header and one eight-byte descriptor. LUN LIST LENGTH still reports 16 descriptor bytes, so the unchanged full response needs 24 bytes. One decoded entry is not evidence of only one available unit. This is documented arithmetic, not captured device I/O.
Our reader guidance: retain the nexus, SELECT REPORT and actual received length. Check a complete header and complete descriptors, bound length arithmetic, and re-check a larger response after retry. Two requests do not prove an atomic inventory snapshot. The allocation minimum in Oracle's library manual is product-specific.
Discovery is also not readiness: Seagate permits a list response while other commands are unready. Nor does a LUN alone establish persistent identity; select a logical-unit-associated designator from the device-identification descriptors when correlating paths to the same unit. Enumeration does not verify stored data.
Host discovery adds another filter. Linux v6.12 probes returned LUNs separately with INQUIRY. Its sequential fallback can stop at the first missing LUN unless sparse scanning applies. Device quirks and host limits also influence scanning. A host inventory therefore need not reproduce the target's list. This is version-specific source inspection, not an executed rescan.
The historical problem was already explicit in Bottomley's OLS 2002 paper: probing depended on exception flags controlling whether LUNs should be scanned. The paper proposed moving more discovery policy into user space. That design proposal explains the motivation; it does not document today's implementation.
Read the field before interpreting an abort
TASK ABORTED is command status 40h. ABORTED COMMAND is sense key 0Bh. A CHECK CONDITION status can accompany the latter. These names are not interchangeable diagnoses; Linux keeps the constants in separate groups. See the pinned header and T10 assignment.
Reference values, not observations from a device. The final three rows are decimal process exit categories documented by sg3_utils v1.46. A process exit of 40 is not SCSI status 40h.
| Field | Value | Meaning |
|---|---|---|
| SCSI command status | 40h (hex) | TASK ABORTED |
| SCSI sense key | 0Bh (hex) | ABORTED COMMAND |
| sg3_utils process exit | 29 (decimal) | TASK ABORTED status |
| sg3_utils process exit | 11 (decimal) | ABORTED COMMAND category |
| sg3_utils process exit | 40 / 41 (decimal) | ABORTED COMMAND with ASC=10h; 41 adds valid Information |
A library category is another boundary. In the pinned sg3_utils v1.46 API contract, sg_err_category_sense does not return the Information-bearing category 41. Its implementation selects category 40 from sense key 0Bh and ASC=10h without testing Information validity. Category 40 therefore does not prove that Information is invalid. Preserve the original sense buffer and identify the caller before interpreting a library result as a utility exit. This is a source-code finding, not an observed device response.
An offline check of four synthetic buffers using Ubuntu's libsgutils2 package 1.46-3ubuntu4.1 confirms the distinction: both ASC=10h inputs returned category 40, while a separate Information extractor reported one invalid field and one valid value of 123. The two ASC=47h controls both returned 11. These are library-call results, not process exits or disk observations. The Python reproducer records all input bytes, the library's internal version and its SHA-256 hash; it issues no device I/O.
Reporting depends on context. The Seagate Control mode page describes TAS=1 reporting for tasks aborted by actions on a different initiator-target nexus from the one that received the command. TAS=0 suppresses the response for that aborted task, not necessarily every other notification. Do not equate successful cancellation with receiving status 40h.
For sense key 0Bh, keep ASC/ASCQ and the original command. The reference describes retry as a possible recovery, not a guarantee. Our diagnostic interpretation: neither the word aborted nor these codes alone establishes that no data changed. Check the operation's recovery rules before repeating a write. This is source synthesis, not a new device experiment.
A decoded value is not automatically a failing LBA
The SCSI Information field needs its own interpretation. Its meaning comes from the device type and reported command, not the sense key alone. Information and Command-specific Information are separate fields.
| Format | Information bytes | Width | Validity |
|---|---|---|---|
| Fixed (70h/71h) | 3-6 | 32 bits | Byte 0, bit 7 |
| Descriptor type 00h | 4-11 | 64 bits | Descriptor byte 2, bit 7 |
In Seagate Rev. M, sections 2.4.1.1.2-3 and 2.4.1.2, type 00h has additional length 0Ah and requires VALID=1 when returned. Type 01h is Command-specific Information, not another copy of type 00h. A fixed-format VALID=0 does not establish a valid command-defined address.
The pinned Linux v6.12 extraction helper separates its Boolean return from the numeric output. It reads big-endian values at the widths above. A false return leaves the output argument unchanged in this implementation; discard that output unless the return is true. Reusing a previous value after a failed extraction can otherwise turn missing evidence into a stale address. Its descriptor branch checks type and additional length but does not independently check the descriptor's VALID bit; do not treat this helper as a complete validator for arbitrary captured bytes. The descriptor search also does not establish the complete payload's availability merely by finding a matching type.
Our diagnostic rule: retain the actual received length, declared lengths, validity and original command together. Check that the whole field is available before decoding. Missing or truncated information is unknown, not LBA zero. Conversely, a valid value of zero must remain representable. Only label the value an LBA when the command contract gives it that meaning; do not use a numeric truthiness check as an availability test.
This source review adds interpretation guidance, not new drive measurements. For command-dependent residuals and deferred errors, see the existing tape/deferred-error evidence.
Find the rejected command field before blaming the media
For ILLEGAL REQUEST, a valid SCSI field pointer locates a byte in the submitted command or its parameter data, not a failing disk block. C/D=1 selects the CDB; C/D=0 selects data parameters. Byte numbering starts at zero. BPV=0 means no valid bit position, not bit zero. A multi-byte field is identified by its first byte; a pointer localizes the rejected field. See the field definitions.
Fixed-format sense uses bytes 15-17, gated by SKSV. Descriptor format places the same three bytes at offsets 4-6 within the type-02h descriptor, whose additional length is 06h. A conforming descriptor has SKSV=1. Decode the sense key first: MEDIUM ERROR can instead use this area for a retry count. The Rev. M reference contains an inconsistency: one introductory sentence says type 01h, but Tables 14 and 17 say 02h. The pinned sg3_utils decoder also dispatches sense-key-specific data as type 02h; type 01h is Command-specific Information. Rev. M also cautions that the indicated byte need not be the byte that must change to correct the problem.
A decoder can print an invalid descriptor
Twelve invented buffers were passed to the installed sg3-utils 1.46-3ubuntu4.1 decoder (utility version 1.21, dated 20190602), without opening a device. In the descriptor pair below, changing only SKSV from 1 to 0 leaves the printed byte/bit position unchanged. The fixed-format path suppresses the pointer for the corresponding invalid case. This is a version-specific offline observation, not a measurement of malformed drive responses.
| Input | Control | Observed decoder text |
|---|---|---|
| Fixed, ILLEGAL REQUEST | C/D=1, BPV=1, SKSV=1 | Command: byte 8 bit 2 |
| Fixed, ILLEGAL REQUEST | C/D=0, BPV=1, SKSV=1 | Data parameters: byte 8 bit 2 |
| Fixed, ILLEGAL REQUEST | BPV=0; low bits still 2 | Command: byte 8; no bit position |
| Fixed, ILLEGAL REQUEST | SKSV=0 | No command field pointer printed |
| Descriptor, ILLEGAL REQUEST | SKSV=1 (valid control) | Command: byte 8 bit 2 |
| Descriptor, ILLEGAL REQUEST | SKSV=0 (malformed) | Command: byte 8 bit 2 |
| Descriptor, MEDIUM ERROR | Same numeric payload 00 08 | Actual retry count: 8 |
Preserve the raw bytes and received length. Reject an incomplete or invalid field before treating its printed value as evidence. Decoder exit status zero means the tool ran successfully; it does not certify protocol validity. The fixtures also cover a valid zero position and truncated fixed/descriptor buffers.
Reproduce offline with the Python runner and input fixtures in one directory. Run python3 probe.py with sg_decode_sense installed. All 12 observations include stdout, input lengths, executable hash and capture time. A different decoder version may differ.
SG_IO completion is not one success bit
A Linux SG_IO call can return zero while the response reports a SCSI or host error. In v6.12's block-device path, scsi_complete_sghdr_rq copies command status into output fields; it does not simply return that status as the system-call result. Inspect the completion function. Preserve these observations together:
- System-call result
- Check the return value and, on failure, errno. A successful ioctl is not itself a GOOD command status.
- status / host_status / driver_status
- Interpret the SCSI and host/driver result fields, plus the defined status mask in info. CHECK CONDITION calls for sense interpretation; it is not automatically a failed disk.
- sb_len_wr / resid
- The first counts returned sense bytes. The second is the residual data-byte count: requested
dxfer_lenminus transferred bytes. Neither is a replacement for status.
Arithmetic example, not a device observation: a 512-byte request with a valid residual of 160 reports 352 transferred bytes. Whether that is acceptable depends on the command. A permitted variable-length response is different from an incomplete fixed-length response. Reject an out-of-range residual before subtracting it or using the result as a buffer bound. The v3 ABI defines these quantities separately.
A zero residual is not a universal completeness proof. The historical SG HOWTO describes unsupported or inaccurate residual reporting. Do not project that warning into a measured defect rate for today's adapters. Verify the actual reporting path and command contract; retain raw sense bytes and their received length, not just a decoder's zero-filled output.
The research connection is error propagation, not a new hardware finding. Gunawi and colleagues' EIO paper (FAST 2008) analyzes Linux 2.6.15.4 error-code flow. Its sections 3.1.3 and 5 distinguish alternate error channels, transformations and asynchronous paths; merely observing a conditional check does not prove correct recovery. Our operational inference is to preserve the response's separate evidence fields instead of reducing them to one success flag. We did not rerun that study or send commands to a device.
Unit Attention reports a state change, not a failed disk
Sense data is the structured explanation, not the command status itself. Unit Attention uses sense key 06h; CHECK CONDITION uses status 02h. Do not put those values in the same namespace. The additional pair matters: 29h/00h groups power-on and reset possibilities; it does not isolate a power-supply fault. A 2Ah/09h report concerns changed capacity data, not an unreadable sector. T10 key assignments and ASC/ASCQ assignments are informative code lists, not component diagnoses.
A diagnostic request can change what remains observable
In Linux v6.12's target implementation, pending Unit Attentions belong to an initiator-mapped device entry. Its REQUEST SENSE helper selects the first queued pair, described by the code as highest priority, and clears all pending conditions on that entry. This is a version-specific implementation observation, not a promise about every SCSI device. A second poll therefore need not reproduce the first. Inspect the target's clearing helper.
The associated spc_emulate_request_sense builds the Unit Attention payload and completes the request with GOOD status. GOOD describes that request's completion; it does not mean its payload reported no condition. Inspect REQUEST SENSE emulation. This explicit request is different from iSCSI autosense, which carries sense data in the original CHECK CONDITION response. RFC 7143, section 11.4.7.
Response length and consumption must be considered together. This v6.12 target rejects a REQUEST SENSE command with DESC set before invoking the clearing helper. Buffer-mapping failure also returns before that helper. Once reached, it clears pending conditions before copying the length-limited payload. A short successful response therefore need not preserve every field of the consumed notification. Retain the first response and its actual length; requesting more bytes later is not a guaranteed way to recover the same condition. Validation and copy ordering.
An identity query does not acknowledge the notification
Seagate's Rev. L reference specifies that INQUIRY executes without clearing a pending Unit Attention. A successful identity query therefore does not establish that the notification was consumed. CHECK CONDITION reporting has a separate clearing policy: the manual's UA_INTLCK_CTRL table distinguishes configurations that clear the reported condition from configurations that retain it. That retention does not make REQUEST SENSE non-consuming: Table 454's footnote says it still clears the reported condition. Do not turn a successful probe into a claim that all pending state changes have been acknowledged. INQUIRY and clearing policy, pages 104 and 464.
Kernel dispositions are another namespace
In the initiator-side scsi_check_sense function, an expected reset can lead to NEEDS_RETRY, but that branch excludes the 28h/00h medium-change pair. The fallback SUCCESS passes the Unit Attention upward for a completion decision; it is not SCSI GOOD and does not certify successful data I/O. Device-handler callbacks and earlier branches also affect the result. Linux v6.12 handling.
Investigation record: retain the command, initiator and LUN identity, status, raw sense bytes and length, timestamp, reset history and diagnostic-request order. Our inference is to preserve the first observation before probing again, not to retry every Unit Attention or declare every notification harmless.
EIO (FAST 2008), sections 3.1.3 and 5.2-5.3 explains why alternate error channels and transformed return values complicate diagnosis. Its Linux 2.6.15.4 study is historical context, not evidence of a present-day Unit Attention failure rate. This supplement is a source review; no device commands or kernel recovery experiment were run.
What a readiness probe actually establishes
TEST UNIT READY (TUR) asks about readiness; it does not request a self-test. Seagate's Rev. H reference, section 3.53 also allows responses such as BUSY or RESERVATION CONFLICT. Do not reduce every completion to a binary ready/not-ready verdict.
NOT READY can report absent media or a logical unit becoming ready, not necessarily broken hardware. CHECK CONDITION needs its sense details: in the Oracle SL4000 interface, it can report a pending Unit Attention. That library's readiness to accept commands is not a claim about a tape drive's loaded medium.
Diagnostic interpretation: GOOD on a readiness probe does not verify stored bytes, checksum integrity, write durability or future command success. Retain the addressed logical unit, command status and returned sense, then use evidence specific to the operation being investigated. These are source-based distinctions, not observed device-test results.
Bairavasundaram et al. (SIGMETRICS 2007), section 3.3 distinguish two sector-checking mechanisms in their storage system. Neither is a readiness probe. Their study did not measure TUR detection sensitivity.
| Operation | What is checked | Boundary |
|---|---|---|
| TEST UNIT READY | Logical-unit readiness | No requested sector sweep |
| Media scrub (study) | SCSI VERIFY with drive-internal ECC | No data transfer to the storage layer |
| Data scrub (study) | Sector reads and stored-checksum comparison | Checked data, not future writes |
Operational implication: distinguish readiness checks from scrubbing and latent-sector-error discovery. Record the checked range, completion and validation method. Historical findings from one storage-system population do not establish a modern drive's error rate or a universal scrub interval. See our analysis of detection and repair boundaries.
From ATA error bits to SCSI sense data
| ATA register value (hex) | ATA meaning (include/linux/ata.h) | Sense key (hex) | ASC/ASCQ (hex) | T10 name of that code | Class | Source |
|---|---|---|---|---|---|---|
| error 0x40 | UNC: uncorrectable media error | 03h MEDIUM ERROR | 11h/04h | UNRECOVERED READ ERROR - AUTO REALLOCATE FAILED | media | Linux translation source |
| error 0x84 | ICRC with ABRT: interface CRC error | 0Bh ABORTED COMMAND | 47h/00h | SCSI PARITY ERROR (T10 lists data-phase CRC separately as 47h/01h) | link | Linux translation source |
| error 0x01 | AMNF: address mark not found | 03h MEDIUM ERROR | 13h/00h | ADDRESS MARK NOT FOUND FOR DATA FIELD | media | Linux translation source |
| error 0x10 | IDNF: ID not found | 05h ILLEGAL REQUEST | 21h/00h | LOGICAL BLOCK ADDRESS OUT OF RANGE | addressing (a media-format cause is not distinguished) | Linux translation source |
| status DF bit | Device fault | 04h HARDWARE ERROR | 44h/00h | INTERNAL TARGET FAILURE | device | Linux translation source |
| status BSY bit | Device busy, error bits invalid | 0Bh ABORTED COMMAND | 00h/00h | NO ADDITIONAL SENSE INFORMATION | unknown | Linux translation source |
Codes T10 assigns that separate link from media
| ASC/ASCQ (hex) | T10 name | Applies to disks (D) | Class | Source |
|---|---|---|---|---|
| 11h/00h | UNRECOVERED READ ERROR | yes | media | T10 ASC/ASCQ list |
| 11h/01h | READ RETRIES EXHAUSTED | yes | media | T10 ASC/ASCQ list |
| 0Ch/02h | WRITE ERROR - AUTO REALLOCATION FAILED | yes | media | T10 ASC/ASCQ list |
| 47h/01h | DATA PHASE CRC ERROR DETECTED | yes | link | T10 ASC/ASCQ list |
| 47h/03h | INFORMATION UNIT iuCRC ERROR DETECTED | yes | link | T10 ASC/ASCQ list |
| 08h/03h | LOGICAL UNIT COMMUNICATION CRC ERROR (ULTRA-DMA/32) | yes | link | T10 ASC/ASCQ list |
| 44h/00h | INTERNAL TARGET FAILURE | yes | device internal | T10 ASC/ASCQ list |
| 5Dh/00h | FAILURE PREDICTION THRESHOLD EXCEEDED | yes | prediction flag, not a fault | T10 ASC/ASCQ list |
What the kernel log line means
| Emask (hex) | String printed | Meaning per kernel wiki | Kernel action per libata-eh.c | Source |
|---|---|---|---|---|
| 0x10 | ATA bus error | Chip-to-device bus error | Reset scheduled; DEV, MEDIA and INVALID bits of the same command are cleared as probably spurious | Linux recovery source |
| 0x8 | media error | Software detected a media error | Set from the UNC or AMNF error bit; no reset by this rule | Linux recovery source |
| 0x4 | timeout | Command did not complete within its allowed time; cause unspecified | Reset scheduled; counted toward speed-down | Linux recovery source |
| 0x2 | HSM violation | Hardware did not respond as the host state machine expects | Reset scheduled; HSM is counted in this speed-down category only for I/O commands | Linux recovery source |
| 0x1 | device error | Device reported an error; not by itself a hardware diagnosis | Counted as unknown-device error only for I/O commands without MEDIA or INVALID | Linux recovery source |
Recovery verdicts, not guaranteed actions
| Counted errors | Window (min) | Threshold (errors) | Requested verdict | Source |
|---|---|---|---|---|
| Non-dubious ATA bus + timeout/HSM | 10 | more than 3 | SPEED_DOWN | Linux recovery source |
| Non-dubious timeout/HSM + unknown device | 10 | more than 3 | NCQ_OFF | Linux recovery source |
| Non-dubious unknown device | 10 | more than 6 | SPEED_DOWN | Linux recovery source |
| Non-dubious bus + timeout/HSM + unknown device | 5 | more than 6 | FALLBACK_TO_PIO, subject to caller eligibility | Linux recovery source |
| Dubious bus + timeout/HSM | 5 | more than 1 | SPEED_DOWN + FALLBACK_TO_PIO + KEEP_ERRORS | Linux recovery source |
| Dubious timeout/HSM + unknown device | 5 | more than 1 | NCQ_OFF + KEEP_ERRORS | Linux recovery source |
| Media-only error, without bus/timeout/HSM precedence | none | none | No speed-down category | Linux recovery source |
Why a threshold is not an action
The caller first tries NCQ disabling when eligible, then speed reduction. It takes only one action per invocation. Forced PIO additionally requires prior speed-down steps, a non-PIO mode, and PATA or a SATA ATAPI device. A SATA ATA disk is excluded from that PIO branch. Therefore the verdict table is not a recipe for predicting a disk's next negotiated speed. Pinned recovery source.
Dubious categories concern an as-yet-unverified transfer configuration, not a physical defect label. HSM and unknown-device counting also depend on the I/O flag. A completed mitigation normally clears error history unless KEEP_ERRORS applies. Counting lines in a log is therefore not equivalent to replaying the kernel's categorized error ring.
Source discrepancy: the nearby comment says more than eight combined errors for the five-minute rule, but the executable condition is greater than six. The table follows the code. Correction, 2026-10-13: an earlier version incorrectly described unconditional PIO fallback.
Same input, different kernel translation
We compiled the unchanged ATA-to-sense function from two pinned revisions and supplied the same ten invented byte pairs to each. All values below are hexadecimal; outputs are sense key / ASC / ASCQ. These are source-function tests, not commands sent to a drive. No full recovery path was executed.
| Input case | Status | Error | v6.12 | 3857c2fe5449 |
|---|---|---|---|---|
| UNC | 41 | 40 | 03/11/04 | 03/11/04 |
| ICRC with ABRT | 41 | 84 | 0b/47/00 | 0b/47/00 |
| AMNF | 41 | 01 | 03/13/00 | 03/13/00 |
| IDNF | 41 | 10 | 05/21/00 | 05/21/00 |
| Device fault | 20 | 00 | 04/44/00 | 04/44/00 |
| Busy; error ignored | 80 | 40 | 0b/47/00 | 0b/00/00 |
| DRQ status only | 08 | 00 | 0b/47/00 | 0b/00/00 |
| UNC plus ICRC/ABRT | 41 | c4 | 0b/47/00 | 0b/47/00 |
| Earlier composite-mask match | 41 | d4 | 0b/00/00 | 0b/00/00 |
| ABRT with DRDY/ERR | 41 | 04 | 05/21/04 | 0b/00/00 |
In v6.12, BSY and DRQ status-only cases share 0Bh/47h/00h with the ICRC example. The newer reference changes those status fallbacks. Also, an earlier composite mask can win over the ICRC/ABRT mask. Neither an output code nor a single input bit is a universal fault classifier. v6.12 source and newer pinned source.
Reproduce with Python 3, a C compiler and network access: python3 reproduce.py > results.json. Reproduction script and results with source hashes. Each invocation uses temporary files, downloads the pinned source and fails if expected outputs differ.
A clean error log is not an integrity proof
Bairavasundaram and colleagues' FAST08 paper explicitly separates hardware-reported transport errors from corruption found by higher-layer checks. Its storage systems used checksums, block identity checks and parity verification to detect different classes of corruption. Section 3 describes incomplete observation after drive removal and limits of support-oriented logging. Read the paper, sections 2-3.
Our operational inference: retain filesystem/checksum and application evidence alongside ATA/SCSI reports. The absence of a reported transport error does not verify stored contents. This does not establish the failure rate of a contemporary system. See the existing corruption analysis.
Reading the numbers
Read the complete status/error registers and command context before interpreting a translated sense code. In the pinned translation routine, isolated UNC 40h maps to 03h/11h/04h, whereas ICRC with ABRT 84h maps to 0Bh/47h/00h. Combined bits follow ordered mask matching; the presence of one familiar bit does not guarantee its isolated-row result. Preserve the original evidence rather than inferring the input from the output.
The error mask is another interpretation layer. When libata classifies a command as an ATA bus error, its error handler clears the command's DEV, MEDIA and INVALID mask bits. This does not erase the raw ATA error register, and does not establish that an underlying media problem was absent. Valid device-provided sense can also follow a different path from the fallback translation examined here.
Timeout and HSM categories do not identify the failing component. They may contribute to recovery decisions, but a counter does not establish whether the cause is cabling, power, firmware, a controller or the device. T10's 5Dh/00h prediction-threshold indication is also not a measurement of failure probability.
Version is part of the evidence. The comparison below reproduces a different BSY mapping in v6.12 and the pinned newer reference, while ordinary UNC and ICRC examples agree. That difference is a decoder behavior, not a change in measured hardware reliability.
System-call completion, SCSI/host status, received sense length and transferred byte count are different observations. A zero SG_IO return does not collapse them into one success verdict; command-specific length rules still matter.
Related: the SMART failure-signal note, the NVMe health-log note and what fails most often on HDDs, SSDs and links.
Method
Source audit, not a device reliability measurement. The original Linux reference 3857c2fe5449541e24afc5efdb0f81a8a8f9a3a0 was reopened on 2026-10-13: ata_to_sense_error, ata_eh_analyze_tf, ata_eh_categorize_error, ata_eh_speed_down_verdict and ata_eh_speed_down were inspected. Existing translation rows retain that revision. The downloadable Python harness compiles the unchanged translation function at this commit and at v6.12 (adc218676eef25575469234709c2d87185ca223a), with constants extracted from each revision's headers, then checks ten invented byte-pair inputs per version. JSON records source URLs, SHA-256 hashes, compiler and generation time. This does not remeasure drives or execute the full recovery path. Sense formats use the separately cited v6.12 decoder, T10, RFC 7143 and Seagate reference. FAST08 sections 2-3 provide the detection-boundary context, not a new dataset. The 2026-10-25 SG_IO supplement reviews Linux v6.12's ABI and block-device completion source, the historical SG HOWTO and Gunawi et al., EIO (FAST 2008), sections 2, 3.1.3 and 5.2-5.3. Its length example is arithmetic, not an executed I/O result. The 2026-11-08 Information-field supplement checks Seagate Rev. M sections 2.4.1.1.2-3 and 2.4.1.2 against the Linux v6.12 extraction and descriptor-search helpers. It adds interpretation guidance, not new device measurements or an executed kernel security test. The field-pointer supplement executes 12 synthetic offline buffers through sg_decode_sense from sg3-utils 1.46-3ubuntu4.1, preserving input bytes, received length, stdout, return status and executable hash. It cross-checks Seagate Rev. M Tables 14 and 17-19, Quantum's field definitions and pinned sg3_utils v1.46 source; no SCSI command is issued. The 2026-11-11 abort-fields supplement compares command status 40h, sense key 0Bh and versioned sg3_utils exit categories using primary reference sources; its table is a reference mapping, not captured device results. The 2026-11-12 supplement checks the pinned sg3_utils v1.46 API contract and sg_err_category_sense implementation, separating a library category from an Information-bearing utility result; source inspection only. A separate offline check passes four invented 18-byte fixed-format buffers through sg_err_category_sense and sg_get_sense_info_fld from Ubuntu package 1.46-3ubuntu4.1 (internal library version 2.79 20210304). Input bytes, observed outputs, runtime, binary hash and reproducer are public; this is not a CLI or hardware test. The 2026-10-26 Unit Attention supplement separates T10 code assignments, Linux v6.12 target-side notification consumption and initiator-side recovery dispositions; it is source review, not execution of a device or full kernel recovery path. The 2026-11-13 TEST UNIT READY supplement compares Seagate Rev. H section 3.53 with Oracle's SL4000 command reference; it adds source-based readiness interpretation, not a device experiment. The REPORT LUNS supplement compares Seagate Rev. M sections 2.2.6 and 3.36 with Oracle SL4000's documented allocation example; it is source synthesis, not executed device I/O. The discovery supplement also inspects Linux v6.12 scanning and Bottomley's OLS 2002 design paper; no rescan or kernel execution is claimed.
Limits
No hardware logs, failure rates or causal diagnoses were collected. The function-only cases deliberately include boundary/composite register values; they are not a sample of commands observed on disks. They do not reproduce native device sense, command selection, full kernel recovery or firmware behavior. The source audit is version-specific, not a claim about every deployed kernel. T10 code names are descriptive assignments, not physical fault identification. The archived ATA wiki is secondary context only. The FAST08 study concerns a historical storage-system population with its own integrity checks and logging limitations; its findings are not a modern fleet failure rate. The SG_IO supplement does not establish whether any particular adapter reports residuals correctly; the HOWTO caveat is historical. EIO's Linux 2.6.15.4 static analysis is context, not a measurement of present-day SG_IO reliability. REQUEST SENSE consumption is scoped to the cited Linux target implementation. No universal clearing, retry or harmlessness rule is inferred for all devices.
Sources
- 01Linux pinned 3857c2fe5449: libata error categorization, recovery verdicts and action guards · accessed 2026-10-13
- 02Linux pinned 3857c2fe5449: ata_to_sense_error and its callers · accessed 2026-10-13
- 03Linux v6.12, commit adc218676eef: ATA-to-SCSI translation · accessed 2026-10-13
- 04T10: SCSI ASC/ASCQ assignments, numeric sorted listing (as of 2024-11-28) · accessed 2026-10-13
- 05Libata error messages, ata Wiki (archived, marked obsolete) · accessed 2026-10-10
- 06T10 working drafts: SCSI architecture, command sets and transports · accessed 2026-10-13
- 07RFC 7143: SCSI concepts and iSCSI transport; sections 4.1, 4.2 and 11.4.7 · accessed 2026-10-13
- 08T10: SCSI sense-key assignments · accessed 2026-10-13
- 09T10: Additional sense data and ASC/ASCQ lookup tables · accessed 2026-10-13
- 10Linux v6.12: scsi_normalize_sense, fixed and descriptor field extraction · accessed 2026-10-13
- 11Seagate SCSI Commands Reference, Rev. H, sections 2.4.1.3-2.4.1.5 · accessed 2026-10-13
- 12Bairavasundaram et al. (FAST 2008): An Analysis of Data Corruption in the Storage Stack, sections 2-3 · accessed 2026-10-13
- 13Linux v6.12: sg_io_hdr fields and SG_INFO status mask · accessed 2026-10-25
- 14Linux v6.12: scsi_complete_sghdr_rq and sg_io in scsi_ioctl.c · accessed 2026-10-25
- 15Douglas Gilbert, Linux SCSI Generic HOWTO, section 6.20: resid (historical driver caveat) · accessed 2026-10-25
- 16Gunawi et al., EIO: Error Handling is Occasionally Correct (FAST 2008), sections 2, 3.1.3 and 5.2-5.3 · accessed 2026-10-25
- 17Seagate SCSI Commands Reference Rev. M (June 2022), sections 2.4.1.1.2-3 and 2.4.1.2 · accessed 2026-11-08
- 18Linux v6.12: scsi_get_sense_info_fld at pinned commit adc218676eef · accessed 2026-11-08
- 19Quantum Scalar i3: Request Sense response and sense-key-specific field definitions · accessed 2026-11-08
- 20Seagate SCSI Commands Reference Rev. M, Tables 14, 17-19 and sections 2.4.1.1.4-2.4.1.2 · accessed 2026-11-08
- 21sg3_utils v1.46 at 7e5b77563a46: decode_sks and sense descriptor dispatch · accessed 2026-11-08
- 22Linux v6.12: separate SAM status and sense-key constants · accessed 2026-11-11
- 23sg3_utils v1.46: documented decimal exit categories 11, 29, 40 and 41 · accessed 2026-11-11
- 24Seagate SCSI Commands Reference Rev. M (June 2022): sense keys p. 59 and TAS p. 465 · accessed 2026-11-11
- 25sg3_utils v1.46: sense-category function and categories that it does not return · accessed 2026-11-12
- 26Linux v6.12 target: target_scsi3_ua_check and core_scsi3_ua_clear_for_request_sense · accessed 2026-10-26
- 27Linux v6.12 target: spc_emulate_request_sense · accessed 2026-11-04
- 28Linux v6.12: scsi_report_sense and scsi_check_sense; disposition is not device command status · accessed 2026-10-26
- 29Seagate SCSI Commands Reference Rev. L (November 2020), INQUIRY p. 104 and UA_INTLCK_CTRL Table 454 p. 464 · accessed 2026-11-12
- 30Seagate SCSI Commands Reference Rev. M (June 2022), sections 2.2.6, 3.36 and 5.4.9 · accessed 2026-11-14
- 31Oracle SL4000 SCSI Reference: REPORT LUNS (A0h), Select Report and Report LUNs Data · accessed 2026-11-14
- 32Seagate SCSI Commands Reference, Rev. H (July 2014), section 3.53 and Tables 186-187 · accessed 2026-11-13
- 33Oracle SL4000 SCSI Reference: Test Unit Ready (00h) · accessed 2026-11-13
- 34Bairavasundaram, Goodson, Pasupathy and Schindler. An Analysis of Latent Sector Errors in Disk Drives. SIGMETRICS 2007, sections 3.3, 4.1-4.3 and 5.5 · accessed 2026-11-14
- 35Linux v6.12 scsi_scan.c: REPORT LUNS and sequential scanning · accessed 2026-11-14
- 36James E. J. Bottomley, Incrementally Improving the Linux SCSI Subsystem (OLS 2002), sections 1.1 and 3.1-3.3 · accessed 2026-11-14