From: "Arnd Bergmann" <arnd@arndb.de>
To: javen <javen_xu@realsil.com.cn>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] rtl_pci: add support for Realtek management device
Date: Tue, 03 Mar 2026 07:55:37 +0100 [thread overview]
Message-ID: <884d151a-bbf6-4eae-92f1-d03b157a892b@app.fastmail.com> (raw)
In-Reply-To: <20260303061841.1431-1-javen_xu@realsil.com.cn>
On Tue, Mar 3, 2026, at 07:18, javen wrote:
> From: Javen Xu <javen_xu@realsil.com.cn>
>
> 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 <linux/module.h>
> +#include <linux/pci.h>
> +#include <linux/init.h>
> +
> +#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
next prev parent reply other threads:[~2026-03-03 6:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-03 6:18 javen
2026-03-03 6:55 ` Arnd Bergmann [this message]
2026-03-05 11:58 ` kernel test robot
2026-03-06 9:05 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=884d151a-bbf6-4eae-92f1-d03b157a892b@app.fastmail.com \
--to=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=javen_xu@realsil.com.cn \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox