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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9EB4FEB64DA for ; Fri, 14 Jul 2023 13:28:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235661AbjGNN2f (ORCPT ); Fri, 14 Jul 2023 09:28:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234638AbjGNN2c (ORCPT ); Fri, 14 Jul 2023 09:28:32 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ECD7030F4; Fri, 14 Jul 2023 06:28:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=/ECHFNZrgtTJV8ui4hGBa7LqmL4xWtdtw95/EPxl764=; b=3o/D3zjVAqE8MJJ2RANnv4DmYS bdANk8Y9bMdmx5NrfSV9tumNfr7UWOkpWwhnSVqvgzjAhjud4Yh7v64modEbmzx5COSTau4BdSiIC zqLBQ0pQVfP6cWSjpz6+w5Zt0pbE4nrs9dpNxZr7YsozR+Io/d2hzHd3+PZvJfnP4TEA=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1qKIqL-001M7e-VJ; Fri, 14 Jul 2023 15:28:21 +0200 Date: Fri, 14 Jul 2023 15:28:21 +0200 From: Andrew Lunn To: Ante Knezic Cc: netdev@vger.kernel.org, f.fainelli@gmail.com, olteanv@gmail.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next] net: dsa: mv88e6xxx: Add erratum 3.14 for 88E6390X and 88E6190X Message-ID: <570d32ad-e475-4a0b-a6ee-a2bdf5f67b69@lunn.ch> References: <20230714114717.18921-1-ante.knezic@helmholz.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230714114717.18921-1-ante.knezic@helmholz.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > +static int mv88e6390x_serdes_erratum_3_14(struct mv88e6xxx_chip *chip) > +{ > + int lanes[] = { MV88E6390_PORT9_LANE0, MV88E6390_PORT9_LANE1, > + MV88E6390_PORT9_LANE2, MV88E6390_PORT9_LANE3, > + MV88E6390_PORT10_LANE0, MV88E6390_PORT10_LANE1, > + MV88E6390_PORT10_LANE2, MV88E6390_PORT10_LANE3 }; Please make this const. Otherwise you end up with two copies of it. > + int err, i; > + > + /* 88e6390x-88e6190x errata 3.14: > + * After chip reset, SERDES reconfiguration or SERDES core > + * Software Reset, the SERDES lanes may not be properly aligned > + * resulting in CRC errors > + */ > + > + for (i = 0; i < ARRAY_SIZE(lanes); i++) { > + err = mv88e6390_serdes_write(chip, lanes[i], > + MDIO_MMD_PHYXS, > + 0xf054, 0x400C); Does Marvell give this register a name? If so, please add a #define. Are the bits in the register documented? > + if (!err && up) { > + if (chip->info->prod_num == MV88E6XXX_PORT_SWITCH_ID_PROD_6390X || > + chip->info->prod_num == MV88E6XXX_PORT_SWITCH_ID_PROD_6190X) 6191X? 6193X? Please sort these into numerical order. Andrew --- pw-bot: cr