drivers/usb/atm/usbatm.c
Source file repositories/reference/linux-study-clean/drivers/usb/atm/usbatm.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/usb/atm/usbatm.c- Extension
.c- Size
- 35501 bytes
- Lines
- 1330
- Domain
- Driver Families
- Bucket
- drivers/usb
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Touches user memory; correctness depends on fault-safe copying and privilege boundary handling.
- 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
usbatm.hlinux/uaccess.hlinux/crc32.hlinux/errno.hlinux/init.hlinux/interrupt.hlinux/kernel.hlinux/module.hlinux/moduleparam.hlinux/netdevice.hlinux/proc_fs.hlinux/sched/signal.hlinux/signal.hlinux/slab.hlinux/stat.hlinux/timer.hlinux/wait.hlinux/kthread.hlinux/ratelimit.h
Detected Declarations
struct usbatm_vcc_datastruct usbatm_controlfunction usbatm_pdu_lengthfunction usbatm_popfunction usbatm_submit_urbfunction usbatm_completefunction usbatm_extract_one_cellfunction usbatm_extract_cellsfunction usbatm_write_cellsfunction usbatm_rx_processfunction usbatm_tx_processfunction usbatm_cancel_sendfunction usbatm_atm_sendfunction usbatm_destroy_instancefunction usbatm_get_instancefunction usbatm_put_instancefunction usbatm_atm_dev_closefunction usbatm_atm_proc_readfunction usbatm_atm_openfunction usbatm_atm_closefunction usbatm_atm_ioctlfunction usbatm_atm_initfunction usbatm_do_heavy_initfunction usbatm_heavy_initfunction usbatm_tasklet_schedulefunction usbatm_init_channelfunction usbatm_usb_probefunction usbatm_usb_disconnectfunction usbatm_usb_initfunction usbatm_usb_exitfunction usbatm_print_packetmodule init usbatm_usb_initexport usbatm_usb_probeexport usbatm_usb_disconnect
Annotated Snippet
module_init(usbatm_usb_init);
static void __exit usbatm_usb_exit(void)
{
}
module_exit(usbatm_usb_exit);
MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_LICENSE("GPL");
/************
** debug **
************/
#ifdef VERBOSE_DEBUG
static int usbatm_print_packet(struct usbatm_data *instance,
const unsigned char *data, int len)
{
unsigned char buffer[256];
int i = 0, j = 0;
for (i = 0; i < len;) {
buffer[0] = '\0';
sprintf(buffer, "%.3d :", i);
for (j = 0; (j < 16) && (i < len); j++, i++)
sprintf(buffer, "%s %2.2x", buffer, data[i]);
dev_dbg(&instance->usb_intf->dev, "%s", buffer);
}
return i;
}
#endif
Annotation
- Immediate include surface: `usbatm.h`, `linux/uaccess.h`, `linux/crc32.h`, `linux/errno.h`, `linux/init.h`, `linux/interrupt.h`, `linux/kernel.h`, `linux/module.h`.
- Detected declarations: `struct usbatm_vcc_data`, `struct usbatm_control`, `function usbatm_pdu_length`, `function usbatm_pop`, `function usbatm_submit_urb`, `function usbatm_complete`, `function usbatm_extract_one_cell`, `function usbatm_extract_cells`, `function usbatm_write_cells`, `function usbatm_rx_process`.
- Atlas domain: Driver Families / drivers/usb.
- Implementation status: integration implementation candidate.
- This snippet crosses the user/kernel memory boundary; validate fault handling and access checks before translating the pattern.
- 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.