Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp3576004rdb; Wed, 27 Dec 2023 11:51:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IGVWI5onduo+bs5mKeBqfiHDcuKIFbq3haXT3h2zdEKQEjA+XRXM+lUEjtc0gWSxB0cUgcW X-Received: by 2002:a05:622a:491:b0:41c:baf5:b500 with SMTP id p17-20020a05622a049100b0041cbaf5b500mr14957693qtx.47.1703706690006; Wed, 27 Dec 2023 11:51:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703706689; cv=none; d=google.com; s=arc-20160816; b=VD2zJNGEd6Jl6sWX4t/PPZ7bewQpQQzXnvDN1C2d4/egjWF0YMjVGqQRzwmD026VZI ksAZUIsAgjJDLA4P5im4out2j0p9PZ+53SwTEBbP2qStlziQM3US/ApEN4QNs10whr9i WrCx8HaIa/5lqmuNeUMmrS81yZlFnapcVTxbk2oXLVJR0Mp9hN16eIgjr87/JPeFHwAP FoB57Ti1rjMmaxJhX5GtbpnvAp1sgn74m3YN36yKgJjsz9Cr/usbbMgi0bvX1DVT5pqc wxBApXe4r2icVvV1j5ZxOwLY1FvvUFT/7T+E8IG1ykENrjQhV5asujSW8cCHuPMhmWAv I/Bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=ZQV8YX8rOUM4ZWornMi1pNG+BpkRd9hjDAN9lELZU0w=; fh=Y7sDK4dAMzybLgU2e34hIo4cM3LenhoC5YveU2yhsQQ=; b=B1BjAsnBL8OnipqCCrs6Cyhi/xD355WNP5UPXGQGd/1FhEOjSiO41E/o0hysegoReH NCi9vfYaIzVL1Xs9WuJ8iyQgFxv6L6If6twQIIo+kqM91a+KrDRTocsDpUoJU+R6JzBe odINx9kZjo87T+TBj/gwwGncbiP3r3N4Z5CTmAIgTiX6aDSUk/QjibdnZHDcJP8fX6fF SL9lXEOlfIkA+hvrPqrtb2Gj2T4ur53ZKcORBOmgXlVgt8Zuyguiq+sGpkbuk5wnnwno 7+Bzw9urs0IIs0kqFsCFoTRkxpXkzStBHkFkhWsjLy6EqvtuzgDgt9WHVoafNgHjMv/q u+2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arinc9.com header.s=gm1 header.b=de58BORB; spf=pass (google.com: domain of linux-kernel+bounces-12231-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12231-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arinc9.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id f9-20020ac85d09000000b00427f62df116si188688qtx.579.2023.12.27.11.51.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Dec 2023 11:51:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-12231-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@arinc9.com header.s=gm1 header.b=de58BORB; spf=pass (google.com: domain of linux-kernel+bounces-12231-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12231-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arinc9.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id B2F3D1C22508 for ; Wed, 27 Dec 2023 19:51:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CAE7D47F52; Wed, 27 Dec 2023 19:51:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arinc9.com header.i=@arinc9.com header.b="de58BORB" X-Original-To: linux-kernel@vger.kernel.org Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) (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 075BE47776; Wed, 27 Dec 2023 19:51:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arinc9.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arinc9.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 9AD9E1C0003; Wed, 27 Dec 2023 19:51:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arinc9.com; s=gm1; t=1703706674; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZQV8YX8rOUM4ZWornMi1pNG+BpkRd9hjDAN9lELZU0w=; b=de58BORBYXHfy/2uytj3vdf2RsHJQQjor1wdt8a0I3AbXyUJRu0ImhEU/e7UJ6QtwlQPP3 F/zSvdSUpYdWvHYxOrcaHX8yhmv7ejuq41TFnZ/h0+TkqCmv4cS719NG/yzZEZgbUqS3z7 g/rbRu55JigKRp1MnNcsBjOdjkzQDhWWEjco2m1607VZGf3k8bGXSUyeHiPR4IllJvjcze EasPv28pPh2j/iW5HYRyIJHb5SU6kUFtxbt7qjLUa16EqL2Tay/S0Y9DHOXQYNAPOG+/pG 5vYsm1bPbvoSzPQdLARKDry6J74u12W1jcUUFLcGAzRB81cRYaRjGrxRkHmwSg== Message-ID: Date: Wed, 27 Dec 2023 22:51:08 +0300 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next] net: dsa: mt7530: register OF node for internal MDIO bus To: Vladimir Oltean Cc: Daniel Golle , Landen Chao , DENG Qingfang , Sean Wang , Andrew Lunn , Florian Fainelli , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno , David Bauer , mithat.guner@xeront.com, erkin.bozoglu@xeront.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org References: <20231220173539.59071-1-arinc.unal@arinc9.com> <20231220173539.59071-1-arinc.unal@arinc9.com> <20231221151607.ujobhh4aet4obxdz@skbuf> <6600c6b1-2230-4963-940c-8b95a01750fd@arinc9.com> <20231227191154.6jkqdlqdxciidpfw@skbuf> Content-Language: en-US From: =?UTF-8?B?QXLEsW7DpyDDnE5BTA==?= In-Reply-To: <20231227191154.6jkqdlqdxciidpfw@skbuf> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-GND-Sasl: arinc.unal@arinc9.com On 27.12.2023 22:11, Vladimir Oltean wrote: > On Sun, Dec 24, 2023 at 10:37:12AM +0300, Arınç ÜNAL wrote: >> If the MDIO bus of the switch is defined on the devicetree, the >> (!ds->user_mii_bus && ds->ops->phy_read) check in dsa_switch_setup will be >> true so the MDIO bus will be attempted to be registered again, resulting in >> a kernel panic. > > Where does mt7530 provide ds->ops->phy_read() in upstream? Sorry, that's a misdiagnosis from my part. There's indeed no ds->ops->phy_read() or ds->ops->phy_write(). I should know that as I have intensively studied the MDIO bus registration on all DSA subdrivers. The issue is at mt7530_setup_mdio_irq(): ds->user_mii_bus->irq[p] = irq; I didn't realise ds->user_mii_bus is also used to store irq mapping for each PHY. Should we agree that user_mii_bus is needed for all cases or make another way to store the irq mappings? Arınç