Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp463209lqo; Wed, 8 May 2024 05:30:40 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWjDlbjCsQ4iQUrQ9mEhGOf7TzgRfLlRwP19UPj1bnij6tMqNX8vH7aZx1rlCaa9eURxZKUm5pT9tcBts8ct4xGsplZDtvof6+Zp5Lrsg== X-Google-Smtp-Source: AGHT+IHaniSxAM6HkQ5MAM3RhLPuaSO2poRjAb00hRSDyq9sFkg34WjeYR93N3qyO28EHDoCLp8g X-Received: by 2002:a05:6a21:84:b0:1af:995f:1443 with SMTP id adf61e73a8af0-1afc8dc8625mr1984009637.60.1715171440117; Wed, 08 May 2024 05:30:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715171440; cv=pass; d=google.com; s=arc-20160816; b=Ta/IIzU7fi4hPbp3Zj5Xlwt+2tPbt8G9AoFWO4kcds/1+lxCkDLcQJFsolMg2B3eK5 ut7BS97JOB6VH2tcJnelXr81+BCD4DyScITf+4STvlMlBk9WKJtpxW7U72TzB0DkUVwi J/041kUOY2nYIMncMeyN1/U1e3u2yDYabjjb080FFktUd9MHfT0ENPA+R1Q2s6/bDaeU dBNLC7HqzrGbQI+VEmqJb819EY609/yTDfeSSyzDLR7dZYq3FLHjUlU+WhJJYlmnHxZC /9uXA+5mF+U/9witjEdZnDjIPHfhRQId4FrdgzXnDuKqtVmlGh2krQPEs2j2yFMybjbG sFLQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=G0EgRcxHPYVYNFfngVUMS5fl9BPyKfiAOc6TK4fQlus=; fh=xcGEHwqaERKcRQgf50xgy+ykk+iojKD6LK8KOEe9dHo=; b=zeZ8+WmW6hD6FHJlHuhUgNghl6QCSIeGWwsuB7Xa/WgI+vNuU4hIbhOLncPkx9F/5Q aeLh4/5NxNmxdmlv00P9Sv4sX6RGci/dnoRI0anQAuh1BFbz1EBDBJMxf5nJItrkEr1B BIaW2aRKbgqWNBczNkG5NfGv/kGT6g160OvpR4q3eVrieg/MMyb+aEdz0C/sO0w+3ymA lLLif9+sW1F6uxKaeZPQ5zvf7NRQQwH7Wvftc3YJYOCN4mUVv0NJ3bCSzow5S9mHxlDT jHLAggLEV/Crhs+Eiwp/YCs444r/v3L2U2eA5nClAUfJ/dUZ4xVLCwWb85hMhbk/Dhi/ hGaw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=YsDzDW2A; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-173213-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173213-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id c135-20020a63358d000000b0061a13c69033si12068085pga.740.2024.05.08.05.30.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 05:30:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-173213-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=YsDzDW2A; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-173213-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173213-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id B11292844BE for ; Wed, 8 May 2024 12:30:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E49EA42062; Wed, 8 May 2024 12:30:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="YsDzDW2A" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C069B8F40; Wed, 8 May 2024 12:30:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715171431; cv=none; b=RBuunDDeoToDdjsEi2uQ7qFPCe08SKfpR4gD2Z1zB6IqQzCnRX7St4PqghdedzBCKjqe4QQYNSniP26KOQ4hxmKsuYZ5VsFwHEPUkHehS3yc5TFmSMTHFDXUMpvfNOPn1az517okh2RxXS2iIVAbs2v8nwf+8Ebm0RPry/aH4IM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715171431; c=relaxed/simple; bh=n2zx+VkOi/JkKFYVmWoia6SLsAL7lL33lDj+4RPAed4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=bzDniAVO2SIR5uomY3CT0z70HhIfT0eKgl13Jpq/0h1+0ph6U4w3/kdIACOjYj3MUm0LRx8H4U9gopSbQz9BdYCN9VFG8UAfcbZxFciO+f8AP0HgRAoa7mQ0HrGRP8uTIurikYCKdi3O0yfW/FBZHLywBilH2HGzc56ZSaI+vSk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=YsDzDW2A; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch 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=G0EgRcxHPYVYNFfngVUMS5fl9BPyKfiAOc6TK4fQlus=; b=YsDzDW2A+bVrOGPszxwm4oD4pi CO2xvST/CSj+z8fQ2InMekf0lKYl0rOLSNpPabRc0iChULUg45TXtjH4aLhJ3C5vaTqfcSX7QLZu/ x0TCY9uWV/xoOOSP0i1ui1oqWWRzq/5YpNWtL3V2Qs0hHij8xb/AoLiJ32yXWcE6Vvf0=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1s4gRB-00EwrQ-Dp; Wed, 08 May 2024 14:30:21 +0200 Date: Wed, 8 May 2024 14:30:21 +0200 From: Andrew Lunn To: SkyLake Huang =?utf-8?B?KOm7g+WVn+a+pCk=?= Cc: "linux@armlinux.org.uk" , "linux-kernel@vger.kernel.org" , "linux-mediatek@lists.infradead.org" , "linux-arm-kernel@lists.infradead.org" , "kuba@kernel.org" , "pabeni@redhat.com" , "edumazet@google.com" , "netdev@vger.kernel.org" , "dqfext@gmail.com" , Steven Liu =?utf-8?B?KOWKieS6uuixqik=?= , "matthias.bgg@gmail.com" , "davem@davemloft.net" , "hkallweit1@gmail.com" , "daniel@makrotopia.org" , "angelogioacchino.delregno@collabora.com" Subject: Re: [PATCH 3/3] net: phy: mediatek: add support for built-in 2.5G ethernet PHY on MT7988 Message-ID: <577176af-9f6c-45f9-824f-2b4ca762b2f7@lunn.ch> References: <20240425023325.15586-1-SkyLake.Huang@mediatek.com> <20240425023325.15586-4-SkyLake.Huang@mediatek.com> <4ccd437ee744382a8483ffe71d06cd495dacec71.camel@mediatek.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4ccd437ee744382a8483ffe71d06cd495dacec71.camel@mediatek.com> > > > +ret = request_firmware(&fw, MT7988_2P5GE_PMB, dev); > > > +if (ret) { > > > +dev_err(dev, "failed to load firmware: %s, ret: %d\n", > > > +MT7988_2P5GE_PMB, ret); > > > +return ret; > > > +} > > > > This will block for userspace while holding phydev->lock and the > > RTNL. > > That blocks much of the networking APIs, which is not a good idea. If > > you have a number of these PHYs, then the RTNL will serialise the > > loading of firmware. > > > I'm not sure I really get this. MT7988's internal 2.5Gphy is built > inside SoC. We won't have a number of these PHYs. How long does firmware download take? If you are holding RTNL you are blocking all other network configuration. How many Ethernets does this device have? If it is just one, it is not too bad, but if there is a built in switch, you cannot be configuring that switch at the same time firmware download is happening... Andrew