From: Oliver Neukum Date: Thu, 9 May 2019 09:08:16 +0000 (+0200) Subject: aqc111: fix endianness issue in aqc111_change_mtu X-Git-Tag: v5.15~6400^2~9 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=b8b277525e9df2fd2dc3d1f4fe01c6796bb107fc;p=mirror_ubuntu-kernels.git aqc111: fix endianness issue in aqc111_change_mtu If the MTU is large enough, the first write to the device is just repeated. On BE architectures, however, the first word of the command will be swapped a second time and garbage will be written. Avoid that. Signed-off-by: Oliver Neukum Signed-off-by: David S. Miller --- diff --git a/drivers/net/usb/aqc111.c b/drivers/net/usb/aqc111.c index aff995be2a31..408df2d335e3 100644 --- a/drivers/net/usb/aqc111.c +++ b/drivers/net/usb/aqc111.c @@ -453,6 +453,8 @@ static int aqc111_change_mtu(struct net_device *net, int new_mtu) reg16 = 0x1420; else if (dev->net->mtu <= 16334) reg16 = 0x1A20; + else + return 0; aqc111_write16_cmd(dev, AQ_ACCESS_MAC, SFR_PAUSE_WATERLVL_LOW, 2, ®16);