>-----Original Message----- >From: Andrew Lunn <and...@lunn.ch> >Sent: Thursday, November 22, 2018 8:06 PM >To: Claudiu Manoil <claudiu.man...@nxp.com> >Cc: David Miller <da...@davemloft.net>; netdev@vger.kernel.org; linux- >ker...@vger.kernel.org; Alexandru Marginean ><alexandru.margin...@nxp.com>; Catalin Horghidan ><catalin.horghi...@nxp.com> >Subject: Re: [PATCH net-next v2 1/4] enetc: Introduce basic PF and VF ENETC >ethernet drivers > >On Thu, Nov 22, 2018 at 01:06:01PM +0000, Claudiu Manoil wrote: >> >-----Original Message----- >> >From: David Miller <da...@davemloft.net> >> >Sent: Thursday, November 22, 2018 2:21 AM >> >To: Claudiu Manoil <claudiu.man...@nxp.com> >> >Cc: netdev@vger.kernel.org; linux-ker...@vger.kernel.org; Alexandru >> >Marginean <alexandru.margin...@nxp.com>; Catalin Horghidan >> ><catalin.horghi...@nxp.com> >> >Subject: Re: [PATCH net-next v2 1/4] enetc: Introduce basic PF and VF ENETC >> >ethernet drivers >> > >> >From: Claudiu Manoil <claudiu.man...@nxp.com> >> >Date: Tue, 20 Nov 2018 20:15:31 +0200 >> > >> >> diff --git a/drivers/net/ethernet/freescale/Makefile >> >b/drivers/net/ethernet/freescale/Makefile >> >> index 3b4ff08..20e5c2f9 100644 >> >> --- a/drivers/net/ethernet/freescale/Makefile >> >> +++ b/drivers/net/ethernet/freescale/Makefile >> >> @@ -23,3 +23,4 @@ obj-$(CONFIG_FSL_FMAN) += fman/ >> >> obj-$(CONFIG_FSL_DPAA_ETH) += dpaa/ >> >> >> >> obj-$(CONFIG_FSL_DPAA2_ETH) += dpaa2/ >> >> +obj-$(CONFIG_NET_VENDOR_FREESCALE) += enetc/ >> > >> >The driver enable Kconfig option should guard traversing into the >> >driver subdirectory, not the vendor enable Kconfig knob. >> >> The enetc/ dir contains 2 drivers, that share a lot of common code. >> Would you agree if I change the vendor enable with the two configs >> (one for each driver) as below? >> >> -obj-$(CONFIG_NET_VENDOR_FREESCALE) += enetc/ >> +obj-$(CONFIG_FSL_ENETC) += enetc/ >> +obj-$(CONFIG_FSL_ENETC_VF) += enetc/ > >CONFIG_NET_VENDOR_FREESCALE should hide/show all Freescale drivers. > >Once you show all Freescale drivers, there should be an option to >enable each individual driver. > >Does the ENETC_VF driver depend on the ENETC driver? If so, when >CONFIG_FSL_ENETC is enabled, the CONFIG_FSL_ENETC_VF should be >unhidden. >
The two drivers are independent as can be seen from enetc/Makefile. E.g., in a virtualized env you can have a linux instance (guest) containing only the VF driver. Sending v3 with the above mentioned change.