Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp3076343rwe; Mon, 29 Aug 2022 05:33:12 -0700 (PDT) X-Google-Smtp-Source: AA6agR67qsuMWSDl4aXob6rPhK+UTuong+5Q0qiCVjOl7jjiVXQZmVIkkD/HGXTmlbEnXnPIP9jK X-Received: by 2002:a17:902:8603:b0:172:ede7:6076 with SMTP id f3-20020a170902860300b00172ede76076mr16613745plo.72.1661776391713; Mon, 29 Aug 2022 05:33:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661776391; cv=none; d=google.com; s=arc-20160816; b=hcmtUMacyU9sxJ1VpkZfRub3IX09AewFlmSwXhPfgytlnjoNmA2oKk9mzEbsl0/Spe riEivZNOSbEBU5xNXvkODeBk8sJGQq5UBMENKF2D1eW+ZXhqLY6cozRUrVcMc0iY4RAg WoJ0Nxj4amz/UXGdakT8mRMmrNeh4NfofzCIlemCsBP/POyXSD2lORjGyHJhEA8ytdu7 UX8XF8B1CY10wgmmYBJHUeLPjuSiSFvk+oZGqsHUgGupgMm4MFcCFLiFX8Rl5MI8pZ4/ QFKTa9YhE4/m051IF9g2CACQ3WNixH1gAdP3HSsrW7CGz1JJNBAPn0NYfjN8rSNocuRl w8QA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=IWQEwUwDIcyOOCpF5h1jU+LQuALZ4KLz9SMB8s11G2M=; b=i3tFxlnDOx6I7FPNwI382O21vf39t0E/1qVyGXguvlseuBGwRZmcAw2aqajRmf+qrs dbpMrVfePRD2GfhnYVedvZ1FGhoZJ9L6mjHz9OJlYEt22WnwmYjacuPFBdSADUHxjK64 MZRHri6yt98+Om7HgtT7CmrvNC/s+5hSKfIS76FGdHWAxwhWp9IeRwkSp9FQ3Ov/gy4F NzFjfTketC8lH+2kq1x24bGtITodV7cWy/Wu245h5kOofQ0iQ9NEuifsopMxp/hqnvYE 7ga5iGLlUh2GFHh8mc41uHXnKjzOnlcoQd9aTcBl0EKYLxYhXKYORGiKgBO4cusrCZTm +0fA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KWkYV8j8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e20-20020a63d954000000b0042b30fbdd76si9376308pgj.779.2022.08.29.05.33.00; Mon, 29 Aug 2022 05:33:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KWkYV8j8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229905AbiH2LQE (ORCPT + 99 others); Mon, 29 Aug 2022 07:16:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231450AbiH2LNu (ORCPT ); Mon, 29 Aug 2022 07:13:50 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09535659D1; Mon, 29 Aug 2022 04:09:43 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 7AB05B80F96; Mon, 29 Aug 2022 11:09:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C047BC433C1; Mon, 29 Aug 2022 11:09:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661771374; bh=t4Ral+eNtw1TmAL9Zj3bBoJmT5H+4wQP/GGzP5O2aOg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KWkYV8j82XefMjlyyiyiUdw0LNjelcEmMqvIG3fFmyRRYGiqzntQ6m7TP2y1NIquO ntUxxEmDEa/gRELFB1vQuZE9gyYa6TysmVluBPF1mdqRlq9ZJpi/mo0jDKzdMclKnP Y6JMsyKNYtcsh5cDjWUpsAK56X32FIm43h5BQjOM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hayes Wang , "David S. Miller" , Sasha Levin Subject: [PATCH 5.19 024/158] r8152: fix the units of some registers for RTL8156A Date: Mon, 29 Aug 2022 12:57:54 +0200 Message-Id: <20220829105809.807331767@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220829105808.828227973@linuxfoundation.org> References: <20220829105808.828227973@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hayes Wang [ Upstream commit 6dc4df12d741c0fe8f885778a43039e0619b9cd9 ] The units of PLA_RX_FIFO_FULL and PLA_RX_FIFO_EMPTY are 16 bytes. Fixes: 195aae321c82 ("r8152: support new chips") Signed-off-by: Hayes Wang Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/usb/r8152.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 0f6efaabaa32b..46c7954d27629 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c @@ -6431,21 +6431,8 @@ static void r8156_fc_parameter(struct r8152 *tp) u32 pause_on = tp->fc_pause_on ? tp->fc_pause_on : fc_pause_on_auto(tp); u32 pause_off = tp->fc_pause_off ? tp->fc_pause_off : fc_pause_off_auto(tp); - switch (tp->version) { - case RTL_VER_10: - case RTL_VER_11: - ocp_write_word(tp, MCU_TYPE_PLA, PLA_RX_FIFO_FULL, pause_on / 8); - ocp_write_word(tp, MCU_TYPE_PLA, PLA_RX_FIFO_EMPTY, pause_off / 8); - break; - case RTL_VER_12: - case RTL_VER_13: - case RTL_VER_15: - ocp_write_word(tp, MCU_TYPE_PLA, PLA_RX_FIFO_FULL, pause_on / 16); - ocp_write_word(tp, MCU_TYPE_PLA, PLA_RX_FIFO_EMPTY, pause_off / 16); - break; - default: - break; - } + ocp_write_word(tp, MCU_TYPE_PLA, PLA_RX_FIFO_FULL, pause_on / 16); + ocp_write_word(tp, MCU_TYPE_PLA, PLA_RX_FIFO_EMPTY, pause_off / 16); } static void rtl8156_change_mtu(struct r8152 *tp) -- 2.35.1