Message ID | 50701EEC.7080805@linux.intel.com |
---|---|
State | Rejected, archived |
Delegated to: | David Miller |
Headers | show |
From: Haicheng Li <haicheng.li@linux.intel.com> Date: Sat, 06 Oct 2012 20:07:08 +0800 > The failure is due to the CONFIG_PPS is not set there, consequently > CONFIG_PTP_1588_CLOCK can not be set as =y anyway. > > So David's patch of "da1586461e53a4dd045738cce309ab488970f0ef [1/9] > pch_gbe: Fix PTP dependencies" is buggy. Furthermore, I think using > "selects" to resolve such dependency issue is not good idea as it > won't visit the dependencies. > > David, I would still suggest to take my original patch: > https://lkml.org/lkml/2012/9/28/70 > > + depends on PTP_1588_CLOCK_PCH && (PCH_GBE=m || PTP_1588_CLOCK_PCH=y) > > or simply like: This is all very rediculous if you ask me. Why should the user have to know a detail like the underlying PTP chip type just to enable PTP on his networking card? Because that is what you are making him do with your change. Select removed the necessity of the user having to know these things. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 10/06/2012 09:22 PM, David Miller wrote: > From: Haicheng Li<haicheng.li@linux.intel.com> > Date: Sat, 06 Oct 2012 20:07:08 +0800 > >> The failure is due to the CONFIG_PPS is not set there, consequently >> CONFIG_PTP_1588_CLOCK can not be set as =y anyway. >> >> So David's patch of "da1586461e53a4dd045738cce309ab488970f0ef [1/9] >> pch_gbe: Fix PTP dependencies" is buggy. Furthermore, I think using >> "selects" to resolve such dependency issue is not good idea as it >> won't visit the dependencies. >> >> David, I would still suggest to take my original patch: >> https://lkml.org/lkml/2012/9/28/70 >> >> + depends on PTP_1588_CLOCK_PCH&& (PCH_GBE=m || PTP_1588_CLOCK_PCH=y) >> >> or simply like: > > This is all very rediculous if you ask me. > > Why should the user have to know a detail like the underlying > PTP chip type just to enable PTP on his networking card? > > Because that is what you are making him do with your change. > > Select removed the necessity of the user having to know these > things. However it possibly breaks the build... IMHO, the reason why the dependency of PCH_PTP becomes so tricky is that the code of these two modules call the functions of each other (bad code structure?). To fix it neatly, either we restructure the code or just simply make it: + depends on PTP_1588_CLOCK_PCH=y For PCH_GBE=m case, it does be able to pass the build test, but I'm afraid it won't be smoothly workable via "insmod" due to the codependency of these two when PCH_PTP is enabled. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Haicheng Li <haicheng.li@linux.intel.com> Date: Sat, 06 Oct 2012 22:07:23 +0800 > On 10/06/2012 09:22 PM, David Miller wrote: >> From: Haicheng Li<haicheng.li@linux.intel.com> >> Date: Sat, 06 Oct 2012 20:07:08 +0800 >> >>> The failure is due to the CONFIG_PPS is not set there, consequently >>> CONFIG_PTP_1588_CLOCK can not be set as =y anyway. >>> >>> So David's patch of "da1586461e53a4dd045738cce309ab488970f0ef [1/9] >>> pch_gbe: Fix PTP dependencies" is buggy. Furthermore, I think using >>> "selects" to resolve such dependency issue is not good idea as it >>> won't visit the dependencies. >>> >>> David, I would still suggest to take my original patch: >>> https://lkml.org/lkml/2012/9/28/70 >>> >>> + depends on PTP_1588_CLOCK_PCH&& (PCH_GBE=m || PTP_1588_CLOCK_PCH=y) >>> >>> or simply like: >> >> This is all very rediculous if you ask me. >> >> Why should the user have to know a detail like the underlying >> PTP chip type just to enable PTP on his networking card? >> >> Because that is what you are making him do with your change. >> >> Select removed the necessity of the user having to know these >> things. > However it possibly breaks the build... > > IMHO, the reason why the dependency of PCH_PTP becomes so tricky is > that the code of these two modules call the functions of each other > (bad code structure?). To fix it neatly, either we restructure the > code or just simply make it: > + depends on PTP_1588_CLOCK_PCH=y > > For PCH_GBE=m case, it does be able to pass the build test, but I'm > afraid it won't be smoothly workable via "insmod" due to the > codependency of these two when PCH_PTP is enabled. Then why does it work for IXGBE and others who use select? -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Sat, Oct 06, 2012 at 10:07:23PM +0800, Haicheng Li wrote: > > IMHO, the reason why the dependency of PCH_PTP becomes so tricky is > that the code of these two modules call the functions of each other > (bad code structure?). Yes, that is the source of the problem. I don't recall how this habit of having the PTP option as a module got started (and I hope it wasn't me), but I think the right way to handle this option is with a simple boolean connected to ifdefs for the MAC driver. Come to think of it, it may have all started with the gianfar ptp module. In principle, the time stamping function of a MAC driver can be completely separate from the clock function, and indeed that is how the pair of gianfar drivers work. But for other hardware, it might not be practical to keep the functions separate, and in that case I would say, just keep it as one driver. Thanks, Richard PS It looks like no one is really looking after this PCH thing, so does anyone want to send me a board so I can take care of it? Let me know off list. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 10/06/2012 10:21 PM, David Miller wrote: > From: Haicheng Li<haicheng.li@linux.intel.com> > Date: Sat, 06 Oct 2012 22:07:23 +0800 > >> On 10/06/2012 09:22 PM, David Miller wrote: >>> From: Haicheng Li<haicheng.li@linux.intel.com> >>> Date: Sat, 06 Oct 2012 20:07:08 +0800 >>> >>>> The failure is due to the CONFIG_PPS is not set there, consequently >>>> CONFIG_PTP_1588_CLOCK can not be set as =y anyway. >>>> >>>> So David's patch of "da1586461e53a4dd045738cce309ab488970f0ef [1/9] >>>> pch_gbe: Fix PTP dependencies" is buggy. Furthermore, I think using >>>> "selects" to resolve such dependency issue is not good idea as it >>>> won't visit the dependencies. >>>> >>>> David, I would still suggest to take my original patch: >>>> https://lkml.org/lkml/2012/9/28/70 >>>> >>>> + depends on PTP_1588_CLOCK_PCH&& (PCH_GBE=m || PTP_1588_CLOCK_PCH=y) >>>> >>>> or simply like: >>> >>> This is all very rediculous if you ask me. >>> >>> Why should the user have to know a detail like the underlying >>> PTP chip type just to enable PTP on his networking card? >>> >>> Because that is what you are making him do with your change. >>> >>> Select removed the necessity of the user having to know these >>> things. >> However it possibly breaks the build... >> >> IMHO, the reason why the dependency of PCH_PTP becomes so tricky is >> that the code of these two modules call the functions of each other >> (bad code structure?). To fix it neatly, either we restructure the >> code or just simply make it: >> + depends on PTP_1588_CLOCK_PCH=y >> >> For PCH_GBE=m case, it does be able to pass the build test, but I'm >> afraid it won't be smoothly workable via "insmod" due to the >> codependency of these two when PCH_PTP is enabled. > > Then why does it work for IXGBE and others who use select? They explicitly select all the possible dependencies if they are bug-free (I didn't strictly check them). Take IXGBE_PTP as example, it explicitly selects PPS, and also depends on EXPERIMENTAL: config IXGBE_PTP bool "PTP Clock Support" default n depends on IXGBE && EXPERIMENTAL select PPS select PTP_1588_CLOCK So if you stick to use "select" as the convention of such build issue fixing, fengguang's build failure would be fixed by: + depends on EXPERIMENTAL + select PPS + select PTP_1588_CLOCK would you prefer this way? -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Haicheng Li <haicheng.li@linux.intel.com> Date: Sun, 07 Oct 2012 01:21:09 +0800 > Take IXGBE_PTP as example, it explicitly selects PPS, and also depends > on EXPERIMENTAL: > config IXGBE_PTP > bool "PTP Clock Support" > default n > depends on IXGBE && EXPERIMENTAL > select PPS > select PTP_1588_CLOCK > > So if you stick to use "select" as the convention of such build issue > fixing, fengguang's build failure would be fixed by: > + depends on EXPERIMENTAL > + select PPS > + select PTP_1588_CLOCK > > would you prefer this way? Yes, I would. Thanks. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/Kconfig b/drivers/net/ethernet/oki-semi/pch_gbe/Kconfig index bce0164..df1e649 100644 --- a/drivers/net/ethernet/oki-semi/pch_gbe/Kconfig +++ b/drivers/net/ethernet/oki-semi/pch_gbe/Kconfig @@ -21,12 +21,12 @@ config PCH_GBE ML7223/ML7831 is companion chip for Intel Atom E6xx series. ML7223/ML7831 is completely compatible for Intel EG20T PCH. -if PCH_GBE +if PTP_1588_CLOCK_PCH config PCH_PTP bool "PCH PTP clock support" default n - depends on PTP_1588_CLOCK_PCH + depends on PTP_1588_CLOCK_PCH=y || PCH_GBE=m ---help--- Say Y here if you want to use Precision Time Protocol (PTP) in the driver. PTP is a method to precisely synchronize distributed clocks