drivers/misc/ibmasm/dot_command.h
Source file repositories/reference/linux-study-clean/drivers/misc/ibmasm/dot_command.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/misc/ibmasm/dot_command.h- Extension
.h- Size
- 1588 bytes
- Lines
- 65
- Domain
- Driver Families
- Bucket
- drivers/misc
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
struct dot_command_headerfunction get_dot_command_sizefunction get_dot_command_timeout
Annotated Snippet
struct dot_command_header {
u8 type;
u8 command_size;
u16 data_size;
u8 status;
u8 reserved;
};
#pragma pack()
static inline size_t get_dot_command_size(void *buffer)
{
struct dot_command_header *cmd = (struct dot_command_header *)buffer;
return sizeof(struct dot_command_header) + cmd->command_size + cmd->data_size;
}
static inline unsigned int get_dot_command_timeout(void *buffer)
{
struct dot_command_header *header = (struct dot_command_header *)buffer;
unsigned char *cmd = buffer + sizeof(struct dot_command_header);
/* dot commands 6.3.1, 7.1 and 8.x need a longer timeout */
if (header->command_size == 3) {
if ((cmd[0] == 6) && (cmd[1] == 3) && (cmd[2] == 1))
return IBMASM_CMD_TIMEOUT_EXTRA;
} else if (header->command_size == 2) {
if ((cmd[0] == 7) && (cmd[1] == 1))
return IBMASM_CMD_TIMEOUT_EXTRA;
if (cmd[0] == 8)
return IBMASM_CMD_TIMEOUT_EXTRA;
}
return IBMASM_CMD_TIMEOUT_NORMAL;
}
#endif /* __DOT_COMMAND_H__ */
Annotation
- Detected declarations: `struct dot_command_header`, `function get_dot_command_size`, `function get_dot_command_timeout`.
- Atlas domain: Driver Families / drivers/misc.
- 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.