| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/09/25 13:20 | flow | patch-triage |
2mArgs:null Results: {
"EnableConfigs": [
"USB4_NET",
"USB4"
],
"FocusSymbols": [],
"KMSANReasoning": "",
"NeedsKMSAN": false,
"Reasoning": "The patch modifies drivers/net/thunderbolt/main.c (the ThunderboltIP network driver) to add support for toggling end-to-end (E2E) flow control on Tx rings via ethtool private flags. This driver operates over the Thunderbolt/USB4 bus and requires a physical Thunderbolt/USB4 Native Host Interface (NHI) PCIe controller as well as an active Thunderbolt XDomain peer connection to instantiate the net device and invoke the driver callbacks. Because Thunderbolt/USB4 host controllers and link topologies are not emulated in standard QEMU/GCE virtualized fuzzing environments, the modified code is structurally unreachable for syzkaller.",
"WorthFuzzing": false
} |
| 1/1 | 2026/09/25 13:20 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit e284a0a16ba159fb44a0b76d84b8c9792df989b6\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Fri Sep 25 13:20:25 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/drivers/net/thunderbolt/main.c b/drivers/net/thunderbolt/main.c\nindex d9fb587a62c5e..b17ab8e15c1f3 100644\n--- a/drivers/net/thunderbolt/main.c\n+++ b/drivers/net/thunderbolt/main.c\n@@ -160,6 +160,7 @@ struct tbnet_ring {\n * @login_sent: ThunderboltIP login message successfully sent\n * @login_received: ThunderboltIP login message received from the remote\n *\t\t host\n+ * @tx_e2e: Enable end-to-end flow control on the Tx ring\n * @local_transmit_path: HopID we are using to send out packets\n * @remote_transmit_path: HopID the other end is using to send packets to us\n * @connection_lock: Lock serializing access to @login_sent,\n@@ -190,6 +191,7 @@ struct tbnet {\n \tatomic_t command_id;\n \tbool login_sent;\n \tbool login_received;\n+\tbool tx_e2e;\n \tint local_transmit_path;\n \tint remote_transmit_path;\n \tstruct mutex connection_lock;\n@@ -947,8 +949,12 @@ static int tbnet_open(struct net_device *dev)\n \n \tnetif_carrier_off(dev);\n \n-\tring = tb_ring_alloc_tx(xd-\u003etb-\u003enhi, -1, TBNET_RING_SIZE,\n-\t\t\t\tRING_FLAG_FRAME);\n+\tflags = RING_FLAG_FRAME;\n+\t/* The peer bit advertises E2E protocol support. */\n+\tif (net-\u003etx_e2e \u0026\u0026 tbnet_e2e \u0026\u0026 net-\u003esvc-\u003eprtcstns \u0026 TBNET_E2E)\n+\t\tflags |= RING_FLAG_E2E;\n+\n+\tring = tb_ring_alloc_tx(xd-\u003etb-\u003enhi, -1, TBNET_RING_SIZE, flags);\n \tif (!ring) {\n \t\tnetdev_err(dev, \"failed to allocate Tx ring\\n\");\n \t\treturn -ENOMEM;\n@@ -1336,8 +1342,58 @@ static int tbnet_get_link_ksettings(struct net_device *dev,\n \treturn 0;\n }\n \n+static const char tbnet_priv_flags[][ETH_GSTRING_LEN] = {\n+#define TBNET_PRIV_FLAG_TX_E2E\tBIT(0)\n+\t\"tx-e2e\",\n+};\n+\n+static void tbnet_get_strings(struct net_device *dev, u32 stringset, u8 *data)\n+{\n+\tif (stringset == ETH_SS_PRIV_FLAGS)\n+\t\tmemcpy(data, tbnet_priv_flags, sizeof(tbnet_priv_flags));\n+}\n+\n+static int tbnet_get_sset_count(struct net_device *dev, int sset)\n+{\n+\tif (sset == ETH_SS_PRIV_FLAGS)\n+\t\treturn ARRAY_SIZE(tbnet_priv_flags);\n+\n+\treturn -EOPNOTSUPP;\n+}\n+\n+static u32 tbnet_get_priv_flags(struct net_device *dev)\n+{\n+\tconst struct tbnet *net = netdev_priv(dev);\n+\n+\treturn net-\u003etx_e2e ? TBNET_PRIV_FLAG_TX_E2E : 0;\n+}\n+\n+static int tbnet_set_priv_flags(struct net_device *dev, u32 flags)\n+{\n+\tstruct tbnet *net = netdev_priv(dev);\n+\tbool tx_e2e;\n+\n+\tif (flags \u0026 ~TBNET_PRIV_FLAG_TX_E2E)\n+\t\treturn -EINVAL;\n+\n+\ttx_e2e = flags \u0026 TBNET_PRIV_FLAG_TX_E2E;\n+\tif (net-\u003etx_e2e == tx_e2e)\n+\t\treturn 0;\n+\tif (netif_running(dev))\n+\t\treturn -EBUSY;\n+\tif (tx_e2e \u0026\u0026 !tbnet_e2e)\n+\t\treturn -EOPNOTSUPP;\n+\n+\tnet-\u003etx_e2e = tx_e2e;\n+\treturn 0;\n+}\n+\n static const struct ethtool_ops tbnet_ethtool_ops = {\n \t.get_link_ksettings = tbnet_get_link_ksettings,\n+\t.get_strings = tbnet_get_strings,\n+\t.get_sset_count = tbnet_get_sset_count,\n+\t.get_priv_flags = tbnet_get_priv_flags,\n+\t.set_priv_flags = tbnet_set_priv_flags,\n };\n \n static void tbnet_generate_mac(struct net_device *dev)\n"
} |
| 2/1 | 2026/09/25 13:20 | agent | patch-evaluator |
2mModel:core Args: null Results: {
"EnableConfigs": [
"USB4_NET",
"USB4"
],
"FocusSymbols": [],
"Reasoning": "The patch modifies drivers/net/thunderbolt/main.c (the ThunderboltIP network driver) to add support for toggling end-to-end (E2E) flow control on Tx rings via ethtool private flags. This driver operates over the Thunderbolt/USB4 bus and requires a physical Thunderbolt/USB4 Native Host Interface (NHI) PCIe controller as well as an active Thunderbolt XDomain peer connection to instantiate the net device and invoke the driver callbacks. Because Thunderbolt/USB4 host controllers and link topologies are not emulated in standard QEMU/GCE virtualized fuzzing environments, the modified code is structurally unreachable for syzkaller.",
"WorthFuzzing": false
}Instruction: You are an expert Linux kernel maintainer and security engineer.
Your job is to review a provided patch series and evaluate whether it warrants fuzzing with syzkaller.
IMPORTANT: The changes have ALREADY been applied and committed as the HEAD commit in
your workspace. Do NOT rely on internal assumptions. You must actively use your code access
tools to inspect the actual source code, callers, and surrounding context.
================================================================================
1. CORE TRIAGE PHILOSOPHY
================================================================================
The goal of patch fuzzing is to discover crashes, regressions, exposed latent bugs,
and newly triggered assertions introduced by the patch series.
- REACHABILITY IS THE PRIMARY GATE:
Fuzzing can only discover bugs in code that can actually execute in standard virtualized
environments (GCE or QEMU, utilizing software-emulated devices like USB gadgets, netdev, tun/tap).
If the modified code is structurally unreachable (see Section 2), it MUST NOT be fuzzed,
regardless of whether it adds assertions or complex logic.
- DO NOT BLINDLY TRUST "NO FUNCTIONAL CHANGE" (NFCI) OR "REFACTORING" CLAIMS:
Patch authors routinely label changes as "cleanups", "refactorings", or state
"No functional change intended". Do NOT take these claims at face value.
Code refactorings that rearrange logic, introduce helper functions, or alter state management
in core subsystems frequently introduce subtle semantic shifts or uncover latent kernel bugs.
If reachable executable code is modified or refactored, it MUST be fuzzed.
- NEW OR MODIFIED ASSERTIONS IN REACHABLE CODE MUST BE FUZZED:
When a patch introduces or modifies runtime checks or assertions (e.g., WARN_ON*, VM_WARN_ON*,
BUG_ON*, lockdep_assert*) in reachable code paths, it enforces new or stricter invariants.
Even if the author believes the invariant always holds, fuzzing is essential to verify whether
an unusual sequence of operations can violate it.
================================================================================
2. WHEN TO RETURN WorthFuzzing=false (NEGATIVE CRITERIA)
================================================================================
Return WorthFuzzing=false ONLY IF all modified code falls strictly into one or more of these categories:
- Non-kernel and non-executable changes:
* Modifications to Documentation/, comments, or spelling fixes.
* User-space directories, self-tests, samples, or scripts (e.g., tools/, samples/, scripts/, usr/)
that do not affect the compiled kernel image (vmlinux) or kernel modules.
* Purely decorative logging (e.g., message strings in pr_err, printk, dev_info) or tracepoints
that do not alter control flow or data structures.
* Build system or Kconfig changes that do not alter compiled C logic.
- Structurally unreachable hardware:
* Vendor-specific PCIe switches, SmartNICs, or GPU drivers (e.g., mlxsw, pds_core, qed,
ionic, amdgpu) requiring physical ASIC/PCIe cards not emulated in standard QEMU.
- Unreachable execution paths:
* Driver teardown callbacks (.remove, .shutdown, pci_unregister_driver) executed only during
physical PCI hot-unplug or manual sysfs driver unbinding.
* Code paths exclusive to architectures other than the target architecture.
================================================================================
3. WHEN TO RETURN WorthFuzzing=true (POSITIVE CRITERIA)
================================================================================
Return WorthFuzzing=true whenever the patch touches reachable executable code, including:
- Core Subsystems:
* Any logic modifications in memory management (mm/), synchronization/locking (kernel/locking/),
BPF, scheduler, core networking, VFS, or syscall handling.
- Refactorings and Code Cleanups:
* Any restructuring of reachable data structures, helper abstractions, or algorithm flows.
- Runtime Assertions and Defensive Checks:
* Any introduction or alteration of assertions (WARN_ON*, VM_WARN_ON*, BUG_ON*, etc.) in reachable paths.
- Reachable Drivers and Protocols:
* Drivers accessible via virtual buses (virtio, USB gadget, loopback, netlink, binder, sockets, etc.).
================================================================================
4. EXTRACTING FocusSymbols (PREVENTING DILUTION)
================================================================================
When WorthFuzzing=true, you must extract specific kernel functions into FocusSymbols to guide the fuzzer:
- AVOID UBIQUITOUS LIFECYCLE HOT-PATHS:
Do NOT list generic, ubiquitous functions called by almost every program in the corpus
(including, but not limited to: general memory allocators and deallocators, page fault
and trap handlers, or core synchronization primitives; this is not an exhaustive list).
Listing ubiquitous functions causes the fuzzer to classify thousands of unrelated tests as "focused",
which severely dilutes fuzzing effort away from the actual changes.
- TARGET SPECIFIC FEATURE LOGIC AND ENTRYPOINTS:
List functions that specifically implement the logic being added or altered, or direct API entrypoints
for the subsystem feature under review.
- HANDLING STATIC INLINE FUNCTIONS IN HEADERS (.h):
Compiler-inlined static functions (such as static inlines in mm/*.h or include/linux/*.h) lack
distinct symbol addresses in vmlinux and cannot be targeted directly by symbol coverage filters.
If the changes are primarily in static inline helpers, identify non-static, feature-specific caller
functions in .c files that exercise them (avoiding ubiquitous lifecycle wrappers).
================================================================================
5. IDENTIFYING EnableConfigs
================================================================================
Identify any specific CONFIG_ options required to properly compile and reach the modified code:
- Inspect Kconfig files and #ifdef guards; do not make assumptions.
- Check "depends on" lines in Kconfig to include any non-standard parent subsystem configs needed.
- Strip any 'CONFIG_' prefix (e.g., return "NET_IPV4" instead of "CONFIG_NET_IPV4").
Prefer calling several tools at the same time to save round-trips.
Use set-results tool to provide results of the analysis.
It must be called exactly once before the final reply.
Ignore results of this tool.
Prompt: Target architecture: amd64
For your convenience, here is the diff of the changes:
commit e284a0a16ba159fb44a0b76d84b8c9792df989b6
Author: syz-cluster <triage@syzkaller.com>
Date: Fri Sep 25 13:20:25 2026 +0000
syz-cluster: applied patch under review
diff --git a/drivers/net/thunderbolt/main.c b/drivers/net/thunderbolt/main.c
index d9fb587a62c5e..b17ab8e15c1f3 100644
--- a/drivers/net/thunderbolt/main.c
+++ b/drivers/net/thunderbolt/main.c
@@ -160,6 +160,7 @@ struct tbnet_ring {
* @login_sent: ThunderboltIP login message successfully sent
* @login_received: ThunderboltIP login message received from the remote
* host
+ * @tx_e2e: Enable end-to-end flow control on the Tx ring
* @local_transmit_path: HopID we are using to send out packets
* @remote_transmit_path: HopID the other end is using to send packets to us
* @connection_lock: Lock serializing access to @login_sent,
@@ -190,6 +191,7 @@ struct tbnet {
atomic_t command_id;
bool login_sent;
bool login_received;
+ bool tx_e2e;
int local_transmit_path;
int remote_transmit_path;
struct mutex connection_lock;
@@ -947,8 +949,12 @@ static int tbnet_open(struct net_device *dev)
netif_carrier_off(dev);
- ring = tb_ring_alloc_tx(xd->tb->nhi, -1, TBNET_RING_SIZE,
- RING_FLAG_FRAME);
+ flags = RING_FLAG_FRAME;
+ /* The peer bit advertises E2E protocol support. */
+ if (net->tx_e2e && tbnet_e2e && net->svc->prtcstns & TBNET_E2E)
+ flags |= RING_FLAG_E2E;
+
+ ring = tb_ring_alloc_tx(xd->tb->nhi, -1, TBNET_RING_SIZE, flags);
if (!ring) {
netdev_err(dev, "failed to allocate Tx ring\n");
return -ENOMEM;
@@ -1336,8 +1342,58 @@ static int tbnet_get_link_ksettings(struct net_device *dev,
return 0;
}
+static const char tbnet_priv_flags[][ETH_GSTRING_LEN] = {
+#define TBNET_PRIV_FLAG_TX_E2E BIT(0)
+ "tx-e2e",
+};
+
+static void tbnet_get_strings(struct net_device *dev, u32 stringset, u8 *data)
+{
+ if (stringset == ETH_SS_PRIV_FLAGS)
+ memcpy(data, tbnet_priv_flags, sizeof(tbnet_priv_flags));
+}
+
+static int tbnet_get_sset_count(struct net_device *dev, int sset)
+{
+ if (sset == ETH_SS_PRIV_FLAGS)
+ return ARRAY_SIZE(tbnet_priv_flags);
+
+ return -EOPNOTSUPP;
+}
+
+static u32 tbnet_get_priv_flags(struct net_device *dev)
+{
+ const struct tbnet *net = netdev_priv(dev);
+
+ return net->tx_e2e ? TBNET_PRIV_FLAG_TX_E2E : 0;
+}
+
+static int tbnet_set_priv_flags(struct net_device *dev, u32 flags)
+{
+ struct tbnet *net = netdev_priv(dev);
+ bool tx_e2e;
+
+ if (flags & ~TBNET_PRIV_FLAG_TX_E2E)
+ return -EINVAL;
+
+ tx_e2e = flags & TBNET_PRIV_FLAG_TX_E2E;
+ if (net->tx_e2e == tx_e2e)
+ return 0;
+ if (netif_running(dev))
+ return -EBUSY;
+ if (tx_e2e && !tbnet_e2e)
+ return -EOPNOTSUPP;
+
+ net->tx_e2e = tx_e2e;
+ return 0;
+}
+
static const struct ethtool_ops tbnet_ethtool_ops = {
.get_link_ksettings = tbnet_get_link_ksettings,
+ .get_strings = tbnet_get_strings,
+ .get_sset_count = tbnet_get_sset_count,
+ .get_priv_flags = tbnet_get_priv_flags,
+ .set_priv_flags = tbnet_set_priv_flags,
};
static void tbnet_generate_mac(struct net_device *dev)
|
| 3/2 | 2026/09/25 13:20 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 3888 output: 29 thoughts: 159 Thoughts: **Evaluating the Patch for Syzkaller Fuzzing** Okay, so I need to decide if this patch is a good candidate for Syzkaller fuzzing. My first thought is to run it through my mental checklist: safety guidelines are paramount. Is this routine developer QA or something more substantial that might need a deeper dive into the kernel? Based on the request it seems to be in the "completely benign" category. Alright, let's look at the actual diff and codebase. The patch touches `drivers/net/thunderbolt/main.c`. Hmm, right, that's the Thunderbolt networking driver, ThunderboltIP, the Apple/Intel one. Now, the key question is whether this is something Syzkaller can actually *reach*. Does it require specific hardware? Can it be emulated? Or can it be made to be reached in the current Syzkaller build? Before I dive too deep into assumptions, I'll leverage my knowledge of the available tools. I'll get the lay of the land for the `drivers/net/thunderbolt/` directory and its dependencies to check and see what those tools say. That will provide a clearer picture for my decision on whether Syzkaller is a good fit. |
| 4/2 | 2026/09/25 13:20 | tool | grepper |
0mArgs:{
"Expression": "tbnet",
"PathPrefix": "drivers/net/thunderbolt/"
}Results: {
"Output": "\nFull output is too long, showing 500 out of 629 lines.\nUse more precise expression if possible.\n\ndrivers/net/thunderbolt/main.c=119=struct thunderbolt_ip_status {\n--\ndrivers/net/thunderbolt/main.c-123-\ndrivers/net/thunderbolt/main.c:124:struct tbnet_stats {\ndrivers/net/thunderbolt/main.c-125-\tu64 tx_packets;\n--\ndrivers/net/thunderbolt/main.c-136-\ndrivers/net/thunderbolt/main.c:137:struct tbnet_frame {\ndrivers/net/thunderbolt/main.c-138-\tstruct net_device *dev;\n--\ndrivers/net/thunderbolt/main.c-142-\ndrivers/net/thunderbolt/main.c:143:struct tbnet_ring {\ndrivers/net/thunderbolt/main.c:144:\tstruct tbnet_frame frames[TBNET_RING_SIZE];\ndrivers/net/thunderbolt/main.c-145-\tunsigned int cons;\n--\ndrivers/net/thunderbolt/main.c-150-/**\ndrivers/net/thunderbolt/main.c:151: * struct tbnet - ThunderboltIP network driver private data\ndrivers/net/thunderbolt/main.c-152- * @svc: XDomain service the driver is bound to\n--\ndrivers/net/thunderbolt/main.c-182- */\ndrivers/net/thunderbolt/main.c:183:struct tbnet {\ndrivers/net/thunderbolt/main.c-184-\tconst struct tb_service *svc;\n--\ndrivers/net/thunderbolt/main.c-188-\tstruct napi_struct napi;\ndrivers/net/thunderbolt/main.c:189:\tstruct tbnet_stats stats;\ndrivers/net/thunderbolt/main.c-190-\tstruct sk_buff *skb;\n--\ndrivers/net/thunderbolt/main.c-202-\tstruct thunderbolt_ip_frame_header rx_hdr;\ndrivers/net/thunderbolt/main.c:203:\tstruct tbnet_ring rx_ring;\ndrivers/net/thunderbolt/main.c-204-\tatomic_t frame_id;\ndrivers/net/thunderbolt/main.c:205:\tstruct tbnet_ring tx_ring;\ndrivers/net/thunderbolt/main.c-206-};\n--\ndrivers/net/thunderbolt/main.c-208-/* Network property directory UUID: c66189ca-1cce-4195-bdb8-49592e5f5a4f */\ndrivers/net/thunderbolt/main.c:209:static const uuid_t tbnet_dir_uuid =\ndrivers/net/thunderbolt/main.c-210-\tUUID_INIT(0xc66189ca, 0x1cce, 0x4195,\n--\ndrivers/net/thunderbolt/main.c-213-/* ThunderboltIP protocol UUID: 798f589e-3616-8a47-97c6-5664a920c8dd */\ndrivers/net/thunderbolt/main.c:214:static const uuid_t tbnet_svc_uuid =\ndrivers/net/thunderbolt/main.c-215-\tUUID_INIT(0x798f589e, 0x3616, 0x8a47,\n--\ndrivers/net/thunderbolt/main.c-217-\ndrivers/net/thunderbolt/main.c:218:static struct tb_property_dir *tbnet_dir;\ndrivers/net/thunderbolt/main.c-219-\ndrivers/net/thunderbolt/main.c:220:static bool tbnet_e2e = true;\ndrivers/net/thunderbolt/main.c:221:module_param_named(e2e, tbnet_e2e, bool, 0444);\ndrivers/net/thunderbolt/main.c-222-MODULE_PARM_DESC(e2e, \"USB4NET full end-to-end flow control (default: true)\");\ndrivers/net/thunderbolt/main.c-223-\ndrivers/net/thunderbolt/main.c:224:static void tbnet_fill_header(struct thunderbolt_ip_header *hdr, u64 route,\ndrivers/net/thunderbolt/main.c-225-\tu8 sequence, const uuid_t *initiator_uuid, const uuid_t *target_uuid,\n--\ndrivers/net/thunderbolt/main.c-236-\thdr-\u003elength_sn = length_sn;\ndrivers/net/thunderbolt/main.c:237:\tuuid_copy(\u0026hdr-\u003euuid, \u0026tbnet_svc_uuid);\ndrivers/net/thunderbolt/main.c-238-\tuuid_copy(\u0026hdr-\u003einitiator_uuid, initiator_uuid);\n--\ndrivers/net/thunderbolt/main.c-243-\ndrivers/net/thunderbolt/main.c:244:static int tbnet_login_response(struct tbnet *net, u64 route, u8 sequence,\ndrivers/net/thunderbolt/main.c-245-\t\t\t\tu32 command_id)\n--\ndrivers/net/thunderbolt/main.c-250-\tmemset(\u0026reply, 0, sizeof(reply));\ndrivers/net/thunderbolt/main.c:251:\ttbnet_fill_header(\u0026reply.hdr, route, sequence, xd-\u003elocal_uuid,\ndrivers/net/thunderbolt/main.c-252-\t\t\t xd-\u003eremote_uuid, TBIP_LOGIN_RESPONSE, sizeof(reply),\n--\ndrivers/net/thunderbolt/main.c-260-\ndrivers/net/thunderbolt/main.c:261:static int tbnet_login_request(struct tbnet *net, u8 sequence)\ndrivers/net/thunderbolt/main.c-262-{\n--\ndrivers/net/thunderbolt/main.c-267-\tmemset(\u0026request, 0, sizeof(request));\ndrivers/net/thunderbolt/main.c:268:\ttbnet_fill_header(\u0026request.hdr, xd-\u003eroute, sequence, xd-\u003elocal_uuid,\ndrivers/net/thunderbolt/main.c-269-\t\t\t xd-\u003eremote_uuid, TBIP_LOGIN, sizeof(request),\n--\ndrivers/net/thunderbolt/main.c-280-\ndrivers/net/thunderbolt/main.c:281:static int tbnet_logout_response(struct tbnet *net, u64 route, u8 sequence,\ndrivers/net/thunderbolt/main.c-282-\t\t\t\t u32 command_id)\n--\ndrivers/net/thunderbolt/main.c-287-\tmemset(\u0026reply, 0, sizeof(reply));\ndrivers/net/thunderbolt/main.c:288:\ttbnet_fill_header(\u0026reply.hdr, route, sequence, xd-\u003elocal_uuid,\ndrivers/net/thunderbolt/main.c-289-\t\t\t xd-\u003eremote_uuid, TBIP_STATUS, sizeof(reply),\n--\ndrivers/net/thunderbolt/main.c-294-\ndrivers/net/thunderbolt/main.c:295:static int tbnet_logout_request(struct tbnet *net)\ndrivers/net/thunderbolt/main.c-296-{\n--\ndrivers/net/thunderbolt/main.c-301-\tmemset(\u0026request, 0, sizeof(request));\ndrivers/net/thunderbolt/main.c:302:\ttbnet_fill_header(\u0026request.hdr, xd-\u003eroute, 0, xd-\u003elocal_uuid,\ndrivers/net/thunderbolt/main.c-303-\t\t\t xd-\u003eremote_uuid, TBIP_LOGOUT, sizeof(request),\n--\ndrivers/net/thunderbolt/main.c-311-\ndrivers/net/thunderbolt/main.c:312:static void start_login(struct tbnet *net)\ndrivers/net/thunderbolt/main.c-313-{\n--\ndrivers/net/thunderbolt/main.c-324-\ndrivers/net/thunderbolt/main.c:325:static void stop_login(struct tbnet *net)\ndrivers/net/thunderbolt/main.c-326-{\n--\ndrivers/net/thunderbolt/main.c-332-\ndrivers/net/thunderbolt/main.c:333:static void tbnet_free_buffers(struct tbnet_ring *ring)\ndrivers/net/thunderbolt/main.c-334-{\n--\ndrivers/net/thunderbolt/main.c-338-\t\tstruct device *dma_dev = tb_ring_dma_device(ring-\u003ering);\ndrivers/net/thunderbolt/main.c:339:\t\tstruct tbnet_frame *tf = \u0026ring-\u003eframes[i];\ndrivers/net/thunderbolt/main.c-340-\t\tenum dma_data_direction dir;\n--\ndrivers/net/thunderbolt/main.c-356-\ndrivers/net/thunderbolt/main.c:357:\t\ttrace_tbnet_free_frame(i, tf-\u003epage, tf-\u003eframe.buffer_phy, dir);\ndrivers/net/thunderbolt/main.c-358-\n--\ndrivers/net/thunderbolt/main.c-370-\ndrivers/net/thunderbolt/main.c:371:static void tbnet_tear_down(struct tbnet *net, bool send_logout)\ndrivers/net/thunderbolt/main.c-372-{\n--\ndrivers/net/thunderbolt/main.c-385-\t\t\t\t retries);\ndrivers/net/thunderbolt/main.c:386:\t\t\tret = tbnet_logout_request(net);\ndrivers/net/thunderbolt/main.c-387-\t\t\tif (ret != -ETIMEDOUT)\n--\ndrivers/net/thunderbolt/main.c-391-\t\t/* Tear the paths down before stopping the rings. This mirrors\ndrivers/net/thunderbolt/main.c:392:\t\t * tbnet_connected_work(), which enables the paths last so the\ndrivers/net/thunderbolt/main.c-393-\t\t * Rx ring is primed before packets can arrive. Stopping a\ndrivers/net/thunderbolt/main.c:394:\t\t * ring zeroes its descriptor base and tbnet_free_buffers()\ndrivers/net/thunderbolt/main.c-395-\t\t * unmaps and frees the frame buffers, leaving anything still\n--\ndrivers/net/thunderbolt/main.c-410-\t\ttb_ring_stop(net-\u003etx_ring.ring);\ndrivers/net/thunderbolt/main.c:411:\t\ttbnet_free_buffers(\u0026net-\u003erx_ring);\ndrivers/net/thunderbolt/main.c:412:\t\ttbnet_free_buffers(\u0026net-\u003etx_ring);\ndrivers/net/thunderbolt/main.c-413-\n--\ndrivers/net/thunderbolt/main.c-426-\ndrivers/net/thunderbolt/main.c:427:static int tbnet_handle_packet(const void *buf, size_t size, void *data)\ndrivers/net/thunderbolt/main.c-428-{\ndrivers/net/thunderbolt/main.c-429-\tconst struct thunderbolt_ip_login *pkg = buf;\ndrivers/net/thunderbolt/main.c:430:\tstruct tbnet *net = data;\ndrivers/net/thunderbolt/main.c-431-\tu32 command_id;\n--\ndrivers/net/thunderbolt/main.c-458-\ndrivers/net/thunderbolt/main.c:459:\t\tret = tbnet_login_response(net, route, sequence,\ndrivers/net/thunderbolt/main.c-460-\t\t\t\t\t pkg-\u003ehdr.command_id);\n--\ndrivers/net/thunderbolt/main.c-485-\t\tnetdev_dbg(net-\u003edev, \"remote logout request received\\n\");\ndrivers/net/thunderbolt/main.c:486:\t\tret = tbnet_logout_response(net, route, sequence, command_id);\ndrivers/net/thunderbolt/main.c-487-\t\tif (!ret) {\n--\ndrivers/net/thunderbolt/main.c-502-\ndrivers/net/thunderbolt/main.c:503:static unsigned int tbnet_available_buffers(const struct tbnet_ring *ring)\ndrivers/net/thunderbolt/main.c-504-{\n--\ndrivers/net/thunderbolt/main.c-507-\ndrivers/net/thunderbolt/main.c:508:static int tbnet_alloc_rx_buffers(struct tbnet *net, unsigned int nbuffers)\ndrivers/net/thunderbolt/main.c-509-{\ndrivers/net/thunderbolt/main.c:510:\tstruct tbnet_ring *ring = \u0026net-\u003erx_ring;\ndrivers/net/thunderbolt/main.c-511-\tint ret;\n--\ndrivers/net/thunderbolt/main.c-515-\t\tunsigned int index = ring-\u003eprod \u0026 (TBNET_RING_SIZE - 1);\ndrivers/net/thunderbolt/main.c:516:\t\tstruct tbnet_frame *tf = \u0026ring-\u003eframes[index];\ndrivers/net/thunderbolt/main.c-517-\t\tdma_addr_t dma_addr;\n--\ndrivers/net/thunderbolt/main.c-541-\ndrivers/net/thunderbolt/main.c:542:\t\ttrace_tbnet_alloc_rx_frame(index, tf-\u003epage, dma_addr,\ndrivers/net/thunderbolt/main.c-543-\t\t\t\t\t DMA_FROM_DEVICE);\n--\ndrivers/net/thunderbolt/main.c-552-err_free:\ndrivers/net/thunderbolt/main.c:553:\ttbnet_free_buffers(ring);\ndrivers/net/thunderbolt/main.c-554-\treturn ret;\n--\ndrivers/net/thunderbolt/main.c-556-\ndrivers/net/thunderbolt/main.c:557:static struct tbnet_frame *tbnet_get_tx_buffer(struct tbnet *net)\ndrivers/net/thunderbolt/main.c-558-{\ndrivers/net/thunderbolt/main.c:559:\tstruct tbnet_ring *ring = \u0026net-\u003etx_ring;\ndrivers/net/thunderbolt/main.c-560-\tstruct device *dma_dev = tb_ring_dma_device(ring-\u003ering);\ndrivers/net/thunderbolt/main.c:561:\tstruct tbnet_frame *tf;\ndrivers/net/thunderbolt/main.c-562-\tunsigned int index;\ndrivers/net/thunderbolt/main.c-563-\ndrivers/net/thunderbolt/main.c:564:\tif (!tbnet_available_buffers(ring))\ndrivers/net/thunderbolt/main.c-565-\t\treturn NULL;\n--\ndrivers/net/thunderbolt/main.c-577-\ndrivers/net/thunderbolt/main.c:578:static void tbnet_tx_callback(struct tb_ring *ring, struct ring_frame *frame,\ndrivers/net/thunderbolt/main.c-579-\t\t\t bool canceled)\ndrivers/net/thunderbolt/main.c-580-{\ndrivers/net/thunderbolt/main.c:581:\tstruct tbnet_frame *tf = container_of(frame, typeof(*tf), frame);\ndrivers/net/thunderbolt/main.c:582:\tstruct tbnet *net = netdev_priv(tf-\u003edev);\ndrivers/net/thunderbolt/main.c-583-\n--\ndrivers/net/thunderbolt/main.c-586-\ndrivers/net/thunderbolt/main.c:587:\tif (tbnet_available_buffers(\u0026net-\u003etx_ring) \u003e= TBNET_RING_SIZE / 2)\ndrivers/net/thunderbolt/main.c-588-\t\tnetif_wake_queue(net-\u003edev);\n--\ndrivers/net/thunderbolt/main.c-590-\ndrivers/net/thunderbolt/main.c:591:static int tbnet_alloc_tx_buffers(struct tbnet *net)\ndrivers/net/thunderbolt/main.c-592-{\ndrivers/net/thunderbolt/main.c:593:\tstruct tbnet_ring *ring = \u0026net-\u003etx_ring;\ndrivers/net/thunderbolt/main.c-594-\tstruct device *dma_dev = tb_ring_dma_device(ring-\u003ering);\n--\ndrivers/net/thunderbolt/main.c-597-\tfor (i = 0; i \u003c TBNET_RING_SIZE; i++) {\ndrivers/net/thunderbolt/main.c:598:\t\tstruct tbnet_frame *tf = \u0026ring-\u003eframes[i];\ndrivers/net/thunderbolt/main.c-599-\t\tdma_addr_t dma_addr;\n--\ndrivers/net/thunderbolt/main.c-602-\t\tif (!tf-\u003epage) {\ndrivers/net/thunderbolt/main.c:603:\t\t\ttbnet_free_buffers(ring);\ndrivers/net/thunderbolt/main.c-604-\t\t\treturn -ENOMEM;\n--\ndrivers/net/thunderbolt/main.c-611-\t\t\ttf-\u003epage = NULL;\ndrivers/net/thunderbolt/main.c:612:\t\t\ttbnet_free_buffers(ring);\ndrivers/net/thunderbolt/main.c-613-\t\t\treturn -ENOMEM;\n--\ndrivers/net/thunderbolt/main.c-617-\t\ttf-\u003eframe.buffer_phy = dma_addr;\ndrivers/net/thunderbolt/main.c:618:\t\ttf-\u003eframe.callback = tbnet_tx_callback;\ndrivers/net/thunderbolt/main.c-619-\t\ttf-\u003eframe.sof = TBIP_PDF_FRAME_START;\n--\ndrivers/net/thunderbolt/main.c-621-\ndrivers/net/thunderbolt/main.c:622:\t\ttrace_tbnet_alloc_tx_frame(i, tf-\u003epage, dma_addr, DMA_TO_DEVICE);\ndrivers/net/thunderbolt/main.c-623-\t}\n--\ndrivers/net/thunderbolt/main.c-630-\ndrivers/net/thunderbolt/main.c:631:static void tbnet_connect_failed(struct tbnet *net)\ndrivers/net/thunderbolt/main.c-632-{\n--\ndrivers/net/thunderbolt/main.c-638-\ndrivers/net/thunderbolt/main.c:639:static void tbnet_connected_work(struct work_struct *work)\ndrivers/net/thunderbolt/main.c-640-{\ndrivers/net/thunderbolt/main.c:641:\tstruct tbnet *net = container_of(work, typeof(*net), connected_work);\ndrivers/net/thunderbolt/main.c-642-\tbool connected;\n--\ndrivers/net/thunderbolt/main.c-661-\t\t\ttb_xdomain_release_in_hopid(net-\u003exd, ret);\ndrivers/net/thunderbolt/main.c:662:\t\ttbnet_connect_failed(net);\ndrivers/net/thunderbolt/main.c-663-\t\treturn;\n--\ndrivers/net/thunderbolt/main.c-675-\ndrivers/net/thunderbolt/main.c:676:\tret = tbnet_alloc_rx_buffers(net, TBNET_RING_SIZE);\ndrivers/net/thunderbolt/main.c-677-\tif (ret)\n--\ndrivers/net/thunderbolt/main.c-679-\ndrivers/net/thunderbolt/main.c:680:\tret = tbnet_alloc_tx_buffers(net);\ndrivers/net/thunderbolt/main.c-681-\tif (ret)\n--\ndrivers/net/thunderbolt/main.c-699-err_free_tx_buffers:\ndrivers/net/thunderbolt/main.c:700:\ttbnet_free_buffers(\u0026net-\u003etx_ring);\ndrivers/net/thunderbolt/main.c-701-err_free_rx_buffers:\ndrivers/net/thunderbolt/main.c:702:\ttbnet_free_buffers(\u0026net-\u003erx_ring);\ndrivers/net/thunderbolt/main.c-703-err_stop_rings:\n--\ndrivers/net/thunderbolt/main.c-706-\ttb_xdomain_release_in_hopid(net-\u003exd, net-\u003eremote_transmit_path);\ndrivers/net/thunderbolt/main.c:707:\ttbnet_connect_failed(net);\ndrivers/net/thunderbolt/main.c-708-}\ndrivers/net/thunderbolt/main.c-709-\ndrivers/net/thunderbolt/main.c:710:static void tbnet_login_work(struct work_struct *work)\ndrivers/net/thunderbolt/main.c-711-{\ndrivers/net/thunderbolt/main.c:712:\tstruct tbnet *net = container_of(work, typeof(*net), login_work.work);\ndrivers/net/thunderbolt/main.c-713-\tunsigned long delay = msecs_to_jiffies(TBNET_LOGIN_DELAY);\n--\ndrivers/net/thunderbolt/main.c-721-\ndrivers/net/thunderbolt/main.c:722:\tret = tbnet_login_request(net, net-\u003elogin_retries % 4);\ndrivers/net/thunderbolt/main.c-723-\tif (ret) {\n--\ndrivers/net/thunderbolt/main.c-744-\ndrivers/net/thunderbolt/main.c:745:static void tbnet_disconnect_work(struct work_struct *work)\ndrivers/net/thunderbolt/main.c-746-{\ndrivers/net/thunderbolt/main.c:747:\tstruct tbnet *net = container_of(work, typeof(*net), disconnect_work);\ndrivers/net/thunderbolt/main.c-748-\ndrivers/net/thunderbolt/main.c:749:\ttbnet_tear_down(net, false);\ndrivers/net/thunderbolt/main.c-750-}\ndrivers/net/thunderbolt/main.c-751-\ndrivers/net/thunderbolt/main.c:752:static bool tbnet_check_frame(struct tbnet *net, const struct tbnet_frame *tf,\ndrivers/net/thunderbolt/main.c-753-\t\t\t const struct thunderbolt_ip_frame_header *hdr)\n--\ndrivers/net/thunderbolt/main.c-809-\ndrivers/net/thunderbolt/main.c:810:\t/* Start of packet, validate the frame header. tbnet_poll() puts the\ndrivers/net/thunderbolt/main.c-811-\t * first frame in the skb linear area and every further frame in a page\n--\ndrivers/net/thunderbolt/main.c-826-\ndrivers/net/thunderbolt/main.c:827:static int tbnet_poll(struct napi_struct *napi, int budget)\ndrivers/net/thunderbolt/main.c-828-{\ndrivers/net/thunderbolt/main.c:829:\tstruct tbnet *net = container_of(napi, struct tbnet, napi);\ndrivers/net/thunderbolt/main.c:830:\tunsigned int cleaned_count = tbnet_available_buffers(\u0026net-\u003erx_ring);\ndrivers/net/thunderbolt/main.c-831-\tstruct device *dma_dev = tb_ring_dma_device(net-\u003erx_ring.ring);\n--\ndrivers/net/thunderbolt/main.c-838-\t\tstruct ring_frame *frame;\ndrivers/net/thunderbolt/main.c:839:\t\tstruct tbnet_frame *tf;\ndrivers/net/thunderbolt/main.c-840-\t\tstruct page *page;\n--\ndrivers/net/thunderbolt/main.c-848-\t\tif (cleaned_count \u003e= MAX_SKB_FRAGS) {\ndrivers/net/thunderbolt/main.c:849:\t\t\ttbnet_alloc_rx_buffers(net, cleaned_count);\ndrivers/net/thunderbolt/main.c-850-\t\t\tcleaned_count = 0;\n--\ndrivers/net/thunderbolt/main.c-867-\t\thdr = page_address(page);\ndrivers/net/thunderbolt/main.c:868:\t\tif (!tbnet_check_frame(net, tf, hdr)) {\ndrivers/net/thunderbolt/main.c:869:\t\t\ttrace_tbnet_invalid_rx_ip_frame(hdr-\u003eframe_size,\ndrivers/net/thunderbolt/main.c-870-\t\t\t\thdr-\u003eframe_id, hdr-\u003eframe_index, hdr-\u003eframe_count);\n--\ndrivers/net/thunderbolt/main.c-876-\ndrivers/net/thunderbolt/main.c:877:\t\ttrace_tbnet_rx_ip_frame(hdr-\u003eframe_size, hdr-\u003eframe_id,\ndrivers/net/thunderbolt/main.c-878-\t\t\t\t\thdr-\u003eframe_index, hdr-\u003eframe_count);\n--\ndrivers/net/thunderbolt/main.c-914-\t\t\tskb-\u003eprotocol = eth_type_trans(skb, net-\u003edev);\ndrivers/net/thunderbolt/main.c:915:\t\t\ttrace_tbnet_rx_skb(skb);\ndrivers/net/thunderbolt/main.c-916-\t\t\tnapi_gro_receive(\u0026net-\u003enapi, skb);\n--\ndrivers/net/thunderbolt/main.c-921-\tif (cleaned_count)\ndrivers/net/thunderbolt/main.c:922:\t\ttbnet_alloc_rx_buffers(net, cleaned_count);\ndrivers/net/thunderbolt/main.c-923-\n--\ndrivers/net/thunderbolt/main.c-933-\ndrivers/net/thunderbolt/main.c:934:static void tbnet_start_poll(void *data)\ndrivers/net/thunderbolt/main.c-935-{\ndrivers/net/thunderbolt/main.c:936:\tstruct tbnet *net = data;\ndrivers/net/thunderbolt/main.c-937-\n--\ndrivers/net/thunderbolt/main.c-940-\ndrivers/net/thunderbolt/main.c:941:static int tbnet_open(struct net_device *dev)\ndrivers/net/thunderbolt/main.c-942-{\ndrivers/net/thunderbolt/main.c:943:\tstruct tbnet *net = netdev_priv(dev);\ndrivers/net/thunderbolt/main.c-944-\tstruct tb_xdomain *xd = net-\u003exd;\n--\ndrivers/net/thunderbolt/main.c-953-\t/* The peer bit advertises E2E protocol support. */\ndrivers/net/thunderbolt/main.c:954:\tif (net-\u003etx_e2e \u0026\u0026 tbnet_e2e \u0026\u0026 net-\u003esvc-\u003eprtcstns \u0026 TBNET_E2E)\ndrivers/net/thunderbolt/main.c-955-\t\tflags |= RING_FLAG_E2E;\n--\ndrivers/net/thunderbolt/main.c-977-\t/* Only enable full E2E if the other end supports it too */\ndrivers/net/thunderbolt/main.c:978:\tif (tbnet_e2e \u0026\u0026 net-\u003esvc-\u003eprtcstns \u0026 TBNET_E2E)\ndrivers/net/thunderbolt/main.c-979-\t\tflags |= RING_FLAG_E2E;\n--\ndrivers/net/thunderbolt/main.c-982-\t\t\t\tnet-\u003etx_ring.ring-\u003ehop, sof_mask,\ndrivers/net/thunderbolt/main.c:983:\t\t\t\teof_mask, tbnet_start_poll, net);\ndrivers/net/thunderbolt/main.c-984-\tif (!ring) {\n--\ndrivers/net/thunderbolt/main.c-1001-\ndrivers/net/thunderbolt/main.c:1002:static int tbnet_stop(struct net_device *dev)\ndrivers/net/thunderbolt/main.c-1003-{\ndrivers/net/thunderbolt/main.c:1004:\tstruct tbnet *net = netdev_priv(dev);\ndrivers/net/thunderbolt/main.c-1005-\n--\ndrivers/net/thunderbolt/main.c-1008-\tcancel_work_sync(\u0026net-\u003edisconnect_work);\ndrivers/net/thunderbolt/main.c:1009:\ttbnet_tear_down(net, true);\ndrivers/net/thunderbolt/main.c-1010-\n--\ndrivers/net/thunderbolt/main.c-1020-\ndrivers/net/thunderbolt/main.c:1021:static bool tbnet_xmit_csum_and_map(struct tbnet *net, struct sk_buff *skb,\ndrivers/net/thunderbolt/main.c:1022:\tstruct tbnet_frame **frames, u32 frame_count)\ndrivers/net/thunderbolt/main.c-1023-{\n--\ndrivers/net/thunderbolt/main.c-1041-\t\t\thdr-\u003eframe_count = cpu_to_le32(frame_count);\ndrivers/net/thunderbolt/main.c:1042:\t\t\ttrace_tbnet_tx_ip_frame(hdr-\u003eframe_size, hdr-\u003eframe_id,\ndrivers/net/thunderbolt/main.c-1043-\t\t\t\t\t\thdr-\u003eframe_index, hdr-\u003eframe_count);\n--\ndrivers/net/thunderbolt/main.c-1107-\t\thdr-\u003eframe_count = cpu_to_le32(frame_count);\ndrivers/net/thunderbolt/main.c:1108:\t\ttrace_tbnet_tx_ip_frame(hdr-\u003eframe_size, hdr-\u003eframe_id,\ndrivers/net/thunderbolt/main.c-1109-\t\t\t\t\thdr-\u003eframe_index, hdr-\u003eframe_count);\n--\ndrivers/net/thunderbolt/main.c-1126-\ndrivers/net/thunderbolt/main.c:1127:static void *tbnet_kmap_frag(struct sk_buff *skb, unsigned int frag_num,\ndrivers/net/thunderbolt/main.c-1128-\t\t\t unsigned int *len)\n--\ndrivers/net/thunderbolt/main.c-1135-\ndrivers/net/thunderbolt/main.c:1136:static netdev_tx_t tbnet_start_xmit(struct sk_buff *skb,\ndrivers/net/thunderbolt/main.c-1137-\t\t\t\t struct net_device *dev)\ndrivers/net/thunderbolt/main.c-1138-{\ndrivers/net/thunderbolt/main.c:1139:\tstruct tbnet *net = netdev_priv(dev);\ndrivers/net/thunderbolt/main.c:1140:\tstruct tbnet_frame *frames[MAX_SKB_FRAGS];\ndrivers/net/thunderbolt/main.c-1141-\tu16 frame_id = atomic_read(\u0026net-\u003eframe_id);\n--\ndrivers/net/thunderbolt/main.c-1151-\ndrivers/net/thunderbolt/main.c:1152:\ttrace_tbnet_tx_skb(skb);\ndrivers/net/thunderbolt/main.c-1153-\ndrivers/net/thunderbolt/main.c-1154-\tnframes = DIV_ROUND_UP(data_len, TBNET_MAX_PAYLOAD_SIZE);\ndrivers/net/thunderbolt/main.c:1155:\tif (tbnet_available_buffers(\u0026net-\u003etx_ring) \u003c nframes) {\ndrivers/net/thunderbolt/main.c-1156-\t\tnetif_stop_queue(net-\u003edev);\n--\ndrivers/net/thunderbolt/main.c-1159-\ndrivers/net/thunderbolt/main.c:1160:\tframes[frame_index] = tbnet_get_tx_buffer(net);\ndrivers/net/thunderbolt/main.c-1161-\tif (!frames[frame_index])\n--\ndrivers/net/thunderbolt/main.c-1199-\t\t\t\t/* Map and then unmap quickly */\ndrivers/net/thunderbolt/main.c:1200:\t\t\t\tsrc = tbnet_kmap_frag(skb, frag++, \u0026len);\ndrivers/net/thunderbolt/main.c-1201-\t\t\t\tunmap = true;\n--\ndrivers/net/thunderbolt/main.c-1209-\ndrivers/net/thunderbolt/main.c:1210:\t\tframes[frame_index] = tbnet_get_tx_buffer(net);\ndrivers/net/thunderbolt/main.c-1211-\t\tif (!frames[frame_index])\n--\ndrivers/net/thunderbolt/main.c-1235-\t\tif (frag \u003c skb_shinfo(skb)-\u003enr_frags) {\ndrivers/net/thunderbolt/main.c:1236:\t\t\tsrc = tbnet_kmap_frag(skb, frag++, \u0026len);\ndrivers/net/thunderbolt/main.c-1237-\t\t\tunmap = true;\n--\ndrivers/net/thunderbolt/main.c-1247-\ndrivers/net/thunderbolt/main.c:1248:\tif (!tbnet_xmit_csum_and_map(net, skb, frames, frame_index + 1))\ndrivers/net/thunderbolt/main.c-1249-\t\tgoto err_drop;\n--\ndrivers/net/thunderbolt/main.c-1259-\ndrivers/net/thunderbolt/main.c:1260:\ttrace_tbnet_consume_skb(skb);\ndrivers/net/thunderbolt/main.c-1261-\tdev_consume_skb_any(skb);\n--\ndrivers/net/thunderbolt/main.c-1274-\ndrivers/net/thunderbolt/main.c:1275:static void tbnet_get_stats64(struct net_device *dev,\ndrivers/net/thunderbolt/main.c-1276-\t\t\t struct rtnl_link_stats64 *stats)\ndrivers/net/thunderbolt/main.c-1277-{\ndrivers/net/thunderbolt/main.c:1278:\tstruct tbnet *net = netdev_priv(dev);\ndrivers/net/thunderbolt/main.c-1279-\n--\ndrivers/net/thunderbolt/main.c-1293-\ndrivers/net/thunderbolt/main.c:1294:static const struct net_device_ops tbnet_netdev_ops = {\ndrivers/net/thunderbolt/main.c:1295:\t.ndo_open = tbnet_open,\ndrivers/net/thunderbolt/main.c:1296:\t.ndo_stop = tbnet_stop,\ndrivers/net/thunderbolt/main.c:1297:\t.ndo_start_xmit = tbnet_start_xmit,\ndrivers/net/thunderbolt/main.c-1298-\t.ndo_set_mac_address = eth_mac_addr,\ndrivers/net/thunderbolt/main.c:1299:\t.ndo_get_stats64 = tbnet_get_stats64,\ndrivers/net/thunderbolt/main.c-1300-};\ndrivers/net/thunderbolt/main.c-1301-\ndrivers/net/thunderbolt/main.c:1302:static int tbnet_get_link_ksettings(struct net_device *dev,\ndrivers/net/thunderbolt/main.c-1303-\t\t\t\t struct ethtool_link_ksettings *cmd)\ndrivers/net/thunderbolt/main.c-1304-{\ndrivers/net/thunderbolt/main.c:1305:\tconst struct tbnet *net = netdev_priv(dev);\ndrivers/net/thunderbolt/main.c-1306-\tconst struct tb_xdomain *xd = net-\u003exd;\n--\ndrivers/net/thunderbolt/main.c-1344-\ndrivers/net/thunderbolt/main.c:1345:static const char tbnet_priv_flags[][ETH_GSTRING_LEN] = {\ndrivers/net/thunderbolt/main.c-1346-#define TBNET_PRIV_FLAG_TX_E2E\tBIT(0)\n--\ndrivers/net/thunderbolt/main.c-1349-\ndrivers/net/thunderbolt/main.c:1350:static void tbnet_get_strings(struct net_device *dev, u32 stringset, u8 *data)\ndrivers/net/thunderbolt/main.c-1351-{\ndrivers/net/thunderbolt/main.c-1352-\tif (stringset == ETH_SS_PRIV_FLAGS)\ndrivers/net/thunderbolt/main.c:1353:\t\tmemcpy(data, tbnet_priv_flags, sizeof(tbnet_priv_flags));\ndrivers/net/thunderbolt/main.c-1354-}\ndrivers/net/thunderbolt/main.c-1355-\ndrivers/net/thunderbolt/main.c:1356:static int tbnet_get_sset_count(struct net_device *dev, int sset)\ndrivers/net/thunderbolt/main.c-1357-{\ndrivers/net/thunderbolt/main.c-1358-\tif (sset == ETH_SS_PRIV_FLAGS)\ndrivers/net/thunderbolt/main.c:1359:\t\treturn ARRAY_SIZE(tbnet_priv_flags);\ndrivers/net/thunderbolt/main.c-1360-\n--\ndrivers/net/thunderbolt/main.c-1363-\ndrivers/net/thunderbolt/main.c:1364:static u32 tbnet_get_priv_flags(struct net_device *dev)\ndrivers/net/thunderbolt/main.c-1365-{\ndrivers/net/thunderbolt/main.c:1366:\tconst struct tbnet *net = netdev_priv(dev);\ndrivers/net/thunderbolt/main.c-1367-\n--\ndrivers/net/thunderbolt/main.c-1370-\ndrivers/net/thunderbolt/main.c:1371:static int tbnet_set_priv_flags(struct net_device *dev, u32 flags)\ndrivers/net/thunderbolt/main.c-1372-{\ndrivers/net/thunderbolt/main.c:1373:\tstruct tbnet *net = netdev_priv(dev);\ndrivers/net/thunderbolt/main.c-1374-\tbool tx_e2e;\n--\ndrivers/net/thunderbolt/main.c-1383-\t\treturn -EBUSY;\ndrivers/net/thunderbolt/main.c:1384:\tif (tx_e2e \u0026\u0026 !tbnet_e2e)\ndrivers/net/thunderbolt/main.c-1385-\t\treturn -EOPNOTSUPP;\n--\ndrivers/net/thunderbolt/main.c-1390-\ndrivers/net/thunderbolt/main.c:1391:static const struct ethtool_ops tbnet_ethtool_ops = {\ndrivers/net/thunderbolt/main.c:1392:\t.get_link_ksettings = tbnet_get_link_ksettings,\ndrivers/net/thunderbolt/main.c:1393:\t.get_strings = tbnet_get_strings,\ndrivers/net/thunderbolt/main.c:1394:\t.get_sset_count = tbnet_get_sset_count,\ndrivers/net/thunderbolt/main.c:1395:\t.get_priv_flags = tbnet_get_priv_flags,\ndrivers/net/thunderbolt/main.c:1396:\t.set_priv_flags = tbnet_set_priv_flags,\ndrivers/net/thunderbolt/main.c-1397-};\ndrivers/net/thunderbolt/main.c-1398-\ndrivers/net/thunderbolt/main.c:1399:static void tbnet_generate_mac(struct net_device *dev)\ndrivers/net/thunderbolt/main.c-1400-{\ndrivers/net/thunderbolt/main.c:1401:\tconst struct tbnet *net = netdev_priv(dev);\ndrivers/net/thunderbolt/main.c-1402-\tconst struct tb_xdomain *xd = net-\u003exd;\n--\ndrivers/net/thunderbolt/main.c-1420-\ndrivers/net/thunderbolt/main.c:1421:static int tbnet_probe(struct tb_service *svc)\ndrivers/net/thunderbolt/main.c-1422-{\n--\ndrivers/net/thunderbolt/main.c-1424-\tstruct net_device *dev;\ndrivers/net/thunderbolt/main.c:1425:\tstruct tbnet *net;\ndrivers/net/thunderbolt/main.c-1426-\tint ret;\n--\ndrivers/net/thunderbolt/main.c-1434-\tnet = netdev_priv(dev);\ndrivers/net/thunderbolt/main.c:1435:\tINIT_DELAYED_WORK(\u0026net-\u003elogin_work, tbnet_login_work);\ndrivers/net/thunderbolt/main.c:1436:\tINIT_WORK(\u0026net-\u003econnected_work, tbnet_connected_work);\ndrivers/net/thunderbolt/main.c:1437:\tINIT_WORK(\u0026net-\u003edisconnect_work, tbnet_disconnect_work);\ndrivers/net/thunderbolt/main.c-1438-\tmutex_init(\u0026net-\u003econnection_lock);\n--\ndrivers/net/thunderbolt/main.c-1444-\ndrivers/net/thunderbolt/main.c:1445:\ttbnet_generate_mac(dev);\ndrivers/net/thunderbolt/main.c-1446-\ndrivers/net/thunderbolt/main.c-1447-\tstrcpy(dev-\u003ename, \"thunderbolt%d\");\ndrivers/net/thunderbolt/main.c:1448:\tdev-\u003enetdev_ops = \u0026tbnet_netdev_ops;\ndrivers/net/thunderbolt/main.c:1449:\tdev-\u003eethtool_ops = \u0026tbnet_ethtool_ops;\ndrivers/net/thunderbolt/main.c-1450-\n--\ndrivers/net/thunderbolt/main.c-1468-\ndrivers/net/thunderbolt/main.c:1469:\tnetif_napi_add(dev, \u0026net-\u003enapi, tbnet_poll);\ndrivers/net/thunderbolt/main.c-1470-\n--\ndrivers/net/thunderbolt/main.c-1474-\ndrivers/net/thunderbolt/main.c:1475:\tnet-\u003ehandler.uuid = \u0026tbnet_svc_uuid;\ndrivers/net/thunderbolt/main.c:1476:\tnet-\u003ehandler.callback = tbnet_handle_packet;\ndrivers/net/thunderbolt/main.c-1477-\tnet-\u003ehandler.data = net;\n--\ndrivers/net/thunderbolt/main.c-1491-\ndrivers/net/thunderbolt/main.c:1492:static void tbnet_remove(struct tb_service *svc)\ndrivers/net/thunderbolt/main.c-1493-{\ndrivers/net/thunderbolt/main.c:1494:\tstruct tbnet *net = tb_service_get_drvdata(svc);\ndrivers/net/thunderbolt/main.c-1495-\n--\ndrivers/net/thunderbolt/main.c-1500-\ndrivers/net/thunderbolt/main.c:1501:static void tbnet_shutdown(struct tb_service *svc)\ndrivers/net/thunderbolt/main.c-1502-{\ndrivers/net/thunderbolt/main.c:1503:\ttbnet_tear_down(tb_service_get_drvdata(svc), true);\n\n"
} |
| 5/2 | 2026/09/25 13:20 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 15429 output: 32 thoughts: 10 Thoughts: Okay, here's my attempt at summarizing that thought process, tailored for an expert audience: **Diving into Kconfig for Thunderbolt Networking** Alright, so I need to get up to speed on the Thunderbolt networking situation. My instinct is to head straight for the Kconfig files. This isn't exactly a new technology, so hopefully, there's already a well-defined configuration structure in place. I'm expecting to find a dedicated section, likely under the networking or hardware sections, where the relevant drivers and features are controlled. I'm also hoping the existing structure is clean, well-commented, and includes dependencies. The goal is to quickly pinpoint the specific options related to Thunderbolt networking, understand their defaults, and figure out how to best configure them for a specific use case. Specifically I'm hoping to quickly identify which drivers are relevant, how they can be enabled, and what dependencies they have. |
| 6/2 | 2026/09/25 13:20 | tool | grepper |
0mArgs:{
"Expression": "config USB4_NET",
"PathPrefix": "drivers/net/thunderbolt/"
}Results: {
"Output": "drivers/net/thunderbolt/Kconfig-1-# SPDX-License-Identifier: GPL-2.0-only\ndrivers/net/thunderbolt/Kconfig:2:config USB4_NET\ndrivers/net/thunderbolt/Kconfig-3-\ttristate \"Networking over USB4 and Thunderbolt cables\"\n"
} |
| 7/2 | 2026/09/25 13:20 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 15742 output: 35 thoughts: 15 Thoughts: Okay, here's my take on those thoughts, tailored for an expert audience: **Diving into the Thunderbolt Kconfig** Alright, let's get down to brass tacks. I'm going to start by taking a close look at the `drivers/net/thunderbolt/Kconfig` file. I'm immediately expecting a configuration fragment, likely using the usual `config` blocks, maybe some `menuconfig` or `choice` directives depending on the complexity of the Thunderbolt network driver's features. My initial focus will be on the dependencies. I want to see which other kernel subsystems, drivers, or options are prerequisites for enabling Thunderbolt networking. Are we looking at dependencies on the core Thunderbolt host controller driver (`thunderbolt.ko`), maybe specific hardware platform support, or potentially other network stack components? I'll be scrutinizing the help text for each option. It's crucial to understand the implications of each configuration choice. I'm looking for clues about the supported hardware variants (e.g., specific TB controllers or NICs), power management behaviors related to Thunderbolt connectivity, and any performance trade-offs associated with different settings. I'll also be watching for any conditional dependencies (e.g., options that only apply if a certain other driver is enabled), which often reveal insights into the overall design and modularity of the Thunderbolt network stack. I'll be paying close attention to any "default" values assigned to options. Do they make sense? Are they reasonable for a wide range of typical setups, or are they skewed toward specific use cases? I'll also be trying to gauge the maturity of the driver based on the available options and the level of customization. Finally, I'll be keeping an eye out for any "tricky" bits – anything that looks like it might introduce conflicts or unusual behavior based on my existing knowledge of kernel configuration. |
| 8/2 | 2026/09/25 13:21 | tool | read-file |
0mArgs:{
"File": "drivers/net/thunderbolt/Kconfig",
"FirstLine": 1,
"LineCount": 20
}Results: {
"Contents": " 1:\t# SPDX-License-Identifier: GPL-2.0-only\n 2:\tconfig USB4_NET\n 3:\t\ttristate \"Networking over USB4 and Thunderbolt cables\"\n 4:\t\tdepends on USB4 \u0026\u0026 INET\n 5:\t\thelp\n 6:\t\t Select this if you want to create network between two computers\n 7:\t\t over a USB4 and Thunderbolt cables. The driver supports Apple\n 8:\t\t ThunderboltIP protocol and allows communication with any host\n 9:\t\t supporting the same protocol including Windows and macOS.\n 10:\t\n 11:\t\t To compile this driver a module, choose M here. The module will be\n 12:\t\t called thunderbolt_net.\n"
} |
| 9/2 | 2026/09/25 13:21 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 16363 output: 30 thoughts: 55 Thoughts: Okay, let's dive into this USB4 situation. Here's how I'm thinking about it: **Investigating USB4 Emulation in QEMU** Alright, I need to get a handle on this. First, what *exactly* is `USB4`? I need to refresh my understanding and nail down the fundamental definition. Then, I need to locate where `CONFIG_USB4` is defined within the Linux kernel config. This is crucial for understanding the build options and how to potentially enable or disable support. The real question I need answered is: can I actually emulate or instantiate Thunderbolt/USB4 devices within QEMU? That's the end goal here. If it's possible, then how? What kernel modules need to be active? What configuration parameters are relevant? My next thought, given my previous investigations into Thunderbolt, leads me directly to `drivers/thunderbolt/Kconfig`. That's the most likely place in the kernel tree where the USB4 configuration, or relevant parts thereof, reside. Let's see what clues that Kconfig file might hold regarding drivers, emulation capabilities, and dependencies. I expect to find some indication there of how to proceed with QEMU integration. |
| 10/2 | 2026/09/25 13:21 | tool | grepper |
0mArgs:{
"Expression": "config USB4\\b",
"PathPrefix": "drivers/thunderbolt/"
}Results: {
"Output": "drivers/thunderbolt/Kconfig-1-# SPDX-License-Identifier: GPL-2.0-only\ndrivers/thunderbolt/Kconfig:2:menuconfig USB4\ndrivers/thunderbolt/Kconfig-3-\ttristate \"Unified support for USB4 and Thunderbolt\"\n"
} |
| 11/2 | 2026/09/25 13:21 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 16778 output: 33 thoughts: 13 Thoughts: Okay, here's my take on those thoughts, tailored for an expert audience, presented in the first person: **Diving into Thunderbolt Configuration** Right, let's pull up the `drivers/thunderbolt/Kconfig` file. I'm keen to see what's changed and what the current status is regarding Thunderbolt configuration options. I need to get a clear picture of the build-time configurations, dependencies, and any potential gotchas for the Thunderbolt subsystem. I'm especially interested in whether they've simplified things, added finer-grained control over specific features like DMA protection or alternative modes, or if the configuration remains complex as ever. It's also important to verify that dependencies on other parts of the kernel are clearly stated and understood. Hopefully, it’s not a tangled web of `if` statements and obscure symbol usage, although experience tells me that's a distinct possibility... I'm looking for clarity, elegance, and the ability to easily customize the Thunderbolt stack to fit specific use cases. Let’s see what surprises are in store. |
| 12/2 | 2026/09/25 13:21 | tool | read-file |
0mArgs:{
"File": "drivers/thunderbolt/Kconfig",
"FirstLine": 1,
"LineCount": 50
}Results: {
"Contents": " 1:\t# SPDX-License-Identifier: GPL-2.0-only\n 2:\tmenuconfig USB4\n 3:\t\ttristate \"Unified support for USB4 and Thunderbolt\"\n 4:\t\tdepends on PCI\n 5:\t\tselect APPLE_PROPERTIES if EFI_STUB \u0026\u0026 X86\n 6:\t\tselect CRC32\n 7:\t\tselect CRYPTO_LIB_SHA256\n 8:\t\tselect CRYPTO_LIB_UTILS\n 9:\t\tselect NVMEM\n 10:\t\thelp\n 11:\t\t USB4 and Thunderbolt driver. USB4 is the public specification\n 12:\t\t based on the Thunderbolt 3 protocol. This driver is required if\n 13:\t\t you want to hotplug Thunderbolt and USB4 compliant devices on\n 14:\t\t Apple hardware or on PCs with Intel Falcon Ridge or newer.\n 15:\t\n 16:\t\t To compile this driver a module, choose M here. The module will be\n 17:\t\t called thunderbolt.\n 18:\t\n 19:\tif USB4\n 20:\t\n 21:\tconfig USB4_CONFIGFS\n 22:\t\tdef_tristate USB4\n 23:\t\tdepends on CONFIGFS_FS \u0026\u0026 !(USB4=y \u0026\u0026 CONFIGFS_FS=m)\n 24:\t\n 25:\tconfig USB4_DEBUGFS_WRITE\n 26:\t\tbool \"Enable write by debugfs to configuration spaces (DANGEROUS)\"\n 27:\t\thelp\n 28:\t\t Enables writing to device configuration registers through\n 29:\t\t debugfs interface. You can use tools such as Thunderbolt/USB4\n 30:\t\t debugging tools to access these registers. For more\n 31:\t\t information see:\n 32:\t\n 33:\t\t https://github.com/intel/tbtools\n 34:\t\n 35:\t\t Only enable this if you know what you are doing! Never enable\n 36:\t\t this for production systems or distro kernels.\n 37:\t\n 38:\tconfig USB4_DEBUGFS_MARGINING\n 39:\t\tbool \"Expose receiver lane margining operations under USB4 ports and retimers (DANGEROUS)\"\n 40:\t\tdepends on DEBUG_FS\n 41:\t\tdepends on USB4_DEBUGFS_WRITE\n 42:\t\thelp\n 43:\t\t Enables hardware and software based receiver lane margining\n 44:\t\t support under each USB4 port and retimer, including retimers\n 45:\t\t on the other side of the cable. Used for electrical quality\n 46:\t\t and robustness validation during manufacturing. Should not be\n 47:\t\t enabled by distro kernels.\n 48:\t\n 49:\tconfig USB4_KUNIT_TEST\n 50:\t\tbool \"KUnit tests\" if !KUNIT_ALL_TESTS\n"
} |
| 13/2 | 2026/09/25 13:21 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 17749 output: 23 thoughts: 82 Thoughts: **Probing Thunderbolt/USB4: Where Do I Begin?** Okay, hold on a second. I need to refresh my memory on how Thunderbolt and USB4 systems actually probe and discover devices. How does that initial negotiation happen? Does QEMU provide some sort of virtual or emulated Thunderbolt device I can work with? Or maybe a dummy device, something I can use for testing, perhaps a mock-up? Alright, let's step back a moment and try a different tack. I seem to recall there being some work around `USB4_CONFIGFS`, or possibly a `test.c` file that might give me some clues. I should investigate those first. Right, let's get down to brass tacks and go straight to the source code. I need to zero in on the Thunderbolt drivers. I should search inside the `drivers/thunderbolt/` directory specifically, and look for files related to configfs, or anything that sounds like a mock or test device. Hopefully, I'll find something there to give me a solid starting point. |
| 14/2 | 2026/09/25 13:21 | tool | codesearch-dir-index |
0mArgs:{
"Dir": "drivers/thunderbolt/"
}Results: {
"Files": [
"acpi.c",
"cap.c",
"clx.c",
"configfs.c",
"ctl.c",
"ctl.h",
"debugfs.c",
"dma_port.c",
"dma_port.h",
"dma_test.c",
"domain.c",
"eeprom.c",
"icm.c",
"lc.c",
"nhi.c",
"nhi.h",
"nhi_regs.h",
"nvm.c",
"path.c",
"pci.c",
"property.c",
"quirks.c",
"retimer.c",
"sb_regs.h",
"stream.c",
"switch.c",
"tb.c",
"tb.h",
"tb_msgs.h",
"tb_regs.h",
"test.c",
"tmu.c",
"trace.h",
"tunnel.c",
"tunnel.h",
"usb4.c",
"usb4_port.c",
"xdomain.c"
],
"Subdirs": null
} |
| 15/2 | 2026/09/25 13:21 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 18353 output: 28 thoughts: 28 Thoughts: Okay, here's my take on those code snippets, thinking like an embedded systems expert: **Diving into the Code** Alright, time to get my hands dirty. I need to understand what's going on within these specific code files – `test.c`, `configfs.c`, and `dma_test.c`. Given their names, I'm already forming some initial hypotheses: `test.c` is likely a general-purpose testing module. It may be part of a larger test suite, could be a standalone diagnostic tool, or possibly even a rudimentary driver test. Then, there's `configfs.c`, that screams configuration filesystem. I suspect it's the implementation for a ConfigFS interface, perhaps allowing user-space applications to dynamically configure device parameters or driver behavior. Finally, `dma_test.c` probably deals with Direct Memory Access (DMA). I expect this code will be all about setting up DMA channels, transferring data between memory and peripherals, and, crucially, validating the integrity of those transfers. I need to figure out the architectural considerations, how they relate to the hardware in question, and whether it's using the right APIs for the job. Now, let's see how well it's written and how it handles potential edge cases. |
| 16/2 | 2026/09/25 13:21 | tool | grepper |
0mArgs:{
"Expression": "tb_service",
"PathPrefix": "drivers/thunderbolt/"
}Results: {
"Output": "drivers/thunderbolt/debugfs.c=2473=void tb_xdomain_debugfs_remove(struct tb_xdomain *xd)\n--\ndrivers/thunderbolt/debugfs.c-2478-/**\ndrivers/thunderbolt/debugfs.c:2479: * tb_service_debugfs_init() - Add debugfs directory for service\ndrivers/thunderbolt/debugfs.c-2480- * @svc: Thunderbolt service pointer\n--\ndrivers/thunderbolt/debugfs.c-2483- */\ndrivers/thunderbolt/debugfs.c:2484:void tb_service_debugfs_init(struct tb_service *svc)\ndrivers/thunderbolt/debugfs.c-2485-{\n--\ndrivers/thunderbolt/debugfs.c-2490-/**\ndrivers/thunderbolt/debugfs.c:2491: * tb_service_debugfs_remove() - Remove service debugfs directory\ndrivers/thunderbolt/debugfs.c-2492- * @svc: Thunderbolt service pointer\n--\ndrivers/thunderbolt/debugfs.c-2495- */\ndrivers/thunderbolt/debugfs.c:2496:void tb_service_debugfs_remove(struct tb_service *svc)\ndrivers/thunderbolt/debugfs.c-2497-{\n--\ndrivers/thunderbolt/dma_test.c=91=struct dma_test {\ndrivers/thunderbolt/dma_test.c:92:\tconst struct tb_service *svc;\ndrivers/thunderbolt/dma_test.c-93-\tstruct tb_xdomain *xd;\n--\ndrivers/thunderbolt/dma_test.c=362=static int __fops ## _show(void *data, u64 *val)\t\t\\\ndrivers/thunderbolt/dma_test.c-363-{\t\t\t\t\t\t\t\t\\\ndrivers/thunderbolt/dma_test.c:364:\tstruct tb_service *svc = data;\t\t\t\t\\\ndrivers/thunderbolt/dma_test.c:365:\tstruct dma_test *dt = tb_service_get_drvdata(svc);\t\\\ndrivers/thunderbolt/dma_test.c-366-\tint ret;\t\t\t\t\t\t\\\n--\ndrivers/thunderbolt/dma_test.c=375=static int __fops ## _store(void *data, u64 val)\t\t\\\ndrivers/thunderbolt/dma_test.c-376-{\t\t\t\t\t\t\t\t\\\ndrivers/thunderbolt/dma_test.c:377:\tstruct tb_service *svc = data;\t\t\t\t\\\ndrivers/thunderbolt/dma_test.c:378:\tstruct dma_test *dt = tb_service_get_drvdata(svc);\t\\\ndrivers/thunderbolt/dma_test.c-379-\tint ret;\t\t\t\t\t\t\\\n--\ndrivers/thunderbolt/dma_test.c=510=static int test_store(void *data, u64 val)\ndrivers/thunderbolt/dma_test.c-511-{\ndrivers/thunderbolt/dma_test.c:512:\tstruct tb_service *svc = data;\ndrivers/thunderbolt/dma_test.c:513:\tstruct dma_test *dt = tb_service_get_drvdata(svc);\ndrivers/thunderbolt/dma_test.c-514-\tint ret;\n--\ndrivers/thunderbolt/dma_test.c=596=static int status_show(struct seq_file *s, void *not_used)\ndrivers/thunderbolt/dma_test.c-597-{\ndrivers/thunderbolt/dma_test.c:598:\tstruct tb_service *svc = s-\u003eprivate;\ndrivers/thunderbolt/dma_test.c:599:\tstruct dma_test *dt = tb_service_get_drvdata(svc);\ndrivers/thunderbolt/dma_test.c-600-\tint ret;\n--\ndrivers/thunderbolt/dma_test.c=621=DEFINE_SHOW_ATTRIBUTE(status);\ndrivers/thunderbolt/dma_test.c-622-\ndrivers/thunderbolt/dma_test.c:623:static void dma_test_debugfs_init(struct tb_service *svc)\ndrivers/thunderbolt/dma_test.c-624-{\n--\ndrivers/thunderbolt/dma_test.c-638-\ndrivers/thunderbolt/dma_test.c:639:static int dma_test_probe(struct tb_service *svc)\ndrivers/thunderbolt/dma_test.c-640-{\ndrivers/thunderbolt/dma_test.c:641:\tstruct tb_xdomain *xd = tb_service_parent(svc);\ndrivers/thunderbolt/dma_test.c-642-\tstruct dma_test *dt;\n--\ndrivers/thunderbolt/dma_test.c-652-\ndrivers/thunderbolt/dma_test.c:653:\ttb_service_set_drvdata(svc, dt);\ndrivers/thunderbolt/dma_test.c-654-\tdma_test_debugfs_init(svc);\n--\ndrivers/thunderbolt/dma_test.c-658-\ndrivers/thunderbolt/dma_test.c:659:static void dma_test_remove(struct tb_service *svc)\ndrivers/thunderbolt/dma_test.c-660-{\ndrivers/thunderbolt/dma_test.c:661:\tstruct dma_test *dt = tb_service_get_drvdata(svc);\ndrivers/thunderbolt/dma_test.c-662-\n--\ndrivers/thunderbolt/dma_test.c=686=static const struct dev_pm_ops dma_test_pm_ops = {\n--\ndrivers/thunderbolt/dma_test.c-689-\ndrivers/thunderbolt/dma_test.c:690:static const struct tb_service_id dma_test_ids[] = {\ndrivers/thunderbolt/dma_test.c-691-\t{ TB_SERVICE(\"dma_test\", 1) },\n--\ndrivers/thunderbolt/dma_test.c=694=MODULE_DEVICE_TABLE(tbsvc, dma_test_ids);\ndrivers/thunderbolt/dma_test.c-695-\ndrivers/thunderbolt/dma_test.c:696:static struct tb_service_driver dma_test_driver = {\ndrivers/thunderbolt/dma_test.c-697-\t.driver = {\n--\ndrivers/thunderbolt/domain.c=20=static DEFINE_IDA(tb_domain_ida);\ndrivers/thunderbolt/domain.c-21-\ndrivers/thunderbolt/domain.c:22:static bool match_service_id(const struct tb_service_id *id,\ndrivers/thunderbolt/domain.c:23:\t\t\t const struct tb_service *svc)\ndrivers/thunderbolt/domain.c-24-{\n--\ndrivers/thunderbolt/domain.c-47-\ndrivers/thunderbolt/domain.c:48:static const struct tb_service_id *__tb_service_match(struct device *dev,\ndrivers/thunderbolt/domain.c-49-\t\t\t\t\t\t const struct device_driver *drv)\ndrivers/thunderbolt/domain.c-50-{\ndrivers/thunderbolt/domain.c:51:\tconst struct tb_service_driver *driver;\ndrivers/thunderbolt/domain.c:52:\tconst struct tb_service_id *ids;\ndrivers/thunderbolt/domain.c:53:\tstruct tb_service *svc;\ndrivers/thunderbolt/domain.c-54-\n--\ndrivers/thunderbolt/domain.c-58-\ndrivers/thunderbolt/domain.c:59:\tdriver = container_of_const(drv, struct tb_service_driver, driver);\ndrivers/thunderbolt/domain.c-60-\tif (!driver-\u003eid_table)\n--\ndrivers/thunderbolt/domain.c-70-\ndrivers/thunderbolt/domain.c:71:static int tb_service_match(struct device *dev, const struct device_driver *drv)\ndrivers/thunderbolt/domain.c-72-{\ndrivers/thunderbolt/domain.c:73:\treturn !!__tb_service_match(dev, drv);\ndrivers/thunderbolt/domain.c-74-}\ndrivers/thunderbolt/domain.c-75-\ndrivers/thunderbolt/domain.c:76:static int tb_service_probe(struct device *dev)\ndrivers/thunderbolt/domain.c-77-{\ndrivers/thunderbolt/domain.c:78:\tstruct tb_service *svc = tb_to_service(dev);\ndrivers/thunderbolt/domain.c:79:\tstruct tb_service_driver *driver;\ndrivers/thunderbolt/domain.c-80-\ndrivers/thunderbolt/domain.c:81:\tdriver = container_of(dev-\u003edriver, struct tb_service_driver, driver);\ndrivers/thunderbolt/domain.c-82-\n--\ndrivers/thunderbolt/domain.c-85-\ndrivers/thunderbolt/domain.c:86:static void tb_service_remove(struct device *dev)\ndrivers/thunderbolt/domain.c-87-{\ndrivers/thunderbolt/domain.c:88:\tstruct tb_service *svc = tb_to_service(dev);\ndrivers/thunderbolt/domain.c:89:\tstruct tb_service_driver *driver;\ndrivers/thunderbolt/domain.c-90-\ndrivers/thunderbolt/domain.c:91:\tdriver = container_of(dev-\u003edriver, struct tb_service_driver, driver);\ndrivers/thunderbolt/domain.c-92-\tif (driver-\u003eremove)\n--\ndrivers/thunderbolt/domain.c-95-\ndrivers/thunderbolt/domain.c:96:static void tb_service_shutdown(struct device *dev)\ndrivers/thunderbolt/domain.c-97-{\ndrivers/thunderbolt/domain.c:98:\tstruct tb_service_driver *driver;\ndrivers/thunderbolt/domain.c:99:\tstruct tb_service *svc;\ndrivers/thunderbolt/domain.c-100-\n--\ndrivers/thunderbolt/domain.c-104-\ndrivers/thunderbolt/domain.c:105:\tdriver = container_of(dev-\u003edriver, struct tb_service_driver, driver);\ndrivers/thunderbolt/domain.c-106-\tif (driver-\u003eshutdown)\n--\ndrivers/thunderbolt/domain.c=309=const struct bus_type tb_bus_type = {\ndrivers/thunderbolt/domain.c-310-\t.name = \"thunderbolt\",\ndrivers/thunderbolt/domain.c:311:\t.match = tb_service_match,\ndrivers/thunderbolt/domain.c:312:\t.probe = tb_service_probe,\ndrivers/thunderbolt/domain.c:313:\t.remove = tb_service_remove,\ndrivers/thunderbolt/domain.c:314:\t.shutdown = tb_service_shutdown,\ndrivers/thunderbolt/domain.c-315-};\n--\ndrivers/thunderbolt/stream.c=191=struct tbstream {\ndrivers/thunderbolt/stream.c-192-\tstruct kref kref;\ndrivers/thunderbolt/stream.c:193:\tstruct tb_service *svc;\ndrivers/thunderbolt/stream.c-194-\tstruct list_head list;\n--\ndrivers/thunderbolt/stream.c=216=static void tbstream_release(struct kref *kref)\n--\ndrivers/thunderbolt/stream.c-219-\ndrivers/thunderbolt/stream.c:220:\ttb_service_put(stream-\u003esvc);\ndrivers/thunderbolt/stream.c-221-\tkfree(stream);\n--\ndrivers/thunderbolt/stream.c=241=static inline bool tbstream_valid(const struct tbstream *stream)\n--\ndrivers/thunderbolt/stream.c-243-\tif (stream)\ndrivers/thunderbolt/stream.c:244:\t\treturn !tb_service_parent(stream-\u003esvc)-\u003eis_unplugged;\ndrivers/thunderbolt/stream.c-245-\treturn false;\n--\ndrivers/thunderbolt/stream.c=281=static inline struct tb_xdomain *tbstream_dev_xdomain(struct tbstream_dev *sdev)\n--\ndrivers/thunderbolt/stream.c-283-\tif (sdev-\u003estream)\ndrivers/thunderbolt/stream.c:284:\t\treturn tb_service_parent(sdev-\u003estream-\u003esvc);\ndrivers/thunderbolt/stream.c-285-\treturn NULL;\n--\ndrivers/thunderbolt/stream.c=1065=static ssize_t tbstream_dev_in_hopid_show(struct config_item *item, char *buf)\n--\ndrivers/thunderbolt/stream.c-1073-/* svc-\u003elock must be held */\ndrivers/thunderbolt/stream.c:1074:static void service_remove_properties(struct tb_service *svc, const char *name)\ndrivers/thunderbolt/stream.c-1075-{\n--\ndrivers/thunderbolt/stream.c-1102-\ndrivers/thunderbolt/stream.c:1103:static int service_update_properties(struct tb_service *svc, const char *name,\ndrivers/thunderbolt/stream.c-1104-\t\t\t\t int in_hopid, int out_hopid)\n--\ndrivers/thunderbolt/stream.c=1167=static int tbstream_dev_update_properties(struct tbstream_dev *sdev)\n--\ndrivers/thunderbolt/stream.c-1179-\tif (!ret)\ndrivers/thunderbolt/stream.c:1180:\t\ttb_service_properties_changed(stream-\u003esvc);\ndrivers/thunderbolt/stream.c-1181-\n--\ndrivers/thunderbolt/stream.c=1384=static const struct config_item_type tbstream_dev_type = {\n--\ndrivers/thunderbolt/stream.c-1389-\ndrivers/thunderbolt/stream.c:1390:static void service_get_hopids(struct tb_service *svc, const char *name,\ndrivers/thunderbolt/stream.c-1391-\t\t\t int *in_hopid, int *out_hopid)\n--\ndrivers/thunderbolt/stream.c=1419=tbstream_dev_attach_stream(struct tbstream_dev *sdev, struct tbstream_group *sg)\n--\ndrivers/thunderbolt/stream.c-1445-\t\t\t\t sdev-\u003eout_hopid);\ndrivers/thunderbolt/stream.c:1446:\ttb_service_properties_changed(stream-\u003esvc);\ndrivers/thunderbolt/stream.c-1447-\n--\ndrivers/thunderbolt/stream.c=1452=static void tbstream_dev_detach_stream(struct tbstream_dev *sdev)\n--\ndrivers/thunderbolt/stream.c-1462-\t\tsdev-\u003estream = NULL;\ndrivers/thunderbolt/stream.c:1463:\t\txd = tb_service_parent(stream-\u003esvc);\ndrivers/thunderbolt/stream.c-1464-\t\tif (sdev-\u003eout_hopid \u003e 0)\n--\ndrivers/thunderbolt/stream.c-1470-\tservice_update_properties(stream-\u003esvc, name, 0, 0);\ndrivers/thunderbolt/stream.c:1471:\ttb_service_properties_changed(stream-\u003esvc);\ndrivers/thunderbolt/stream.c-1472-\n--\ndrivers/thunderbolt/stream.c=1671=static void tbstream_group_detach_stream(struct tbstream *stream)\n--\ndrivers/thunderbolt/stream.c-1694-\ndrivers/thunderbolt/stream.c:1695:static int tbstream_probe(struct tb_service *svc)\ndrivers/thunderbolt/stream.c-1696-{\n--\ndrivers/thunderbolt/stream.c-1704-\tkref_init(\u0026stream-\u003ekref);\ndrivers/thunderbolt/stream.c:1705:\tstream-\u003esvc = tb_service_get(svc);\ndrivers/thunderbolt/stream.c-1706-\tINIT_LIST_HEAD(\u0026stream-\u003elist);\n--\ndrivers/thunderbolt/stream.c-1711-\ttbstream_group_attach_stream(stream);\ndrivers/thunderbolt/stream.c:1712:\ttb_service_set_drvdata(svc, stream);\ndrivers/thunderbolt/stream.c-1713-\treturn 0;\n--\ndrivers/thunderbolt/stream.c-1715-\ndrivers/thunderbolt/stream.c:1716:static void tbstream_remove(struct tb_service *svc)\ndrivers/thunderbolt/stream.c-1717-{\ndrivers/thunderbolt/stream.c:1718:\tstruct tbstream *stream = tb_service_get_drvdata(svc);\ndrivers/thunderbolt/stream.c-1719-\n--\ndrivers/thunderbolt/stream.c=1726=static int __maybe_unused tbstream_suspend(struct device *dev)\ndrivers/thunderbolt/stream.c-1727-{\ndrivers/thunderbolt/stream.c:1728:\tstruct tb_service *svc = tb_to_service(dev);\ndrivers/thunderbolt/stream.c:1729:\tstruct tbstream *stream = tb_service_get_drvdata(svc);\ndrivers/thunderbolt/stream.c-1730-\tstruct tbstream_group *sg;\n--\ndrivers/thunderbolt/stream.c=1749=static int __maybe_unused tbstream_resume(struct device *dev)\ndrivers/thunderbolt/stream.c-1750-{\ndrivers/thunderbolt/stream.c:1751:\tstruct tb_service *svc = tb_to_service(dev);\ndrivers/thunderbolt/stream.c:1752:\tstruct tbstream *stream = tb_service_get_drvdata(svc);\ndrivers/thunderbolt/stream.c-1753-\tstruct tbstream_group *sg;\n--\ndrivers/thunderbolt/stream.c=1779=static const struct dev_pm_ops tbstream_pm_ops = {\n--\ndrivers/thunderbolt/stream.c-1782-\ndrivers/thunderbolt/stream.c:1783:static const struct tb_service_id tbstream_ids[] = {\ndrivers/thunderbolt/stream.c-1784-\t{ TB_SERVICE(\"stream\", 1) },\n--\ndrivers/thunderbolt/stream.c=1787=MODULE_DEVICE_TABLE(tbsvc, tbstream_ids);\ndrivers/thunderbolt/stream.c-1788-\ndrivers/thunderbolt/stream.c:1789:static struct tb_service_driver tbstream_driver = {\ndrivers/thunderbolt/stream.c-1790-\t.driver = {\n--\ndrivers/thunderbolt/tb.h=1545=void tb_xdomain_debugfs_remove(struct tb_xdomain *xd);\ndrivers/thunderbolt/tb.h:1546:void tb_service_debugfs_init(struct tb_service *svc);\ndrivers/thunderbolt/tb.h:1547:void tb_service_debugfs_remove(struct tb_service *svc);\ndrivers/thunderbolt/tb.h-1548-void tb_retimer_debugfs_init(struct tb_retimer *rt);\n--\ndrivers/thunderbolt/tb.h=1556=static inline void tb_xdomain_debugfs_remove(struct tb_xdomain *xd) { }\ndrivers/thunderbolt/tb.h:1557:static inline void tb_service_debugfs_init(struct tb_service *svc) { }\ndrivers/thunderbolt/tb.h:1558:static inline void tb_service_debugfs_remove(struct tb_service *svc) { }\ndrivers/thunderbolt/tb.h-1559-static inline void tb_retimer_debugfs_init(struct tb_retimer *rt) { }\n--\ndrivers/thunderbolt/xdomain.c=648=static int update_service_properties(struct device *dev, void *data)\n--\ndrivers/thunderbolt/xdomain.c-650-\tstruct tb_property_dir *root = data;\ndrivers/thunderbolt/xdomain.c:651:\tstruct tb_service *svc;\ndrivers/thunderbolt/xdomain.c-652-\tstruct tb_property *p;\n--\ndrivers/thunderbolt/xdomain.c=939=tb_xdp_schedule_request(struct tb *tb, const struct tb_xdp_header *hdr,\n--\ndrivers/thunderbolt/xdomain.c-968- */\ndrivers/thunderbolt/xdomain.c:969:int tb_register_service_driver(struct tb_service_driver *drv)\ndrivers/thunderbolt/xdomain.c-970-{\n--\ndrivers/thunderbolt/xdomain.c=977=EXPORT_SYMBOL_GPL(tb_register_service_driver);\n--\ndrivers/thunderbolt/xdomain.c-984- */\ndrivers/thunderbolt/xdomain.c:985:void tb_unregister_service_driver(struct tb_service_driver *drv)\ndrivers/thunderbolt/xdomain.c-986-{\n--\ndrivers/thunderbolt/xdomain.c=991=static int update_xdomain(struct device *dev, void *data)\n--\ndrivers/thunderbolt/xdomain.c-1008-/**\ndrivers/thunderbolt/xdomain.c:1009: * tb_service_properties_changed() - Notify the other host about changes\ndrivers/thunderbolt/xdomain.c-1010- * @svc: Service whose properties changed\n--\ndrivers/thunderbolt/xdomain.c-1015- */\ndrivers/thunderbolt/xdomain.c:1016:void tb_service_properties_changed(struct tb_service *svc)\ndrivers/thunderbolt/xdomain.c-1017-{\ndrivers/thunderbolt/xdomain.c:1018:\tstruct tb_xdomain *xd = tb_service_parent(svc);\ndrivers/thunderbolt/xdomain.c-1019-\n--\ndrivers/thunderbolt/xdomain.c-1026-}\ndrivers/thunderbolt/xdomain.c:1027:EXPORT_SYMBOL_GPL(tb_service_properties_changed);\ndrivers/thunderbolt/xdomain.c-1028-\ndrivers/thunderbolt/xdomain.c=1029=static ssize_t key_show(struct device *dev, struct device_attribute *attr,\n--\ndrivers/thunderbolt/xdomain.c-1031-{\ndrivers/thunderbolt/xdomain.c:1032:\tstruct tb_service *svc = container_of(dev, struct tb_service, dev);\ndrivers/thunderbolt/xdomain.c-1033-\n--\ndrivers/thunderbolt/xdomain.c=1040=static DEVICE_ATTR_RO(key);\ndrivers/thunderbolt/xdomain.c-1041-\ndrivers/thunderbolt/xdomain.c:1042:static int get_modalias(const struct tb_service *svc, char *buf, size_t size)\ndrivers/thunderbolt/xdomain.c-1043-{\n--\ndrivers/thunderbolt/xdomain.c=1048=static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,\n--\ndrivers/thunderbolt/xdomain.c-1050-{\ndrivers/thunderbolt/xdomain.c:1051:\tstruct tb_service *svc = container_of(dev, struct tb_service, dev);\ndrivers/thunderbolt/xdomain.c-1052-\n--\ndrivers/thunderbolt/xdomain.c=1059=static ssize_t prtcid_show(struct device *dev, struct device_attribute *attr,\n--\ndrivers/thunderbolt/xdomain.c-1061-{\ndrivers/thunderbolt/xdomain.c:1062:\tstruct tb_service *svc = container_of(dev, struct tb_service, dev);\ndrivers/thunderbolt/xdomain.c-1063-\n--\ndrivers/thunderbolt/xdomain.c=1068=static ssize_t prtcvers_show(struct device *dev, struct device_attribute *attr,\n--\ndrivers/thunderbolt/xdomain.c-1070-{\ndrivers/thunderbolt/xdomain.c:1071:\tstruct tb_service *svc = container_of(dev, struct tb_service, dev);\ndrivers/thunderbolt/xdomain.c-1072-\n--\ndrivers/thunderbolt/xdomain.c=1077=static ssize_t prtcrevs_show(struct device *dev, struct device_attribute *attr,\n--\ndrivers/thunderbolt/xdomain.c-1079-{\ndrivers/thunderbolt/xdomain.c:1080:\tstruct tb_service *svc = container_of(dev, struct tb_service, dev);\ndrivers/thunderbolt/xdomain.c-1081-\n--\ndrivers/thunderbolt/xdomain.c=1086=static ssize_t prtcstns_show(struct device *dev, struct device_attribute *attr,\n--\ndrivers/thunderbolt/xdomain.c-1088-{\ndrivers/thunderbolt/xdomain.c:1089:\tstruct tb_service *svc = container_of(dev, struct tb_service, dev);\ndrivers/thunderbolt/xdomain.c-1090-\n--\ndrivers/thunderbolt/xdomain.c=1093=static DEVICE_ATTR_RO(prtcstns);\ndrivers/thunderbolt/xdomain.c-1094-\ndrivers/thunderbolt/xdomain.c:1095:static struct attribute *tb_service_attrs[] = {\ndrivers/thunderbolt/xdomain.c-1096-\t\u0026dev_attr_key.attr,\n--\ndrivers/thunderbolt/xdomain.c-1104-\ndrivers/thunderbolt/xdomain.c:1105:static const struct attribute_group tb_service_attr_group = {\ndrivers/thunderbolt/xdomain.c:1106:\t.attrs = tb_service_attrs,\ndrivers/thunderbolt/xdomain.c-1107-};\ndrivers/thunderbolt/xdomain.c-1108-\ndrivers/thunderbolt/xdomain.c:1109:static const struct attribute_group *tb_service_attr_groups[] = {\ndrivers/thunderbolt/xdomain.c:1110:\t\u0026tb_service_attr_group,\ndrivers/thunderbolt/xdomain.c-1111-\tNULL,\n--\ndrivers/thunderbolt/xdomain.c-1113-\ndrivers/thunderbolt/xdomain.c:1114:static int tb_service_uevent(const struct device *dev, struct kobj_uevent_env *env)\ndrivers/thunderbolt/xdomain.c-1115-{\ndrivers/thunderbolt/xdomain.c:1116:\tconst struct tb_service *svc = container_of_const(dev, struct tb_service, dev);\ndrivers/thunderbolt/xdomain.c-1117-\tchar modalias[64];\n--\ndrivers/thunderbolt/xdomain.c-1122-\ndrivers/thunderbolt/xdomain.c:1123:static void tb_service_release(struct device *dev)\ndrivers/thunderbolt/xdomain.c-1124-{\ndrivers/thunderbolt/xdomain.c:1125:\tstruct tb_service *svc = container_of(dev, struct tb_service, dev);\ndrivers/thunderbolt/xdomain.c:1126:\tstruct tb_xdomain *xd = tb_service_parent(svc);\ndrivers/thunderbolt/xdomain.c-1127-\n--\ndrivers/thunderbolt/xdomain.c-1134-\ndrivers/thunderbolt/xdomain.c:1135:const struct device_type tb_service_type = {\ndrivers/thunderbolt/xdomain.c-1136-\t.name = \"thunderbolt_service\",\ndrivers/thunderbolt/xdomain.c:1137:\t.groups = tb_service_attr_groups,\ndrivers/thunderbolt/xdomain.c:1138:\t.uevent = tb_service_uevent,\ndrivers/thunderbolt/xdomain.c:1139:\t.release = tb_service_release,\ndrivers/thunderbolt/xdomain.c-1140-};\ndrivers/thunderbolt/xdomain.c:1141:EXPORT_SYMBOL_GPL(tb_service_type);\ndrivers/thunderbolt/xdomain.c-1142-\ndrivers/thunderbolt/xdomain.c:1143:static void update_service(struct tb_service *svc, struct tb_property *property)\ndrivers/thunderbolt/xdomain.c-1144-{\n--\ndrivers/thunderbolt/xdomain.c=1153=static void __unregister_service(struct device *dev)\ndrivers/thunderbolt/xdomain.c-1154-{\ndrivers/thunderbolt/xdomain.c:1155:\tstruct tb_service *svc = tb_to_service(dev);\ndrivers/thunderbolt/xdomain.c-1156-\ndrivers/thunderbolt/xdomain.c:1157:\ttb_service_debugfs_remove(svc);\ndrivers/thunderbolt/xdomain.c-1158-\tdevice_unregister(\u0026svc-\u003edev);\n--\ndrivers/thunderbolt/xdomain.c=1161=static int remove_missing_service(struct device *dev, void *data)\n--\ndrivers/thunderbolt/xdomain.c-1163-\tstruct tb_xdomain *xd = data;\ndrivers/thunderbolt/xdomain.c:1164:\tstruct tb_service *svc;\ndrivers/thunderbolt/xdomain.c-1165-\n--\ndrivers/thunderbolt/xdomain.c=1177=static int find_service(struct device *dev, const void *data)\n--\ndrivers/thunderbolt/xdomain.c-1179-\tconst struct tb_property *p = data;\ndrivers/thunderbolt/xdomain.c:1180:\tstruct tb_service *svc;\ndrivers/thunderbolt/xdomain.c-1181-\n--\ndrivers/thunderbolt/xdomain.c-1188-\ndrivers/thunderbolt/xdomain.c:1189:static int populate_service(struct tb_service *svc,\ndrivers/thunderbolt/xdomain.c-1190-\t\t\t struct tb_property *property)\n--\ndrivers/thunderbolt/xdomain.c=1222=static void enumerate_services(struct tb_xdomain *xd)\ndrivers/thunderbolt/xdomain.c-1223-{\ndrivers/thunderbolt/xdomain.c:1224:\tstruct tb_service *svc;\ndrivers/thunderbolt/xdomain.c-1225-\tstruct tb_property *p;\n--\ndrivers/thunderbolt/xdomain.c-1264-\t\tsvc-\u003edev.bus = \u0026tb_bus_type;\ndrivers/thunderbolt/xdomain.c:1265:\t\tsvc-\u003edev.type = \u0026tb_service_type;\ndrivers/thunderbolt/xdomain.c-1266-\t\tsvc-\u003edev.parent = get_device(\u0026xd-\u003edev);\n--\ndrivers/thunderbolt/xdomain.c-1269-\ndrivers/thunderbolt/xdomain.c:1270:\t\ttb_service_debugfs_init(svc);\ndrivers/thunderbolt/xdomain.c-1271-\ndrivers/thunderbolt/xdomain.c-1272-\t\tif (device_register(\u0026svc-\u003edev)) {\ndrivers/thunderbolt/xdomain.c:1273:\t\t\ttb_service_debugfs_remove(svc);\ndrivers/thunderbolt/xdomain.c-1274-\t\t\tput_device(\u0026svc-\u003edev);\n"
} |
| 17/2 | 2026/09/25 13:21 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 26656 output: 26 thoughts: 33 Thoughts: Okay, let's break this down. **Investigating the Creation of `struct tb_xdomain`** Alright, so I need to figure out exactly what's involved in creating a `struct tb_xdomain`. This is a critical piece, and I need to understand it at a granular level. The most logical place to start would be to look at the code that actually *uses* or, more precisely, *creates* one of these structs. Let me check the typical entry points for this type of creation - that's going to be in `test.c` or any similar test code related to thunderbolt domain configuration, I'd imagine. I'm going to scan that source to discover the call graphs in `tb_xdomain` use. I expect to be able to follow the breadcrumbs from there. |
| 18/2 | 2026/09/25 13:21 | tool | grepper |
0mArgs:{
"Expression": "test",
"PathPrefix": "drivers/thunderbolt/"
}Results: {
"Output": "\nFull output is too long, showing 500 out of 2297 lines.\nUse more precise expression if possible.\n\ndrivers/thunderbolt/Kconfig=49=config USB4_KUNIT_TEST\ndrivers/thunderbolt/Kconfig:50:\tbool \"KUnit tests\" if !KUNIT_ALL_TESTS\ndrivers/thunderbolt/Kconfig-51-\tdepends on USB4 \u0026\u0026 KUNIT=y\n--\ndrivers/thunderbolt/Kconfig=54=config USB4_DMA_TEST\ndrivers/thunderbolt/Kconfig:55:\ttristate \"DMA traffic test driver\"\ndrivers/thunderbolt/Kconfig-56-\tdepends on DEBUG_FS\n--\ndrivers/thunderbolt/Kconfig-64-\t To compile this driver a module, choose M here. The module will be\ndrivers/thunderbolt/Kconfig:65:\t called thunderbolt_dma_test.\ndrivers/thunderbolt/Kconfig-66-\n--\ndrivers/thunderbolt/Makefile=10=thunderbolt-$(CONFIG_USB4_CONFIGFS) += configfs.o\ndrivers/thunderbolt/Makefile:11:thunderbolt-${CONFIG_USB4_KUNIT_TEST} += test.o\ndrivers/thunderbolt/Makefile:12:CFLAGS_test.o += $(DISABLE_STRUCTLEAK_PLUGIN)\ndrivers/thunderbolt/Makefile-13-\ndrivers/thunderbolt/Makefile:14:thunderbolt_dma_test-${CONFIG_USB4_DMA_TEST} += dma_test.o\ndrivers/thunderbolt/Makefile:15:obj-$(CONFIG_USB4_DMA_TEST) += thunderbolt_dma_test.o\ndrivers/thunderbolt/Makefile-16-\n--\ndrivers/thunderbolt/ctl.c=133=static int tb_cfg_request_enqueue(struct tb_ctl *ctl,\n--\ndrivers/thunderbolt/ctl.c-135-{\ndrivers/thunderbolt/ctl.c:136:\tWARN_ON(test_bit(TB_CFG_REQUEST_ACTIVE, \u0026req-\u003eflags));\ndrivers/thunderbolt/ctl.c-137-\tWARN_ON(req-\u003ectl);\n--\ndrivers/thunderbolt/ctl.c=151=static void tb_cfg_request_dequeue(struct tb_cfg_request *req)\n--\ndrivers/thunderbolt/ctl.c-155-\tmutex_lock(\u0026ctl-\u003erequest_queue_lock);\ndrivers/thunderbolt/ctl.c:156:\tif (!test_bit(TB_CFG_REQUEST_ACTIVE, \u0026req-\u003eflags)) {\ndrivers/thunderbolt/ctl.c-157-\t\tmutex_unlock(\u0026ctl-\u003erequest_queue_lock);\n--\ndrivers/thunderbolt/ctl.c-162-\tclear_bit(TB_CFG_REQUEST_ACTIVE, \u0026req-\u003eflags);\ndrivers/thunderbolt/ctl.c:163:\tif (test_bit(TB_CFG_REQUEST_CANCELED, \u0026req-\u003eflags))\ndrivers/thunderbolt/ctl.c-164-\t\twake_up(\u0026tb_cfg_request_cancel_queue);\n--\ndrivers/thunderbolt/ctl.c=168=static bool tb_cfg_request_is_active(struct tb_cfg_request *req)\ndrivers/thunderbolt/ctl.c-169-{\ndrivers/thunderbolt/ctl.c:170:\treturn test_bit(TB_CFG_REQUEST_ACTIVE, \u0026req-\u003eflags);\ndrivers/thunderbolt/ctl.c-171-}\n--\ndrivers/thunderbolt/ctl.c=524=static void tb_cfg_request_work(struct work_struct *work)\n--\ndrivers/thunderbolt/ctl.c-527-\ndrivers/thunderbolt/ctl.c:528:\tif (!test_bit(TB_CFG_REQUEST_CANCELED, \u0026req-\u003eflags))\ndrivers/thunderbolt/ctl.c-529-\t\treq-\u003ecallback(req-\u003ecallback_data);\n--\ndrivers/thunderbolt/debugfs.c=414=static ssize_t retimer_sb_regs_write(struct file *file,\n--\ndrivers/thunderbolt/debugfs.c-483- * @time: %true if time margining is used instead of voltage\ndrivers/thunderbolt/debugfs.c:484: * @right_high: %false if left/low margin test is performed, %true if\ndrivers/thunderbolt/debugfs.c-485- *\t\tright/high\n--\ndrivers/thunderbolt/debugfs.c=1153=static int margining_run_sw(struct tb_margining *margining,\n--\ndrivers/thunderbolt/debugfs.c-1183-\ndrivers/thunderbolt/debugfs.c:1184:\t\t/* Any errors stop the test */\ndrivers/thunderbolt/debugfs.c-1185-\t\tif (errors)\n--\ndrivers/thunderbolt/debugfs.c=1473=DEBUGFS_ATTR_RW(margining_results);\ndrivers/thunderbolt/debugfs.c-1474-\ndrivers/thunderbolt/debugfs.c:1475:static ssize_t margining_test_write(struct file *file,\ndrivers/thunderbolt/debugfs.c-1476-\t\t\t\t const char __user *user_buf,\n--\ndrivers/thunderbolt/debugfs.c-1509-\ndrivers/thunderbolt/debugfs.c:1510:static int margining_test_show(struct seq_file *s, void *not_used)\ndrivers/thunderbolt/debugfs.c-1511-{\n--\ndrivers/thunderbolt/debugfs.c-1529-}\ndrivers/thunderbolt/debugfs.c:1530:DEBUGFS_ATTR_RW(margining_test);\ndrivers/thunderbolt/debugfs.c-1531-\n--\ndrivers/thunderbolt/debugfs.c=1650=static struct tb_margining *margining_alloc(struct tb_port *port,\n--\ndrivers/thunderbolt/debugfs.c-1738-\t\t\t \u0026margining_results_fops);\ndrivers/thunderbolt/debugfs.c:1739:\tdebugfs_create_file(\"test\", 0600, dir, margining, \u0026margining_test_fops);\ndrivers/thunderbolt/debugfs.c-1740-\tif (independent_voltage_margins(margining) == USB4_MARGIN_CAP_VOLTAGE_INDP_GEN_2_3_HL ||\n--\ndrivers/thunderbolt/dma_test.c-2-/*\ndrivers/thunderbolt/dma_test.c:3: * DMA traffic test driver\ndrivers/thunderbolt/dma_test.c-4- *\n--\ndrivers/thunderbolt/dma_test.c-21-\ndrivers/thunderbolt/dma_test.c:22:enum dma_test_frame_pdf {\ndrivers/thunderbolt/dma_test.c-23-\tDMA_TEST_PDF_FRAME_START = 1,\n--\ndrivers/thunderbolt/dma_test.c-26-\ndrivers/thunderbolt/dma_test.c:27:struct dma_test_frame {\ndrivers/thunderbolt/dma_test.c:28:\tstruct dma_test *dma_test;\ndrivers/thunderbolt/dma_test.c-29-\tvoid *data;\n--\ndrivers/thunderbolt/dma_test.c-32-\ndrivers/thunderbolt/dma_test.c:33:enum dma_test_test_error {\ndrivers/thunderbolt/dma_test.c-34-\tDMA_TEST_NO_ERROR,\n--\ndrivers/thunderbolt/dma_test.c-44-\ndrivers/thunderbolt/dma_test.c:45:static const char * const dma_test_error_names[] = {\ndrivers/thunderbolt/dma_test.c-46-\t[DMA_TEST_NO_ERROR] = \"no errors\",\n--\ndrivers/thunderbolt/dma_test.c-56-\ndrivers/thunderbolt/dma_test.c:57:enum dma_test_result {\ndrivers/thunderbolt/dma_test.c-58-\tDMA_TEST_NOT_RUN,\n--\ndrivers/thunderbolt/dma_test.c-62-\ndrivers/thunderbolt/dma_test.c:63:static const char * const dma_test_result_names[] = {\ndrivers/thunderbolt/dma_test.c-64-\t[DMA_TEST_NOT_RUN] = \"not run\",\n--\ndrivers/thunderbolt/dma_test.c-69-/**\ndrivers/thunderbolt/dma_test.c:70: * struct dma_test - DMA test device driver private data\ndrivers/thunderbolt/dma_test.c-71- * @svc: XDomain service the driver is bound to\n--\ndrivers/thunderbolt/dma_test.c-82- * @link_width: Expected link width (Gb/s), %0 to use whatever is negotiated\ndrivers/thunderbolt/dma_test.c:83: * @crc_errors: Number of CRC errors during the test run\ndrivers/thunderbolt/dma_test.c:84: * @buffer_overflow_errors: Number of buffer overflow errors during the test\ndrivers/thunderbolt/dma_test.c-85- *\t\t\t run\n--\ndrivers/thunderbolt/dma_test.c-90- */\ndrivers/thunderbolt/dma_test.c:91:struct dma_test {\ndrivers/thunderbolt/dma_test.c-92-\tconst struct tb_service *svc;\n--\ndrivers/thunderbolt/dma_test.c-105-\tunsigned int buffer_overflow_errors;\ndrivers/thunderbolt/dma_test.c:106:\tenum dma_test_result result;\ndrivers/thunderbolt/dma_test.c:107:\tenum dma_test_test_error error_code;\ndrivers/thunderbolt/dma_test.c-108-\tstruct completion complete;\n--\ndrivers/thunderbolt/dma_test.c-111-\ndrivers/thunderbolt/dma_test.c:112:/* DMA test property directory UUID: 3188cd10-6523-4a5a-a682-fdca07a248d8 */\ndrivers/thunderbolt/dma_test.c:113:static const uuid_t dma_test_dir_uuid =\ndrivers/thunderbolt/dma_test.c-114-\tUUID_INIT(0x3188cd10, 0x6523, 0x4a5a,\n--\ndrivers/thunderbolt/dma_test.c-116-\ndrivers/thunderbolt/dma_test.c:117:static struct tb_property_dir *dma_test_dir;\ndrivers/thunderbolt/dma_test.c:118:static void *dma_test_pattern;\ndrivers/thunderbolt/dma_test.c-119-\ndrivers/thunderbolt/dma_test.c:120:static void dma_test_free_rings(struct dma_test *dt)\ndrivers/thunderbolt/dma_test.c-121-{\n--\ndrivers/thunderbolt/dma_test.c-133-\ndrivers/thunderbolt/dma_test.c:134:static int dma_test_start_rings(struct dma_test *dt)\ndrivers/thunderbolt/dma_test.c-135-{\n--\ndrivers/thunderbolt/dma_test.c-161-\t\tif (ret \u003c 0) {\ndrivers/thunderbolt/dma_test.c:162:\t\t\tdma_test_free_rings(dt);\ndrivers/thunderbolt/dma_test.c-163-\t\t\treturn ret;\n--\ndrivers/thunderbolt/dma_test.c-179-\t\tif (!ring) {\ndrivers/thunderbolt/dma_test.c:180:\t\t\tdma_test_free_rings(dt);\ndrivers/thunderbolt/dma_test.c-181-\t\t\treturn -ENOMEM;\n--\ndrivers/thunderbolt/dma_test.c-189-\t\tif (ret \u003c 0) {\ndrivers/thunderbolt/dma_test.c:190:\t\t\tdma_test_free_rings(dt);\ndrivers/thunderbolt/dma_test.c-191-\t\t\treturn ret;\n--\ndrivers/thunderbolt/dma_test.c-201-\tif (ret) {\ndrivers/thunderbolt/dma_test.c:202:\t\tdma_test_free_rings(dt);\ndrivers/thunderbolt/dma_test.c-203-\t\treturn ret;\n--\ndrivers/thunderbolt/dma_test.c-213-\ndrivers/thunderbolt/dma_test.c:214:static void dma_test_stop_rings(struct dma_test *dt)\ndrivers/thunderbolt/dma_test.c-215-{\n--\ndrivers/thunderbolt/dma_test.c-229-\ndrivers/thunderbolt/dma_test.c:230:\tdma_test_free_rings(dt);\ndrivers/thunderbolt/dma_test.c-231-}\ndrivers/thunderbolt/dma_test.c-232-\ndrivers/thunderbolt/dma_test.c:233:static void dma_test_rx_callback(struct tb_ring *ring, struct ring_frame *frame,\ndrivers/thunderbolt/dma_test.c-234-\t\t\t\t bool canceled)\ndrivers/thunderbolt/dma_test.c-235-{\ndrivers/thunderbolt/dma_test.c:236:\tstruct dma_test_frame *tf = container_of(frame, typeof(*tf), frame);\ndrivers/thunderbolt/dma_test.c:237:\tstruct dma_test *dt = tf-\u003edma_test;\ndrivers/thunderbolt/dma_test.c-238-\tstruct device *dma_dev = tb_ring_dma_device(dt-\u003erx_ring);\n--\ndrivers/thunderbolt/dma_test.c-263-\ndrivers/thunderbolt/dma_test.c:264:static int dma_test_submit_rx(struct dma_test *dt, size_t npackets)\ndrivers/thunderbolt/dma_test.c-265-{\n--\ndrivers/thunderbolt/dma_test.c-269-\tfor (i = 0; i \u003c npackets; i++) {\ndrivers/thunderbolt/dma_test.c:270:\t\tstruct dma_test_frame *tf;\ndrivers/thunderbolt/dma_test.c-271-\t\tdma_addr_t dma_addr;\n--\ndrivers/thunderbolt/dma_test.c-291-\t\ttf-\u003eframe.buffer_phy = dma_addr;\ndrivers/thunderbolt/dma_test.c:292:\t\ttf-\u003eframe.callback = dma_test_rx_callback;\ndrivers/thunderbolt/dma_test.c:293:\t\ttf-\u003edma_test = dt;\ndrivers/thunderbolt/dma_test.c-294-\t\tINIT_LIST_HEAD(\u0026tf-\u003eframe.list);\n--\ndrivers/thunderbolt/dma_test.c-301-\ndrivers/thunderbolt/dma_test.c:302:static void dma_test_tx_callback(struct tb_ring *ring, struct ring_frame *frame,\ndrivers/thunderbolt/dma_test.c-303-\t\t\t\t bool canceled)\ndrivers/thunderbolt/dma_test.c-304-{\ndrivers/thunderbolt/dma_test.c:305:\tstruct dma_test_frame *tf = container_of(frame, typeof(*tf), frame);\ndrivers/thunderbolt/dma_test.c:306:\tstruct dma_test *dt = tf-\u003edma_test;\ndrivers/thunderbolt/dma_test.c-307-\tstruct device *dma_dev = tb_ring_dma_device(dt-\u003etx_ring);\n--\ndrivers/thunderbolt/dma_test.c-314-\ndrivers/thunderbolt/dma_test.c:315:static int dma_test_submit_tx(struct dma_test *dt, size_t npackets)\ndrivers/thunderbolt/dma_test.c-316-{\n--\ndrivers/thunderbolt/dma_test.c-320-\tfor (i = 0; i \u003c npackets; i++) {\ndrivers/thunderbolt/dma_test.c:321:\t\tstruct dma_test_frame *tf;\ndrivers/thunderbolt/dma_test.c-322-\t\tdma_addr_t dma_addr;\n--\ndrivers/thunderbolt/dma_test.c-328-\t\ttf-\u003eframe.size = 0; /* means 4096 */\ndrivers/thunderbolt/dma_test.c:329:\t\ttf-\u003edma_test = dt;\ndrivers/thunderbolt/dma_test.c-330-\ndrivers/thunderbolt/dma_test.c:331:\t\ttf-\u003edata = kmemdup(dma_test_pattern, DMA_TEST_FRAME_SIZE, GFP_KERNEL);\ndrivers/thunderbolt/dma_test.c-332-\t\tif (!tf-\u003edata) {\n--\ndrivers/thunderbolt/dma_test.c-345-\t\ttf-\u003eframe.buffer_phy = dma_addr;\ndrivers/thunderbolt/dma_test.c:346:\t\ttf-\u003eframe.callback = dma_test_tx_callback;\ndrivers/thunderbolt/dma_test.c-347-\t\ttf-\u003eframe.sof = DMA_TEST_PDF_FRAME_START;\n--\ndrivers/thunderbolt/dma_test.c=362=static int __fops ## _show(void *data, u64 *val)\t\t\\\n--\ndrivers/thunderbolt/dma_test.c-364-\tstruct tb_service *svc = data;\t\t\t\t\\\ndrivers/thunderbolt/dma_test.c:365:\tstruct dma_test *dt = tb_service_get_drvdata(svc);\t\\\ndrivers/thunderbolt/dma_test.c-366-\tint ret;\t\t\t\t\t\t\\\n--\ndrivers/thunderbolt/dma_test.c=375=static int __fops ## _store(void *data, u64 val)\t\t\\\n--\ndrivers/thunderbolt/dma_test.c-377-\tstruct tb_service *svc = data;\t\t\t\t\\\ndrivers/thunderbolt/dma_test.c:378:\tstruct dma_test *dt = tb_service_get_drvdata(svc);\t\\\ndrivers/thunderbolt/dma_test.c-379-\tint ret;\t\t\t\t\t\t\\\n--\ndrivers/thunderbolt/dma_test.c=391=DEFINE_DEBUGFS_ATTRIBUTE(__fops ## _fops, __fops ## _show,\t\\\n--\ndrivers/thunderbolt/dma_test.c-393-\ndrivers/thunderbolt/dma_test.c:394:static void lanes_get(const struct dma_test *dt, u64 *val)\ndrivers/thunderbolt/dma_test.c-395-{\n--\ndrivers/thunderbolt/dma_test.c=399=static int lanes_validate(u64 val)\n--\ndrivers/thunderbolt/dma_test.c-403-\ndrivers/thunderbolt/dma_test.c:404:static void lanes_set(struct dma_test *dt, u64 val)\ndrivers/thunderbolt/dma_test.c-405-{\n--\ndrivers/thunderbolt/dma_test.c=408=DMA_TEST_DEBUGFS_ATTR(lanes, lanes_get, lanes_validate, lanes_set);\ndrivers/thunderbolt/dma_test.c-409-\ndrivers/thunderbolt/dma_test.c:410:static void speed_get(const struct dma_test *dt, u64 *val)\ndrivers/thunderbolt/dma_test.c-411-{\n--\ndrivers/thunderbolt/dma_test.c=415=static int speed_validate(u64 val)\n--\ndrivers/thunderbolt/dma_test.c-427-\ndrivers/thunderbolt/dma_test.c:428:static void speed_set(struct dma_test *dt, u64 val)\ndrivers/thunderbolt/dma_test.c-429-{\n--\ndrivers/thunderbolt/dma_test.c=432=DMA_TEST_DEBUGFS_ATTR(speed, speed_get, speed_validate, speed_set);\ndrivers/thunderbolt/dma_test.c-433-\ndrivers/thunderbolt/dma_test.c:434:static void packets_to_receive_get(const struct dma_test *dt, u64 *val)\ndrivers/thunderbolt/dma_test.c-435-{\n--\ndrivers/thunderbolt/dma_test.c=439=static int packets_to_receive_validate(u64 val)\n--\ndrivers/thunderbolt/dma_test.c-443-\ndrivers/thunderbolt/dma_test.c:444:static void packets_to_receive_set(struct dma_test *dt, u64 val)\ndrivers/thunderbolt/dma_test.c-445-{\n--\ndrivers/thunderbolt/dma_test.c=448=DMA_TEST_DEBUGFS_ATTR(packets_to_receive, packets_to_receive_get,\n--\ndrivers/thunderbolt/dma_test.c-450-\ndrivers/thunderbolt/dma_test.c:451:static void packets_to_send_get(const struct dma_test *dt, u64 *val)\ndrivers/thunderbolt/dma_test.c-452-{\n--\ndrivers/thunderbolt/dma_test.c=456=static int packets_to_send_validate(u64 val)\n--\ndrivers/thunderbolt/dma_test.c-460-\ndrivers/thunderbolt/dma_test.c:461:static void packets_to_send_set(struct dma_test *dt, u64 val)\ndrivers/thunderbolt/dma_test.c-462-{\n--\ndrivers/thunderbolt/dma_test.c=465=DMA_TEST_DEBUGFS_ATTR(packets_to_send, packets_to_send_get,\n--\ndrivers/thunderbolt/dma_test.c-467-\ndrivers/thunderbolt/dma_test.c:468:static int dma_test_set_bonding(struct dma_test *dt)\ndrivers/thunderbolt/dma_test.c-469-{\n--\ndrivers/thunderbolt/dma_test.c-480-\ndrivers/thunderbolt/dma_test.c:481:static bool dma_test_validate_config(struct dma_test *dt)\ndrivers/thunderbolt/dma_test.c-482-{\n--\ndrivers/thunderbolt/dma_test.c-490-\ndrivers/thunderbolt/dma_test.c:491:static void dma_test_check_errors(struct dma_test *dt, int ret)\ndrivers/thunderbolt/dma_test.c-492-{\n--\ndrivers/thunderbolt/dma_test.c-509-\ndrivers/thunderbolt/dma_test.c:510:static int test_store(void *data, u64 val)\ndrivers/thunderbolt/dma_test.c-511-{\ndrivers/thunderbolt/dma_test.c-512-\tstruct tb_service *svc = data;\ndrivers/thunderbolt/dma_test.c:513:\tstruct dma_test *dt = tb_service_get_drvdata(svc);\ndrivers/thunderbolt/dma_test.c-514-\tint ret;\n--\ndrivers/thunderbolt/dma_test.c-529-\ndrivers/thunderbolt/dma_test.c:530:\tdev_dbg(\u0026svc-\u003edev, \"DMA test starting\\n\");\ndrivers/thunderbolt/dma_test.c-531-\tif (dt-\u003elink_speed)\n--\ndrivers/thunderbolt/dma_test.c-537-\ndrivers/thunderbolt/dma_test.c:538:\tif (!dma_test_validate_config(dt)) {\ndrivers/thunderbolt/dma_test.c:539:\t\tdev_err(\u0026svc-\u003edev, \"invalid test configuration\\n\");\ndrivers/thunderbolt/dma_test.c-540-\t\tdt-\u003eerror_code = DMA_TEST_CONFIG_ERROR;\n--\ndrivers/thunderbolt/dma_test.c-543-\ndrivers/thunderbolt/dma_test.c:544:\tret = dma_test_set_bonding(dt);\ndrivers/thunderbolt/dma_test.c-545-\tif (ret) {\n--\ndrivers/thunderbolt/dma_test.c-550-\ndrivers/thunderbolt/dma_test.c:551:\tret = dma_test_start_rings(dt);\ndrivers/thunderbolt/dma_test.c-552-\tif (ret) {\n--\ndrivers/thunderbolt/dma_test.c-559-\t\treinit_completion(\u0026dt-\u003ecomplete);\ndrivers/thunderbolt/dma_test.c:560:\t\tret = dma_test_submit_rx(dt, dt-\u003epackets_to_receive);\ndrivers/thunderbolt/dma_test.c-561-\t\tif (ret) {\n--\ndrivers/thunderbolt/dma_test.c-568-\tif (dt-\u003epackets_to_send) {\ndrivers/thunderbolt/dma_test.c:569:\t\tret = dma_test_submit_tx(dt, dt-\u003epackets_to_send);\ndrivers/thunderbolt/dma_test.c-570-\t\tif (ret) {\n--\ndrivers/thunderbolt/dma_test.c-585-out_stop:\ndrivers/thunderbolt/dma_test.c:586:\tdma_test_stop_rings(dt);\ndrivers/thunderbolt/dma_test.c-587-out_unlock:\ndrivers/thunderbolt/dma_test.c:588:\tdma_test_check_errors(dt, ret);\ndrivers/thunderbolt/dma_test.c-589-\tmutex_unlock(\u0026dt-\u003elock);\ndrivers/thunderbolt/dma_test.c-590-\ndrivers/thunderbolt/dma_test.c:591:\tdev_dbg(\u0026svc-\u003edev, \"DMA test %s\\n\", dma_test_result_names[dt-\u003eresult]);\ndrivers/thunderbolt/dma_test.c-592-\treturn ret;\ndrivers/thunderbolt/dma_test.c-593-}\ndrivers/thunderbolt/dma_test.c:594:DEFINE_DEBUGFS_ATTRIBUTE(test_fops, NULL, test_store, \"%llu\\n\");\ndrivers/thunderbolt/dma_test.c-595-\ndrivers/thunderbolt/dma_test.c=596=static int status_show(struct seq_file *s, void *not_used)\n--\ndrivers/thunderbolt/dma_test.c-598-\tstruct tb_service *svc = s-\u003eprivate;\ndrivers/thunderbolt/dma_test.c:599:\tstruct dma_test *dt = tb_service_get_drvdata(svc);\ndrivers/thunderbolt/dma_test.c-600-\tint ret;\n--\ndrivers/thunderbolt/dma_test.c-605-\ndrivers/thunderbolt/dma_test.c:606:\tseq_printf(s, \"result: %s\\n\", dma_test_result_names[dt-\u003eresult]);\ndrivers/thunderbolt/dma_test.c-607-\tif (dt-\u003eresult == DMA_TEST_NOT_RUN)\n--\ndrivers/thunderbolt/dma_test.c-614-\t\t dt-\u003ebuffer_overflow_errors);\ndrivers/thunderbolt/dma_test.c:615:\tseq_printf(s, \"error: %s\\n\", dma_test_error_names[dt-\u003eerror_code]);\ndrivers/thunderbolt/dma_test.c-616-\n--\ndrivers/thunderbolt/dma_test.c=621=DEFINE_SHOW_ATTRIBUTE(status);\ndrivers/thunderbolt/dma_test.c-622-\ndrivers/thunderbolt/dma_test.c:623:static void dma_test_debugfs_init(struct tb_service *svc)\ndrivers/thunderbolt/dma_test.c-624-{\n--\ndrivers/thunderbolt/dma_test.c-626-\ndrivers/thunderbolt/dma_test.c:627:\tdebugfs_dir = debugfs_create_dir(\"dma_test\", svc-\u003edebugfs_dir);\ndrivers/thunderbolt/dma_test.c-628-\n--\ndrivers/thunderbolt/dma_test.c-635-\tdebugfs_create_file(\"status\", 0400, debugfs_dir, svc, \u0026status_fops);\ndrivers/thunderbolt/dma_test.c:636:\tdebugfs_create_file(\"test\", 0200, debugfs_dir, svc, \u0026test_fops);\ndrivers/thunderbolt/dma_test.c-637-}\ndrivers/thunderbolt/dma_test.c-638-\ndrivers/thunderbolt/dma_test.c:639:static int dma_test_probe(struct tb_service *svc)\ndrivers/thunderbolt/dma_test.c-640-{\ndrivers/thunderbolt/dma_test.c-641-\tstruct tb_xdomain *xd = tb_service_parent(svc);\ndrivers/thunderbolt/dma_test.c:642:\tstruct dma_test *dt;\ndrivers/thunderbolt/dma_test.c-643-\n--\ndrivers/thunderbolt/dma_test.c-653-\ttb_service_set_drvdata(svc, dt);\ndrivers/thunderbolt/dma_test.c:654:\tdma_test_debugfs_init(svc);\ndrivers/thunderbolt/dma_test.c-655-\n--\ndrivers/thunderbolt/dma_test.c-658-\ndrivers/thunderbolt/dma_test.c:659:static void dma_test_remove(struct tb_service *svc)\ndrivers/thunderbolt/dma_test.c-660-{\ndrivers/thunderbolt/dma_test.c:661:\tstruct dma_test *dt = tb_service_get_drvdata(svc);\ndrivers/thunderbolt/dma_test.c-662-\ndrivers/thunderbolt/dma_test.c-663-\tmutex_lock(\u0026dt-\u003elock);\ndrivers/thunderbolt/dma_test.c:664:\tdebugfs_lookup_and_remove(\"dma_test\", svc-\u003edebugfs_dir);\ndrivers/thunderbolt/dma_test.c-665-\tmutex_unlock(\u0026dt-\u003elock);\n--\ndrivers/thunderbolt/dma_test.c-667-\ndrivers/thunderbolt/dma_test.c:668:static int __maybe_unused dma_test_suspend(struct device *dev)\ndrivers/thunderbolt/dma_test.c-669-{\n--\ndrivers/thunderbolt/dma_test.c-671-\t * No need to do anything special here. If userspace is writing\ndrivers/thunderbolt/dma_test.c:672:\t * to the test attribute when suspend started, it comes out from\ndrivers/thunderbolt/dma_test.c-673-\t * wait_for_completion_interruptible() with -ERESTARTSYS and the\ndrivers/thunderbolt/dma_test.c:674:\t * DMA test fails tearing down the rings. Once userspace is\ndrivers/thunderbolt/dma_test.c-675-\t * thawed the kernel restarts the write syscall effectively\ndrivers/thunderbolt/dma_test.c:676:\t * re-running the test.\ndrivers/thunderbolt/dma_test.c-677-\t */\n--\ndrivers/thunderbolt/dma_test.c-680-\ndrivers/thunderbolt/dma_test.c:681:static int __maybe_unused dma_test_resume(struct device *dev)\ndrivers/thunderbolt/dma_test.c-682-{\n--\ndrivers/thunderbolt/dma_test.c-685-\ndrivers/thunderbolt/dma_test.c:686:static const struct dev_pm_ops dma_test_pm_ops = {\ndrivers/thunderbolt/dma_test.c:687:\tSET_SYSTEM_SLEEP_PM_OPS(dma_test_suspend, dma_test_resume)\ndrivers/thunderbolt/dma_test.c-688-};\ndrivers/thunderbolt/dma_test.c-689-\ndrivers/thunderbolt/dma_test.c:690:static const struct tb_service_id dma_test_ids[] = {\ndrivers/thunderbolt/dma_test.c:691:\t{ TB_SERVICE(\"dma_test\", 1) },\ndrivers/thunderbolt/dma_test.c-692-\t{ }\ndrivers/thunderbolt/dma_test.c-693-};\ndrivers/thunderbolt/dma_test.c:694:MODULE_DEVICE_TABLE(tbsvc, dma_test_ids);\ndrivers/thunderbolt/dma_test.c-695-\ndrivers/thunderbolt/dma_test.c:696:static struct tb_service_driver dma_test_driver = {\ndrivers/thunderbolt/dma_test.c-697-\t.driver = {\ndrivers/thunderbolt/dma_test.c-698-\t\t.owner = THIS_MODULE,\ndrivers/thunderbolt/dma_test.c:699:\t\t.name = \"thunderbolt_dma_test\",\ndrivers/thunderbolt/dma_test.c:700:\t\t.pm = \u0026dma_test_pm_ops,\ndrivers/thunderbolt/dma_test.c-701-\t},\ndrivers/thunderbolt/dma_test.c:702:\t.probe = dma_test_probe,\ndrivers/thunderbolt/dma_test.c:703:\t.remove = dma_test_remove,\ndrivers/thunderbolt/dma_test.c:704:\t.id_table = dma_test_ids,\ndrivers/thunderbolt/dma_test.c-705-};\ndrivers/thunderbolt/dma_test.c-706-\ndrivers/thunderbolt/dma_test.c:707:static int __init dma_test_init(void)\ndrivers/thunderbolt/dma_test.c-708-{\n--\ndrivers/thunderbolt/dma_test.c-711-\ndrivers/thunderbolt/dma_test.c:712:\tdma_test_pattern = kmalloc(DMA_TEST_FRAME_SIZE, GFP_KERNEL);\ndrivers/thunderbolt/dma_test.c:713:\tif (!dma_test_pattern)\ndrivers/thunderbolt/dma_test.c-714-\t\treturn -ENOMEM;\n--\ndrivers/thunderbolt/dma_test.c-716-\tfor (i = 0; i \u003c\tDMA_TEST_FRAME_SIZE / sizeof(data_value); i++)\ndrivers/thunderbolt/dma_test.c:717:\t\t((u32 *)dma_test_pattern)[i] = data_value++;\ndrivers/thunderbolt/dma_test.c-718-\ndrivers/thunderbolt/dma_test.c:719:\tdma_test_dir = tb_property_create_dir(\u0026dma_test_dir_uuid);\ndrivers/thunderbolt/dma_test.c:720:\tif (!dma_test_dir) {\ndrivers/thunderbolt/dma_test.c-721-\t\tret = -ENOMEM;\n--\ndrivers/thunderbolt/dma_test.c-724-\ndrivers/thunderbolt/dma_test.c:725:\ttb_property_add_immediate(dma_test_dir, \"prtcid\", 1);\ndrivers/thunderbolt/dma_test.c:726:\ttb_property_add_immediate(dma_test_dir, \"prtcvers\", 1);\ndrivers/thunderbolt/dma_test.c:727:\ttb_property_add_immediate(dma_test_dir, \"prtcrevs\", 0);\ndrivers/thunderbolt/dma_test.c:728:\ttb_property_add_immediate(dma_test_dir, \"prtcstns\", 0);\ndrivers/thunderbolt/dma_test.c-729-\ndrivers/thunderbolt/dma_test.c:730:\tret = tb_register_property_dir(\"dma_test\", dma_test_dir);\ndrivers/thunderbolt/dma_test.c-731-\tif (ret)\n--\ndrivers/thunderbolt/dma_test.c-733-\ndrivers/thunderbolt/dma_test.c:734:\tret = tb_register_service_driver(\u0026dma_test_driver);\ndrivers/thunderbolt/dma_test.c-735-\tif (ret)\n--\ndrivers/thunderbolt/dma_test.c-740-err_unregister_dir:\ndrivers/thunderbolt/dma_test.c:741:\ttb_unregister_property_dir(\"dma_test\", dma_test_dir);\ndrivers/thunderbolt/dma_test.c-742-err_free_dir:\ndrivers/thunderbolt/dma_test.c:743:\ttb_property_free_dir(dma_test_dir);\ndrivers/thunderbolt/dma_test.c-744-err_free_pattern:\ndrivers/thunderbolt/dma_test.c:745:\tkfree(dma_test_pattern);\ndrivers/thunderbolt/dma_test.c-746-\n--\ndrivers/thunderbolt/dma_test.c-748-}\ndrivers/thunderbolt/dma_test.c:749:module_init(dma_test_init);\ndrivers/thunderbolt/dma_test.c-750-\ndrivers/thunderbolt/dma_test.c:751:static void __exit dma_test_exit(void)\ndrivers/thunderbolt/dma_test.c-752-{\ndrivers/thunderbolt/dma_test.c:753:\ttb_unregister_service_driver(\u0026dma_test_driver);\ndrivers/thunderbolt/dma_test.c:754:\ttb_unregister_property_dir(\"dma_test\", dma_test_dir);\ndrivers/thunderbolt/dma_test.c:755:\ttb_property_free_dir(dma_test_dir);\ndrivers/thunderbolt/dma_test.c:756:\tkfree(dma_test_pattern);\ndrivers/thunderbolt/dma_test.c-757-}\ndrivers/thunderbolt/dma_test.c:758:module_exit(dma_test_exit);\ndrivers/thunderbolt/dma_test.c-759-\n--\ndrivers/thunderbolt/dma_test.c=761=MODULE_AUTHOR(\"Mika Westerberg \u003cmika.westerberg@linux.intel.com\u003e\");\ndrivers/thunderbolt/dma_test.c:762:MODULE_DESCRIPTION(\"Thunderbolt/USB4 DMA traffic test driver\");\ndrivers/thunderbolt/dma_test.c-763-MODULE_LICENSE(\"GPL v2\");\n--\ndrivers/thunderbolt/icm.c=2479=struct tb *icm_probe(struct tb_nhi *nhi)\n--\ndrivers/thunderbolt/icm.c-2514-\t\t/*\ndrivers/thunderbolt/icm.c:2515:\t\t * NVM upgrade has not been tested on Apple systems and\ndrivers/thunderbolt/icm.c-2516-\t\t * they don't provide images publicly either. To be on\n--\ndrivers/thunderbolt/tb.h=1403=enum usb4_margining_lane {\n--\ndrivers/thunderbolt/tb.h-1416- * @optional_voltage_offset_range: Enable optional extended voltage range\ndrivers/thunderbolt/tb.h:1417: * @right_high: %false if left/low margin test is performed, %true if right/high\ndrivers/thunderbolt/tb.h:1418: * @upper_eye: %true if margin test is done on upper eye, %false if done on\ndrivers/thunderbolt/tb.h-1419- *\t lower eye\n--\ndrivers/thunderbolt/test.c-2-/*\ndrivers/thunderbolt/test.c:3: * KUnit tests\ndrivers/thunderbolt/test.c-4- *\n--\ndrivers/thunderbolt/test.c-8-\ndrivers/thunderbolt/test.c:9:#include \u003ckunit/test.h\u003e\ndrivers/thunderbolt/test.c-10-#include \u003clinux/idr.h\u003e\n--\ndrivers/thunderbolt/test.c=24=static void __ida_destroy(struct kunit_resource *res)\n--\ndrivers/thunderbolt/test.c-30-\ndrivers/thunderbolt/test.c:31:static void kunit_ida_init(struct kunit *test, struct ida *ida)\ndrivers/thunderbolt/test.c-32-{\ndrivers/thunderbolt/test.c:33:\tkunit_alloc_resource(test, __ida_init, __ida_destroy, GFP_KERNEL, ida);\ndrivers/thunderbolt/test.c-34-}\ndrivers/thunderbolt/test.c-35-\ndrivers/thunderbolt/test.c:36:static struct tb_switch *alloc_switch(struct kunit *test, u64 route,\ndrivers/thunderbolt/test.c-37-\t\t\t\t u8 upstream_port, u8 max_port_number)\n--\ndrivers/thunderbolt/test.c-42-\ndrivers/thunderbolt/test.c:43:\tsw = kunit_kzalloc(test, sizeof(*sw), GFP_KERNEL);\ndrivers/thunderbolt/test.c-44-\tif (!sw)\n--\ndrivers/thunderbolt/test.c-54-\tsize = (sw-\u003econfig.max_port_number + 1) * sizeof(*sw-\u003eports);\n\n"
} |
| 19/2 | 2026/09/25 13:21 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 37623 output: 31 thoughts: 50 Thoughts: Okay, let's dive into this `nhi.c` file. It's the Thunderbolt Native Host Interface driver, so that's where the low-level communication with the Thunderbolt hardware happens. I need to understand its role in the system. I'm going to quickly check if this is a PCI driver. My intuition says it probably is, but it's always good to be certain. A quick and dirty way to check is with `grep`, so I'll search through the code for "pci_driver" within the `drivers/thunderbolt/nhi.c` file. That should give me a solid clue as to its core operational structure, and how it's integrated with the PCI subsystem. |
| 20/2 | 2026/09/25 13:21 | tool | grepper |
0mArgs:{
"Expression": "pci_register_driver",
"PathPrefix": "drivers/thunderbolt/"
}Results: {
"Output": "drivers/thunderbolt/pci.c=640=static int __init nhi_init(void)\n--\ndrivers/thunderbolt/pci.c-647-\ndrivers/thunderbolt/pci.c:648:\tret = pci_register_driver(\u0026nhi_driver);\ndrivers/thunderbolt/pci.c-649-\tif (ret)\n"
} |
| 21/2 | 2026/09/25 13:21 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 37959 output: 29 thoughts: 17 Thoughts: Okay, here's my interpretation of that thought process, tailored for an expert audience, and rendered in the first person: **Analyzing the Thunderbolt PCI Driver's PCI ID Handling** Alright, I'm diving into the `drivers/thunderbolt/pci.c` file. My immediate focus is on how it handles PCI IDs. I need to understand the specifics of how this driver identifies and interacts with Thunderbolt devices connected via PCI. I'm looking for the essential PCI IDs that are used to match supported devices. I want to know the vendor, device, subsystem, and subsystem vendor IDs, and the scope of which the IDs pertain to. The important part is making sure the driver is robust in the face of the multitude of hardware configurations out there. I'm going to pay close attention to the matching logic and any wildcarding or range-matching techniques employed. Any nuances there could be crucial for overall reliability and interoperability with various chipsets and firmware revisions. My aim is to get a handle on the driver's device-identification strategy to make sure it's correct. |
| 22/2 | 2026/09/25 13:21 | tool | grepper |
0mArgs:{
"Expression": "nhi_driver",
"PathPrefix": "drivers/thunderbolt/"
}Results: {
"Output": "drivers/thunderbolt/pci.c=629=MODULE_LICENSE(\"GPL\");\ndrivers/thunderbolt/pci.c-630-\ndrivers/thunderbolt/pci.c:631:static struct pci_driver nhi_driver = {\ndrivers/thunderbolt/pci.c-632-\t.name = \"thunderbolt\",\n--\ndrivers/thunderbolt/pci.c=640=static int __init nhi_init(void)\n--\ndrivers/thunderbolt/pci.c-647-\ndrivers/thunderbolt/pci.c:648:\tret = pci_register_driver(\u0026nhi_driver);\ndrivers/thunderbolt/pci.c-649-\tif (ret)\n--\ndrivers/thunderbolt/pci.c=655=static void __exit nhi_unload(void)\ndrivers/thunderbolt/pci.c-656-{\ndrivers/thunderbolt/pci.c:657:\tpci_unregister_driver(\u0026nhi_driver);\ndrivers/thunderbolt/pci.c-658-\ttb_domain_exit();\n"
} |
| 23/2 | 2026/09/25 13:21 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 38513 output: 29 thoughts: 24 Thoughts: Here's my thought process, as it stands: **Digging into Thunderbolt PCI Device Identification** Okay, so I need to understand how the system's identifying Thunderbolt devices at the PCI level. The usual starting point is the driver's device ID table, and the likely place to find that is within the Thunderbolt driver's PCI-specific code. That makes `drivers/thunderbolt/pci.c` the obvious file to examine. Let's see what's defined in the `pci_device_id` structure there. I'm expecting to see a list of vendor and device IDs, likely along with subsystem IDs, that the driver claims ownership of. This will give me a good understanding of what the driver considers to be "Thunderbolt" devices from the PCI bus's perspective. I am guessing they are well defined. |
| 24/2 | 2026/09/25 13:21 | tool | grepper |
0mArgs:{
"Expression": "nhi_ids",
"PathPrefix": "drivers/thunderbolt/"
}Results: {
"Output": "drivers/thunderbolt/pci.c=531=static void nhi_pci_shutdown(struct pci_dev *pdev)\n--\ndrivers/thunderbolt/pci.c-535-\ndrivers/thunderbolt/pci.c:536:static struct pci_device_id nhi_ids[] = {\ndrivers/thunderbolt/pci.c-537-\t/*\n--\ndrivers/thunderbolt/pci.c-626-\ndrivers/thunderbolt/pci.c:627:MODULE_DEVICE_TABLE(pci, nhi_ids);\ndrivers/thunderbolt/pci.c-628-MODULE_DESCRIPTION(\"Thunderbolt/USB4 core driver\");\n--\ndrivers/thunderbolt/pci.c=631=static struct pci_driver nhi_driver = {\ndrivers/thunderbolt/pci.c-632-\t.name = \"thunderbolt\",\ndrivers/thunderbolt/pci.c:633:\t.id_table = nhi_ids,\ndrivers/thunderbolt/pci.c-634-\t.probe = nhi_pci_probe,\n"
} |
| 25/2 | 2026/09/25 13:21 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 39025 output: 31 thoughts: 281 Thoughts: **Analyzing the Thunderbolt PCI Driver and its Fuzzing Potential** Okay, let's break this down. My initial thought is that `thunderbolt` is definitely a PCI driver – I'm familiar with its scope covering Intel's Falcon Ridge, Alpine Ridge, Titan Ridge, Ice Lake, Tiger Lake, and the USB4 NHI. Now, the key question arises: can syzkaller actually *reach* `drivers/net/thunderbolt/main.c`? That's the critical first hurdle. I need to refer to Section 2 of those instructions. I'm thinking about the reachability gate – fuzzing hinges on code being executable in standard virtualized environments like GCE or QEMU, leveraging emulated devices. The instructions make it clear that structurally unreachable code should not be fuzzed. Unreachable hardware, like vendor-specific PCIe switches, SmartNICs, or specialized GPU drivers requiring physical cards, falls into this category. Now I need to consider `drivers/net/thunderbolt/`. So, what does `tbnet` probe for? That is a critical question. I should examine the device IDs it uses. I need to look closely at `tbnet_ids` or `tb_service_driver` within `drivers/net/thunderbolt/main.c` to determine what specific hardware the driver interacts with. The answer to *that* will decide whether this is even a viable target for fuzzing in a standard virtualized environment. |
| 26/2 | 2026/09/25 13:21 | tool | grepper |
0mArgs:{
"Expression": "tbnet_ids",
"PathPrefix": "drivers/net/thunderbolt/"
}Results: {
"Output": "drivers/net/thunderbolt/main.c=1537=static DEFINE_SIMPLE_DEV_PM_OPS(tbnet_pm_ops, tbnet_suspend, tbnet_resume);\ndrivers/net/thunderbolt/main.c-1538-\ndrivers/net/thunderbolt/main.c:1539:static const struct tb_service_id tbnet_ids[] = {\ndrivers/net/thunderbolt/main.c-1540-\t{ TB_SERVICE(\"network\", 1) },\n--\ndrivers/net/thunderbolt/main.c-1542-};\ndrivers/net/thunderbolt/main.c:1543:MODULE_DEVICE_TABLE(tbsvc, tbnet_ids);\ndrivers/net/thunderbolt/main.c-1544-\ndrivers/net/thunderbolt/main.c=1545=static struct tb_service_driver tbnet_driver = {\n--\ndrivers/net/thunderbolt/main.c-1553-\t.shutdown = tbnet_shutdown,\ndrivers/net/thunderbolt/main.c:1554:\t.id_table = tbnet_ids,\ndrivers/net/thunderbolt/main.c-1555-};\n"
} |
| 27/2 | 2026/09/25 13:21 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 39956 output: 31 thoughts: 99 Thoughts: **Delving into the Thunderbolt Service Creation Process** Okay, so I'm trying to figure out the lifecycle of a `tb_service` object, specifically in the context of `tbnet`. I remember that `tbnet` is registered as a service driver with `tb_register_service_driver(&tbnet_driver)`. Now, the key question is, *when* is that actual `tb_service` instantiated? My first instinct is to check where services are enumerated, so let's look at `enumerate_services(struct tb_xdomain *xd)` in `drivers/thunderbolt/xdomain.c`. That function likely holds the key to discovering the service creation flow. Now, to trace further back and understand the broader picture, I need to know how `struct tb_xdomain` itself is created, and that will give me context. So, let's search for instances of `tb_xdomain_alloc` or direct declarations of `struct tb_xdomain` to trace the creation of the cross-domain structure. This should illuminate the overall service creation paradigm and when `tbnet` is actually connected within that flow. |
| 28/2 | 2026/09/25 13:21 | tool | grepper |
0mArgs:{
"Expression": "tb_xdomain_alloc",
"PathPrefix": "drivers/thunderbolt/"
}Results: {
"Output": "drivers/thunderbolt/dma_test.c=134=static int dma_test_start_rings(struct dma_test *dt)\n--\ndrivers/thunderbolt/dma_test.c-159-\ndrivers/thunderbolt/dma_test.c:160:\t\tret = tb_xdomain_alloc_out_hopid(xd, -1);\ndrivers/thunderbolt/dma_test.c-161-\t\tif (ret \u003c 0) {\n--\ndrivers/thunderbolt/dma_test.c-187-\ndrivers/thunderbolt/dma_test.c:188:\t\tret = tb_xdomain_alloc_in_hopid(xd, -1);\ndrivers/thunderbolt/dma_test.c-189-\t\tif (ret \u003c 0) {\n--\ndrivers/thunderbolt/icm.c=709=static void add_xdomain(struct tb_switch *sw, u64 route,\n--\ndrivers/thunderbolt/icm.c-716-\ndrivers/thunderbolt/icm.c:717:\txd = tb_xdomain_alloc(sw-\u003etb, \u0026sw-\u003edev, route, local_uuid, remote_uuid);\ndrivers/thunderbolt/icm.c-718-\tif (!xd)\n--\ndrivers/thunderbolt/stream.c=1186=static int tbstream_dev_alloc_in_hopid(struct tbstream_dev *sdev, int hopid)\n--\ndrivers/thunderbolt/stream.c-1196-\t}\ndrivers/thunderbolt/stream.c:1197:\tret = tb_xdomain_alloc_in_hopid(xd, hopid);\ndrivers/thunderbolt/stream.c-1198-\tif (ret \u003c 0)\n--\ndrivers/thunderbolt/stream.c=1212=static int tbstream_dev_alloc_out_hopid(struct tbstream_dev *sdev, int hopid)\n--\ndrivers/thunderbolt/stream.c-1222-\t}\ndrivers/thunderbolt/stream.c:1223:\tret = tb_xdomain_alloc_out_hopid(xd, hopid);\ndrivers/thunderbolt/stream.c-1224-\tif (ret \u003c 0)\n--\ndrivers/thunderbolt/tb.c=431=static void tb_scan_xdomain(struct tb_port *port)\n--\ndrivers/thunderbolt/tb.c-447-\ndrivers/thunderbolt/tb.c:448:\txd = tb_xdomain_alloc(tb, \u0026sw-\u003edev, route, tb-\u003eroot_switch-\u003euuid,\ndrivers/thunderbolt/tb.c-449-\t\t\t NULL);\n--\ndrivers/thunderbolt/tb.h=1261=bool tb_xdomain_handle_request(struct tb *tb, enum tb_cfg_pkg_type type,\ndrivers/thunderbolt/tb.h-1262-\t\t\t const void *buf, size_t size);\ndrivers/thunderbolt/tb.h:1263:struct tb_xdomain *tb_xdomain_alloc(struct tb *tb, struct device *parent,\ndrivers/thunderbolt/tb.h-1264-\t\t\t\t u64 route, const uuid_t *local_uuid,\n--\ndrivers/thunderbolt/xdomain.c=2078=static void tb_xdomain_link_exit(struct tb_xdomain *xd)\n--\ndrivers/thunderbolt/xdomain.c-2111-/**\ndrivers/thunderbolt/xdomain.c:2112: * tb_xdomain_alloc() - Allocate new XDomain object\ndrivers/thunderbolt/xdomain.c-2113- * @tb: Domain where the XDomain belongs\n--\ndrivers/thunderbolt/xdomain.c-2124- */\ndrivers/thunderbolt/xdomain.c:2125:struct tb_xdomain *tb_xdomain_alloc(struct tb *tb, struct device *parent,\ndrivers/thunderbolt/xdomain.c-2126-\t\t\t\t u64 route, const uuid_t *local_uuid,\n--\ndrivers/thunderbolt/xdomain.c=2352=EXPORT_SYMBOL_GPL(tb_xdomain_lane_bonding_disable);\n--\ndrivers/thunderbolt/xdomain.c-2354-/**\ndrivers/thunderbolt/xdomain.c:2355: * tb_xdomain_alloc_in_hopid() - Allocate input HopID for tunneling\ndrivers/thunderbolt/xdomain.c-2356- * @xd: XDomain connection\n--\ndrivers/thunderbolt/xdomain.c-2367- */\ndrivers/thunderbolt/xdomain.c:2368:int tb_xdomain_alloc_in_hopid(struct tb_xdomain *xd, int hopid)\ndrivers/thunderbolt/xdomain.c-2369-{\n--\ndrivers/thunderbolt/xdomain.c-2377-}\ndrivers/thunderbolt/xdomain.c:2378:EXPORT_SYMBOL_GPL(tb_xdomain_alloc_in_hopid);\ndrivers/thunderbolt/xdomain.c-2379-\ndrivers/thunderbolt/xdomain.c-2380-/**\ndrivers/thunderbolt/xdomain.c:2381: * tb_xdomain_alloc_out_hopid() - Allocate output HopID for tunneling\ndrivers/thunderbolt/xdomain.c-2382- * @xd: XDomain connection\n--\ndrivers/thunderbolt/xdomain.c-2393- */\ndrivers/thunderbolt/xdomain.c:2394:int tb_xdomain_alloc_out_hopid(struct tb_xdomain *xd, int hopid)\ndrivers/thunderbolt/xdomain.c-2395-{\n--\ndrivers/thunderbolt/xdomain.c-2403-}\ndrivers/thunderbolt/xdomain.c:2404:EXPORT_SYMBOL_GPL(tb_xdomain_alloc_out_hopid);\ndrivers/thunderbolt/xdomain.c-2405-\n"
} |
| 29/2 | 2026/09/25 13:21 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 41825 output: 34 thoughts: 157 Thoughts: **My Line of Inquiry: Thunderbolt/USB4 Emulation** Okay, so `tb_xdomain_alloc` is crucial, called by `icm_probe` and `tb_scan_xdomain`. Makes sense, those are core Thunderbolt functions. And those functions are dependent on a `struct tb`, which originates from `nhi_probe`. Right, `nhi_probe` is for the Native Host Interface, the physical PCI device – the Falcon Ridge, Alpine Ridge, Titan Ridge, or the Intel/AMD USB4 NHI. But here's where my mind starts racing. Can I even *emulate* Thunderbolt or USB4 in a standard QEMU setup, or perhaps even in Google Compute Engine? My initial thought is no, because I don't recall seeing an emulated Thunderbolt or USB4 NHI controller in QEMU. That's a fundamental architectural limitation, I'd imagine. Wait a second... what about that `drivers/thunderbolt/test.c` file in the kernel? Maybe there's a test setup, perhaps a simulated environment, within the kernel itself. I should investigate what that does. That might hold the key to understanding how Thunderbolt-related code can be exercised without a physical device, and perhaps how it *could* be simulated if I have enough time and resources. Let's see what that test file offers. |
| 30/2 | 2026/09/25 13:22 | tool | read-file |
0mArgs:{
"File": "drivers/thunderbolt/test.c",
"FirstLine": 1,
"LineCount": 50
}Results: {
"Contents": " 1:\t// SPDX-License-Identifier: GPL-2.0\n 2:\t/*\n 3:\t * KUnit tests\n 4:\t *\n 5:\t * Copyright (C) 2020, Intel Corporation\n 6:\t * Author: Mika Westerberg \u003cmika.westerberg@linux.intel.com\u003e\n 7:\t */\n 8:\t\n 9:\t#include \u003ckunit/test.h\u003e\n 10:\t#include \u003clinux/idr.h\u003e\n 11:\t\n 12:\t#include \"tb.h\"\n 13:\t#include \"tunnel.h\"\n 14:\t\n 15:\tstatic int __ida_init(struct kunit_resource *res, void *context)\n 16:\t{\n 17:\t\tstruct ida *ida = context;\n 18:\t\n 19:\t\tida_init(ida);\n 20:\t\tres-\u003edata = ida;\n 21:\t\treturn 0;\n 22:\t}\n 23:\t\n 24:\tstatic void __ida_destroy(struct kunit_resource *res)\n 25:\t{\n 26:\t\tstruct ida *ida = res-\u003edata;\n 27:\t\n 28:\t\tida_destroy(ida);\n 29:\t}\n 30:\t\n 31:\tstatic void kunit_ida_init(struct kunit *test, struct ida *ida)\n 32:\t{\n 33:\t\tkunit_alloc_resource(test, __ida_init, __ida_destroy, GFP_KERNEL, ida);\n 34:\t}\n 35:\t\n 36:\tstatic struct tb_switch *alloc_switch(struct kunit *test, u64 route,\n 37:\t\t\t\t\t u8 upstream_port, u8 max_port_number)\n 38:\t{\n 39:\t\tstruct tb_switch *sw;\n 40:\t\tsize_t size;\n 41:\t\tint i;\n 42:\t\n 43:\t\tsw = kunit_kzalloc(test, sizeof(*sw), GFP_KERNEL);\n 44:\t\tif (!sw)\n 45:\t\t\treturn NULL;\n 46:\t\n 47:\t\tsw-\u003econfig.upstream_port_number = upstream_port;\n 48:\t\tsw-\u003econfig.depth = tb_route_length(route);\n 49:\t\tsw-\u003econfig.route_hi = upper_32_bits(route);\n 50:\t\tsw-\u003econfig.route_lo = lower_32_bits(route);\n"
} |
| 31/2 | 2026/09/25 13:22 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 42957 output: 35 thoughts: 485 Thoughts: **My Assessment of Thunderbolt Network Emulation Possibilities**
Okay, so the initial mention of KUnit tests immediately clarifies that those are for testing the basic Thunderbolt switch, tunnel, and path functionalities, not syzkaller fuzzing. That's a different avenue entirely. Then my mind shifts to USB gadget emulation. Can we, maybe, fake a Thunderbolt network connection using USB gadget? Nope. The USB gadget offers `g_ether`, `rndis`, `cdc_ether`, and similar options, but Thunderbolt is distinct. It's built on a PCIe controller, specifically the `nhi` (Native Host Interface).
So, if not USB gadget, can QEMU potentially emulate Thunderbolt or USB4? Let's investigate QEMU's capabilities. I'm searching for thunderbolt or nhi emulation support. Hmm, it seems QEMU doesn't have explicit Thunderbolt `nhi` emulation. This prompts a different line of inquiry: Can we create or probe a `thunderbolt-net` interface through software? I need to check `tbnet_probe`.
`tbnet_probe` is called when a `tb_service` with the ID `network` is probed on a `tb_bus_type`. Interesting! How do we create such a `tb_service` in the first place? Time to investigate all callers or references to `tb_service_type` or `tb_service` creation.
Looking in `drivers/thunderbolt/xdomain.c`, I see `enumerate_services(struct tb_xdomain *xd)` calls. This function enumerates services from the xdomain properties. It looks like it is creating them with `kzalloc`, and registering the device:
```c
tb_property_for_each(xd->remote_properties, p) {
if (p->type != TB_PROPERTY_TYPE_DIRECTORY)
continue;
...
svc = kzalloc(sizeof(*svc), GFP_KERNEL);
...
device_register(&svc->dev);
```
So, where does `xd->remote_properties` come from? It's derived from the Thunderbolt XDomain discovery protocol (`tb_xdp_properties_response` and others), operating over the Thunderbolt fabric! Ah, but that means it requires an active Thunderbolt link physically connected to another Thunderbolt host. Crucially, the Thunderbolt fabric relies on physical Thunderbolt or USB4 host controller hardware, like Intel Falcon Ridge, Alpine Ridge, Titan Ridge, Goshen Ridge, Barlow Ridge, Maple Ridge, or integrated Intel/AMD USB4 NHI.
Wait, I think there's still a glimmer of hope! What about `USB4_CONFIGFS`? What does the `configfs.c` file in `drivers/thunderbolt` actually do? I need to check `drivers/thunderbolt/configfs.c`. Let's see if this offers a software-defined path.
|
| 32/2 | 2026/09/25 13:22 | tool | read-file |
0mArgs:{
"File": "drivers/thunderbolt/configfs.c",
"FirstLine": 1,
"LineCount": 80
}Results: {
"Contents": " 1:\t// SPDX-License-Identifier: GPL-2.0\n 2:\t/*\n 3:\t * ConfigFS support\n 4:\t *\n 5:\t * Copyright (C) 2026, Intel Corporation\n 6:\t * Author: Mika Westerberg \u003cmika.westerberg@linux.intel.com\u003e\n 7:\t */\n 8:\t\n 9:\t#include \u003clinux/configfs.h\u003e\n 10:\t#include \u003clinux/export.h\u003e\n 11:\t\n 12:\t#include \"tb.h\"\n 13:\t\n 14:\tstatic const struct config_item_type tb_root_group_type = {\n 15:\t\t.ct_owner = THIS_MODULE,\n 16:\t};\n 17:\t\n 18:\tstatic struct configfs_subsystem tb_configfs = {\n 19:\t\t.su_group = {\n 20:\t\t\t.cg_item = {\n 21:\t\t\t\t.ci_namebuf = \"thunderbolt\",\n 22:\t\t\t\t.ci_type = \u0026tb_root_group_type,\n 23:\t\t\t},\n 24:\t\t},\n 25:\t};\n 26:\t\n 27:\t/**\n 28:\t * tb_configfs_register_group() - Register Thunderbolt ConfigFS group\n 29:\t * @group: Group to register.\n 30:\t *\n 31:\t * Registers the new @group under Thunderbolt subsystem ConfigFS.\n 32:\t *\n 33:\t * Return: 0% in case of success, negative errno otherwise.\n 34:\t */\n 35:\tint tb_configfs_register_group(struct config_group *group)\n 36:\t{\n 37:\t\treturn configfs_register_group(\u0026tb_configfs.su_group, group);\n 38:\t}\n 39:\tEXPORT_SYMBOL_GPL(tb_configfs_register_group);\n 40:\t\n 41:\t/**\n 42:\t * tb_configfs_unregister_group() - Unregister previously registered group\n 43:\t * @group: Group to unregister.\n 44:\t */\n 45:\tvoid tb_configfs_unregister_group(struct config_group *group)\n 46:\t{\n 47:\t\tconfigfs_unregister_group(group);\n 48:\t}\n 49:\tEXPORT_SYMBOL_GPL(tb_configfs_unregister_group);\n 50:\t\n 51:\tint tb_configfs_init(void)\n 52:\t{\n 53:\t\tconfig_group_init(\u0026tb_configfs.su_group);\n 54:\t\tmutex_init(\u0026tb_configfs.su_mutex);\n 55:\t\treturn configfs_register_subsystem(\u0026tb_configfs);\n 56:\t}\n 57:\t\n 58:\tvoid tb_configfs_exit(void)\n 59:\t{\n 60:\t\tconfigfs_unregister_subsystem(\u0026tb_configfs);\n 61:\t}\n"
} |
| 33/2 | 2026/09/25 13:22 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 44875 output: 30 thoughts: 16 Thoughts: Okay, here's my take on those thoughts, tailored for an expert audience: **Analyzing the Callers of `tb_configfs_register_group`** Alright, so the initial thought process zeroes in on that function, `tb_configfs_register_group`. My immediate instinct is to trace back its usage. Understanding *who* is calling it is key to figuring out its overall role and, more specifically, how it integrates with the broader system design. This is standard procedure, of course. I'm looking for the register, not just the function, but the contexts in which this is used. It should immediately show me the relationships this function has. So, I need to understand its relationship to the functions that call it. The goal is to rapidly establish the function's significance and potential impact within the kernel configuration subsystem. |
| 34/2 | 2026/09/25 13:22 | tool | grepper |
0mArgs:{
"Expression": "tb_configfs_register_group",
"PathPrefix": "drivers/"
}Results: {
"Output": "drivers/thunderbolt/configfs.c=18=static struct configfs_subsystem tb_configfs = {\n--\ndrivers/thunderbolt/configfs.c-27-/**\ndrivers/thunderbolt/configfs.c:28: * tb_configfs_register_group() - Register Thunderbolt ConfigFS group\ndrivers/thunderbolt/configfs.c-29- * @group: Group to register.\n--\ndrivers/thunderbolt/configfs.c-34- */\ndrivers/thunderbolt/configfs.c:35:int tb_configfs_register_group(struct config_group *group)\ndrivers/thunderbolt/configfs.c-36-{\n--\ndrivers/thunderbolt/configfs.c-38-}\ndrivers/thunderbolt/configfs.c:39:EXPORT_SYMBOL_GPL(tb_configfs_register_group);\ndrivers/thunderbolt/configfs.c-40-\n--\ndrivers/thunderbolt/stream.c=1800=static int __init tbstream_init(void)\n--\ndrivers/thunderbolt/stream.c-1817-\tconfig_group_init(\u0026tbstream_group);\ndrivers/thunderbolt/stream.c:1818:\tret = tb_configfs_register_group(\u0026tbstream_group);\ndrivers/thunderbolt/stream.c-1819-\tif (ret)\n"
} |
| 35/2 | 2026/09/25 13:22 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 45435 output: 32 thoughts: 655 Thoughts: **Thunderbolt Networking: Worth Fuzzing?** Okay, so `tbstream_init` sets up a configfs group for streaming DMA, but importantly, it *doesn't* create a `tbnet` device. Now, I need to be really careful here. Let's revisit Section 2 of the instructions because this feels like a potential "WorthFuzzing=false" scenario. The key negative criteria are "Structurally unreachable hardware." Specifically, things like vendor-specific PCIe switches, SmartNICs, or GPU drivers that require physical ASICs or PCIe cards not emulated in standard QEMU. It also states "REACHABILITY IS THE PRIMARY GATE", so if I can't reach the code in QEMU, forget about fuzzing it. Hmm, what *is* `drivers/net/thunderbolt/main.c`? Ah, it's the `thunderbolt_net` driver. It's an Ethernet driver that lives on top of the Thunderbolt bus, communicating between two Thunderbolt hosts using the Apple ThunderboltIP protocol. To get a `thunderbolt0` network device, I need a physical Thunderbolt/USB4 host controller (like Intel's Falcon Ridge or AMD's USB4 NHI), a physical Thunderbolt/USB4 cable connecting to a peer host (or a loopback), and XDomain service discovery. Here's the problem: QEMU *doesn't* emulate Thunderbolt/USB4 NHI controllers. Syzkaller runs in standard virtualized environments. Can it instantiate a `thunderbolt_net` device? No! Without the hardware, `tbnet_probe()` is never called. No `thunderbolt%d` net_device is ever registered. And none of the functions I'm interested in, like `tbnet_open`, `tbnet_get_priv_flags`, etc., get a chance to execute. So, am I at a dead end? Possibly, but I need to make sure. I'm going to check syzkaller for any syzlang descriptions mentioning "thunderbolt". Then, I'll double-check for any mock devices or anything helpful in `drivers/net/thunderbolt/` or `drivers/thunderbolt/`. Just to be absolutely thorough, I'll grep the entire tree and tools for `CONFIG_USB4_NET` and `thunderbolt`, and check `CONFIG_USB4_NET` in `arch/x86/configs/`. I need to be 100% certain before I decide this code is off-limits. |
| 36/2 | 2026/09/25 13:22 | tool | grepper |
0mError:no matches Args: {
"Expression": "USB4_NET",
"PathPrefix": "arch/x86/configs/"
}Results: {
"error": "no matches"
} |
| 37/2 | 2026/09/25 13:22 | llm | patch-evaluator |
0mModel:gemini-3.8-flash Args: null Results: null Tokens: input: 46675 output: 177 thoughts: 690 Thoughts: **Analysis of ThunderboltIP Network Driver Changes for Fuzzing Suitability** Okay, let's re-examine `drivers/net/thunderbolt/main.c`. This patch introduces changes related to end-to-end (E2E) flow control, specifically within the ThunderboltIP network driver. The core modification involves adding a new ethtool private flag, "tx-e2e," and associated handlers for setting and getting this flag, alongside changes to the `tbnet_open` function to support E2E in transmit rings. The patch is confined solely to `drivers/net/thunderbolt/main.c`. Crucially, this driver relies on `CONFIG_USB4_NET` and `CONFIG_USB4`, and, more fundamentally, it demands a physical Thunderbolt/USB4 host controller (NHI). This isn't emulated by the standard QEMU or Google Compute Engine environments we typically use for fuzzing. Furthermore, the `tbnet` driver requires an active Thunderbolt link – an XDomain connection between two Thunderbolt hosts – for the `network` service to be detected and probed. I've confirmed that no other files are touched by this patch. Now, let's assess the fuzzing criteria. Given the structural limitations, it's pretty clear that this isn't WorthFuzzing. The `EnableConfigs` are correct as `"USB4_NET", "USB4"`, and I've checked the expected format for `set-results`. We need a concise explanation, and the reasoning is as follows: 1. The patch modifies the ThunderboltIP network driver (`drivers/net/thunderbolt/main.c`) to add an ethtool private flag for E2E flow control and make necessary changes to support E2E in the `tbnet_open` function. 2. The driver requires a real Thunderbolt/USB4 host controller (NHI PCIe device) and an active Thunderbolt link for network device enumeration. These conditions are not met in standard virtualized fuzzing environments like QEMU and GCE. 3. Therefore, the modified code is structurally unreachable during syzkaller fuzzing. Thus, `WorthFuzzing=false`. I'm confident in this analysis. I will proceed with calling `set-results` using the information determined. |
| 38/2 | 2026/09/25 13:22 | tool | set-results |
0mArgs:{
"EnableConfigs": [
"USB4_NET",
"USB4"
],
"FocusSymbols": [],
"Reasoning": "The patch modifies drivers/net/thunderbolt/main.c (the ThunderboltIP network driver) to add support for toggling end-to-end (E2E) flow control on Tx rings via ethtool private flags. This driver operates over the Thunderbolt/USB4 bus and requires a physical Thunderbolt/USB4 Native Host Interface (NHI) PCIe controller as well as an active Thunderbolt XDomain peer connection to instantiate the net device and invoke the driver callbacks. Because Thunderbolt/USB4 host controllers and link topologies are not emulated in standard QEMU/GCE virtualized fuzzing environments, the modified code is structurally unreachable for syzkaller.",
"WorthFuzzing": false
}Results: {
"EnableConfigs": [
"USB4_NET",
"USB4"
],
"FocusSymbols": [],
"Reasoning": "The patch modifies drivers/net/thunderbolt/main.c (the ThunderboltIP network driver) to add support for toggling end-to-end (E2E) flow control on Tx rings via ethtool private flags. This driver operates over the Thunderbolt/USB4 bus and requires a physical Thunderbolt/USB4 Native Host Interface (NHI) PCIe controller as well as an active Thunderbolt XDomain peer connection to instantiate the net device and invoke the driver callbacks. Because Thunderbolt/USB4 host controllers and link topologies are not emulated in standard QEMU/GCE virtualized fuzzing environments, the modified code is structurally unreachable for syzkaller.",
"WorthFuzzing": false
} |
| 39/1 | 2026/09/25 13:22 | action | If |
0mArgs:{
"WorthFuzzing": false
}Results: null |
| Total Calls | Total Tokens | Avg Tokens | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|
| Total Calls | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|