drivers/net/ethernet/tehuti/tn40_mdio.c
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/tehuti/tn40_mdio.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/tehuti/tn40_mdio.c- Extension
.c- Size
- 5716 bytes
- Lines
- 221
- 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
linux/netdevice.hlinux/pci.hlinux/phylink.htn40.h
Detected Declarations
function tn40_mdio_set_speedfunction tn40_mdio_statfunction tn40_mdio_wait_nobusyfunction tn40_mdio_readfunction tn40_mdio_writefunction tn40_mdio_read_c45function tn40_mdio_write_c45function tn40_swnodes_registerfunction tn40_swnodes_cleanupfunction tn40_mdiobus_init
Annotated Snippet
if (ret) {
pr_err("swnodes failed\n");
return ret;
}
ret = device_add_software_node(&bus->dev,
priv->nodes.group[SWNODE_MDIO]);
if (ret) {
dev_err(&pdev->dev,
"device_add_software_node failed: %d\n", ret);
goto err_swnodes_unregister;
}
}
tn40_mdio_set_speed(priv, TN40_MDIO_SPEED_6MHZ);
ret = devm_mdiobus_register(&pdev->dev, bus);
if (ret) {
dev_err(&pdev->dev, "failed to register mdiobus %d %u %u\n",
ret, bus->state, MDIOBUS_UNREGISTERED);
goto err_swnodes_cleanup;
}
return 0;
err_swnodes_unregister:
software_node_unregister_node_group(priv->nodes.group);
return ret;
err_swnodes_cleanup:
tn40_swnodes_cleanup(priv);
return ret;
}
MODULE_FIRMWARE(AQR105_FIRMWARE);
Annotation
- Immediate include surface: `linux/netdevice.h`, `linux/pci.h`, `linux/phylink.h`, `tn40.h`.
- Detected declarations: `function tn40_mdio_set_speed`, `function tn40_mdio_stat`, `function tn40_mdio_wait_nobusy`, `function tn40_mdio_read`, `function tn40_mdio_write`, `function tn40_mdio_read_c45`, `function tn40_mdio_write_c45`, `function tn40_swnodes_register`, `function tn40_swnodes_cleanup`, `function tn40_mdiobus_init`.
- 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.