[PATCH] i2c: tiny-usb: Add Better Internet SFPdebug
From: Marcus Hughes
Date: Thu Nov 26 2026 - 14:11:29 EST
The Better Internet SFPdebug is a USB bench tool for SFP and SFP+
modules. One of its interfaces is an I2C adapter for the module's bus
that speaks the i2c-tiny-usb protocol.
The board has its own USB ID, 16d0:15ba, from MCS Electronics.
Besides the I2C adapter, it has a second interface that its web
manager uses from the browser. Today the driver can only be bound to
the board with new_id, which takes both interfaces, so the web manager
can't connect while the driver is loaded.
Match only the I2C interface (ff/01/01). The driver then binds by
itself, with no new_id step, so the board's I2C bus is ready as soon
as it is plugged in, as the board was designed to work. The web
manager's interface stays free.
Signed-off-by: Marcus Hughes <marcus.hughes@xxxxxxxxxxxxxxxxxx>
---
Notes:
systemd's hwdb lists the same USB ID since its commit ba9122914f06
("hwdb: add Better Internet SFPdebug (#45063)"), which gives the
logged-in user access to the board.
Tested on Ubuntu 26.04 (Linux 7.0), with the driver built from v7.0
plus this change and installed in place of the stock module:
- Without the change, the driver binds none of the board's interfaces.
Bound with new_id, it takes both, and Chrome can't claim the web
manager's interface ("Unable to claim interface") until the driver is
unloaded.
- With the change, plugging the board in loads the driver through the
new alias. It binds the I2C interface alone, leaving the web
manager's interface unbound, and registers one adapter.
- i2cdetect -r finds 0x50 and 0x51 on a fitted SFP+ module, and i2cdump
reads its identity EEPROM. With the module unpowered, reads NAK as
expected, and they work again once it is powered.
- The web manager stays connected in Chrome throughout. After a replug,
the driver binds the I2C interface again by itself.
Our automated hardware tests also use this driver, bound with new_id,
on Linux 6.18. They read and write SFP modules with i2cdetect,
i2cdump, i2cget, i2cset and i2ctransfer, and compare every byte with
what the board itself reads.
drivers/i2c/busses/i2c-tiny-usb.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/i2c/busses/i2c-tiny-usb.c b/drivers/i2c/busses/i2c-tiny-usb.c
index 73355a56a..a4ac9f2d1 100644
--- a/drivers/i2c/busses/i2c-tiny-usb.c
+++ b/drivers/i2c/busses/i2c-tiny-usb.c
@@ -162,6 +162,9 @@ static const struct i2c_algorithm usb_algorithm = {
static const struct usb_device_id i2c_tiny_usb_table[] = {
{ USB_DEVICE(0x0403, 0xc631) }, /* FTDI */
{ USB_DEVICE(0x1c40, 0x0534) }, /* EZPrototypes */
+ /* Better Internet SFPdebug: its I2C interface only */
+ { USB_DEVICE_AND_INTERFACE_INFO(0x16d0, 0x15ba,
+ USB_CLASS_VENDOR_SPEC, 0x01, 0x01) },
{ } /* Terminating entry */
};
base-commit: 04e9bf1648f846976b543e91c1838a712433772a
--
2.53.0