drivers/usb/cdns3/cdnsp-trace.h
Source file repositories/reference/linux-study-clean/drivers/usb/cdns3/cdnsp-trace.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/usb/cdns3/cdnsp-trace.h- Extension
.h- Size
- 21356 bytes
- Lines
- 802
- 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/tracepoint.hcdnsp-gadget.hcdnsp-debug.htrace/define_trace.h
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
#undef TRACE_SYSTEM
#define TRACE_SYSTEM cdnsp-dev
/*
* The TRACE_SYSTEM_VAR defaults to TRACE_SYSTEM, but must be a
* legitimate C variable. It is not exported to user space.
*/
#undef TRACE_SYSTEM_VAR
#define TRACE_SYSTEM_VAR cdnsp_dev
#if !defined(__CDNSP_DEV_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
#define __CDNSP_DEV_TRACE_H
#include <linux/tracepoint.h>
#include "cdnsp-gadget.h"
#include "cdnsp-debug.h"
/*
* There is limitation for single buffer size in TRACEPOINT subsystem.
* By default TRACE_BUF_SIZE is 1024, so no all data will be logged.
* To show more data this must be increased. In most cases the default
* value is sufficient.
*/
#define CDNSP_MSG_MAX 500
DECLARE_EVENT_CLASS(cdnsp_log_ep,
TP_PROTO(struct cdnsp_ep *pep, u32 stream_id),
TP_ARGS(pep, stream_id),
TP_STRUCT__entry(
__string(name, pep->name)
__field(unsigned int, state)
__field(u32, stream_id)
__field(u8, enabled)
__field(unsigned int, num_streams)
__field(int, td_count)
__field(u8, first_prime_det)
__field(u8, drbls_count)
),
TP_fast_assign(
__assign_str(name);
__entry->state = pep->ep_state;
__entry->stream_id = stream_id;
__entry->enabled = pep->ep_state & EP_HAS_STREAMS;
__entry->num_streams = pep->stream_info.num_streams;
__entry->td_count = pep->stream_info.td_count;
__entry->first_prime_det = pep->stream_info.first_prime_det;
__entry->drbls_count = pep->stream_info.drbls_count;
),
TP_printk("%s: SID: %08x, ep state: %x, stream: enabled: %d num %d "
"tds %d, first prime: %d drbls %d",
__get_str(name), __entry->stream_id, __entry->state,
__entry->enabled, __entry->num_streams, __entry->td_count,
__entry->first_prime_det, __entry->drbls_count)
);
DEFINE_EVENT(cdnsp_log_ep, cdnsp_tr_drbl,
TP_PROTO(struct cdnsp_ep *pep, u32 stream_id),
TP_ARGS(pep, stream_id)
);
DEFINE_EVENT(cdnsp_log_ep, cdnsp_wait_for_prime,
TP_PROTO(struct cdnsp_ep *pep, u32 stream_id),
TP_ARGS(pep, stream_id)
);
DEFINE_EVENT(cdnsp_log_ep, cdnsp_ep_list_empty_with_skip,
TP_PROTO(struct cdnsp_ep *pep, u32 stream_id),
TP_ARGS(pep, stream_id)
);
DEFINE_EVENT(cdnsp_log_ep, cdnsp_ep_enable_end,
TP_PROTO(struct cdnsp_ep *pep, u32 stream_id),
TP_ARGS(pep, stream_id)
);
DEFINE_EVENT(cdnsp_log_ep, cdnsp_ep_disable_end,
TP_PROTO(struct cdnsp_ep *pep, u32 stream_id),
TP_ARGS(pep, stream_id)
);
DEFINE_EVENT(cdnsp_log_ep, cdnsp_ep_busy_try_halt_again,
TP_PROTO(struct cdnsp_ep *pep, u32 stream_id),
TP_ARGS(pep, stream_id)
);
DECLARE_EVENT_CLASS(cdnsp_log_enable_disable,
TP_PROTO(int set),
TP_ARGS(set),
TP_STRUCT__entry(
__field(int, set)
Annotation
- Immediate include surface: `linux/tracepoint.h`, `cdnsp-gadget.h`, `cdnsp-debug.h`, `trace/define_trace.h`.
- 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.