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=-8.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,USER_AGENT_NEOMUTT autolearn=ham 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 B9D59C282C4 for ; Sat, 9 Feb 2019 16:07:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 89B9121919 for ; Sat, 9 Feb 2019 16:07:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="dN09odG3" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727013AbfBIQHP (ORCPT ); Sat, 9 Feb 2019 11:07:15 -0500 Received: from pandora.armlinux.org.uk ([78.32.30.218]:49024 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726944AbfBIQHP (ORCPT ); Sat, 9 Feb 2019 11:07:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2014; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=jEzeE5lSL8cGGuflkuXKJP6SQh8X7atx8xMhLoWT87k=; b=dN09odG3MpV2B3ERg7sM4hpGw IhyTQQjxoPpvilpkS4ClAgqFVi/uUH2OtswNLsNGJ/khdaoDz2lChojyFIsMj7QIt5v+7KRYQqWw6 tNbkypBHAi3Qu/errb4hDAK/swHXBhV2lYYhHkaQupXvJuIJ01SCJDbKNX2kinjv12CdA=; Received: from shell.armlinux.org.uk ([2001:4d48:ad52:3201:5054:ff:fe00:4ec]:54380) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1gsV9p-00011e-SL; Sat, 09 Feb 2019 16:07:10 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.89) (envelope-from ) id 1gsV9p-00082v-1D; Sat, 09 Feb 2019 16:07:09 +0000 Date: Sat, 9 Feb 2019 16:07:08 +0000 From: Russell King - ARM Linux admin To: Antoine Tenart , Maxime Chevallier Cc: Baruch Siach , Sven Auhagen , "David S. Miller" , netdev@vger.kernel.org Subject: Re: [PATCH] net: mvpp2: clear flow control modes in 10G mode Message-ID: <20190209160708.e7o5wlcj2gt3f7cy@shell.armlinux.org.uk> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Please ignore this one - subject line is not correct. Thanks. On Sat, Feb 09, 2019 at 04:06:13PM +0000, Russell King wrote: > When mvpp2 configures the flow control modes in mvpp2_xlg_config() for > 10G mode, it only ever set the flow control enable bits. There is no > mechanism to clear these bits, which means that userspace is unable to > use standard APIs to disable flow control (the only way is to poke the > register directly.) > > Fix the missing bit clearance to allow flow control to be disabled. > This means that, by default, as there is no negotiation in 10G modes > with mvpp2, flow control is now disabled rather than being rx-only. > > Signed-off-by: Russell King > --- > drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c > index b63fac6ee2e6..199e6f17ee1b 100644 > --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c > +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c > @@ -4532,8 +4532,13 @@ static void mvpp2_xlg_config(struct mvpp2_port *port, unsigned int mode, > > if (state->pause & MLO_PAUSE_TX) > ctrl0 |= MVPP22_XLG_CTRL0_TX_FLOW_CTRL_EN; > + else > + ctrl0 &= ~MVPP22_XLG_CTRL0_TX_FLOW_CTRL_EN; > + > if (state->pause & MLO_PAUSE_RX) > ctrl0 |= MVPP22_XLG_CTRL0_RX_FLOW_CTRL_EN; > + else > + ctrl0 &= ~MVPP22_XLG_CTRL0_RX_FLOW_CTRL_EN; > > ctrl4 &= ~MVPP22_XLG_CTRL4_MACMODSELECT_GMAC; > ctrl4 |= MVPP22_XLG_CTRL4_FWD_FC | MVPP22_XLG_CTRL4_FWD_PFC | > -- > 2.7.4 > > -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up According to speedtest.net: 11.9Mbps down 500kbps up