drivers/net/ethernet/sun/cassini.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/sun/cassini.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/sun/cassini.h- Extension
.h- Size
- 124997 bytes
- Lines
- 2901
- Domain
- Driver Families
- Bucket
- drivers/net
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- 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 cas_tx_descstruct cas_rx_descstruct cas_rx_compstruct cas_init_blockstruct cas_tiny_countstruct casenum link_state
Annotated Snippet
struct cas_tx_desc {
__le64 control;
__le64 buffer;
};
/* descriptor ring for free buffers contains page-sized buffers. the index
* value is not used by the hw in any way. it's just stored and returned in
* the completion ring.
*/
struct cas_rx_desc {
__le64 index;
__le64 buffer;
};
/* received packets are put on the completion ring. */
/* word 1 */
#define RX_COMP1_DATA_SIZE_MASK 0x0000000007FFE000ULL
#define RX_COMP1_DATA_SIZE_SHIFT 13
#define RX_COMP1_DATA_OFF_MASK 0x000001FFF8000000ULL
#define RX_COMP1_DATA_OFF_SHIFT 27
#define RX_COMP1_DATA_INDEX_MASK 0x007FFE0000000000ULL
#define RX_COMP1_DATA_INDEX_SHIFT 41
#define RX_COMP1_SKIP_MASK 0x0180000000000000ULL
#define RX_COMP1_SKIP_SHIFT 55
#define RX_COMP1_RELEASE_NEXT 0x0200000000000000ULL
#define RX_COMP1_SPLIT_PKT 0x0400000000000000ULL
#define RX_COMP1_RELEASE_FLOW 0x0800000000000000ULL
#define RX_COMP1_RELEASE_DATA 0x1000000000000000ULL
#define RX_COMP1_RELEASE_HDR 0x2000000000000000ULL
#define RX_COMP1_TYPE_MASK 0xC000000000000000ULL
#define RX_COMP1_TYPE_SHIFT 62
/* word 2 */
#define RX_COMP2_NEXT_INDEX_MASK 0x00000007FFE00000ULL
#define RX_COMP2_NEXT_INDEX_SHIFT 21
#define RX_COMP2_HDR_SIZE_MASK 0x00000FF800000000ULL
#define RX_COMP2_HDR_SIZE_SHIFT 35
#define RX_COMP2_HDR_OFF_MASK 0x0003F00000000000ULL
#define RX_COMP2_HDR_OFF_SHIFT 44
#define RX_COMP2_HDR_INDEX_MASK 0xFFFC000000000000ULL
#define RX_COMP2_HDR_INDEX_SHIFT 50
/* word 3 */
#define RX_COMP3_SMALL_PKT 0x0000000000000001ULL
#define RX_COMP3_JUMBO_PKT 0x0000000000000002ULL
#define RX_COMP3_JUMBO_HDR_SPLIT_EN 0x0000000000000004ULL
#define RX_COMP3_CSUM_START_MASK 0x000000000007F000ULL
#define RX_COMP3_CSUM_START_SHIFT 12
#define RX_COMP3_FLOWID_MASK 0x0000000001F80000ULL
#define RX_COMP3_FLOWID_SHIFT 19
#define RX_COMP3_OPCODE_MASK 0x000000000E000000ULL
#define RX_COMP3_OPCODE_SHIFT 25
#define RX_COMP3_FORCE_FLAG 0x0000000010000000ULL
#define RX_COMP3_NO_ASSIST 0x0000000020000000ULL
#define RX_COMP3_LOAD_BAL_MASK 0x000001F800000000ULL
#define RX_COMP3_LOAD_BAL_SHIFT 35
#define RX_PLUS_COMP3_ENC_PKT 0x0000020000000000ULL /* cas+ */
#define RX_COMP3_L3_HEAD_OFF_MASK 0x0000FE0000000000ULL /* cas */
#define RX_COMP3_L3_HEAD_OFF_SHIFT 41
#define RX_PLUS_COMP_L3_HEAD_OFF_MASK 0x0000FC0000000000ULL /* cas+ */
#define RX_PLUS_COMP_L3_HEAD_OFF_SHIFT 42
#define RX_COMP3_SAP_MASK 0xFFFF000000000000ULL
#define RX_COMP3_SAP_SHIFT 48
/* word 4 */
#define RX_COMP4_TCP_CSUM_MASK 0x000000000000FFFFULL
#define RX_COMP4_TCP_CSUM_SHIFT 0
#define RX_COMP4_PKT_LEN_MASK 0x000000003FFF0000ULL
#define RX_COMP4_PKT_LEN_SHIFT 16
#define RX_COMP4_PERFECT_MATCH_MASK 0x00000003C0000000ULL
#define RX_COMP4_PERFECT_MATCH_SHIFT 30
#define RX_COMP4_ZERO 0x0000080000000000ULL
#define RX_COMP4_HASH_VAL_MASK 0x0FFFF00000000000ULL
#define RX_COMP4_HASH_VAL_SHIFT 44
#define RX_COMP4_HASH_PASS 0x1000000000000000ULL
#define RX_COMP4_BAD 0x4000000000000000ULL
#define RX_COMP4_LEN_MISMATCH 0x8000000000000000ULL
/* we encode the following: ring/index/release. only 14 bits
* are usable.
* NOTE: the encoding is dependent upon RX_DESC_RING_SIZE and
* MAX_RX_DESC_RINGS. */
#define RX_INDEX_NUM_MASK 0x0000000000000FFFULL
#define RX_INDEX_NUM_SHIFT 0
#define RX_INDEX_RING_MASK 0x0000000000001000ULL
#define RX_INDEX_RING_SHIFT 12
#define RX_INDEX_RELEASE 0x0000000000002000ULL
struct cas_rx_comp {
__le64 word1;
Annotation
- Detected declarations: `struct cas_tx_desc`, `struct cas_rx_desc`, `struct cas_rx_comp`, `struct cas_init_block`, `struct cas_tiny_count`, `struct cas`, `enum link_state`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.