From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751670AbdJNUHL (ORCPT ); Sat, 14 Oct 2017 16:07:11 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:45438 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751367AbdJNUHK (ORCPT ); Sat, 14 Oct 2017 16:07:10 -0400 Date: Sat, 14 Oct 2017 22:07:06 +0200 From: Andrew Lunn To: Tristram.Ha@microchip.com Cc: Florian Fainelli , Pavel Machek , Ruediger Schmitt , muvarov@gmail.com, nathan.leigh.conrad@gmail.com, vivien.didelot@savoirfairelinux.com, UNGLinuxDriver@microchip.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 RFC 6/7] Add MIB counter reading support Message-ID: <20171014200706.GA24477@lunn.ch> References: <1507321985-15097-1-git-send-email-Tristram.Ha@microchip.com> <1507321985-15097-7-git-send-email-Tristram.Ha@microchip.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1507321985-15097-7-git-send-email-Tristram.Ha@microchip.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > +static void ksz9477_phy_setup(struct ksz_device *dev, int port, > + struct phy_device *phy) > +{ > + if (port < dev->phy_port_cnt) { > + /* SUPPORTED_Asym_Pause and SUPPORTED_Pause can be removed to > + * disable flow control when rate limiting is used. > + */ > + phy->advertising = phy->supported; > + } > +} > + This has nothing to do with MIBs. It does not belong in this patch. > static void ksz9477_port_setup(struct ksz_device *dev, int port, bool cpu_port) > { > u8 data8; > @@ -1159,6 +1198,8 @@ static int ksz9477_setup(struct dsa_switch *ds) > /* start switch */ > ksz_cfg(dev, REG_SW_OPERATION, SW_START, true); > > + ksz_init_mib_timer(dev); > + > return 0; > } > > @@ -1168,6 +1209,7 @@ static int ksz9477_setup(struct dsa_switch *ds) > .set_addr = ksz9477_set_addr, > .phy_read = ksz9477_phy_read16, > .phy_write = ksz9477_phy_write16, > + .adjust_link = ksz_adjust_link, Please move the adjust_link changes into a separate patch. I need to come back at look at the mutex's and the freeze code. It is not obviously correct, and i don't have the time at the moment. Andrew