Skip to content

Commit fa0b198

Browse files
EthanNelson-MoorePaolo Abeni
authored andcommitted
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: c9b3745 ("USB2NET : SR9700 : One chip USB 1.1 USB2NET SR9700Device Driver Support") Cc: [email protected] Signed-off-by: Ethan Nelson-Moore <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
1 parent 58fc734 commit fa0b198

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/net/usb/sr9700.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ static int sr_read_reg(struct usbnet *dev, u8 reg, u8 *value)
5252

5353
static int sr_write_reg(struct usbnet *dev, u8 reg, u8 value)
5454
{
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,
5656
value, reg, NULL, 0);
5757
}
5858

@@ -65,7 +65,7 @@ static void sr_write_async(struct usbnet *dev, u8 reg, u16 length,
6565

6666
static void sr_write_reg_async(struct usbnet *dev, u8 reg, u8 value)
6767
{
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,
6969
value, reg, NULL, 0);
7070
}
7171

0 commit comments

Comments
 (0)