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=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 8997FC433E1 for ; Thu, 2 Jul 2020 13:50:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 70CB12088E for ; Thu, 2 Jul 2020 13:50:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729365AbgGBNuT (ORCPT ); Thu, 2 Jul 2020 09:50:19 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:43724 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728989AbgGBNuT (ORCPT ); Thu, 2 Jul 2020 09:50:19 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1jqzbU-003KUp-JR; Thu, 02 Jul 2020 15:50:16 +0200 Date: Thu, 2 Jul 2020 15:50:16 +0200 From: Andrew Lunn To: Codrin Ciubotariu Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, woojung.huh@microchip.com, UNGLinuxDriver@microchip.com, vivien.didelot@gmail.com, f.fainelli@gmail.com, davem@davemloft.net, kuba@kernel.org Subject: Re: [PATCH net] net: dsa: microchip: set the correct number of ports Message-ID: <20200702135016.GL730739@lunn.ch> References: <20200702094450.1353917-1-codrin.ciubotariu@microchip.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200702094450.1353917-1-codrin.ciubotariu@microchip.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, Jul 02, 2020 at 12:44:50PM +0300, Codrin Ciubotariu wrote: > The number of ports is incorrectly set to the maximum available for a DSA > switch. Even if the extra ports are not used, this causes some functions > to be called later, like port_disable() and port_stp_state_set(). If the > driver doesn't check the port index, it will end up modifying unknown > registers. > > Fixes: b987e98e50ab ("dsa: add DSA switch driver for Microchip KSZ9477") > Signed-off-by: Codrin Ciubotariu Reviewed-by: Andrew Lunn Thanks for the minimum patch. If you wait about a week, net will get merged into net-next. You can then submit a refactoring patch based on your previous version. Andrew