Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp462921yba; Wed, 15 May 2019 04:33:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqz1LH6PzRd5NkmhcnMfVGe8N47T6I8z/tVcZ1LaAi0YU2PuMYFqGKmYfdePyXXBdf66W0Ff X-Received: by 2002:a63:317:: with SMTP id 23mr43525897pgd.414.1557919989295; Wed, 15 May 2019 04:33:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557919989; cv=none; d=google.com; s=arc-20160816; b=qqktiQKp904Z3BcthJIc2VfBN3zTU2q7vWOfT0ywB3073uESrMLxeVg1VpqjRMOUZK X6GbIhjBqgGZ37abKuGfxoatYTLjwP++ZTwLYy+L+zRXUtlHbJ8s9TcmItJwsal4rHf7 5E5O+a6ctPFudfqe9jM5yVCVKznJXplszgYH/FsUE7RIDw5iSUhl6mjHQWtu/17LZlv7 VUqRfUlpFOQ5byTXZdrQWkCWGTr3EUd2PJ5JWa4EyNsc2dKujWtSNVbj2Y8tQao/a0C+ mh1CYuVj2TlW4rhPqiTcCiU31/DRwKvNQPxZO9+Ki0nL2XV/w9syxZKqwCxWuwfiPn9H i+rQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=PHUISGHFMylcE+Xp3kV13LQSNZQKYHzYqo0vJ/xhTxs=; b=yVh3IQaHIu3I58+oezGU93Yy3Gy6q36U828ymfR2RMhGyMlQ3JkCj4axwEKGZqMtZn 0CRMaM6v/1lbjVQc2PwB5xKQwpSS6FdDOtVaDdHWL7s1e2uHFiNwEuZENtlXs+UDGQvJ alxOErVCQIYCvtUiqOMvOOIzEpifpgMInAo6477NUneqgtEFYBqNYsN6yNlW//P6d4Ud 48aONqe2XDpfru3mkstkgAQfnFpbdsfc4AW6Qam8HFiZUMJXKwABscOnx41+1Qn8+xP0 szMGQ785TqdLtaztcBD7MjvQpd07yj5dXdNYwW/D+S06v2ymRt7baKL2f7biCL+fJ6IF aGww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ZTWu80Ad; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c5si1613282pgg.96.2019.05.15.04.32.53; Wed, 15 May 2019 04:33:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ZTWu80Ad; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732254AbfEOLbF (ORCPT + 99 others); Wed, 15 May 2019 07:31:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:42704 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732829AbfEOLbD (ORCPT ); Wed, 15 May 2019 07:31:03 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6B626206BF; Wed, 15 May 2019 11:31:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557919862; bh=NhgZtDE+kJfP2c9ihs85vwuYjgcxXW1BjKaxNGSvzRo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZTWu80AdBHqfpkOxjee4OnbOz1nc9wGUTjwRd5B9W+9+C2zISI4GZ7xJCXdDYom+H TK4km/wiX6nUHTMlt1ron1aKD2QbF8xKnWGKFV6VU3y/cP4Vr2thxOeHg2vCbFsqBV FfnTQ6+LWlXuYj6RE93Y+h+/wZHj+TX2JKkHZ10g= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Oliver Neukum , "David S. Miller" Subject: [PATCH 5.0 120/137] aqc111: fix endianness issue in aqc111_change_mtu Date: Wed, 15 May 2019 12:56:41 +0200 Message-Id: <20190515090702.401821988@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190515090651.633556783@linuxfoundation.org> References: <20190515090651.633556783@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Oliver Neukum [ Upstream commit b8b277525e9df2fd2dc3d1f4fe01c6796bb107fc ] 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 Signed-off-by: Greg Kroah-Hartman --- drivers/net/usb/aqc111.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/net/usb/aqc111.c +++ b/drivers/net/usb/aqc111.c @@ -453,6 +453,8 @@ static int aqc111_change_mtu(struct net_ 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);