Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp1140436rdg; Fri, 11 Aug 2023 10:59:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGBibGAD5YEj8i27XV/EuyEGPFlxfyYOydBrQZ7ZUzV28446VfBfBBkeAiFRdbbXjwgidfz X-Received: by 2002:a17:902:aa41:b0:1bc:2036:5338 with SMTP id c1-20020a170902aa4100b001bc20365338mr2425036plr.28.1691776791591; Fri, 11 Aug 2023 10:59:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691776791; cv=none; d=google.com; s=arc-20160816; b=hxlSz+FIP3Tctc8u9ocvNU4wqTXopJcAgktIqX40Mlo4WhkeeYnBKOidimXBT9Vm40 j5786PqEv4zxZnR/jAZ2D8V7qyQ+RQ2bZM5k0+ce8slMYBrdBu/SBYFNImBQwGZtdtfY pL5h0DZbp6gWm3QwLwKnqTIyO2ztgMYoT1lileVJKmkwLq7jbQQxVQ/aPrG/c9cgxbXF AHG8QjZ500PruqxqQH09v2JiNQkZn3MrCArKONMhuGvEVRSFCQOVNQnf5bzKNa2IphfG FghbwXb7Hrsx0RsPY92W9Pz5nxwxWBUseMB6yaQFsZ+YWZy/TwW9grpRXGp1OM5y4V7j Wq3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=xOLoqjxqXJGEJKgvL6baV/KdAjhnJWawjg5bJQCGfJA=; fh=+lD4iiU9E+ja31CplzCM1hXmF7Ac8SDZ91NT5yHTJxE=; b=tbdOrtTR/4fPALswckkZWUiWincRvLK8OfNs4a3DpuTiPIwf99KCuziD5FJ67v6Qeb m0HDjd7jAoqxBhspNerFuqWMMSLBikMcbV+fmEuJl80GFNg1oQx/v666l7VVCsrLRJnY lOd69oRHKmO5h4+y1hHJ2GmxP4/s6y6yNi5qPO3Tzr0dUUMf0MefuCzZB5GlRj02SSKR PT3wt+LCuP6EwEaSpQv24ynVWUikHAGqsynuYGksXFBg5GO9RFYxtUgpK/A6sipdD1SO /6/EG3fDIxZYWAQ7b2mc5GGR2fQ1H44MF7sd1EGg8iawrVhlWewAWhCXh79hV0BkRvwG KORA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=uX45goiu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i9-20020a17090332c900b001bb3499d8besi3815948plr.478.2023.08.11.10.59.39; Fri, 11 Aug 2023 10:59:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=uX45goiu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236496AbjHKRK7 (ORCPT + 99 others); Fri, 11 Aug 2023 13:10:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236599AbjHKRK5 (ORCPT ); Fri, 11 Aug 2023 13:10:57 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE34B35BB; Fri, 11 Aug 2023 10:10:32 -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=xOLoqjxqXJGEJKgvL6baV/KdAjhnJWawjg5bJQCGfJA=; b=uX45goiuCmbmGHwtTqGkfA1Jma K7ivZYJCl1+3LhvfO0bwkhC8ZesmNFFj3sgSAZe5PGZ9H8n4aeq6NuJ4Dd7tnzlswiiFNSk9bX+zJ dpnLTwzkvxcNjrYNQeSfXhYCnMk7PDqRrcDdNgzi6wHS+DJK0KNXvOSEs+JU1Jpoltjs=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1qUVeH-003pUR-Qc; Fri, 11 Aug 2023 19:10:05 +0200 Date: Fri, 11 Aug 2023 19:10:05 +0200 From: Andrew Lunn To: "Radu Pirea (NXP OSS)" Cc: hkallweit1@gmail.com, linux@armlinux.org.uk, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, richardcochran@gmail.com, sd@queasysnail.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC net-next v1 3/5] net: phy: nxp-c45-tja11xx add MACsec support Message-ID: <61f88d08-b741-48d0-90cb-9554907a9dec@lunn.ch> References: <20230811153249.283984-1-radu-nicolae.pirea@oss.nxp.com> <20230811153249.283984-4-radu-nicolae.pirea@oss.nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230811153249.283984-4-radu-nicolae.pirea@oss.nxp.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > +#define VEND1_MACSEC_BASE 0x9000 > + > +#define MACSEC_CFG 0x0000 > +#define MACSEC_CFG_BYPASS BIT(1) > +#define MACSEC_CFG_S0I BIT(0) > + > +#define MACSEC_TPNET 0x0044 > +static int nxp_c45_macsec_write(struct phy_device *phydev, u16 reg, u32 val) > +{ > + reg = reg / 2; That is a bit odd. How does the data sheet describe these registers. e.g. MACSEC_TPNET. Does it say 0x9022 and 0x9023? It seems it would be easy to mix this up and end up accessing 0x9011 and 0x9012. Andrew