drivers/net/ethernet/renesas/sh_eth.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/renesas/sh_eth.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/renesas/sh_eth.h- Extension
.h- Size
- 12557 bytes
- Lines
- 568
- 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.
- 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 sh_eth_txdescstruct sh_eth_rxdescstruct sh_eth_cpu_datastruct sh_eth_privateenum EDSR_BITenum GECMR_BITenum EDMR_BITenum EDTRR_BITenum EDRRR_BITenum TPAUSER_BITenum BCFR_BITenum PIR_BITenum PSR_BITenum EESR_BITenum EESIPR_BITenum FCFTR_BITenum RMCR_BITenum ECMR_BITenum ECSR_BITenum ECSIPR_BITenum APR_BITenum MPR_BITenum TRSCER_BITenum RPADIR_BITenum ARSTR_BITenum TSU_FWEN0_BITenum TSU_ADSBSY_BITenum TSU_TEN_BITenum TSU_FWSL0_BITenum TSU_FWSLC_BITenum TD_STS_BITenum TD_LEN_BITenum RD_STS_BITenum RD_LEN_BIT
Annotated Snippet
struct sh_eth_txdesc {
u32 status; /* TD0 */
u32 len; /* TD1 */
u32 addr; /* TD2 */
u32 pad0; /* padding data */
} __aligned(2) __packed;
/* Transmit descriptor 0 bits */
enum TD_STS_BIT {
TD_TACT = 0x80000000,
TD_TDLE = 0x40000000,
TD_TFP1 = 0x20000000,
TD_TFP0 = 0x10000000,
TD_TFE = 0x08000000,
TD_TWBI = 0x04000000,
};
#define TDF1ST TD_TFP1
#define TDFEND TD_TFP0
#define TD_TFP (TD_TFP1 | TD_TFP0)
/* Transmit descriptor 1 bits */
enum TD_LEN_BIT {
TD_TBL = 0xffff0000, /* transmit buffer length */
};
/* The sh ether Rx buffer descriptors.
* This structure should be 20 bytes.
*/
struct sh_eth_rxdesc {
u32 status; /* RD0 */
u32 len; /* RD1 */
u32 addr; /* RD2 */
u32 pad0; /* padding data */
} __aligned(2) __packed;
/* Receive descriptor 0 bits */
enum RD_STS_BIT {
RD_RACT = 0x80000000,
RD_RDLE = 0x40000000,
RD_RFP1 = 0x20000000,
RD_RFP0 = 0x10000000,
RD_RFE = 0x08000000,
RD_RFS10 = 0x00000200,
RD_RFS9 = 0x00000100,
RD_RFS8 = 0x00000080,
RD_RFS7 = 0x00000040,
RD_RFS6 = 0x00000020,
RD_RFS5 = 0x00000010,
RD_RFS4 = 0x00000008,
RD_RFS3 = 0x00000004,
RD_RFS2 = 0x00000002,
RD_RFS1 = 0x00000001,
};
#define RDF1ST RD_RFP1
#define RDFEND RD_RFP0
#define RD_RFP (RD_RFP1 | RD_RFP0)
/* Receive descriptor 1 bits */
enum RD_LEN_BIT {
RD_RFL = 0x0000ffff, /* receive frame length */
RD_RBL = 0xffff0000, /* receive buffer length */
};
/* This structure is used by each CPU dependency handling. */
struct sh_eth_cpu_data {
/* mandatory functions */
int (*soft_reset)(struct net_device *ndev);
/* optional functions */
void (*chip_reset)(struct net_device *ndev);
void (*set_duplex)(struct net_device *ndev);
void (*set_rate)(struct net_device *ndev);
/* mandatory initialize value */
int register_type;
u32 edtrr_trns;
u32 eesipr_value;
/* optional initialize value */
u32 ecsr_value;
u32 ecsipr_value;
u32 fdr_value;
u32 fcftr_value;
/* interrupt checking mask */
u32 tx_check;
u32 eesr_err_check;
/* Error mask */
u32 trscer_err_mask;
Annotation
- Detected declarations: `struct sh_eth_txdesc`, `struct sh_eth_rxdesc`, `struct sh_eth_cpu_data`, `struct sh_eth_private`, `enum EDSR_BIT`, `enum GECMR_BIT`, `enum EDMR_BIT`, `enum EDTRR_BIT`, `enum EDRRR_BIT`, `enum TPAUSER_BIT`.
- Atlas domain: Driver Families / drivers/net.
- 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.