public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: patches@lists.linux.dev, stable@vger.kernel.org
Cc: Ethan Nelson-Moore <enelsonmoore@gmail.com>,
	Paolo Abeni <pabeni@redhat.com>, Sasha Levin <sashal@kernel.org>,
	linux-usb@vger.kernel.org
Subject: [PATCH AUTOSEL 6.18-5.10] net: usb: sr9700: support devices with virtual driver CD
Date: Wed,  7 Jan 2026 10:53:07 -0500	[thread overview]
Message-ID: <20260107155329.4063936-5-sashal@kernel.org> (raw)
In-Reply-To: <20260107155329.4063936-1-sashal@kernel.org>

From: Ethan Nelson-Moore <enelsonmoore@gmail.com>

[ Upstream commit bf4172bd870c3a34d3065cbb39192c22cbd7b18d ]

Some SR9700 devices have an SPI flash chip containing a virtual driver
CD, in which case they appear as a device with two interfaces and
product ID 0x9702. Interface 0 is the driver CD and interface 1 is the
Ethernet device.

Link: https://github.com/name-kurniawan/usb-lan
Link: https://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?t=2185
Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
Link: https://patch.msgid.link/20251211062451.139036-1-enelsonmoore@gmail.com
[pabeni@redhat.com: fixes link tags]
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---

LLM Generated explanations, may be completely bogus:

## Analysis of Commit: net: usb: sr9700: support devices with virtual
driver CD

### 1. COMMIT MESSAGE ANALYSIS

The commit adds support for SR9700 USB Ethernet devices that include a
virtual driver CD-ROM. These devices use product ID 0x9702 (vs the
standard 0x9700) and present two interfaces: interface 0 is the CD-ROM,
interface 1 is the actual Ethernet device.

External links reference real-world user issues with these devices
(usb_modeswitch discussions, GitHub repo), confirming this addresses
actual hardware in the field.

### 2. CODE CHANGE ANALYSIS

The change is minimal and straightforward:
```c
{
    /* SR9700 with virtual driver CD-ROM - interface 0 is the CD-ROM
device */
    USB_DEVICE_INTERFACE_NUMBER(0x0fe6, 0x9702, 1),
    .driver_info = (unsigned long)&sr9700_driver_info,
},
```

This adds a single entry to the USB device ID table:
- Same vendor ID (0x0fe6) as existing SR9700
- New product ID (0x9702) for devices with virtual CD-ROM
- Matches only interface 1 (the Ethernet interface, avoiding the CD-ROM
  on interface 0)
- Uses the exact same `sr9700_driver_info` - no driver code changes

### 3. CLASSIFICATION

**This is a NEW DEVICE ID addition** - one of the explicitly allowed
exceptions for stable backports.

- NOT a new feature in the traditional sense
- NOT adding a new driver
- NOT changing any APIs or driver logic
- Simply adding a USB ID to enable hardware on an existing, mature
  driver

### 4. SCOPE AND RISK ASSESSMENT

| Metric | Assessment |
|--------|------------|
| Lines changed | +5 lines |
| Files touched | 1 |
| Code complexity | Trivial - USB ID table entry only |
| Risk level | **Very Low** |

The sr9700 driver is mature and unchanged. The only "new" aspect is
using `USB_DEVICE_INTERFACE_NUMBER()` instead of `USB_DEVICE()` to
specifically bind to interface 1, which is correct behavior for this
dual-interface device.

### 5. USER IMPACT

- **Affected users**: Anyone with SR9700 USB Ethernet adapters that have
  the virtual CD-ROM feature (product ID 0x9702)
- **Current state**: Device is completely non-functional without this
  patch - the driver doesn't recognize it
- **Severity**: Hardware unusable - users cannot access their network
  adapter
- **Evidence**: External links show real users encountering this issue

### 6. STABILITY INDICATORS

- Signed-off-by Paolo Abeni (Red Hat networking maintainer)
- Clean, follows established patterns for USB device ID additions
- Uses standard kernel macros (`USB_DEVICE_INTERFACE_NUMBER`)

### 7. DEPENDENCY CHECK

- No dependencies on other commits
- The sr9700 driver exists in all maintained stable kernels (driver
  added in 2013)
- Patch applies cleanly with no modifications needed

---

## Verdict

This commit is a **textbook example** of what should be backported to
stable:

**Meets stable criteria:**
- ✅ Obviously correct - simple USB ID table entry
- ✅ Fixes real bug - hardware completely unusable without it
- ✅ Small and contained - 5 lines, single file, no logic changes
- ✅ No new features - enables existing driver for device variant
- ✅ Falls into Device ID exception - explicitly allowed for stable

**Risk assessment:**
- Minimal risk - cannot affect existing 0x9700 device users
- Worst case if wrong: only affects users with 0x9702 devices who
  already can't use them

**Benefit:**
- Clear user benefit - enables hardware that otherwise doesn't work at
  all

**NO** concerns:
- No backport adjustments needed
- No dependencies
- Driver code is identical across stable versions

**YES**

 drivers/net/usb/sr9700.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/usb/sr9700.c b/drivers/net/usb/sr9700.c
index 091bc2aca7e8..d8ffb59eaf34 100644
--- a/drivers/net/usb/sr9700.c
+++ b/drivers/net/usb/sr9700.c
@@ -539,6 +539,11 @@ static const struct usb_device_id products[] = {
 		USB_DEVICE(0x0fe6, 0x9700),	/* SR9700 device */
 		.driver_info = (unsigned long)&sr9700_driver_info,
 	},
+	{
+		/* SR9700 with virtual driver CD-ROM - interface 0 is the CD-ROM device */
+		USB_DEVICE_INTERFACE_NUMBER(0x0fe6, 0x9702, 1),
+		.driver_info = (unsigned long)&sr9700_driver_info,
+	},
 	{},			/* END */
 };
 
-- 
2.51.0


  parent reply	other threads:[~2026-01-07 15:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-07 15:53 [PATCH AUTOSEL 6.18-5.15] smb/server: call ksmbd_session_rpc_close() on error path in create_smb2_pipe() Sasha Levin
2026-01-07 15:53 ` [PATCH AUTOSEL 6.18] io_uring: use GFP_NOWAIT for overflow CQEs on legacy rings Sasha Levin
2026-01-07 15:53 ` [PATCH AUTOSEL 6.18-6.6] smb/server: fix refcount leak in smb2_open() Sasha Levin
2026-01-07 15:53 ` [PATCH AUTOSEL 6.18] wifi: mac80211: don't WARN for connections on invalid channels Sasha Levin
2026-01-07 15:53 ` Sasha Levin [this message]
2026-01-07 15:53 ` [PATCH AUTOSEL 6.18-5.10] wifi: mac80211: ocb: skip rx_no_sta when interface is not joined Sasha Levin
2026-01-07 15:53 ` [PATCH AUTOSEL 6.18-5.10] block,bfq: fix aux stat accumulation destination Sasha Levin
2026-01-07 15:53 ` [PATCH AUTOSEL 6.18] platform/x86: dell-lis3lv02d: Add Latitude 5400 Sasha Levin
2026-01-07 15:53 ` [PATCH AUTOSEL 6.18-5.10] wifi: wlcore: ensure skb headroom before skb_push Sasha Levin
2026-01-07 15:53 ` [PATCH AUTOSEL 6.18-6.6] smb/server: fix refcount leak in parse_durable_handle_context() Sasha Levin
2026-01-07 15:53 ` [PATCH AUTOSEL 6.18] wifi: iwlwifi: Implement settime64 as stub for MVM/MLD PTP Sasha Levin
2026-01-07 15:53 ` [PATCH AUTOSEL 6.18-6.1] LoongArch: Set correct protection_map[] for VM_NONE/VM_SHARED Sasha Levin
2026-01-07 15:53 ` [PATCH AUTOSEL 6.18-6.1] LoongArch: Enable exception fixup for specific ADE subcode Sasha Levin
2026-01-07 15:53 ` [PATCH AUTOSEL 6.18-6.12] md: suspend array while updating raid_disks via sysfs Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260107155329.4063936-5-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=enelsonmoore@gmail.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=patches@lists.linux.dev \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox