From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B79DE3BC671 for ; Fri, 13 Mar 2026 15:38:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773416341; cv=none; b=dinbMKTgADhTZZ/nxQc8GT8IeMob71ZLrMsc6YCX55pYAcNoIOrfM4EN8/JoZAi0BhNeIlog/zeqQKyWYV4MWnrmL94KA6iBiCtfqhbMPCpNLBCKPG+dZnMC1cxdJYHHSiC6ruZTpBKzW9VQ3/rgBF6fkTk7n0acjN/nr2Z4z7w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773416341; c=relaxed/simple; bh=6taFHZkgytK9Z293AzNZaJurmYT1xovlqM4MPRifUIw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=iQBIXnegym9LyQU7eagiC2hv3YCE8NzUXuj7XyDu2ZiObF7i+UOdKpS/y/9/NPejXKRwL0MWjsZbohyi6oi4VLmx08nGk9WDTt8mvN3LUB7TgbtMxCSpoANPDAsT2+ezciVjGNessLeVCQSLNCMoH1yBh43Uy5tVaVWS7DgVjOE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=aiernwCI; arc=none smtp.client-ip=209.85.128.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="aiernwCI" Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-48371104ffdso2308445e9.1 for ; Fri, 13 Mar 2026 08:38:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773416334; x=1774021134; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=6taFHZkgytK9Z293AzNZaJurmYT1xovlqM4MPRifUIw=; b=aiernwCIMKRduwDPIzZVYrl9nnodvl0mnL5ibRHNeWEiBVZRn2+NqftDtDW+TYtg/4 u2veDvcT3S8RloSY90AdWA4cz9tHX5xph03B8LQBhgAe0VRgCmu0j7MVRyXQM6cNwQ5w s6qiyXIbER6ZeBKKrjvFuS+pSUjsonNMpmQi/aHuItT3fwKnlVAsJLZSmEdIGqkCbgAO KbWy9TJjWpEU7LIlecFGyV4Ids4gJmBQt7xINygjGBZNZoP+bLDavOgMyeoDEjhny+HE zbf5UYY6vl/LfauGkoVjCx6WUSA1T0V6cDpMATdHhLT3hnR9mlY1ieUVWMDhF+mJjDhE eDYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773416334; x=1774021134; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6taFHZkgytK9Z293AzNZaJurmYT1xovlqM4MPRifUIw=; b=psektgF6zugOkeF/iEpvqI6RG1tyv4P4wnPYfVocOG24Yxdr0SUdGJeDdEjAzqVvJp hBI8W8MXd4dpVLgJmXBjlB3dBQ40YCHoz0tuSXR/A/uIS9I0Pf5Z9LtBammqE77QRBwi q1eA6yPWwD635WEh+MhJODJMi01N4Ub52OCoMOCxWiBXTDeAPxqIYYSVEPLKAThmkysS BIJgpZGXxrwwet3HYTXbDI6UqHMLVapJ3ojlMBs/nmGvIFIHXwxGvD37Dj1FWsF1jRU0 7dcduhp8Y6q7+mYmR5hv42d/ivtdaGkd+wfq/Nxk4NmRNNVf9cOHJby14VIrQq7mIArQ +n9w== X-Forwarded-Encrypted: i=1; AJvYcCVvVqA1vUAXK1CJH5+310uzCtwB5B/ocb0Mh2jUKM2sqEB6iPKxGcW3Oq4ltOc9vkMYdWtYnpUgCemXfuk=@vger.kernel.org X-Gm-Message-State: AOJu0YzIhUNTHCwknREdJom4R0VoDs/VOk4hTAOFmtBXdhif+Zo14Wns 9WF9lqw/tDLozxLDbMU57CV6EDbGWyR6c4ON9MwJim41W6TtkLJui6P3 X-Gm-Gg: ATEYQzzTH9WqkXh3hG9xhi49lKlV8aN7xPC4pWX491qE/Lvs+uLQA9TYx1tLFDHRVSN sWUVrUdBBcWiVKRhWfsXUl4rIXvGVYvmYMM3SPliOQUDBAsSdFnewEe4WbK1f1ouwni6TpcHllR IOWlPK1IQTREAM31bnd6hflKvs7CpBM4zsoUMdzQmrg0WGiAFQdFyltDbKG5qiOu7EbI9YBNAcT 2ojD0/1/JPD80Ny+qfst4Hr49kHYgOP6gj3XxAEQkXUQglsm9wD+5mLhk8B7pEqukWF0X4VV0H5 5NY6lL1hogOLX5W6vuYoFjsrhRFwRyvl9nBxPiWdAP2YpAJaHZv2GqnyXjrwCQpmogGNiNpqDG5 gQTejWAyY2IM4IaGJ61yzsKnGncbtEZ7HIzfptf2RTSuW/4Znp/FXQ5DATwAWyuLuwsPCIjgPS4 KIJGymytCp8sThkFd1U4PGLcin X-Received: by 2002:a05:600c:c4a5:b0:47a:94fc:d063 with SMTP id 5b1f17b1804b1-485566e820dmr29502515e9.1.1773416333527; Fri, 13 Mar 2026 08:38:53 -0700 (PDT) Received: from skbuf ([2a02:2f04:d00a:e00:9fd6:8180:3fc5:2b85]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48557a738easm29417565e9.16.2026.03.13.08.38.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Mar 2026 08:38:52 -0700 (PDT) Date: Fri, 13 Mar 2026 17:38:49 +0200 From: Vladimir Oltean To: bastien.curutchet@bootlin.com, Tristram.Ha@microchip.com Cc: Woojung.Huh@microchip.com, UNGLinuxDriver@microchip.com, andrew@lunn.ch, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, richardcochran@gmail.com, horms@kernel.org, pascal.eberhard@se.com, miquel.raynal@bootlin.com, thomas.petazzoni@bootlin.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, maxime.chevallier@bootlin.com Subject: Re: [PATCH net-next v6 1/9] net: dsa: microchip: Add support for KSZ8463 global irq Message-ID: <20260313153849.qkfzv5c2u6fepjku@skbuf> References: <0658868d-671c-46a2-8daa-26420cdd2975@bootlin.com> <20260309205401.bk5fpw6kqnmlktbu@skbuf> <20260311115356.windefb3j4kkuslg@skbuf> <20260311135610.oox5ahxcyvxkuegw@skbuf> <20260312134526.3lnifstvb5dpghrg@skbuf> 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: <20260312134526.3lnifstvb5dpghrg@skbuf> On Thu, Mar 12, 2026 at 03:45:26PM +0200, Vladimir Oltean wrote: > Thanks for the comment. I took a deeper look at the ksz_switch common > driver and I've started working on some patches. I'll return when > they're more or less ready. So if the common ksz_switch were to remain preferable, we still have the problem that it's very cluttered/abstract and impossible to follow and ensure correctness/lack of regressions for other hardware. Bastien, Tristram, I've tried to address that very particular issue by giving KSZ8463 its very own dsa_switch_ops structure, which it doesn't have to share with anyone else. I have no hardware to test, but some patches are here: https://github.com/vladimiroltean/linux/tree/ksz_separate_dsa_switch_ops Do you think this would be useful? For now I've created a common ksz8_setup(), but it can be further split into whatever granularity is required for ksz8463 to have its own IRQ domain operations. One could conceivable walk this alternative route of having independent per-family dsa_switch_ops and only call ksz_common.c when something is truly common ad infinitum. We could use it to get rid of dev->info->regs[], dev->info->xmii_ctrl1, etc. We could further give ksz8463 a separate ksz_ptp_clock_register() implementation with different PTP operations, to address Bastien's concern. I stopped at only 19 patches though :-/ What do you think, is this direction something worth exploring? Does it help with the PTP IRQ differences here?