From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fout-a7-smtp.messagingengine.com (fout-a7-smtp.messagingengine.com [103.168.172.150]) (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 25717347510 for ; Tue, 3 Mar 2026 06:56:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.150 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772520971; cv=none; b=JzDu4YGlw51/l71KXQ3F4aghuoHDZDW5ZclQ4ntaWt78BmTmnO3WIcyZ4MEicXpo+whMFYsOP9VTVQ7UaXtEPevMIp6n95MoIsGCjtkVzRckluF/aylpzi4IMg2Fl6GPQqcpO7Gr3pqbK2MKmE3rD0/DZNqCaX1dXgqj/HX1eMg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772520971; c=relaxed/simple; bh=gZsSgXDiyew5SacrNS0KdsPWQ0y82OqwIOHffP0/Ii8=; h=MIME-Version:Date:From:To:Cc:Message-Id:In-Reply-To:References: Subject:Content-Type; b=Ps0nRQ5RIavYbzubdxalCxc8ez9nn2T9+gfviEVX8hwxaAQKaRkac6b6rKxRGzf4CmCnr3cBZ74f0Q7Ox7AEiB2jXQOEs4R8jTe+C6qOcYVk2wfk7KxItflKKIbPpfknSJKcHx2kf+UMl5UyORaagoN2YZSVM9Tf2pQPu/2EcdU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de; spf=pass smtp.mailfrom=arndb.de; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b=uFANUFgD; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=4Rko4RSX; arc=none smtp.client-ip=103.168.172.150 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arndb.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b="uFANUFgD"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="4Rko4RSX" Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfout.phl.internal (Postfix) with ESMTP id 44FBBEC0623; Tue, 3 Mar 2026 01:56:08 -0500 (EST) Received: from phl-imap-02 ([10.202.2.81]) by phl-compute-04.internal (MEProxy); Tue, 03 Mar 2026 01:56:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1772520968; x=1772607368; bh=GZsp0x4GUryaQ5lQ1Y9Mfkde3gQOtCmLV9keNVgd9Wo=; b= uFANUFgDbpEwqa2bTc8N/8R+gYjm6ksvBsZcskRhjz7S/vy/eXXiqUzkDGRi1n1I RvWzkuXKzhbmbbBGW0xj8UGcCSChw6RnxokXjaFhkkhctnaJ1bN1Icz0reaLLqBc IxLakBmKV2ghD6LSu4csOQh5niMlAAM591dEUCPfINnWEzqgYgLavYDAF4qtivkM +lJUJdxtsy/JGc4aNL7PKjaYvzyQwZ2gr/YqShtvsMKS69Smc4e4VNNiUvRW1GKo IE5nF1MlVgMr9Wqt82j7haeiAkalV54Uksiwd8PXRdp/DtTD1GwO3ztsB9Ozf7G9 rzUGQq6zCqpRe8RoH7lg7g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1772520968; x= 1772607368; bh=GZsp0x4GUryaQ5lQ1Y9Mfkde3gQOtCmLV9keNVgd9Wo=; b=4 Rko4RSXJc1jsfYC8z0FrftVUffJSvRP/QhDA2uiaJS9Jn1yGTTVwwEiOPaG0II3+ nPA0klZDv6y7+0dirsyQzO0RE86tLxEGmFeSrl41SkvK2wWJpBJA182rBZ9DGO0w ofjH3xKIuktMpxBGCXIJKttQntuiKCZVyVdiEofJpU+9tkaNzAczvpWclSRxZVhs 8bGhJ5cpoe7NyErWJaO0obKr40mKyR0w6C5GKq+sqo21XzLrzDTffzCvsOF0G2Bh lM5sX2dNP8eTIW1RuTzlRuATpBIyU3fjBXKxgA9lHiI+XL4GOIrsxLqUvM35YuTW nh7yD26l7cTRg6Z6KQ2bA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddvheelleduucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepofggfffhvfevkfgjfhfutgfgsehtjeertdertddtnecuhfhrohhmpedftehrnhgu uceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrthhtvg hrnhephfdthfdvtdefhedukeetgefggffhjeeggeetfefggfevudegudevledvkefhvdei necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghrnh gusegrrhhnuggsrdguvgdpnhgspghrtghpthhtohepfedpmhhouggvpehsmhhtphhouhht pdhrtghpthhtohepghhrvghgkhhhsehlihhnuhigfhhouhhnuggrthhiohhnrdhorhhgpd hrtghpthhtohepjhgrvhgvnhgpgihusehrvggrlhhsihhlrdgtohhmrdgtnhdprhgtphht thhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrgh X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id AFE0E700065; Tue, 3 Mar 2026 01:56:07 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ThreadId: AZk0kWerU9RB Date: Tue, 03 Mar 2026 07:55:37 +0100 From: "Arnd Bergmann" To: javen , "Greg Kroah-Hartman" Cc: linux-kernel@vger.kernel.org Message-Id: <884d151a-bbf6-4eae-92f1-d03b157a892b@app.fastmail.com> In-Reply-To: <20260303061841.1431-1-javen_xu@realsil.com.cn> References: <20260303061841.1431-1-javen_xu@realsil.com.cn> Subject: Re: [PATCH v2] rtl_pci: add support for Realtek management device Content-Type: text/plain Content-Transfer-Encoding: 7bit On Tue, Mar 3, 2026, at 07:18, javen wrote: > From: Javen Xu > > This is not the standard ethernet driver. It specially handles the > management function. > > I tried to submitted to linux/net-next before, but they said these class > didn't belong there. So I came here, and I'm wondering if these unknown > classes used for management functions should be submitted here. It depends on what the driver ends up doing. The driver you posted here does not appear to actually do anything, so it's hard to tell. > +/* > + * This module handles PCI endpoint functions exposed by Realtek > + * management controllers (e.g. RTL8111x series). It manages device > + * probing for virtual devices. > + * > + * Copyright(c) 2026 Realtek Semiconductor Corp. > + */ RTL8111x seems to refer to Ethernet controllers. > +#include > +#include > +#include > + > +#define PCI_DEVICE_ID_REALTEK_PTOU 0x8164 > +#define PCI_DEVICE_ID_REALTEK_COM1 0x816a > +#define PCI_DEVICE_ID_REALTEK_COM2 0x816b > +#define PCI_DEVICE_ID_REALTEK_IPMI 0x816c > +#define PCI_DEVICE_ID_REALTEK_BMC 0x816e > +#define PCI_DEVICE_ID_REALTEK_PCIBR 0x9151 The naming here suggests that these would be some type of PC southbridge chip, not an ethernet controller, and that they are likely devices that would each need an actual driver to communicate with the device. > +static int rtl_probe(struct pci_dev *pdev, > + const struct pci_device_id *ent) > +{ > + int rc; > + > + /* enable device (incl. PCI PM wakeup and hotplug setup) */ > + rc = pcim_enable_device(pdev); > + if (rc < 0) > + return dev_err_probe(&pdev->dev, rc, "enable failure\n"); > + > + dev_info(&pdev->dev, "enable device\n"); > + > + return rc; > +} > + > +static void rtl_remove(struct pci_dev *pdev) {} This seems to be the only part of the driver that does anything: you enable the device, but then ignore it afterwards, which seems pointless when reading the driver. Please make sure that there is enough context here that a reader can understand why this is done. Are you planning to add actual functionality later, are you just working around some unusual requirements of the hardware, or are you trying to prevent the devices from being bound to another driver? > +static int rtl_pm_suspend(struct device *device) > +{ > + return 0; > +} > + > +static int rtl_pm_resume(struct device *device) > +{ > + return 0; > +} > + > +static const struct dev_pm_ops rtl_pm_ops = { > + SYSTEM_SLEEP_PM_OPS(rtl_pm_suspend, rtl_pm_resume) > +}; These also do nothing and can likely be left out. Arnd