| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/08/02 05:59 | flow | patch-triage |
0mArgs:null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch modifies a hardware-specific driver for the Realtek RTL8366RB DSA switch. This device is not emulated in standard QEMU/GCE environments, and the driver requires specific device tree nodes or hardware to probe, making the modified code unreachable during fuzzing.",
"WorthFuzzing": false
} |
| 1/1 | 2026/08/02 05:59 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit ccfc371f2d10d4a868c3a565cbc668fd9c83b630\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Sun Aug 2 05:59:58 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/drivers/net/dsa/realtek/rtl8366rb.c b/drivers/net/dsa/realtek/rtl8366rb.c\nindex d2fa8ff6a5d08..f11831b66de88 100644\n--- a/drivers/net/dsa/realtek/rtl8366rb.c\n+++ b/drivers/net/dsa/realtek/rtl8366rb.c\n@@ -794,11 +794,10 @@ static int rtl8366rb_setup_all_leds_off(struct realtek_priv *priv)\n static int rtl8366rb_port_set_isolation(struct realtek_priv *priv, int port,\n \t\t\t\t\tu32 mask)\n {\n-\t/* Bit 0 enables isolation so set this if we enable isolation\n-\t * any of the ports an clear it if we disable on all of them.\n+\t/* Bit 0 enables isolation, the mask indicates allowed forwarding\n+\t * ports\n \t */\n-\tif (mask)\n-\t\tmask = RTL8366RB_PORT_ISO_PORTS(mask) | RTL8366RB_PORT_ISO_EN;\n+\tmask = RTL8366RB_PORT_ISO_PORTS(mask) | RTL8366RB_PORT_ISO_EN;\n \n \treturn regmap_write(priv-\u003emap, RTL8366RB_PORT_ISO(port),\n \t\t\t mask);\n@@ -974,7 +973,7 @@ static int rtl8366rb_setup(struct dsa_switch *ds)\n \t\tif (!dsa_port_is_user(dp))\n \t\t\tcontinue;\n \n-\t\t/* Forward only to the CPU */\n+\t\t/* Forward only to the CPU(s), isolate from all other ports */\n \t\tret = rtl8366rb_port_set_isolation(priv, dp-\u003eindex, upports_mask);\n \t\tif (ret)\n \t\t\treturn ret;\n"
} |
| 2/1 | 2026/08/02 05:59 | agent | patch-evaluator |
0mModel:best-expensive Args: null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch modifies a hardware-specific driver for the Realtek RTL8366RB DSA switch. This device is not emulated in standard QEMU/GCE environments, and the driver requires specific device tree nodes or hardware to probe, making the modified code unreachable during fuzzing.",
"WorthFuzzing": false
}Instruction: You are an expert Linux kernel maintainer. Your job is to review a provided patch series and determine if it makes functional changes to the kernel that should be fuzzed. IMPORTANT: The changes have ALREADY been applied and committed as the HEAD commit in your workspace. Do NOT rely on your internal knowledge of the kernel. You must actively use your code access tools to examine the actual source code and confirm any assumptions. Return WorthFuzzing=false if the patch only contains: - Modifications to Documentation/, Kconfig files, or code comments. - Purely decorative changes, such as logging (e.g., pr_err, printk) or tracepoints. - Changes to numeric constants or macros that do not functionally alter execution flow. - Code paths that are impossible to reach in virtualized environments like GCE or QEMU, even when utilizing software-emulated hardware (e.g., usb gadget, mac80211_hwsim). - Code in vendor-specific PCIe switch, SmartNIC, or GPU drivers (e.g., mlxsw, pds_core, qed, ionic, amdgpu) that require physical PCIe hardware cards not emulated in standard QEMU. - Driver .remove, .shutdown, or pci_unregister_driver teardown callbacks (e.g., igb_remove) that are executed only during PCI hot-unplug or sysfs driver unbind operations. If it modifies reachable core kernel logic, drivers, or architectures, use your code search tools to verify the code can be executed, then return WorthFuzzing=true. When returning WorthFuzzing=true, you MUST ALSO: 1. Extract any specific kernel functions that should be heavily fuzzed into FocusSymbols. Avoid listing generic hot-path functions to prevent skewed test distributions. Prefer non-static, non-inlined API entrypoint functions over internal static helper functions (which are inlined by the compiler and do not have distinct symbol addresses). 2. Identify any specific CONFIG_ options required to properly test this new/modified feature. Go and look into the Kconfig files and check for ifdefs around the code, do not make assumptions. Also check "depends on" lines in Kconfig to include any non-standard parent subsystem configs needed for Kbuild to compile the code statically into vmlinux. List them in the EnableConfigs output array, and DO NOT add a '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: For your convenience, here is the diff of the changes:
commit ccfc371f2d10d4a868c3a565cbc668fd9c83b630
Author: syz-cluster <triage@syzkaller.com>
Date: Sun Aug 2 05:59:58 2026 +0000
syz-cluster: applied patch under review
diff --git a/drivers/net/dsa/realtek/rtl8366rb.c b/drivers/net/dsa/realtek/rtl8366rb.c
index d2fa8ff6a5d08..f11831b66de88 100644
--- a/drivers/net/dsa/realtek/rtl8366rb.c
+++ b/drivers/net/dsa/realtek/rtl8366rb.c
@@ -794,11 +794,10 @@ static int rtl8366rb_setup_all_leds_off(struct realtek_priv *priv)
static int rtl8366rb_port_set_isolation(struct realtek_priv *priv, int port,
u32 mask)
{
- /* Bit 0 enables isolation so set this if we enable isolation
- * any of the ports an clear it if we disable on all of them.
+ /* Bit 0 enables isolation, the mask indicates allowed forwarding
+ * ports
*/
- if (mask)
- mask = RTL8366RB_PORT_ISO_PORTS(mask) | RTL8366RB_PORT_ISO_EN;
+ mask = RTL8366RB_PORT_ISO_PORTS(mask) | RTL8366RB_PORT_ISO_EN;
return regmap_write(priv->map, RTL8366RB_PORT_ISO(port),
mask);
@@ -974,7 +973,7 @@ static int rtl8366rb_setup(struct dsa_switch *ds)
if (!dsa_port_is_user(dp))
continue;
- /* Forward only to the CPU */
+ /* Forward only to the CPU(s), isolate from all other ports */
ret = rtl8366rb_port_set_isolation(priv, dp->index, upports_mask);
if (ret)
return ret;
|
| 3/2 | 2026/08/02 05:59 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 2341 output: 36 thoughts: 202 Thoughts: **Analyzing a Realtek RTL8366RB Driver Patch** Okay, so I'm looking at a patch that tweaks the `rtl8366rb.c` driver, specifically the `rtl8366rb_port_set_isolation` function. It seems they've removed a check, the `if (mask)` condition, before setting the isolation mask. This immediately makes me think about potential implications. I need to understand why this check was removed and what scenarios it might affect. This is the driver for the Realtek RTL8366RB DSA switch, which means we're dealing with a Data Switch Aggregator. DSA switches, as I know, typically interface with the main system via MDIO, SPI, or I2C. The instantiation of this driver and how it's connected is going to be crucial. My first step is to confirm how this driver is actually instantiated. I need to trace back from this `rtl8366rb.c` file and understand the surrounding code. Is this driver even reachable in a typical QEMU setup, for instance? Often, DSA switch drivers depend heavily on device tree entries or specific board configurations to be properly initialized and functioning. I'm going to look carefully at the surrounding code and search for clues about how this switch is connected to the system. I also need to understand any assumptions this driver makes about the hardware it controls. |
| 4/2 | 2026/08/02 06:00 | tool | grepper |
0mArgs:{
"Expression": "rtl8366rb",
"PathPrefix": "drivers/net/dsa/realtek/"
}Results: {
"Output": "\nFull output is too long, showing 500 out of 540 lines.\nUse more precise expression if possible.\n\ndrivers/net/dsa/realtek/Makefile=13=obj-$(CONFIG_NET_DSA_REALTEK_RTL8366RB) += rtl8366.o\ndrivers/net/dsa/realtek/Makefile:14:rtl8366-objs \t\t\t\t:= rtl8366-core.o rtl8366rb.o\ndrivers/net/dsa/realtek/Makefile-15-ifdef CONFIG_NET_DSA_REALTEK_RTL8366RB_LEDS\ndrivers/net/dsa/realtek/Makefile:16:rtl8366-objs \t\t\t\t+= rtl8366rb-leds.o\ndrivers/net/dsa/realtek/Makefile-17-endif\n--\ndrivers/net/dsa/realtek/realtek.h=188=void rtl8366_get_ethtool_stats(struct dsa_switch *ds, int port, uint64_t *data);\ndrivers/net/dsa/realtek/realtek.h-189-\ndrivers/net/dsa/realtek/realtek.h:190:extern const struct realtek_variant rtl8366rb_variant;\ndrivers/net/dsa/realtek/realtek.h-191-extern const struct realtek_variant rtl8365mb_variant;\n--\ndrivers/net/dsa/realtek/rtl8366rb-leds.c-6-#include \"rtl83xx.h\"\ndrivers/net/dsa/realtek/rtl8366rb-leds.c:7:#include \"rtl8366rb.h\"\ndrivers/net/dsa/realtek/rtl8366rb-leds.c-8-\ndrivers/net/dsa/realtek/rtl8366rb-leds.c:9:static inline u32 rtl8366rb_led_group_port_mask(u8 led_group, u8 port)\ndrivers/net/dsa/realtek/rtl8366rb-leds.c-10-{\n--\ndrivers/net/dsa/realtek/rtl8366rb-leds.c-24-\ndrivers/net/dsa/realtek/rtl8366rb-leds.c:25:static int rb8366rb_get_port_led(struct rtl8366rb_led *led)\ndrivers/net/dsa/realtek/rtl8366rb-leds.c-26-{\n--\ndrivers/net/dsa/realtek/rtl8366rb-leds.c-40-\ndrivers/net/dsa/realtek/rtl8366rb-leds.c:41:\treturn !!(val \u0026 rtl8366rb_led_group_port_mask(led_group, port_num));\ndrivers/net/dsa/realtek/rtl8366rb-leds.c-42-}\ndrivers/net/dsa/realtek/rtl8366rb-leds.c-43-\ndrivers/net/dsa/realtek/rtl8366rb-leds.c:44:static int rb8366rb_set_port_led(struct rtl8366rb_led *led, bool enable)\ndrivers/net/dsa/realtek/rtl8366rb-leds.c-45-{\n--\ndrivers/net/dsa/realtek/rtl8366rb-leds.c-52-\t\t\t\t RTL8366RB_LED_X_X_CTRL_REG(led_group),\ndrivers/net/dsa/realtek/rtl8366rb-leds.c:53:\t\t\t\t rtl8366rb_led_group_port_mask(led_group,\ndrivers/net/dsa/realtek/rtl8366rb-leds.c-54-\t\t\t\t\t\t\t port_num),\n--\ndrivers/net/dsa/realtek/rtl8366rb-leds.c=75=static int\ndrivers/net/dsa/realtek/rtl8366rb-leds.c:76:rtl8366rb_cled_brightness_set_blocking(struct led_classdev *ldev,\ndrivers/net/dsa/realtek/rtl8366rb-leds.c-77-\t\t\t\t enum led_brightness brightness)\ndrivers/net/dsa/realtek/rtl8366rb-leds.c-78-{\ndrivers/net/dsa/realtek/rtl8366rb-leds.c:79:\tstruct rtl8366rb_led *led = container_of(ldev, struct rtl8366rb_led,\ndrivers/net/dsa/realtek/rtl8366rb-leds.c-80-\t\t\t\t\t\t cdev);\n--\ndrivers/net/dsa/realtek/rtl8366rb-leds.c-84-\ndrivers/net/dsa/realtek/rtl8366rb-leds.c:85:static int rtl8366rb_setup_led(struct realtek_priv *priv, struct dsa_port *dp,\ndrivers/net/dsa/realtek/rtl8366rb-leds.c-86-\t\t\t struct fwnode_handle *led_fwnode)\ndrivers/net/dsa/realtek/rtl8366rb-leds.c-87-{\ndrivers/net/dsa/realtek/rtl8366rb-leds.c:88:\tstruct rtl8366rb *rb = priv-\u003echip_data;\ndrivers/net/dsa/realtek/rtl8366rb-leds.c-89-\tstruct led_init_data init_data = { };\ndrivers/net/dsa/realtek/rtl8366rb-leds.c-90-\tenum led_default_state state;\ndrivers/net/dsa/realtek/rtl8366rb-leds.c:91:\tstruct rtl8366rb_led *led;\ndrivers/net/dsa/realtek/rtl8366rb-leds.c-92-\tchar name[64];\n--\ndrivers/net/dsa/realtek/rtl8366rb-leds.c-128-\tled-\u003ecdev.brightness_set_blocking =\ndrivers/net/dsa/realtek/rtl8366rb-leds.c:129:\t\trtl8366rb_cled_brightness_set_blocking;\ndrivers/net/dsa/realtek/rtl8366rb-leds.c-130-\tinit_data.fwnode = led_fwnode;\n--\ndrivers/net/dsa/realtek/rtl8366rb-leds.c-146-\ndrivers/net/dsa/realtek/rtl8366rb-leds.c:147:int rtl8366rb_setup_leds(struct realtek_priv *priv)\ndrivers/net/dsa/realtek/rtl8366rb-leds.c-148-{\n--\ndrivers/net/dsa/realtek/rtl8366rb-leds.c-165-\t\tfor_each_child_of_node_scoped(leds_np, led_np) {\ndrivers/net/dsa/realtek/rtl8366rb-leds.c:166:\t\t\tret = rtl8366rb_setup_led(priv, dp,\ndrivers/net/dsa/realtek/rtl8366rb-leds.c-167-\t\t\t\t\t\t of_fwnode_handle(led_np));\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-29-#include \"rtl83xx.h\"\ndrivers/net/dsa/realtek/rtl8366rb.c:30:#include \"rtl8366rb.h\"\ndrivers/net/dsa/realtek/rtl8366rb.c-31-\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-315-\ndrivers/net/dsa/realtek/rtl8366rb.c:316:static struct rtl8366_mib_counter rtl8366rb_mib_counters[] = {\ndrivers/net/dsa/realtek/rtl8366rb.c-317-\t{ 0, 0, 4, \"IfInOctets\"\t\t\t\t},\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-351-\ndrivers/net/dsa/realtek/rtl8366rb.c:352:static int rtl8366rb_get_mib_counter(struct realtek_priv *priv,\ndrivers/net/dsa/realtek/rtl8366rb.c-353-\t\t\t\t int port,\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-393-\ndrivers/net/dsa/realtek/rtl8366rb.c:394:static u32 rtl8366rb_get_irqmask(struct irq_data *d)\ndrivers/net/dsa/realtek/rtl8366rb.c-395-{\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-408-\ndrivers/net/dsa/realtek/rtl8366rb.c:409:static void rtl8366rb_mask_irq(struct irq_data *d)\ndrivers/net/dsa/realtek/rtl8366rb.c-410-{\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-414-\tret = regmap_update_bits(priv-\u003emap, RTL8366RB_INTERRUPT_MASK_REG,\ndrivers/net/dsa/realtek/rtl8366rb.c:415:\t\t\t\t rtl8366rb_get_irqmask(d), 0);\ndrivers/net/dsa/realtek/rtl8366rb.c-416-\tif (ret)\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-419-\ndrivers/net/dsa/realtek/rtl8366rb.c:420:static void rtl8366rb_unmask_irq(struct irq_data *d)\ndrivers/net/dsa/realtek/rtl8366rb.c-421-{\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-425-\tret = regmap_update_bits(priv-\u003emap, RTL8366RB_INTERRUPT_MASK_REG,\ndrivers/net/dsa/realtek/rtl8366rb.c:426:\t\t\t\t rtl8366rb_get_irqmask(d),\ndrivers/net/dsa/realtek/rtl8366rb.c:427:\t\t\t\t rtl8366rb_get_irqmask(d));\ndrivers/net/dsa/realtek/rtl8366rb.c-428-\tif (ret)\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-431-\ndrivers/net/dsa/realtek/rtl8366rb.c:432:static irqreturn_t rtl8366rb_irq(int irq, void *data)\ndrivers/net/dsa/realtek/rtl8366rb.c-433-{\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-463-\ndrivers/net/dsa/realtek/rtl8366rb.c:464:static struct irq_chip rtl8366rb_irq_chip = {\ndrivers/net/dsa/realtek/rtl8366rb.c-465-\t.name = \"RTL8366RB\",\ndrivers/net/dsa/realtek/rtl8366rb.c:466:\t.irq_mask = rtl8366rb_mask_irq,\ndrivers/net/dsa/realtek/rtl8366rb.c:467:\t.irq_unmask = rtl8366rb_unmask_irq,\ndrivers/net/dsa/realtek/rtl8366rb.c-468-};\ndrivers/net/dsa/realtek/rtl8366rb.c-469-\ndrivers/net/dsa/realtek/rtl8366rb.c:470:static int rtl8366rb_irq_map(struct irq_domain *domain, unsigned int irq,\ndrivers/net/dsa/realtek/rtl8366rb.c-471-\t\t\t irq_hw_number_t hwirq)\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-473-\tirq_set_chip_data(irq, domain-\u003ehost_data);\ndrivers/net/dsa/realtek/rtl8366rb.c:474:\tirq_set_chip_and_handler(irq, \u0026rtl8366rb_irq_chip, handle_simple_irq);\ndrivers/net/dsa/realtek/rtl8366rb.c-475-\tirq_set_nested_thread(irq, 1);\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-480-\ndrivers/net/dsa/realtek/rtl8366rb.c:481:static void rtl8366rb_irq_unmap(struct irq_domain *d, unsigned int irq)\ndrivers/net/dsa/realtek/rtl8366rb.c-482-{\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-487-\ndrivers/net/dsa/realtek/rtl8366rb.c:488:static const struct irq_domain_ops rtl8366rb_irqdomain_ops = {\ndrivers/net/dsa/realtek/rtl8366rb.c:489:\t.map = rtl8366rb_irq_map,\ndrivers/net/dsa/realtek/rtl8366rb.c:490:\t.unmap = rtl8366rb_irq_unmap,\ndrivers/net/dsa/realtek/rtl8366rb.c-491-\t.xlate = irq_domain_xlate_onecell,\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-493-\ndrivers/net/dsa/realtek/rtl8366rb.c:494:static int rtl8366rb_setup_cascaded_irq(struct realtek_priv *priv)\ndrivers/net/dsa/realtek/rtl8366rb.c-495-{\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-546-\tret = devm_request_threaded_irq(priv-\u003edev, irq, NULL,\ndrivers/net/dsa/realtek/rtl8366rb.c:547:\t\t\t\t\trtl8366rb_irq, IRQF_ONESHOT,\ndrivers/net/dsa/realtek/rtl8366rb.c-548-\t\t\t\t\t\"RTL8366RB\", priv);\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-553-\tpriv-\u003eirqdomain = irq_domain_create_linear(of_fwnode_handle(intc), RTL8366RB_NUM_INTERRUPT,\ndrivers/net/dsa/realtek/rtl8366rb.c:554:\t\t\t\t\t\t \u0026rtl8366rb_irqdomain_ops, priv);\ndrivers/net/dsa/realtek/rtl8366rb.c-555-\tif (!priv-\u003eirqdomain) {\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-567-\ndrivers/net/dsa/realtek/rtl8366rb.c:568:static int rtl8366rb_set_addr(struct realtek_priv *priv)\ndrivers/net/dsa/realtek/rtl8366rb.c-569-{\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-595-/* Struct for handling the jam tables' entries */\ndrivers/net/dsa/realtek/rtl8366rb.c:596:struct rtl8366rb_jam_tbl_entry {\ndrivers/net/dsa/realtek/rtl8366rb.c-597-\tu16 reg;\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-601-/* For the \"version 0\" early silicon, appear in most source releases */\ndrivers/net/dsa/realtek/rtl8366rb.c:602:static const struct rtl8366rb_jam_tbl_entry rtl8366rb_init_jam_ver_0[] = {\ndrivers/net/dsa/realtek/rtl8366rb.c-603-\t{0x000B, 0x0001}, {0x03A6, 0x0100}, {0x03A7, 0x0001}, {0x02D1, 0x3FFF},\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-634-/* This v1 init sequence is from Belkin F5D8235 U-Boot release */\ndrivers/net/dsa/realtek/rtl8366rb.c:635:static const struct rtl8366rb_jam_tbl_entry rtl8366rb_init_jam_ver_1[] = {\ndrivers/net/dsa/realtek/rtl8366rb.c-636-\t{0x0000, 0x0830}, {0x0001, 0x8000}, {0x0400, 0x8130}, {0xBE78, 0x3C3C},\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-649-/* This v2 init sequence is from Belkin F5D8235 U-Boot release */\ndrivers/net/dsa/realtek/rtl8366rb.c:650:static const struct rtl8366rb_jam_tbl_entry rtl8366rb_init_jam_ver_2[] = {\ndrivers/net/dsa/realtek/rtl8366rb.c-651-\t{0x0450, 0x0000}, {0x0400, 0x8130}, {0x000A, 0x83ED}, {0x0431, 0x5432},\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-664-/* Appears in a DDWRT code dump */\ndrivers/net/dsa/realtek/rtl8366rb.c:665:static const struct rtl8366rb_jam_tbl_entry rtl8366rb_init_jam_ver_3[] = {\ndrivers/net/dsa/realtek/rtl8366rb.c-666-\t{0x0000, 0x0830}, {0x0400, 0x8130}, {0x000A, 0x83ED}, {0x0431, 0x5432},\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-685-/* Belkin F5D8235 v1, \"belkin,f5d8235-v1\" */\ndrivers/net/dsa/realtek/rtl8366rb.c:686:static const struct rtl8366rb_jam_tbl_entry rtl8366rb_init_jam_f5d8235[] = {\ndrivers/net/dsa/realtek/rtl8366rb.c-687-\t{0x0242, 0x02BF}, {0x0245, 0x02BF}, {0x0248, 0x02BF}, {0x024B, 0x02BF},\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-698-/* DGN3500, \"netgear,dgn3500\", \"netgear,dgn3500b\" */\ndrivers/net/dsa/realtek/rtl8366rb.c:699:static const struct rtl8366rb_jam_tbl_entry rtl8366rb_init_jam_dgn3500[] = {\ndrivers/net/dsa/realtek/rtl8366rb.c-700-\t{0x0000, 0x0830}, {0x0400, 0x8130}, {0x000A, 0x83ED}, {0x0F51, 0x0017},\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-709- */\ndrivers/net/dsa/realtek/rtl8366rb.c:710:static const struct rtl8366rb_jam_tbl_entry rtl8366rb_green_jam[] = {\ndrivers/net/dsa/realtek/rtl8366rb.c-711-\t{0xBE78, 0x323C}, {0xBE77, 0x5000}, {0xBE2E, 0x7BA7},\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-716-/* Function that jams the tables in the proper registers */\ndrivers/net/dsa/realtek/rtl8366rb.c:717:static int rtl8366rb_jam_table(const struct rtl8366rb_jam_tbl_entry *jam_table,\ndrivers/net/dsa/realtek/rtl8366rb.c-718-\t\t\t int jam_size, struct realtek_priv *priv,\n--\ndrivers/net/dsa/realtek/rtl8366rb.c=754=int rb8366rb_set_ledgroup_mode(struct realtek_priv *priv,\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-773-/* This code is used also with LEDs disabled */\ndrivers/net/dsa/realtek/rtl8366rb.c:774:static int rtl8366rb_setup_all_leds_off(struct realtek_priv *priv)\ndrivers/net/dsa/realtek/rtl8366rb.c-775-{\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-793-\ndrivers/net/dsa/realtek/rtl8366rb.c:794:static int rtl8366rb_port_set_isolation(struct realtek_priv *priv, int port,\ndrivers/net/dsa/realtek/rtl8366rb.c-795-\t\t\t\t\tu32 mask)\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-805-\ndrivers/net/dsa/realtek/rtl8366rb.c:806:static int rtl8366rb_port_add_isolation(struct realtek_priv *priv, int port,\ndrivers/net/dsa/realtek/rtl8366rb.c-807-\t\t\t\t\tu32 mask)\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-814-\ndrivers/net/dsa/realtek/rtl8366rb.c:815:static int rtl8366rb_port_remove_isolation(struct realtek_priv *priv, int port,\ndrivers/net/dsa/realtek/rtl8366rb.c-816-\t\t\t\t\t u32 mask)\n--\ndrivers/net/dsa/realtek/rtl8366rb.c=822=static void\ndrivers/net/dsa/realtek/rtl8366rb.c:823:rtl8366rb_port_stp_state_set(struct dsa_switch *ds, int port, u8 state)\ndrivers/net/dsa/realtek/rtl8366rb.c-824-{\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-855-\ndrivers/net/dsa/realtek/rtl8366rb.c:856:static int rtl8366rb_port_set_learning(struct realtek_priv *priv, int port,\ndrivers/net/dsa/realtek/rtl8366rb.c-857-\t\t\t\t bool enable)\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-865-\ndrivers/net/dsa/realtek/rtl8366rb.c:866:static int rtl8366rb_setup(struct dsa_switch *ds)\ndrivers/net/dsa/realtek/rtl8366rb.c-867-{\ndrivers/net/dsa/realtek/rtl8366rb.c-868-\tstruct realtek_priv *priv = ds-\u003epriv;\ndrivers/net/dsa/realtek/rtl8366rb.c:869:\tconst struct rtl8366rb_jam_tbl_entry *jam_table;\ndrivers/net/dsa/realtek/rtl8366rb.c-870-\tu32 downports_mask = 0;\ndrivers/net/dsa/realtek/rtl8366rb.c:871:\tstruct rtl8366rb *rb;\ndrivers/net/dsa/realtek/rtl8366rb.c-872-\tu32 upports_mask = 0;\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-908-\tcase 0:\ndrivers/net/dsa/realtek/rtl8366rb.c:909:\t\tjam_table = rtl8366rb_init_jam_ver_0;\ndrivers/net/dsa/realtek/rtl8366rb.c:910:\t\tjam_size = ARRAY_SIZE(rtl8366rb_init_jam_ver_0);\ndrivers/net/dsa/realtek/rtl8366rb.c-911-\t\tbreak;\ndrivers/net/dsa/realtek/rtl8366rb.c-912-\tcase 1:\ndrivers/net/dsa/realtek/rtl8366rb.c:913:\t\tjam_table = rtl8366rb_init_jam_ver_1;\ndrivers/net/dsa/realtek/rtl8366rb.c:914:\t\tjam_size = ARRAY_SIZE(rtl8366rb_init_jam_ver_1);\ndrivers/net/dsa/realtek/rtl8366rb.c-915-\t\tbreak;\ndrivers/net/dsa/realtek/rtl8366rb.c-916-\tcase 2:\ndrivers/net/dsa/realtek/rtl8366rb.c:917:\t\tjam_table = rtl8366rb_init_jam_ver_2;\ndrivers/net/dsa/realtek/rtl8366rb.c:918:\t\tjam_size = ARRAY_SIZE(rtl8366rb_init_jam_ver_2);\ndrivers/net/dsa/realtek/rtl8366rb.c-919-\t\tbreak;\ndrivers/net/dsa/realtek/rtl8366rb.c-920-\tdefault:\ndrivers/net/dsa/realtek/rtl8366rb.c:921:\t\tjam_table = rtl8366rb_init_jam_ver_3;\ndrivers/net/dsa/realtek/rtl8366rb.c:922:\t\tjam_size = ARRAY_SIZE(rtl8366rb_init_jam_ver_3);\ndrivers/net/dsa/realtek/rtl8366rb.c-923-\t\tbreak;\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-930-\tif (of_machine_is_compatible(\"belkin,f5d8235-v1\")) {\ndrivers/net/dsa/realtek/rtl8366rb.c:931:\t\tjam_table = rtl8366rb_init_jam_f5d8235;\ndrivers/net/dsa/realtek/rtl8366rb.c:932:\t\tjam_size = ARRAY_SIZE(rtl8366rb_init_jam_f5d8235);\ndrivers/net/dsa/realtek/rtl8366rb.c-933-\t}\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-935-\t of_machine_is_compatible(\"netgear,dgn3500b\")) {\ndrivers/net/dsa/realtek/rtl8366rb.c:936:\t\tjam_table = rtl8366rb_init_jam_dgn3500;\ndrivers/net/dsa/realtek/rtl8366rb.c:937:\t\tjam_size = ARRAY_SIZE(rtl8366rb_init_jam_dgn3500);\ndrivers/net/dsa/realtek/rtl8366rb.c-938-\t}\ndrivers/net/dsa/realtek/rtl8366rb.c-939-\ndrivers/net/dsa/realtek/rtl8366rb.c:940:\tret = rtl8366rb_jam_table(jam_table, jam_size, priv, true);\ndrivers/net/dsa/realtek/rtl8366rb.c-941-\tif (ret)\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-949-\t\t */\ndrivers/net/dsa/realtek/rtl8366rb.c:950:\t\trtl8366rb_port_stp_state_set(ds, dp-\u003eindex, BR_STATE_DISABLED);\ndrivers/net/dsa/realtek/rtl8366rb.c-951-\ndrivers/net/dsa/realtek/rtl8366rb.c-952-\t\t/* Start with all ports completely isolated */\ndrivers/net/dsa/realtek/rtl8366rb.c:953:\t\tret = rtl8366rb_port_set_isolation(priv, dp-\u003eindex, 0);\ndrivers/net/dsa/realtek/rtl8366rb.c-954-\t\tif (ret)\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-957-\t\t/* Disable learning */\ndrivers/net/dsa/realtek/rtl8366rb.c:958:\t\tret = rtl8366rb_port_set_learning(priv, dp-\u003eindex, false);\ndrivers/net/dsa/realtek/rtl8366rb.c-959-\t\tif (ret)\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-976-\t\t/* Forward only to the CPU(s), isolate from all other ports */\ndrivers/net/dsa/realtek/rtl8366rb.c:977:\t\tret = rtl8366rb_port_set_isolation(priv, dp-\u003eindex, upports_mask);\ndrivers/net/dsa/realtek/rtl8366rb.c-978-\t\tif (ret)\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-991-\t\t/* Forward to all user ports */\ndrivers/net/dsa/realtek/rtl8366rb.c:992:\t\tret = rtl8366rb_port_set_isolation(priv, dp-\u003eindex, downports_mask);\ndrivers/net/dsa/realtek/rtl8366rb.c-993-\t\tif (ret)\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-997-\t/* Set up the \"green ethernet\" feature */\ndrivers/net/dsa/realtek/rtl8366rb.c:998:\tret = rtl8366rb_jam_table(rtl8366rb_green_jam,\ndrivers/net/dsa/realtek/rtl8366rb.c:999:\t\t\t\t ARRAY_SIZE(rtl8366rb_green_jam), priv, false);\ndrivers/net/dsa/realtek/rtl8366rb.c-1000-\tif (ret)\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-1017-\t/* Set some random MAC address */\ndrivers/net/dsa/realtek/rtl8366rb.c:1018:\tret = rtl8366rb_set_addr(priv);\ndrivers/net/dsa/realtek/rtl8366rb.c-1019-\tif (ret)\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-1103-\tif (priv-\u003eleds_disabled) {\ndrivers/net/dsa/realtek/rtl8366rb.c:1104:\t\tret = rtl8366rb_setup_all_leds_off(priv);\ndrivers/net/dsa/realtek/rtl8366rb.c-1105-\t\tif (ret)\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-1107-\t} else {\ndrivers/net/dsa/realtek/rtl8366rb.c:1108:\t\tret = rtl8366rb_setup_leds(priv);\ndrivers/net/dsa/realtek/rtl8366rb.c-1109-\t\tif (ret)\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-1116-\ndrivers/net/dsa/realtek/rtl8366rb.c:1117:\tret = rtl8366rb_setup_cascaded_irq(priv);\ndrivers/net/dsa/realtek/rtl8366rb.c-1118-\tif (ret)\n--\ndrivers/net/dsa/realtek/rtl8366rb.c=1130=static enum dsa_tag_protocol rtl8366_get_tag_protocol(struct dsa_switch *ds,\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-1137-\ndrivers/net/dsa/realtek/rtl8366rb.c:1138:static void rtl8366rb_phylink_get_caps(struct dsa_switch *ds, int port,\ndrivers/net/dsa/realtek/rtl8366rb.c-1139-\t\t\t\t struct phylink_config *config)\n--\ndrivers/net/dsa/realtek/rtl8366rb.c=1164=static void\ndrivers/net/dsa/realtek/rtl8366rb.c:1165:rtl8366rb_mac_config(struct phylink_config *config, unsigned int mode,\ndrivers/net/dsa/realtek/rtl8366rb.c-1166-\t\t const struct phylink_link_state *state)\n--\ndrivers/net/dsa/realtek/rtl8366rb.c=1170=static void\ndrivers/net/dsa/realtek/rtl8366rb.c:1171:rtl8366rb_mac_link_up(struct phylink_config *config, struct phy_device *phydev,\ndrivers/net/dsa/realtek/rtl8366rb.c-1172-\t\t unsigned int mode, phy_interface_t interface,\n--\ndrivers/net/dsa/realtek/rtl8366rb.c=1242=static void\ndrivers/net/dsa/realtek/rtl8366rb.c:1243:rtl8366rb_mac_link_down(struct phylink_config *config, unsigned int mode,\ndrivers/net/dsa/realtek/rtl8366rb.c-1244-\t\t\tphy_interface_t interface)\n--\ndrivers/net/dsa/realtek/rtl8366rb.c=1265=static int\ndrivers/net/dsa/realtek/rtl8366rb.c:1266:rtl8366rb_port_enable(struct dsa_switch *ds, int port,\ndrivers/net/dsa/realtek/rtl8366rb.c-1267-\t\t struct phy_device *phy)\n--\ndrivers/net/dsa/realtek/rtl8366rb.c=1281=static void\ndrivers/net/dsa/realtek/rtl8366rb.c:1282:rtl8366rb_port_disable(struct dsa_switch *ds, int port)\ndrivers/net/dsa/realtek/rtl8366rb.c-1283-{\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-1294-/**\ndrivers/net/dsa/realtek/rtl8366rb.c:1295: * rtl8366rb_drop_untagged() - make the switch drop untagged and C-tagged frames\ndrivers/net/dsa/realtek/rtl8366rb.c-1296- * @priv: SMI state container\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-1301- */\ndrivers/net/dsa/realtek/rtl8366rb.c:1302:static int rtl8366rb_drop_untagged(struct realtek_priv *priv, int port, bool drop)\ndrivers/net/dsa/realtek/rtl8366rb.c-1303-{\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-1308-\ndrivers/net/dsa/realtek/rtl8366rb.c:1309:static int rtl8366rb_vlan_filtering(struct dsa_switch *ds, int port,\ndrivers/net/dsa/realtek/rtl8366rb.c-1310-\t\t\t\t bool vlan_filtering,\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-1313-\tstruct realtek_priv *priv = ds-\u003epriv;\ndrivers/net/dsa/realtek/rtl8366rb.c:1314:\tstruct rtl8366rb *rb;\ndrivers/net/dsa/realtek/rtl8366rb.c-1315-\tint ret;\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-1332-\tif (vlan_filtering)\ndrivers/net/dsa/realtek/rtl8366rb.c:1333:\t\tret = rtl8366rb_drop_untagged(priv, port, !rb-\u003epvid_enabled[port]);\ndrivers/net/dsa/realtek/rtl8366rb.c-1334-\telse\ndrivers/net/dsa/realtek/rtl8366rb.c:1335:\t\tret = rtl8366rb_drop_untagged(priv, port, false);\ndrivers/net/dsa/realtek/rtl8366rb.c-1336-\n--\ndrivers/net/dsa/realtek/rtl8366rb.c=1340=static int\ndrivers/net/dsa/realtek/rtl8366rb.c:1341:rtl8366rb_port_pre_bridge_flags(struct dsa_switch *ds, int port,\ndrivers/net/dsa/realtek/rtl8366rb.c-1342-\t\t\t\tstruct switchdev_brport_flags flags,\n--\ndrivers/net/dsa/realtek/rtl8366rb.c=1352=static void\ndrivers/net/dsa/realtek/rtl8366rb.c:1353:rtl8366rb_port_fast_age(struct dsa_switch *ds, int port)\ndrivers/net/dsa/realtek/rtl8366rb.c-1354-{\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-1364-\ndrivers/net/dsa/realtek/rtl8366rb.c:1365:static int rtl8366rb_change_mtu(struct dsa_switch *ds, int port, int new_mtu)\ndrivers/net/dsa/realtek/rtl8366rb.c-1366-{\ndrivers/net/dsa/realtek/rtl8366rb.c-1367-\tstruct realtek_priv *priv = ds-\u003epriv;\ndrivers/net/dsa/realtek/rtl8366rb.c:1368:\tstruct rtl8366rb *rb;\ndrivers/net/dsa/realtek/rtl8366rb.c-1369-\tunsigned int max_mtu;\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-1411-\ndrivers/net/dsa/realtek/rtl8366rb.c:1412:static int rtl8366rb_max_mtu(struct dsa_switch *ds, int port)\ndrivers/net/dsa/realtek/rtl8366rb.c-1413-{\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-1421-\ndrivers/net/dsa/realtek/rtl8366rb.c:1422:static int rtl8366rb_get_vlan_4k(struct realtek_priv *priv, u32 vid,\ndrivers/net/dsa/realtek/rtl8366rb.c-1423-\t\t\t\t struct rtl8366_vlan_4k *vlan4k)\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-1462-\ndrivers/net/dsa/realtek/rtl8366rb.c:1463:static int rtl8366rb_set_vlan_4k(struct realtek_priv *priv,\ndrivers/net/dsa/realtek/rtl8366rb.c-1464-\t\t\t\t const struct rtl8366_vlan_4k *vlan4k)\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-1496-\ndrivers/net/dsa/realtek/rtl8366rb.c:1497:static int rtl8366rb_get_vlan_mc(struct realtek_priv *priv, u32 index,\ndrivers/net/dsa/realtek/rtl8366rb.c-1498-\t\t\t\t struct rtl8366_vlan_mc *vlanmc)\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-1527-\ndrivers/net/dsa/realtek/rtl8366rb.c:1528:static int rtl8366rb_set_vlan_mc(struct realtek_priv *priv, u32 index,\ndrivers/net/dsa/realtek/rtl8366rb.c-1529-\t\t\t\t const struct rtl8366_vlan_mc *vlanmc)\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-1561-\ndrivers/net/dsa/realtek/rtl8366rb.c:1562:static int rtl8366rb_get_mc_index(struct realtek_priv *priv, int port, int *val)\ndrivers/net/dsa/realtek/rtl8366rb.c-1563-{\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-1580-\ndrivers/net/dsa/realtek/rtl8366rb.c:1581:static int rtl8366rb_set_mc_index(struct realtek_priv *priv, int port, int index)\ndrivers/net/dsa/realtek/rtl8366rb.c-1582-{\ndrivers/net/dsa/realtek/rtl8366rb.c-1583-\tstruct dsa_switch *ds = \u0026priv-\u003eds;\ndrivers/net/dsa/realtek/rtl8366rb.c:1584:\tstruct rtl8366rb *rb;\ndrivers/net/dsa/realtek/rtl8366rb.c-1585-\tbool pvid_enabled;\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-1608-\tif (dsa_port_is_vlan_filtering(dsa_to_port(ds, port)))\ndrivers/net/dsa/realtek/rtl8366rb.c:1609:\t\tret = rtl8366rb_drop_untagged(priv, port, !pvid_enabled);\ndrivers/net/dsa/realtek/rtl8366rb.c-1610-\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-1613-\ndrivers/net/dsa/realtek/rtl8366rb.c:1614:static bool rtl8366rb_is_vlan_valid(struct realtek_priv *priv, unsigned int vlan)\ndrivers/net/dsa/realtek/rtl8366rb.c-1615-{\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-1626-\ndrivers/net/dsa/realtek/rtl8366rb.c:1627:static int rtl8366rb_enable_vlan(struct realtek_priv *priv, bool enable)\ndrivers/net/dsa/realtek/rtl8366rb.c-1628-{\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-1634-\ndrivers/net/dsa/realtek/rtl8366rb.c:1635:static int rtl8366rb_enable_vlan4k(struct realtek_priv *priv, bool enable)\ndrivers/net/dsa/realtek/rtl8366rb.c-1636-{\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-1642-\ndrivers/net/dsa/realtek/rtl8366rb.c:1643:static int rtl8366rb_phy_read(struct realtek_priv *priv, int phy, int regnum)\ndrivers/net/dsa/realtek/rtl8366rb.c-1644-{\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-1684-\ndrivers/net/dsa/realtek/rtl8366rb.c:1685:static int rtl8366rb_phy_write(struct realtek_priv *priv, int phy, int regnum,\ndrivers/net/dsa/realtek/rtl8366rb.c-1686-\t\t\t u16 val)\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-1715-\ndrivers/net/dsa/realtek/rtl8366rb.c:1716:static int rtl8366rb_reset_chip(struct realtek_priv *priv)\ndrivers/net/dsa/realtek/rtl8366rb.c-1717-{\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-1741-\ndrivers/net/dsa/realtek/rtl8366rb.c:1742:static int rtl8366rb_detect(struct realtek_priv *priv)\ndrivers/net/dsa/realtek/rtl8366rb.c-1743-{\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-1764-\t\tpriv-\u003enum_vlan_mc = RTL8366RB_NUM_VLANS;\ndrivers/net/dsa/realtek/rtl8366rb.c:1765:\t\tpriv-\u003emib_counters = rtl8366rb_mib_counters;\ndrivers/net/dsa/realtek/rtl8366rb.c:1766:\t\tpriv-\u003enum_mib_counters = ARRAY_SIZE(rtl8366rb_mib_counters);\ndrivers/net/dsa/realtek/rtl8366rb.c-1767-\t\tbreak;\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-1773-\ndrivers/net/dsa/realtek/rtl8366rb.c:1774:\tret = rtl8366rb_reset_chip(priv);\ndrivers/net/dsa/realtek/rtl8366rb.c-1775-\tif (ret)\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-1780-\ndrivers/net/dsa/realtek/rtl8366rb.c:1781:static const struct phylink_mac_ops rtl8366rb_phylink_mac_ops = {\ndrivers/net/dsa/realtek/rtl8366rb.c:1782:\t.mac_config = rtl8366rb_mac_config,\ndrivers/net/dsa/realtek/rtl8366rb.c:1783:\t.mac_link_down = rtl8366rb_mac_link_down,\ndrivers/net/dsa/realtek/rtl8366rb.c:1784:\t.mac_link_up = rtl8366rb_mac_link_up,\ndrivers/net/dsa/realtek/rtl8366rb.c-1785-};\ndrivers/net/dsa/realtek/rtl8366rb.c-1786-\ndrivers/net/dsa/realtek/rtl8366rb.c:1787:static const struct dsa_switch_ops rtl8366rb_switch_ops = {\ndrivers/net/dsa/realtek/rtl8366rb.c-1788-\t.get_tag_protocol = rtl8366_get_tag_protocol,\ndrivers/net/dsa/realtek/rtl8366rb.c:1789:\t.setup = rtl8366rb_setup,\ndrivers/net/dsa/realtek/rtl8366rb.c:1790:\t.phylink_get_caps = rtl8366rb_phylink_get_caps,\ndrivers/net/dsa/realtek/rtl8366rb.c-1791-\t.get_strings = rtl8366_get_strings,\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-1795-\t.port_bridge_leave = rtl83xx_port_bridge_leave,\ndrivers/net/dsa/realtek/rtl8366rb.c:1796:\t.port_vlan_filtering = rtl8366rb_vlan_filtering,\ndrivers/net/dsa/realtek/rtl8366rb.c-1797-\t.port_vlan_add = rtl8366_vlan_add,\ndrivers/net/dsa/realtek/rtl8366rb.c-1798-\t.port_vlan_del = rtl8366_vlan_del,\ndrivers/net/dsa/realtek/rtl8366rb.c:1799:\t.port_enable = rtl8366rb_port_enable,\ndrivers/net/dsa/realtek/rtl8366rb.c:1800:\t.port_disable = rtl8366rb_port_disable,\ndrivers/net/dsa/realtek/rtl8366rb.c:1801:\t.port_pre_bridge_flags = rtl8366rb_port_pre_bridge_flags,\ndrivers/net/dsa/realtek/rtl8366rb.c-1802-\t.port_bridge_flags = rtl83xx_port_bridge_flags,\ndrivers/net/dsa/realtek/rtl8366rb.c:1803:\t.port_stp_state_set = rtl8366rb_port_stp_state_set,\ndrivers/net/dsa/realtek/rtl8366rb.c:1804:\t.port_fast_age = rtl8366rb_port_fast_age,\ndrivers/net/dsa/realtek/rtl8366rb.c:1805:\t.port_change_mtu = rtl8366rb_change_mtu,\ndrivers/net/dsa/realtek/rtl8366rb.c:1806:\t.port_max_mtu = rtl8366rb_max_mtu,\ndrivers/net/dsa/realtek/rtl8366rb.c-1807-\t.port_hsr_join = dsa_port_simple_hsr_join,\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-1810-\ndrivers/net/dsa/realtek/rtl8366rb.c:1811:static const struct realtek_ops rtl8366rb_ops = {\ndrivers/net/dsa/realtek/rtl8366rb.c:1812:\t.detect\t\t= rtl8366rb_detect,\ndrivers/net/dsa/realtek/rtl8366rb.c:1813:\t.get_vlan_mc\t= rtl8366rb_get_vlan_mc,\ndrivers/net/dsa/realtek/rtl8366rb.c:1814:\t.set_vlan_mc\t= rtl8366rb_set_vlan_mc,\ndrivers/net/dsa/realtek/rtl8366rb.c:1815:\t.get_vlan_4k\t= rtl8366rb_get_vlan_4k,\ndrivers/net/dsa/realtek/rtl8366rb.c:1816:\t.set_vlan_4k\t= rtl8366rb_set_vlan_4k,\ndrivers/net/dsa/realtek/rtl8366rb.c:1817:\t.get_mc_index\t= rtl8366rb_get_mc_index,\ndrivers/net/dsa/realtek/rtl8366rb.c:1818:\t.set_mc_index\t= rtl8366rb_set_mc_index,\ndrivers/net/dsa/realtek/rtl8366rb.c:1819:\t.get_mib_counter = rtl8366rb_get_mib_counter,\ndrivers/net/dsa/realtek/rtl8366rb.c:1820:\t.is_vlan_valid\t= rtl8366rb_is_vlan_valid,\ndrivers/net/dsa/realtek/rtl8366rb.c:1821:\t.enable_vlan\t= rtl8366rb_enable_vlan,\ndrivers/net/dsa/realtek/rtl8366rb.c:1822:\t.enable_vlan4k\t= rtl8366rb_enable_vlan4k,\ndrivers/net/dsa/realtek/rtl8366rb.c:1823:\t.port_add_isolation = rtl8366rb_port_add_isolation,\ndrivers/net/dsa/realtek/rtl8366rb.c:1824:\t.port_remove_isolation = rtl8366rb_port_remove_isolation,\ndrivers/net/dsa/realtek/rtl8366rb.c:1825:\t.port_set_learning = rtl8366rb_port_set_learning,\ndrivers/net/dsa/realtek/rtl8366rb.c:1826:\t.phy_read\t= rtl8366rb_phy_read,\ndrivers/net/dsa/realtek/rtl8366rb.c:1827:\t.phy_write\t= rtl8366rb_phy_write,\ndrivers/net/dsa/realtek/rtl8366rb.c-1828-};\ndrivers/net/dsa/realtek/rtl8366rb.c-1829-\ndrivers/net/dsa/realtek/rtl8366rb.c:1830:const struct realtek_variant rtl8366rb_variant = {\ndrivers/net/dsa/realtek/rtl8366rb.c:1831:\t.ds_ops = \u0026rtl8366rb_switch_ops,\ndrivers/net/dsa/realtek/rtl8366rb.c:1832:\t.ops = \u0026rtl8366rb_ops,\ndrivers/net/dsa/realtek/rtl8366rb.c:1833:\t.phylink_mac_ops = \u0026rtl8366rb_phylink_mac_ops,\ndrivers/net/dsa/realtek/rtl8366rb.c-1834-\t.clk_delay = 10,\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-1836-\t.cmd_write = 0xa8,\ndrivers/net/dsa/realtek/rtl8366rb.c:1837:\t.chip_data_sz = sizeof(struct rtl8366rb),\ndrivers/net/dsa/realtek/rtl8366rb.c-1838-};\ndrivers/net/dsa/realtek/rtl8366rb.c-1839-\ndrivers/net/dsa/realtek/rtl8366rb.c:1840:static const struct of_device_id rtl8366rb_of_match[] = {\ndrivers/net/dsa/realtek/rtl8366rb.c:1841:\t{ .compatible = \"realtek,rtl8366rb\", .data = \u0026rtl8366rb_variant, },\ndrivers/net/dsa/realtek/rtl8366rb.c-1842-\t{ /* sentinel */ },\ndrivers/net/dsa/realtek/rtl8366rb.c-1843-};\ndrivers/net/dsa/realtek/rtl8366rb.c:1844:MODULE_DEVICE_TABLE(of, rtl8366rb_of_match);\ndrivers/net/dsa/realtek/rtl8366rb.c-1845-\ndrivers/net/dsa/realtek/rtl8366rb.c:1846:static struct platform_driver rtl8366rb_smi_driver = {\ndrivers/net/dsa/realtek/rtl8366rb.c-1847-\t.driver = {\ndrivers/net/dsa/realtek/rtl8366rb.c:1848:\t\t.name = \"rtl8366rb-smi\",\ndrivers/net/dsa/realtek/rtl8366rb.c:1849:\t\t.of_match_table = rtl8366rb_of_match,\ndrivers/net/dsa/realtek/rtl8366rb.c-1850-\t},\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-1855-\ndrivers/net/dsa/realtek/rtl8366rb.c:1856:static struct mdio_driver rtl8366rb_mdio_driver = {\ndrivers/net/dsa/realtek/rtl8366rb.c-1857-\t.mdiodrv.driver = {\ndrivers/net/dsa/realtek/rtl8366rb.c:1858:\t\t.name = \"rtl8366rb-mdio\",\ndrivers/net/dsa/realtek/rtl8366rb.c:1859:\t\t.of_match_table = rtl8366rb_of_match,\ndrivers/net/dsa/realtek/rtl8366rb.c-1860-\t},\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-1865-\ndrivers/net/dsa/realtek/rtl8366rb.c:1866:static int rtl8366rb_init(void)\ndrivers/net/dsa/realtek/rtl8366rb.c-1867-{\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-1869-\ndrivers/net/dsa/realtek/rtl8366rb.c:1870:\tret = realtek_mdio_driver_register(\u0026rtl8366rb_mdio_driver);\ndrivers/net/dsa/realtek/rtl8366rb.c-1871-\tif (ret)\n--\ndrivers/net/dsa/realtek/rtl8366rb.c-1873-\ndrivers/net/dsa/realtek/rtl8366rb.c:1874:\tret = realtek_smi_driver_register(\u0026rtl8366rb_smi_driver);\n\n"
} |
| 5/2 | 2026/08/02 06:00 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 18737 output: 90 thoughts: 641 Thoughts: **Unreachable Code Analysis: rtl8366rb Driver** Okay, let's think this through. The `rtl8366rb` driver, it's a platform and MDIO driver, which means it relies on a specific device tree entry with the `realtek,rtl8366rb` compatible string to even get initialized. I know QEMU doesn't emulate this particular Realtek DSA switch, and DSA switches are usually set up through the device tree on specific embedded systems like the Belkin F5D8235 and Netgear DGN3500, which are definitely not in my usual test setup. So, that means the `rtl8366rb_setup` function isn't going to be called, ever, in my environment. Hmm, can Syzkaller inject some kind of fake MDIO or platform device? Potentially, I've seen Syzkaller mess with device injection using `syz_devlink` and similar tools, but it's not straightforward for MDIO or SMI devices, right? Especially without some kind of pseudo-device to hook into. I was thinking maybe Syzkaller could create platform devices directly through the `/sys/devices/platform` directory, but that’s not really how it works. Syzkaller doesn't have a generic way to instantiate random platform devices unless a pseudo-device driver explicitly supports it (like `mac80211_hwsim` or `vkms`, etc.), or maybe through device tree overlays, but I don't think Syzkaller does dynamic overlays for whatever device I want to test. Wait, did I miss something? I don't think Syzkaller can inject platform devices via `syz_platform_device_add` or anything like that. No, there's no such call. Let's step back and check whether this code is even reachable. The driver is for a Realtek DSA switch. The patch I'm looking at modifies `rtl8366rb_port_set_isolation` and `rtl8366rb_setup`, which are specific to this hardware. Since this hardware isn't emulated in standard QEMU or GCE environments, it's not reachable. The patch code is not going to be touched. Alright, let's double-check how this driver probes. It registers both `rtl8366rb_smi_driver` (platform) and `rtl8366rb_mdio_driver` (mdio). They both rely on `.of_match_table = rtl8366rb_of_match`. Without the correct hardware or the proper device tree node, the probe function doesn't get called and this driver is unreachable. It's a dead end. Therefore, WorthFuzzing=false. I'm reasonably confident the changes are in code that's not reachable under the conditions I'm fuzzing. The patch modifies a hardware-specific driver for the Realtek RTL8366RB DSA switch. Since that device isn't emulated in standard environments, and the driver relies on specific device tree nodes or hardware to probe, the modified code can't be reached during fuzzing. |
| 6/2 | 2026/08/02 06:00 | tool | set-results |
0mArgs:{
"EnableConfigs": [],
"FocusSymbols": [],
"Reasoning": "The patch modifies a hardware-specific driver for the Realtek RTL8366RB DSA switch. This device is not emulated in standard QEMU/GCE environments, and the driver requires specific device tree nodes or hardware to probe, making the modified code unreachable during fuzzing.",
"WorthFuzzing": false
}Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch modifies a hardware-specific driver for the Realtek RTL8366RB DSA switch. This device is not emulated in standard QEMU/GCE environments, and the driver requires specific device tree nodes or hardware to probe, making the modified code unreachable during fuzzing.",
"WorthFuzzing": false
} |
| Total Calls | Total Tokens | Avg Tokens | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|
| Total Calls | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|