drivers/net/ethernet/ti/tlan.c
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/ti/tlan.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/ti/tlan.c- Extension
.c- Size
- 87989 bytes
- Lines
- 3265
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: operation-table or driver-model contract
- Status
- pattern 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 an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/hardirq.hlinux/module.hlinux/init.hlinux/interrupt.hlinux/ioport.hlinux/eisa.hlinux/pci.hlinux/dma-mapping.hlinux/netdevice.hlinux/etherdevice.hlinux/delay.hlinux/spinlock.hlinux/workqueue.hlinux/mii.htlan.h
Detected Declarations
function tlan_store_skbfunction tlan_get_skbfunction tlan_set_timerfunction devicefunction tlan_startfunction tlan_stopfunction tlan_suspendfunction tlan_resumefunction tlan_probefunction tlan_init_onefunction tlan_probe1function tlan_eisa_cleanupfunction tlan_exitfunction tlan_eisa_probefunction tlan_pollfunction tlan_get_drvinfofunction tlan_get_eeprom_lenfunction tlan_get_eepromfunction tlan_initfunction tlan_openfunction tlan_ioctlfunction tlan_tx_timeoutfunction tlan_tx_timeout_workfunction tlan_start_txfunction adapterfunction tlan_closefunction tlan_set_multicast_listfunction netdev_for_each_mc_addrfunction channelfunction tlan_handle_stat_overflowfunction channelfunction tlan_handle_dummyfunction tlan_handle_tx_eocfunction tlan_handle_status_checkfunction tlan_handle_rx_eocfunction tlan_timerfunction tlan_reset_listsfunction tlan_free_listsfunction internalfunction tlan_print_listfunction TLAN_RECORDfunction tlan_reset_adapterfunction tlan_finish_resetfunction infunction PHYfunction tlan_phy_printfunction PHYfunction tlan_phy_power_down
Annotated Snippet
static struct pci_driver tlan_driver = {
.name = "tlan",
.id_table = tlan_pci_tbl,
.probe = tlan_init_one,
.remove = tlan_remove_one,
.driver.pm = &tlan_pm_ops,
};
static int __init tlan_probe(void)
{
int rc = -ENODEV;
pr_info("%s", tlan_banner);
TLAN_DBG(TLAN_DEBUG_PROBE, "Starting PCI Probe....\n");
/* Use new style PCI probing. Now the kernel will
do most of this for us */
rc = pci_register_driver(&tlan_driver);
if (rc != 0) {
pr_err("Could not register pci driver\n");
goto err_out_pci_free;
}
TLAN_DBG(TLAN_DEBUG_PROBE, "Starting EISA Probe....\n");
tlan_eisa_probe();
pr_info("%d device%s installed, PCI: %d EISA: %d\n",
tlan_devices_installed, tlan_devices_installed == 1 ? "" : "s",
tlan_have_pci, tlan_have_eisa);
if (tlan_devices_installed == 0) {
rc = -ENODEV;
goto err_out_pci_unreg;
}
return 0;
err_out_pci_unreg:
pci_unregister_driver(&tlan_driver);
err_out_pci_free:
return rc;
}
static int tlan_init_one(struct pci_dev *pdev,
const struct pci_device_id *ent)
{
return tlan_probe1(pdev, -1, -1, 0, ent);
}
/*
***************************************************************
* tlan_probe1
*
* Returns:
* 0 on success, error code on error
* Parms:
* none
*
* The name is lower case to fit in with all the rest of
* the netcard_probe names. This function looks for
* another TLan based adapter, setting it up with the
* allocated device struct if one is found.
* tlan_probe has been ported to the new net API and
* now allocates its own device structure. This function
* is also used by modules.
*
**************************************************************/
static int tlan_probe1(struct pci_dev *pdev, long ioaddr, int irq, int rev,
const struct pci_device_id *ent)
{
struct net_device *dev;
struct tlan_priv *priv;
u16 device_id;
int reg, rc = -ENODEV;
#ifdef CONFIG_PCI
if (pdev) {
rc = pci_enable_device(pdev);
if (rc)
return rc;
rc = pci_request_regions(pdev, tlan_signature);
if (rc) {
pr_err("Could not reserve IO regions\n");
goto err_out;
Annotation
- Immediate include surface: `linux/hardirq.h`, `linux/module.h`, `linux/init.h`, `linux/interrupt.h`, `linux/ioport.h`, `linux/eisa.h`, `linux/pci.h`, `linux/dma-mapping.h`.
- Detected declarations: `function tlan_store_skb`, `function tlan_get_skb`, `function tlan_set_timer`, `function device`, `function tlan_start`, `function tlan_stop`, `function tlan_suspend`, `function tlan_resume`, `function tlan_probe`, `function tlan_init_one`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: pattern implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.