drivers/net/ethernet/toshiba/ps3_gelic_net.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/toshiba/ps3_gelic_net.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/toshiba/ps3_gelic_net.h- Extension
.h- Size
- 11613 bytes
- Lines
- 373
- 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.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- 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 gelic_hw_regsstruct gelic_chain_linkstruct gelic_descrstruct gelic_descr_chainstruct gelic_vlan_idstruct gelic_cardstruct gelic_portenum gelic_descr_rx_statusenum gelic_descr_tx_statusenum gelic_descr_rx_errorenum gelic_descr_dma_statusenum gelic_descr_tx_dma_statusenum gelic_descr_rx_dma_statusenum gelic_lv1_net_control_codeenum gelic_lv1_wol_commandenum gelic_lv1_wol_mp_argenum gelic_lv1_wol_match_argenum gelic_lv1_ether_port_statusenum gelic_lv1_vlan_indexenum gelic_lv1_phyenum gelic_port_typefunction bus_idfunction dev_id
Annotated Snippet
struct gelic_hw_regs {
struct {
__be32 dev_addr;
__be32 size;
} __packed payload;
__be32 next_descr_addr;
__be32 dmac_cmd_status;
__be32 result_size;
__be32 valid_size; /* all zeroes for tx */
__be32 data_status;
__be32 data_error; /* all zeroes for tx */
} __packed;
struct gelic_chain_link {
dma_addr_t cpu_addr;
unsigned int size;
};
struct gelic_descr {
struct gelic_hw_regs hw_regs;
struct gelic_chain_link link;
struct sk_buff *skb;
struct gelic_descr *next;
struct gelic_descr *prev;
} __attribute__((aligned(32)));
struct gelic_descr_chain {
/* we walk from tail to head */
struct gelic_descr *head;
struct gelic_descr *tail;
};
struct gelic_vlan_id {
u16 tx;
u16 rx;
};
struct gelic_card {
struct napi_struct napi;
struct net_device *netdev[GELIC_PORT_MAX];
struct timer_list rx_oom_timer;
/*
* hypervisor requires irq_status should be
* 8 bytes aligned, but u64 member is
* always disposed in that manner
*/
u64 irq_status;
u64 irq_mask;
struct ps3_system_bus_device *dev;
struct gelic_vlan_id vlan[GELIC_PORT_MAX];
int vlan_required;
struct gelic_descr_chain tx_chain;
struct gelic_descr_chain rx_chain;
/*
* tx_lock guards tx descriptor list and
* tx_dma_progress.
*/
spinlock_t tx_lock;
int tx_dma_progress;
struct work_struct tx_timeout_task;
atomic_t tx_timeout_task_counter;
wait_queue_head_t waitq;
/* only first user should up the card */
struct mutex updown_lock;
atomic_t users;
u64 ether_port_status;
int link_mode;
/* original address returned by kzalloc */
void *unalign;
/*
* each netdevice has copy of irq
*/
unsigned int irq;
struct gelic_descr *tx_top, *rx_top;
struct gelic_descr descr[]; /* must be the last */
};
struct gelic_port {
struct gelic_card *card;
struct net_device *netdev;
enum gelic_port_type type;
long priv[]; /* long for alignment */
};
Annotation
- Detected declarations: `struct gelic_hw_regs`, `struct gelic_chain_link`, `struct gelic_descr`, `struct gelic_descr_chain`, `struct gelic_vlan_id`, `struct gelic_card`, `struct gelic_port`, `enum gelic_descr_rx_status`, `enum gelic_descr_tx_status`, `enum gelic_descr_rx_error`.
- 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.