diff mbox series

[v5,net-next,08/13] PCI: Add NXP NETC vendor ID and device IDs

Message ID 20241024065328.521518-9-wei.fang@nxp.com
State New
Headers show
Series add basic support for i.MX95 NETC | expand

Commit Message

Wei Fang Oct. 24, 2024, 6:53 a.m. UTC
NXP NETC is a multi-function RCiEP and it contains multiple functions,
such as EMDIO, PTP Timer, ENETC PF and VF. Therefore, add these device
IDs to pci_ids.h.

Below are the device IDs and corresponding drivers.
PCI_DEVICE_ID_NXP2_ENETC_PF: nxp-enetc4
PCI_DEVICE_ID_NXP2_NETC_EMDIO: fsl-enetc-mdio
PCI_DEVICE_ID_NXP2_NETC_TIMER: ptp_netc
PCI_DEVICE_ID_NXP2_ENETC_VF: fsl-enetc-vf

Signed-off-by: Wei Fang <wei.fang@nxp.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
---
v5: no changes
---
 include/linux/pci_ids.h | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Bjorn Helgaas Oct. 24, 2024, 6:16 p.m. UTC | #1
On Thu, Oct 24, 2024 at 02:53:23PM +0800, Wei Fang wrote:
> NXP NETC is a multi-function RCiEP and it contains multiple functions,
> such as EMDIO, PTP Timer, ENETC PF and VF. Therefore, add these device
> IDs to pci_ids.h.
> 
> Below are the device IDs and corresponding drivers.
> PCI_DEVICE_ID_NXP2_ENETC_PF: nxp-enetc4
> PCI_DEVICE_ID_NXP2_NETC_EMDIO: fsl-enetc-mdio
> PCI_DEVICE_ID_NXP2_NETC_TIMER: ptp_netc
> PCI_DEVICE_ID_NXP2_ENETC_VF: fsl-enetc-vf
> 
> Signed-off-by: Wei Fang <wei.fang@nxp.com>
> Acked-by: Bjorn Helgaas <bhelgaas@google.com>

Please drop my ack.  I don't think these meet the spirit of the
guidance in pci_ids.h, which is there to minimize churn in that file
and make backports easier:

 *      Do not add new entries to this file unless the definitions
 *      are shared between multiple drivers.

PCI_DEVICE_ID_NXP2_NETC_TIMER and PCI_DEVICE_ID_NXP2_ENETC_VF aren't
used at all by this series, so they shouldn't be added to pci_ids.h.

PCI_DEVICE_ID_NXP2_NETC_EMDIO is used only by
drivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c, so it should be
defined there, not in pci_ids.h.

PCI_DEVICE_ID_NXP2_ENETC_PF is used by enetc.c and enetc4_pf.c, but
it looks like those are basically part of the same driver, and it
could be defined in enetc4_hw.h or similar.

> ---
> v5: no changes
> ---
>  include/linux/pci_ids.h | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
> index 4cf6aaed5f35..acd7ae774913 100644
> --- a/include/linux/pci_ids.h
> +++ b/include/linux/pci_ids.h
> @@ -1556,6 +1556,13 @@
>  #define PCI_DEVICE_ID_PHILIPS_SAA7146	0x7146
>  #define PCI_DEVICE_ID_PHILIPS_SAA9730	0x9730
>  
> +/* NXP has two vendor IDs, the other one is 0x1957 */
> +#define PCI_VENDOR_ID_NXP2		PCI_VENDOR_ID_PHILIPS
> +#define PCI_DEVICE_ID_NXP2_ENETC_PF	0xe101
> +#define PCI_DEVICE_ID_NXP2_NETC_EMDIO	0xee00
> +#define PCI_DEVICE_ID_NXP2_NETC_TIMER	0xee02
> +#define PCI_DEVICE_ID_NXP2_ENETC_VF	0xef00
> +
>  #define PCI_VENDOR_ID_EICON		0x1133
>  #define PCI_DEVICE_ID_EICON_DIVA20	0xe002
>  #define PCI_DEVICE_ID_EICON_DIVA20_U	0xe004
> -- 
> 2.34.1
>
Wei Fang Oct. 25, 2024, 3:13 a.m. UTC | #2
> On Thu, Oct 24, 2024 at 02:53:23PM +0800, Wei Fang wrote:
> > NXP NETC is a multi-function RCiEP and it contains multiple functions,
> > such as EMDIO, PTP Timer, ENETC PF and VF. Therefore, add these device
> > IDs to pci_ids.h.
> >
> > Below are the device IDs and corresponding drivers.
> > PCI_DEVICE_ID_NXP2_ENETC_PF: nxp-enetc4
> > PCI_DEVICE_ID_NXP2_NETC_EMDIO: fsl-enetc-mdio
> > PCI_DEVICE_ID_NXP2_NETC_TIMER: ptp_netc
> > PCI_DEVICE_ID_NXP2_ENETC_VF: fsl-enetc-vf
> >
> > Signed-off-by: Wei Fang <wei.fang@nxp.com>
> > Acked-by: Bjorn Helgaas <bhelgaas@google.com>
> 
> Please drop my ack.  I don't think these meet the spirit of the guidance in
> pci_ids.h, which is there to minimize churn in that file and make backports
> easier:
> 
>  *      Do not add new entries to this file unless the definitions
>  *      are shared between multiple drivers.
> 
> PCI_DEVICE_ID_NXP2_NETC_TIMER and PCI_DEVICE_ID_NXP2_ENETC_VF
> aren't used at all by this series, so they shouldn't be added to pci_ids.h.
> 
> PCI_DEVICE_ID_NXP2_NETC_EMDIO is used only by
> drivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c, so it should be defined
> there, not in pci_ids.h.
> 
> PCI_DEVICE_ID_NXP2_ENETC_PF is used by enetc.c and enetc4_pf.c, but it looks
> like those are basically part of the same driver, and it could be defined in
> enetc4_hw.h or similar.
> 

I was not aware of this, I will remove this patch, thanks.
diff mbox series

Patch

diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 4cf6aaed5f35..acd7ae774913 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -1556,6 +1556,13 @@ 
 #define PCI_DEVICE_ID_PHILIPS_SAA7146	0x7146
 #define PCI_DEVICE_ID_PHILIPS_SAA9730	0x9730
 
+/* NXP has two vendor IDs, the other one is 0x1957 */
+#define PCI_VENDOR_ID_NXP2		PCI_VENDOR_ID_PHILIPS
+#define PCI_DEVICE_ID_NXP2_ENETC_PF	0xe101
+#define PCI_DEVICE_ID_NXP2_NETC_EMDIO	0xee00
+#define PCI_DEVICE_ID_NXP2_NETC_TIMER	0xee02
+#define PCI_DEVICE_ID_NXP2_ENETC_VF	0xef00
+
 #define PCI_VENDOR_ID_EICON		0x1133
 #define PCI_DEVICE_ID_EICON_DIVA20	0xe002
 #define PCI_DEVICE_ID_EICON_DIVA20_U	0xe004