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=-5.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 1C960CA9EBC for ; Thu, 24 Oct 2019 13:59:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E3C4C21655 for ; Thu, 24 Oct 2019 13:58:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="oXbbbanS" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2501991AbfJXN65 (ORCPT ); Thu, 24 Oct 2019 09:58:57 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:33580 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727811AbfJXN64 (ORCPT ); Thu, 24 Oct 2019 09:58:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Transfer-Encoding:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: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=4h4g4xWUSzQkOzsFtj/+EUfueq7HCHgHxDUC8+NHICM=; b=oXbbbanSQTTccq/4q8hM8qratB Zr3jaXlry1YfYCgEwaWqSMfdUZtp/MbIKwOBLIVi9ughnWdu8o7t0CZbpgAaTOEmAue2emWkloaZz gJkh/VHsrp73SsoDKb7WngLvDrgUT5VhPTuO+E8B7q0LQ3KcmJZ4IRV2hIFLs+a6wgWQ=; Received: from andrew by vps0.lunn.ch with local (Exim 4.92.2) (envelope-from ) id 1iNddb-0003vD-1j; Thu, 24 Oct 2019 15:58:51 +0200 Date: Thu, 24 Oct 2019 15:58:51 +0200 From: Andrew Lunn To: Michal =?utf-8?B?Vm9rw6HEjQ==?= Cc: Vivien Didelot , "David S. Miller" , Jakub Kicinski , Florian Fainelli , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next] net: dsa: qca8k: Initialize the switch with correct number of ports Message-ID: <20191024135851.GB30147@lunn.ch> References: <1571924818-27725-1-git-send-email-michal.vokac@ysoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1571924818-27725-1-git-send-email-michal.vokac@ysoft.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, Oct 24, 2019 at 03:46:58PM +0200, Michal Vokáč wrote: > Since commit 0394a63acfe2 ("net: dsa: enable and disable all ports") > the dsa core disables all unused ports of a switch. In this case > disabling ports with numbers higher than QCA8K_NUM_PORTS causes that > some switch registers are overwritten with incorrect content. > > To fix this, initialize the dsa_switch->num_ports with correct number > of ports. > > Fixes: 7e99e3470172 ("net: dsa: remove dsa_switch_alloc helper") > Signed-off-by: Michal Vokáč Reviewed-by: Andrew Lunn Andrew