drivers/usb/atm/usbatm.h
Source file repositories/reference/linux-study-clean/drivers/usb/atm/usbatm.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/usb/atm/usbatm.h- Extension
.h- Size
- 5079 bytes
- Lines
- 186
- Domain
- Driver Families
- Bucket
- drivers/usb
- 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/atm.hlinux/atmdev.hlinux/completion.hlinux/device.hlinux/kernel.hlinux/kref.hlinux/list.hlinux/stringify.hlinux/usb.hlinux/mutex.hlinux/ratelimit.h
Detected Declarations
struct usbatm_datastruct usbatm_driverstruct usbatm_channelstruct usbatm_data
Annotated Snippet
struct usbatm_driver {
const char *driver_name;
/* init device ... can sleep, or cause probe() failure */
int (*bind) (struct usbatm_data *, struct usb_interface *,
const struct usb_device_id *id);
/* additional device initialization that is too slow to be done in probe() */
int (*heavy_init) (struct usbatm_data *, struct usb_interface *);
/* cleanup device ... can sleep, but can't fail */
void (*unbind) (struct usbatm_data *, struct usb_interface *);
/* init ATM device ... can sleep, or cause ATM initialization failure */
int (*atm_start) (struct usbatm_data *, struct atm_dev *);
/* cleanup ATM device ... can sleep, but can't fail */
void (*atm_stop) (struct usbatm_data *, struct atm_dev *);
int bulk_in; /* bulk rx endpoint */
int isoc_in; /* isochronous rx endpoint */
int bulk_out; /* bulk tx endpoint */
unsigned rx_padding;
unsigned tx_padding;
};
extern int usbatm_usb_probe(struct usb_interface *intf, const struct usb_device_id *id,
struct usbatm_driver *driver);
extern void usbatm_usb_disconnect(struct usb_interface *intf);
struct usbatm_channel {
int endpoint; /* usb pipe */
unsigned int stride; /* ATM cell size + padding */
unsigned int buf_size; /* urb buffer size */
unsigned int packet_size; /* endpoint maxpacket */
spinlock_t lock;
struct list_head list;
struct tasklet_struct tasklet;
struct timer_list delay;
struct usbatm_data *usbatm;
};
/* main driver data */
struct usbatm_data {
/******************
* public fields *
******************/
/* mini driver */
struct usbatm_driver *driver;
void *driver_data;
char driver_name[16];
unsigned int flags; /* set by mini-driver in bind() */
/* USB device */
struct usb_device *usb_dev;
struct usb_interface *usb_intf;
char description[64];
/* ATM device */
struct atm_dev *atm_dev;
/********************************
* private fields - do not use *
********************************/
struct kref refcount;
struct mutex serialize;
int disconnected;
/* heavy init */
struct task_struct *thread;
struct completion thread_started;
struct completion thread_exited;
/* ATM device */
struct list_head vcc_list;
struct usbatm_channel rx_channel;
struct usbatm_channel tx_channel;
struct sk_buff_head sndqueue;
struct sk_buff *current_skb; /* being emptied */
struct usbatm_vcc_data *cached_vcc;
int cached_vci;
short cached_vpi;
Annotation
- Immediate include surface: `linux/atm.h`, `linux/atmdev.h`, `linux/completion.h`, `linux/device.h`, `linux/kernel.h`, `linux/kref.h`, `linux/list.h`, `linux/stringify.h`.
- Detected declarations: `struct usbatm_data`, `struct usbatm_driver`, `struct usbatm_channel`, `struct usbatm_data`.
- Atlas domain: Driver Families / drivers/usb.
- 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.