Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2152396ybt; Sun, 21 Jun 2020 10:37:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyHnHalw8bPFe1N+idaDnfD8At7eDqjjQHrqGJprzN1y6Q08KOgMNg8NHFihBcGQEA7qAFW X-Received: by 2002:a50:e8c6:: with SMTP id l6mr13055200edn.276.1592761052811; Sun, 21 Jun 2020 10:37:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592761052; cv=none; d=google.com; s=arc-20160816; b=z7ThnRWFdaIJE6h/WWDgwT/VZYH0pMP/Qe0HQSm55Hb7rl0HbMgaC7s5+1SUymzlmO xkP5px/JHTjUlpxmvHT5VH9LTw/qMN0NJZ7wT35yYMI2TyLT7dHXphW8xhhMMMSG8gaB x5mk6cgk/y7hZz3+6N2Ehf9E+UdpS2pqmNUEHWm676Wtsl+29qOnLPhYK+/5QKVq1ZQq SLU1IRF6gh7kyrU3KZ2+kzHsW6DwWf09oxbAc1mQ1sx+l+MvTbSb6e9eQP7miNmpLcSo TYsj6/7Sci0EKxZ5nMgSMyk4Buk5Xvf8g3ZfXmEU4tc0O8xggav7e7oJW42C5wk3gMnC VbWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version; bh=WfCWSnpuChV5MIowSGIA1zU+uVPadiLMXNLWqGmTgKs=; b=KkBricirk6ACSLN21R98eCBkNN+a2Bhf38ONhrEQMXONLJhF1aOSz0QYg78Y26SlMB HQJ83/vhGZMeEtqqUeClZUzU9JEJ+OfZOMYfJ9X5t0e+bnlAJU5CNIDbLm6zlZyNGN3E NSLTlCWYOzLQkvTIhd12VT9mzwAL1OITbO7BlHNVGEHGQGpeywMStOT0Ce304i5T57qN PFBF04SRYXvZPIzppWj7Dh+5qz9XR357j3MIiNytxs52fLOMyWsFLDzBVNWurLZ4pMyX wxDD6u7H7YEpbFtraMPXEr5slOwYMH7wZroyqsJhUXPNZBLQrTNvgQflFkktpU/iCZvN 5I7Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k25si7225454eja.712.2020.06.21.10.37.09; Sun, 21 Jun 2020 10:37:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730489AbgFURf0 (ORCPT + 99 others); Sun, 21 Jun 2020 13:35:26 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:51339 "EHLO relay5-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730454AbgFURfZ (ORCPT ); Sun, 21 Jun 2020 13:35:25 -0400 Received: from webmail.gandi.net (webmail21.sd4.0x35.net [10.200.201.21]) (Authenticated sender: foss@0leil.net) by relay5-d.mail.gandi.net (Postfix) with ESMTPA id E58781C0002; Sun, 21 Jun 2020 17:35:20 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Sun, 21 Jun 2020 19:35:20 +0200 From: Quentin Schulz To: Antoine Tenart Cc: davem@davemloft.net, andrew@lunn.ch, f.fainelli@gmail.com, hkallweit1@gmail.com, richardcochran@gmail.com, alexandre.belloni@bootlin.com, UNGLinuxDriver@microchip.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, allan.nielsen@microchip.com Subject: Re: [PATCH net-next v3 6/8] net: phy: mscc: timestamping and PHC support In-Reply-To: <20200619122300.2510533-7-antoine.tenart@bootlin.com> References: <20200619122300.2510533-1-antoine.tenart@bootlin.com> <20200619122300.2510533-7-antoine.tenart@bootlin.com> Message-ID: <7520915d32e185d2ca29f085b988d55e@0leil.net> X-Sender: foss@0leil.net User-Agent: Roundcube Webmail/1.3.8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Antoine, On 2020-06-19 14:22, Antoine Tenart wrote: [...] > @@ -999,9 +1553,35 @@ int vsc8584_ptp_probe(struct phy_device *phydev) > if (!vsc8531->ptp) > return -ENOMEM; > > + mutex_init(&vsc8531->phc_lock); > mutex_init(&vsc8531->ts_lock); > > + /* Retrieve the shared load/save GPIO. Request it as non exclusive as > + * the same GPIO can be requested by all the PHYs of the same > package. > + * Ths GPIO must be used with the phc_lock taken (the lock is shared Typo + wrong lock named in the comment, instead: * This GPIO must be used with the gpio_lock taken (the lock is shared Though technically both are taken when access to the GPIO is requested AFAICT. Also on another note, maybe we could actually make vsc8531->base_addr be a part of vsc85xx_shared_private structure. We would still need to compute it to pass it to devm_phy_package_join but it can easily be returned by vsc8584_get_base_addr instead of the current void and it'd put all the things used for all PHYs in the package at the same place. Thanks, Quentin