drivers/scsi/isci/scu_completion_codes.h
Source file repositories/reference/linux-study-clean/drivers/scsi/isci/scu_completion_codes.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/isci/scu_completion_codes.h- Extension
.h- Size
- 11760 bytes
- Lines
- 286
- Domain
- Driver Families
- Bucket
- drivers/scsi
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
#ifndef _SCU_COMPLETION_CODES_HEADER_
#define _SCU_COMPLETION_CODES_HEADER_
/**
* This file contains the constants and macros for the SCU hardware completion
* codes.
*
*
*/
#define SCU_COMPLETION_TYPE_SHIFT 28
#define SCU_COMPLETION_TYPE_MASK 0x70000000
/**
* SCU_COMPLETION_TYPE() -
*
* This macro constructs an SCU completion type
*/
#define SCU_COMPLETION_TYPE(type) \
((u32)(type) << SCU_COMPLETION_TYPE_SHIFT)
/**
* SCU_COMPLETION_TYPE() -
*
* These macros contain the SCU completion types SCU_COMPLETION_TYPE
*/
#define SCU_COMPLETION_TYPE_TASK SCU_COMPLETION_TYPE(0)
#define SCU_COMPLETION_TYPE_SDMA SCU_COMPLETION_TYPE(1)
#define SCU_COMPLETION_TYPE_UFI SCU_COMPLETION_TYPE(2)
#define SCU_COMPLETION_TYPE_EVENT SCU_COMPLETION_TYPE(3)
#define SCU_COMPLETION_TYPE_NOTIFY SCU_COMPLETION_TYPE(4)
/**
*
*
* These constants provide the shift and mask values for the various parts of
* an SCU completion code.
*/
#define SCU_COMPLETION_STATUS_MASK 0x0FFC0000
#define SCU_COMPLETION_TL_STATUS_MASK 0x0FC00000
#define SCU_COMPLETION_TL_STATUS_SHIFT 22
#define SCU_COMPLETION_SDMA_STATUS_MASK 0x003C0000
#define SCU_COMPLETION_PEG_MASK 0x00010000
#define SCU_COMPLETION_PORT_MASK 0x00007000
#define SCU_COMPLETION_PE_MASK SCU_COMPLETION_PORT_MASK
#define SCU_COMPLETION_PE_SHIFT 12
#define SCU_COMPLETION_INDEX_MASK 0x00000FFF
/**
* SCU_GET_COMPLETION_TYPE() -
*
* This macro returns the SCU completion type.
*/
#define SCU_GET_COMPLETION_TYPE(completion_code) \
((completion_code) & SCU_COMPLETION_TYPE_MASK)
/**
* SCU_GET_COMPLETION_STATUS() -
*
* This macro returns the SCU completion status.
*/
#define SCU_GET_COMPLETION_STATUS(completion_code) \
((completion_code) & SCU_COMPLETION_STATUS_MASK)
/**
* SCU_GET_COMPLETION_TL_STATUS() -
*
* This macro returns the transport layer completion status.
*/
#define SCU_GET_COMPLETION_TL_STATUS(completion_code) \
((completion_code) & SCU_COMPLETION_TL_STATUS_MASK)
/**
* SCU_MAKE_COMPLETION_STATUS() -
*
* This macro takes a completion code and performs the shift and mask
* operations to turn it into a completion code that can be compared to a
* SCU_GET_COMPLETION_TL_STATUS.
*/
#define SCU_MAKE_COMPLETION_STATUS(completion_code) \
((u32)(completion_code) << SCU_COMPLETION_TL_STATUS_SHIFT)
/**
* SCU_NORMALIZE_COMPLETION_STATUS() -
*
* This macro takes a SCU_GET_COMPLETION_TL_STATUS and normalizes it for a
* return code.
*/
#define SCU_NORMALIZE_COMPLETION_STATUS(completion_code) \
(\
Annotation
- Atlas domain: Driver Families / drivers/scsi.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.