From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6564DC433E0 for ; Mon, 1 Jun 2020 18:39:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3D389206E2 for ; Mon, 1 Jun 2020 18:39:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591036781; bh=u7N8yXkyjo3PP5chVwMK7AqnZHjDJwYak19vBMTXVPw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=1+vuCNF+NEdhGhmQH2bR1QHOfLznRbdfCQ2gWDD7vc+90MFBVJDopqWhNhg+zUOPw 8icn/J8+6J3fsz7B+q+CkrtKil6x79xxnfnTEnti2QrbeP/CcXAZ3bXGSkcWq8pYpe JaPiAjacD7N4wJ4ZC6RsxmhMFVy21eGLd4WjUTM8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731110AbgFASOW (ORCPT ); Mon, 1 Jun 2020 14:14:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:34112 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730958AbgFASOU (ORCPT ); Mon, 1 Jun 2020 14:14:20 -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 E6E14206E2; Mon, 1 Jun 2020 18:14:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591035260; bh=u7N8yXkyjo3PP5chVwMK7AqnZHjDJwYak19vBMTXVPw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WiR8nqCI/YxQjORj+yjoGW4UTJq2HbuHo68FlbcZR99KsSYTC8pQkT6ChU5QU9QlC tq6k+nlVpjdl19r3pSV9zSwhqxbL0hfjqNskDFUiJ7mT7HHIwI7NHprrQv2Rf8xrg8 VetguDTCyAQsvsgn/qJU8JqTUxDBs0e/h8qb64VM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vladimir Oltean , "David S. Miller" Subject: [PATCH 5.6 043/177] net: mscc: ocelot: fix address ageing time (again) Date: Mon, 1 Jun 2020 19:53:01 +0200 Message-Id: <20200601174052.624920756@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200601174048.468952319@linuxfoundation.org> References: <20200601174048.468952319@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Vladimir Oltean commit bf655ba212dfd10d1c86afeee3f3372dbd731d46 upstream. ocelot_set_ageing_time has 2 callers: - felix_set_ageing_time: from drivers/net/dsa/ocelot/felix.c - ocelot_port_attr_ageing_set: from drivers/net/ethernet/mscc/ocelot.c The issue described in the fixed commit below actually happened for the felix_set_ageing_time code path only, since ocelot_port_attr_ageing_set was already dividing by 1000. So to make both paths symmetrical (and to fix addresses getting aged way too fast on Ocelot), stop dividing by 1000 at caller side altogether. Fixes: c0d7eccbc761 ("net: mscc: ocelot: ANA_AUTOAGE_AGE_PERIOD holds a value in seconds, not ms") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/mscc/ocelot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/ethernet/mscc/ocelot.c +++ b/drivers/net/ethernet/mscc/ocelot.c @@ -1460,7 +1460,7 @@ static void ocelot_port_attr_ageing_set( unsigned long ageing_clock_t) { unsigned long ageing_jiffies = clock_t_to_jiffies(ageing_clock_t); - u32 ageing_time = jiffies_to_msecs(ageing_jiffies) / 1000; + u32 ageing_time = jiffies_to_msecs(ageing_jiffies); ocelot_set_ageing_time(ocelot, ageing_time); }