From: Sasha Levin <sashal@kernel.org>
To: patches@lists.linux.dev, stable@vger.kernel.org
Cc: Bradford Love <brad@nextdimension.cc>,
Hans Verkuil <hverkuil+cisco@kernel.org>,
Sasha Levin <sashal@kernel.org>,
mchehab@kernel.org, linux-media@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH AUTOSEL 7.0-6.1] media: em28xx: remove tuner type from Hauppauge DVB DualHD
Date: Mon, 20 Apr 2026 09:18:27 -0400 [thread overview]
Message-ID: <20260420132314.1023554-113-sashal@kernel.org> (raw)
In-Reply-To: <20260420132314.1023554-1-sashal@kernel.org>
From: Bradford Love <brad@nextdimension.cc>
[ Upstream commit a5dcbff7d50a89bf0376e7f2fb1ba3163a6dac0a ]
This reverts a patch which was perhaps inadvertently added.
This was changed during the 5.15-rc4 merge. The faulty commit appears
lost in the pull request somehow, I cannot find it to check the
explanation.
commit c52e7b855b33 ("Merge tag 'v5.15-rc4' into media_tree")
There was nothing wrong with this device and no reason to moodify the
board profile. The DVB capabilities are added via dvb_module_probe.
Additionally, the device contains *zero* analog inputs, so I'm not
sure why one was added.
Signed-off-by: Bradford Love <brad@nextdimension.cc>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
Now I have all the information needed. Let me compile the complete
analysis.
---
## PHASE 1: COMMIT MESSAGE FORENSICS
### Step 1.1: Subject Line
- **Subsystem**: `media: em28xx`
- **Action verb**: "remove" (reverting an inadvertent change)
- **Summary**: Remove incorrect tuner type and input from Hauppauge
WinTV-dualHD DVB board profile
- Record: [media: em28xx] [remove/revert] [Restores correct board
profile for DVB-only device]
### Step 1.2: Tags
- **Signed-off-by**: Bradford Love (brad@nextdimension.cc) - author,
original Hauppauge em28xx developer
- **Signed-off-by**: Hans Verkuil (hverkuil+cisco@kernel.org) - media
subsystem co-maintainer
- No Fixes: tag (expected for candidates)
- No Reported-by: tag
- No Cc: stable
- Record: Signed off by the subsystem expert (Brad Love is the original
author of multiple Hauppauge em28xx board entries) and the media
subsystem maintainer.
### Step 1.3: Commit Body
The commit message explains:
- This reverts a change that was "perhaps inadvertently added" during
the 5.15-rc4 merge into the media tree
- References `c52e7b855b33` ("Merge tag 'v5.15-rc4' into media_tree") as
the source
- The author says "There was nothing wrong with this device" and "no
reason to modify the board profile"
- DVB capabilities are handled via `dvb_module_probe` (not via analog
tuner infrastructure)
- The device has "zero analog inputs" so the added composite input was
bogus
- Record: Bug is a merge-introduced corruption of a board profile.
Symptom is incorrect device configuration.
### Step 1.4: Hidden Bug Fix Detection
This is a clear bug fix disguised as "remove" - it reverts an
inadvertent merge artifact that broke a device's board profile. The
commit restores the original known-correct configuration.
- Record: YES, this is a real bug fix - restoring a corrupted board
profile.
## PHASE 2: DIFF ANALYSIS
### Step 2.1: Inventory
- **Files changed**: 1 (`drivers/media/usb/em28xx/em28xx-cards.c`)
- **Lines**: +1/-6 (net -5 lines)
- **Functions modified**: None (data structure change only)
- **Scope**: Single-file, single board entry modification
- Record: Minimal change to one board profile entry in one file.
### Step 2.2: Code Flow Change
**Hunk 1**: Changes `.tuner_type` from `TUNER_SI2157` back to
`TUNER_ABSENT` and removes the bogus `.input` block.
Before: Board profile claims an Si2157 analog tuner and a composite
video input
After: Board profile correctly declares no analog tuner and no analog
inputs
### Step 2.3: Bug Mechanism
This is a **hardware profile/data corruption fix** (category h -
hardware workaround/device profile).
The incorrect `TUNER_SI2157` value causes:
1. **Unnecessary I2C bus probing**: `em28xx_v4l2_init()` (line
2589-2622) attempts to discover and configure an analog tuner via
I2C, potentially conflicting with the DVB tuner probe
2. **Spurious error message**: The check at line 4057-4058 (`has_dual_ts
&& tuner_type != TUNER_ABSENT`) triggers "We currently don't support
analog TV or stream capture on dual tuners"
3. **Incorrect capability advertisement**: V4L2_CAP_TUNER would be
advertised (line 2758)
4. **Bogus input listing**: A non-existent composite video input
referencing TVP5150 decoder
Record: Incorrect board profile data causing unnecessary I2C probing,
spurious errors, and incorrect capability reporting.
### Step 2.4: Fix Quality
- Obviously correct: Restores the original correct state (matches pre-
merge value and sibling board profile)
- Minimal/surgical: Only changes the one affected board entry
- Regression risk: Virtually zero - restoring known-good configuration
- Record: Fix is trivially correct. Zero regression risk.
## PHASE 3: GIT HISTORY INVESTIGATION
### Step 3.1: Blame
The original correct board entry (`TUNER_ABSENT`) was introduced by Olli
Salonen in commit `11a2a949d05e9d` (2016). The incorrect change was
introduced by merge commit `c52e7b855b33f` during the 5.15-rc4 merge
into media_tree, attributed to Mauro Carvalho Chehab's merge resolution.
Record: Buggy code introduced by merge artifact c52e7b855b33f (Oct
2021), first appearing in v5.16. Correct code existed since 2016 (v4.7
era).
### Step 3.2: Fixes Tag
No Fixes: tag present. The commit references `c52e7b855b33` as the
source of the bug.
Verified: `git diff v5.15..v5.16 -- drivers/media/usb/em28xx/em28xx-
cards.c` confirms the TUNER_SI2157 and input changes were introduced
between v5.15 and v5.16 via that merge.
### Step 3.3: File History
Recent commits to em28xx-cards.c are unrelated (MyGica UTV3 support,
build system changes). No conflicting changes found.
Record: Standalone fix, no prerequisites needed.
### Step 3.4: Author
Bradford Love (brad@nextdimension.cc) is the original Hauppauge em28xx
developer who authored multiple board entries including `em28xx: Add pid
for bulk revision of Hauppauge 461eV2`, `em28xx: Add pid for bulk
revision of Hauppauge 461e`, `em28xx: Add support for Hauppauge USB
QuadHD`, etc.
Record: Author is the domain expert for Hauppauge em28xx devices.
### Step 3.5: Dependencies
None. This is a standalone data change to a board profile. No code
dependencies.
## PHASE 4: MAILING LIST AND EXTERNAL RESEARCH
### Step 4.1-4.5
Lore.kernel.org was unavailable due to bot protection. B4 dig could not
be used on the merge commit (it's a merge). The commit was signed off by
Hans Verkuil (media maintainer), confirming proper review.
Record: Could not access lore discussion. Fix reviewed and accepted by
media subsystem maintainer.
## PHASE 5: CODE SEMANTIC ANALYSIS
### Step 5.1-5.4: Key Code Paths Affected
Verified the following code paths are affected by the incorrect
`TUNER_SI2157`:
1. **`em28xx_v4l2_init()`** (em28xx-video.c:2589): When `tuner_type !=
TUNER_ABSENT`, probes I2C bus for analog tuner. The Si2157 DVB tuner
lives at I2C addresses 0x60/0x63 (from em28xx-dvb.c:1412). The analog
probe at line 2604-2612 uses `v4l2_i2c_tuner_addrs()` which could
overlap with these addresses.
2. **`em28xx_usb_probe()`** (em28xx-cards.c:4057-4066): Dual-TS check
with `tuner_type != TUNER_ABSENT` triggers error message and disables
video.
3. **`em28xx_tuner_setup()`** (em28xx-video.c:2469): Attempts to
configure tuner type TUNER_SI2157 via V4L2 tuner subsystem.
4. The sibling board `EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_01595`
correctly uses `TUNER_ABSENT` and has no input entry, confirming the
fix is correct.
Record: Bug affects I2C probing, capability reporting, and error message
generation. DVB tuner is handled separately via `dvb_module_probe`, not
the analog tuner infrastructure.
## PHASE 6: STABLE TREE ANALYSIS
### Step 6.1: Bug Exists in Stable Trees
Verified: The buggy change entered mainline in v5.16 via merge
`c52e7b855b33f`. All active stable trees (6.1.y, 6.6.y, 6.12.y) contain
this bug. The v5.15.y LTS tree does NOT (bug was introduced after 5.15).
### Step 6.2: Backport Complications
The change is to a data structure entry. It should apply cleanly to all
affected stable trees as the board profile has not been modified since
the merge.
### Step 6.3: No related fixes already in stable.
## PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT
### Step 7.1
- **Subsystem**: drivers/media/usb (USB media capture device driver)
- **Criticality**: PERIPHERAL (affects users of specific Hauppauge
WinTV-dualHD DVB USB device)
- The Hauppauge WinTV-dualHD is a consumer DVB USB stick, commonly used
for DVB-T/T2 reception
### Step 7.2
The em28xx subsystem is mature and stable. The bug has been present
since v5.16 (~4 years).
## PHASE 8: IMPACT AND RISK ASSESSMENT
### Step 8.1: Affected Users
Users of the Hauppauge WinTV-dualHD DVB (USB IDs 2040:0265 and
2040:8265).
### Step 8.2: Trigger Conditions
Every time the device is plugged in or the driver loads. 100%
reproducible for affected hardware.
### Step 8.3: Failure Mode
- Spurious error message in dmesg: "We currently don't support analog TV
or stream capture on dual tuners" (MEDIUM)
- Unnecessary I2C bus probing that could conflict with DVB tuner
(MEDIUM)
- Incorrect V4L2 capability advertising (LOW)
- Non-existent composite input exposed to userspace (LOW)
- Overall severity: MEDIUM
### Step 8.4: Risk-Benefit
- **Benefit**: Fixes incorrect device behavior for all users of this
hardware, eliminates spurious errors, prevents potential I2C conflicts
- **Risk**: Extremely low - 5-line change to a data structure, restoring
known-good values that existed for 5 years before the merge artifact
- **Ratio**: HIGH benefit / VERY LOW risk
## PHASE 9: FINAL SYNTHESIS
### Step 9.1: Evidence
**FOR backporting**:
- Fixes an incorrect board profile caused by a merge artifact
- Small (5 lines net), obviously correct, data-only change
- Restores original known-good configuration (verified by blame)
- Matches sibling device's correct profile
- Author is the domain expert for this hardware
- Reviewed by media subsystem maintainer (Hans Verkuil)
- Bug affects all stable trees from 6.1.y through 6.12.y
- Prevents spurious error messages and potential I2C bus conflicts
- Clean apply expected (no conflicting changes to this entry)
**AGAINST backporting**:
- Bug has been present ~4 years without widespread reports (limited user
impact)
- DVB functionality likely still works despite the incorrect profile
- No syzbot/crash reports associated with this
### Step 9.2: Stable Rules Checklist
1. Obviously correct and tested? **YES** - restores pre-merge state,
signed off by domain expert and maintainer
2. Fixes a real bug? **YES** - incorrect device profile from merge
artifact
3. Important issue? **MEDIUM** - spurious errors, potential I2C
conflicts, incorrect capabilities
4. Small and contained? **YES** - 5 lines in one file, one board entry
5. No new features or APIs? **YES** - purely corrective
6. Can apply to stable? **YES** - clean apply expected
### Step 9.3: Exception Categories
This falls into the **hardware quirk/device profile fix** category -
correcting incorrect device data in an existing driver.
### Step 9.4: Decision
This is a small, obviously correct fix to a board profile that was
corrupted by a merge artifact. It restores the original known-good
configuration for a specific USB device, matching the sibling board's
correct profile. It was written by the domain expert and reviewed by the
media maintainer. The risk is minimal and the fix prevents incorrect
driver behavior for users of this hardware.
## Verification
- [Phase 1] Parsed commit message: author explains merge-introduced
incorrect board profile
- [Phase 2] Diff analysis: +1/-6 lines, changes `.tuner_type` from
TUNER_SI2157 to TUNER_ABSENT, removes 5-line bogus `.input` block
- [Phase 3] git blame: Correct TUNER_ABSENT value existed since commit
11a2a949d05e9d (2016, Olli Salonen). Bug introduced by merge
c52e7b855b33f (Oct 2021)
- [Phase 3] git diff v5.15..v5.16: Confirmed the TUNER_SI2157 and input
changes were introduced between v5.15 and v5.16 via the merge
- [Phase 3] git blame tuner-types.c: TUNER_SI2157 entry was also added
by same merge c52e7b855b33f (stub entry with no parameters)
- [Phase 3] git log --author: Brad Love is the Hauppauge em28xx expert
with multiple device contributions
- [Phase 5] Grep for TUNER_SI2157 in em28xx: Only used in the one
incorrect board entry
- [Phase 5] Code analysis em28xx-video.c:2589-2622: tuner_type !=
TUNER_ABSENT triggers I2C analog tuner probe
- [Phase 5] Code analysis em28xx-cards.c:4057-4066: dual_ts + tuner !=
ABSENT triggers error message
- [Phase 5] Code analysis em28xx-dvb.c:1384-1422: Si2157 tuner handled
via dvb_module_probe at fixed I2C addresses, not analog tuner
infrastructure
- [Phase 5] Verified sibling board
EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_01595 correctly uses TUNER_ABSENT
with no input
- [Phase 6] Bug introduced in v5.16, affects all active stable trees
(6.1.y, 6.6.y, 6.12.y)
- [Phase 6] No conflicting changes to this board entry since v5.16
- UNVERIFIED: Could not access lore.kernel.org discussion due to bot
protection
**YES**
drivers/media/usb/em28xx/em28xx-cards.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/media/usb/em28xx/em28xx-cards.c b/drivers/media/usb/em28xx/em28xx-cards.c
index 2d19f8ecd6857..d7075ebabceb8 100644
--- a/drivers/media/usb/em28xx/em28xx-cards.c
+++ b/drivers/media/usb/em28xx/em28xx-cards.c
@@ -2522,17 +2522,12 @@ const struct em28xx_board em28xx_boards[] = {
.def_i2c_bus = 1,
.i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE |
EM28XX_I2C_FREQ_400_KHZ,
- .tuner_type = TUNER_SI2157,
+ .tuner_type = TUNER_ABSENT,
.tuner_gpio = hauppauge_dualhd_dvb,
.has_dvb = 1,
.has_dual_ts = 1,
.ir_codes = RC_MAP_HAUPPAUGE,
.leds = hauppauge_dualhd_leds,
- .input = { {
- .type = EM28XX_VMUX_COMPOSITE,
- .vmux = TVP5150_COMPOSITE1,
- .amux = EM28XX_AMUX_LINE_IN,
- } },
},
/*
* 2040:026d Hauppauge WinTV-dualHD (model 01595 - ATSC/QAM) Isoc.
--
2.53.0
next prev parent reply other threads:[~2026-04-20 13:26 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260420132314.1023554-1-sashal@kernel.org>
2026-04-20 13:16 ` [PATCH AUTOSEL 7.0-5.10] media: i2c: mt9p031: Check return value of devm_gpiod_get_optional() in mt9p031_probe() Sasha Levin
2026-04-20 13:16 ` [PATCH AUTOSEL 7.0-6.12] media: ipu-bridge: Add OV5675 sensor config Sasha Levin
2026-04-20 13:18 ` [PATCH AUTOSEL 7.0-5.15] media: em28xx: Add a variety of DualHD usb id Sasha Levin
2026-04-20 13:18 ` Sasha Levin [this message]
2026-04-20 13:18 ` [PATCH AUTOSEL 7.0-5.10] media: pulse8-cec: Handle partial deinit Sasha Levin
2026-04-20 13:18 ` [PATCH AUTOSEL 7.0-6.12] media: i2c: imx258: add missing mutex protection for format code access Sasha Levin
2026-04-20 13:18 ` [PATCH AUTOSEL 7.0-5.10] media: si2168: Fix i2c command timeout on embedded platforms Sasha Levin
2026-04-20 13:19 ` [PATCH AUTOSEL 7.0-6.1] media: dw100: Fix kernel oops with PREEMPT_RT enabled Sasha Levin
2026-04-20 13:19 ` [PATCH AUTOSEL 7.0-5.15] media: renesas: vsp1: histo: Fix code enumeration Sasha Levin
2026-04-20 13:19 ` [PATCH AUTOSEL 7.0-6.18] media: synopsys: hdmirx: support use with sleeping GPIOs Sasha Levin
2026-04-20 13:19 ` [PATCH AUTOSEL 7.0-5.15] media: ccs-pll: Fix pre-PLL divider calculation for EXT_IP_PLL_DIVIDER flag Sasha Levin
2026-04-20 13:20 ` [PATCH AUTOSEL 7.0-5.10] media: saa7164: Fix REV2 firmware filename Sasha Levin
2026-04-20 13:20 ` [PATCH AUTOSEL 6.18] media: rkvdec: reduce stack usage in rkvdec_init_v4l2_vp9_count_tbl() Sasha Levin
2026-04-20 13:20 ` [PATCH AUTOSEL 7.0-5.10] media: si2168: fw 4.0-11 loses warm state during sleep Sasha Levin
2026-04-20 13:21 ` [PATCH AUTOSEL 7.0-6.12] media: renesas: vsp1: Initialize format on all pads Sasha Levin
2026-04-20 13:21 ` [PATCH AUTOSEL 7.0-6.12] media: renesas: vsp1: brx: Fix format propagation Sasha Levin
2026-04-20 16:12 ` Biju Das
2026-04-20 13:21 ` [PATCH AUTOSEL 7.0-5.10] media: cx25840: Fix NTSC-J, PAL-N, and SECAM standards Sasha Levin
2026-04-20 13:21 ` [PATCH AUTOSEL 7.0-6.1] media: i2c: ar0521: Check return value of devm_gpiod_get_optional() in ar0521_probe() 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=20260420132314.1023554-113-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=brad@nextdimension.cc \
--cc=hverkuil+cisco@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--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