include/linux/most.h
Source file repositories/reference/linux-study-clean/include/linux/most.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/most.h- Extension
.h- Size
- 12491 bytes
- Lines
- 338
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hlinux/device.h
Detected Declarations
struct modulestruct interface_privatestruct most_channel_capabilitystruct most_channel_configstruct mbostruct most_interfacestruct most_componentenum most_interface_typeenum most_channel_directionenum most_channel_data_typeenum most_status_flags
Annotated Snippet
struct most_channel_capability {
u16 direction;
u16 data_type;
u16 num_buffers_packet;
u16 buffer_size_packet;
u16 num_buffers_streaming;
u16 buffer_size_streaming;
const char *name_suffix;
};
/**
* struct most_channel_config - stores channel configuration
* @direction: direction of the channel
* @data_type: data type travelling over this channel
* @num_buffers: number of buffers
* @buffer_size: size of a buffer for AIM.
* Buffer size may be cutted down by HDM in a configure callback
* to match to a given interface and channel type.
* @extra_len: additional buffer space for internal HDM purposes like padding.
* May be set by HDM in a configure callback if needed.
* @subbuffer_size: size of a subbuffer
* @packets_per_xact: number of MOST frames that are packet inside one USB
* packet. This is USB specific
*
* Describes the configuration for a MOST channel. This information is
* provided from the MostCore to a HDM (like the Medusa PCIe Interface) as a
* parameter of the "configure" function call.
*/
struct most_channel_config {
enum most_channel_direction direction;
enum most_channel_data_type data_type;
u16 num_buffers;
u16 buffer_size;
u16 extra_len;
u16 subbuffer_size;
u16 packets_per_xact;
u16 dbr_size;
};
/*
* struct mbo - MOST Buffer Object.
* @context: context for core completion handler
* @priv: private data for HDM
*
* public: documented fields that are used for the communications
* between MostCore and HDMs
*
* @list: list head for use by the mbo's current owner
* @ifp: (in) associated interface instance
* @num_buffers_ptr: amount of pool buffers
* @hdm_channel_id: (in) HDM channel instance
* @virt_address: (in) kernel virtual address of the buffer
* @bus_address: (in) bus address of the buffer
* @buffer_length: (in) buffer payload length
* @processed_length: (out) processed length
* @status: (out) transfer status
* @complete: (in) completion routine
*
* The core allocates and initializes the MBO.
*
* The HDM receives MBO for transfer from the core with the call to enqueue().
* The HDM copies the data to- or from the buffer depending on configured
* channel direction, set "processed_length" and "status" and completes
* the transfer procedure by calling the completion routine.
*
* Finally, the MBO is being deallocated or recycled for further
* transfers of the same or a different HDM.
*
* Directions of usage:
* The core driver should never access any MBO fields (even if marked
* as "public") while the MBO is owned by an HDM. The ownership starts with
* the call of enqueue() and ends with the call of its complete() routine.
*
* II.
* Every HDM attached to the core driver _must_ ensure that it returns any MBO
* it owns (due to a previous call to enqueue() by the core driver) before it
* de-registers an interface or gets unloaded from the kernel. If this direction
* is violated memory leaks will occur, since the core driver does _not_ track
* MBOs it is currently not in control of.
*
*/
struct mbo {
void *context;
void *priv;
struct list_head list;
struct most_interface *ifp;
int *num_buffers_ptr;
u16 hdm_channel_id;
void *virt_address;
dma_addr_t bus_address;
Annotation
- Immediate include surface: `linux/types.h`, `linux/device.h`.
- Detected declarations: `struct module`, `struct interface_private`, `struct most_channel_capability`, `struct most_channel_config`, `struct mbo`, `struct most_interface`, `struct most_component`, `enum most_interface_type`, `enum most_channel_direction`, `enum most_channel_data_type`.
- Atlas domain: Core OS / Core Kernel Interface.
- 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.