Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: usb: sr9700: fix incorrect command used to write single register

This fixes the device failing to initialize with "error reading MAC
address" for me, probably because the incorrect write of NCR_RST to
SR_NCR is not actually resetting the device.

Fixes: c9b37458e95629b1d1171457afdcc1bf1eb7881d ("USB2NET : SR9700 : One chip USB 1.1 USB2NET SR9700Device Driver Support")
Cc: stable@vger.kernel.org
Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
Link: https://patch.msgid.link/20251221082400.50688-1-enelsonmoore@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>

authored by

Ethan Nelson-Moore and committed by
Paolo Abeni
fa0b198b 58fc7342

+2 -2
+2 -2
drivers/net/usb/sr9700.c
··· 52 52 53 53 static int sr_write_reg(struct usbnet *dev, u8 reg, u8 value) 54 54 { 55 - return usbnet_write_cmd(dev, SR_WR_REGS, SR_REQ_WR_REG, 55 + return usbnet_write_cmd(dev, SR_WR_REG, SR_REQ_WR_REG, 56 56 value, reg, NULL, 0); 57 57 } 58 58 ··· 65 65 66 66 static void sr_write_reg_async(struct usbnet *dev, u8 reg, u8 value) 67 67 { 68 - usbnet_write_cmd_async(dev, SR_WR_REGS, SR_REQ_WR_REG, 68 + usbnet_write_cmd_async(dev, SR_WR_REG, SR_REQ_WR_REG, 69 69 value, reg, NULL, 0); 70 70 } 71 71