mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
net: usb: sr9700: fix incorrect command used to write single register
commit fa0b198be1c6775bc7804731a43be5d899d19e7a upstream.
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: c9b37458e9 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
cff353b7d1
commit
907e8a8f50
@@ -52,7 +52,7 @@ static int sr_read_reg(struct usbnet *dev, u8 reg, u8 *value)
|
||||
|
||||
static int sr_write_reg(struct usbnet *dev, u8 reg, u8 value)
|
||||
{
|
||||
return usbnet_write_cmd(dev, SR_WR_REGS, SR_REQ_WR_REG,
|
||||
return usbnet_write_cmd(dev, SR_WR_REG, SR_REQ_WR_REG,
|
||||
value, reg, NULL, 0);
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ static void sr_write_async(struct usbnet *dev, u8 reg, u16 length,
|
||||
|
||||
static void sr_write_reg_async(struct usbnet *dev, u8 reg, u8 value)
|
||||
{
|
||||
usbnet_write_cmd_async(dev, SR_WR_REGS, SR_REQ_WR_REG,
|
||||
usbnet_write_cmd_async(dev, SR_WR_REG, SR_REQ_WR_REG,
|
||||
value, reg, NULL, 0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user