RE: [patch v1] drivers/platform/x86: introduce support for Mellanox hotplug driver

2016-10-06 Thread Vadim Pasternak


> -Original Message-
> From: Darren Hart [mailto:dvh...@infradead.org]
> Sent: Thursday, September 29, 2016 1:14 AM
> To: Vadim Pasternak 
> Cc: da...@davemloft.net; ge...@linux-m68k.org; akpm@linux-
> foundation.org; kv...@codeaurora.org; gre...@linuxfoundation.org;
> mche...@kernel.org; li...@roeck-us.net; linux-kernel@vger.kernel.org;
> platform-driver-...@vger.kernel.org; j...@resnulli.us; Rafael Wysocki
> 
> Subject: Re: [patch v1] drivers/platform/x86: introduce support for Mellanox
> hotplug driver
> 
> On Thu, Sep 22, 2016 at 01:14:27PM +, vad...@mellanox.com wrote:
> > From: Vadim Pasternak 
> >
> 
> Hi Vadim,

Hi Darren,

Thank you very much for your review.
Sorry for the delay with my reply.

> 
> > Enable system support for the Mellanox Technologies hotplug platform
> > driver, which provides support for the next Mellanox basic systems:
> > "msx6710", "msx6720", "msb7700", "msn2700", "msx1410", "msn2410",
> > "msb7800", "msn2740", "msn2100" and also various number of derivative
> > systems from the above basic types.
> 
> Some context for those reviewing the code and not familiar with your product
> line will help establish context. Those appear to be a mix of Infiniband and
> Ethernet switches, typically with dual power supplies, and an x86 processor.
> 
> Correct?

Yes, we have Ethernet and InfiniBand systems, currently based on Mellanox AISCs 
SwitchX (36 40G Ethernet or 40/56G IB ports), SwitchX-2 (same as previous, but 
with some extra features in HW), Switch-IB/Switch-IB 2 (both 36x100G IB, last 
one with some special offloading features) , Spectrum (32x100G Ethernet, also 
supporting 50G and 25G).
The systems are equipped with I7, Celeron or ATOM processors.
New system which is about to be released will be equipped with NPS460 network 
processor (100G and 40G Ethernet port mixed).
The above systems have different port configuration (combinations of 10/40G or 
25/100G).
Typical system configuration has 4 FAN drawers and 2 PSUs. Also it could be 
system with more FAN drawers.
There are also "fixed" cheaper systems, on which FANs and PSUs are not 
replicable (on such system only cable in/out signals are relevant).

> 
> > This driver handles hot-plug events for the power suppliers, power
> > cables and fans for the above systems.
> >
> > The Kconfig currently controlling compilation of this code is:
> > driver/platform/x86:config MLX_CPLD_PLATFORM
> >tristate "Mellanox platform hotplug driver support"
> 
> Regarding location and approach. Greg KH asked if there was another to
> paramaterize the driver, such as ACPI. You mentioned you didn't have it. I was
> curious to know - did you mean you that the Mellanox switch platform firmware
> does not use ACPI at all or that you didn't have any ACPI description for this
> hardware?

All the mentioned systems unfortunately don't use ACPI.
For new coming 200G systems we consider system support by BMC SoC (current 
system are not equipped with BMC).
 
> 
> If you use ACPI on the platform, the ACPI _DSD mechanism can provide you with
> these sorts of properties, allowing you to describe the platform fully to the
> driver without the need for platform specific drivers.

I suppose we will support _DSD on future systems (in case some of them will be 
not equipped with BMC SoC).

> 
> +Rafael
> 
> Is there a user of this platform driver coming?
> 


Yes, this is another new module mlx-platform.

> >
> > Signed-off-by: Vadim Pasternak 
> 
> > ---
> >  MAINTAINERS   |   7 +
> >  drivers/platform/x86/Kconfig  |  10 +
> >  drivers/platform/x86/Makefile |   1 +
> >  drivers/platform/x86/mlxcpld-hotplug.c| 543
> ++
> >  include/linux/platform_data/mlxcpld-hotplug.h |  90 +
> >  5 files changed, 651 insertions(+)
> >  create mode 100644 drivers/platform/x86/mlxcpld-hotplug.c
> >  create mode 100644 include/linux/platform_data/mlxcpld-hotplug.h
> >
> > diff --git a/MAINTAINERS b/MAINTAINERS index a306795..cbfe2a8 100644
> > --- a/MAINTAINERS
> > +++ b/MAINTAINERS
> > @@ -7649,6 +7649,13 @@ W:   http://www.mellanox.com
> >  Q: http://patchwork.ozlabs.org/project/netdev/list/
> >  F: drivers/net/ethernet/mellanox/mlxsw/
> >
> > +MELLANOX MLX CPLD HOTPLUG DRIVER
> > +M: Vadim Pasternak 
> > +L: platform-driver-...@vger.kernel.org
> > +S: Supported
> > +F: drivers/platform/x86/mlxcpld-hotplug.c
> > +F: include/linux/platform_data/mlxcpld-hotplug.h
> >

Re: [patch v1] drivers/platform/x86: introduce support for Mellanox hotplug driver

2016-09-28 Thread Darren Hart
On Thu, Sep 22, 2016 at 01:14:27PM +, vad...@mellanox.com wrote:
> From: Vadim Pasternak 
> 

Hi Vadim,

> Enable system support for the Mellanox Technologies hotplug platform
> driver, which provides support for the next Mellanox basic systems:
> "msx6710", "msx6720", "msb7700", "msn2700", "msx1410", "msn2410",
> "msb7800", "msn2740", "msn2100" and also various number of derivative
> systems from the above basic types.

Some context for those reviewing the code and not familiar with your product
line will help establish context. Those appear to be a mix of Infiniband and
Ethernet switches, typically with dual power supplies, and an x86 processor.

Correct?

> This driver handles hot-plug events for the power suppliers, power
> cables and fans for the above systems.
> 
> The Kconfig currently controlling compilation of this code is:
> driver/platform/x86:config MLX_CPLD_PLATFORM
>tristate "Mellanox platform hotplug driver support"

Regarding location and approach. Greg KH asked if there was another to
paramaterize the driver, such as ACPI. You mentioned you didn't have it. I was
curious to know - did you mean you that the Mellanox switch platform firmware
does not use ACPI at all or that you didn't have any ACPI description for this
hardware?

If you use ACPI on the platform, the ACPI _DSD mechanism can provide you with
these sorts of properties, allowing you to describe the platform fully to the
driver without the need for platform specific drivers.

+Rafael

Is there a user of this platform driver coming?

> 
> Signed-off-by: Vadim Pasternak 

> ---
>  MAINTAINERS   |   7 +
>  drivers/platform/x86/Kconfig  |  10 +
>  drivers/platform/x86/Makefile |   1 +
>  drivers/platform/x86/mlxcpld-hotplug.c| 543 
> ++
>  include/linux/platform_data/mlxcpld-hotplug.h |  90 +
>  5 files changed, 651 insertions(+)
>  create mode 100644 drivers/platform/x86/mlxcpld-hotplug.c
>  create mode 100644 include/linux/platform_data/mlxcpld-hotplug.h
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index a306795..cbfe2a8 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -7649,6 +7649,13 @@ W: http://www.mellanox.com
>  Q:   http://patchwork.ozlabs.org/project/netdev/list/
>  F:   drivers/net/ethernet/mellanox/mlxsw/
>  
> +MELLANOX MLX CPLD HOTPLUG DRIVER
> +M:   Vadim Pasternak 
> +L:   platform-driver-...@vger.kernel.org
> +S:   Supported
> +F:   drivers/platform/x86/mlxcpld-hotplug.c
> +F:   include/linux/platform_data/mlxcpld-hotplug.h
> +
>  SOFT-ROCE DRIVER (rxe)
>  M:   Moni Shoua 
>  L:   linux-r...@vger.kernel.org
> diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
> index 81b8dcc..e9be541 100644
> --- a/drivers/platform/x86/Kconfig
> +++ b/drivers/platform/x86/Kconfig
> @@ -1026,4 +1026,14 @@ config INTEL_TELEMETRY
> used to get various SoC events and parameters
> directly via debugfs files. Various tools may use
> this interface for SoC state monitoring.
> +
> +config MLX_CPLD_PLATFORM
> +tristate "Mellanox platform hotplug driver support"
> +default n

Please be consistent with whitespace usage with what is in the file and indent
with tabs.

> + depends on MLX_PLATFORM
> + select I2C
> +---help---
> +   This driver handles hot-plug events for the power suppliers, power
> +   cables and fans on the wide range Mellanox IB and Ethernet systems.
> +
>  endif # X86_PLATFORM_DEVICES
> diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile
> index 2efa86d..1f06b63 100644
> --- a/drivers/platform/x86/Makefile
> +++ b/drivers/platform/x86/Makefile
> @@ -71,3 +71,4 @@ obj-$(CONFIG_INTEL_TELEMETRY)   += 
> intel_telemetry_core.o \
>  intel_telemetry_pltdrv.o \
>  intel_telemetry_debugfs.o
>  obj-$(CONFIG_INTEL_PMC_CORE)+= intel_pmc_core.o
> +obj-$(CONFIG_MLX_CPLD_PLATFORM)  += mlxcpld-hotplug.o
> diff --git a/drivers/platform/x86/mlxcpld-hotplug.c 
> b/drivers/platform/x86/mlxcpld-hotplug.c
> new file mode 100644
> index 000..d53d845
> --- /dev/null
> +++ b/drivers/platform/x86/mlxcpld-hotplug.c
> @@ -0,0 +1,543 @@
> +/*
> + * drivers/platform/x86/mlxcpld-hotplug.c
> + * Copyright (c) 2016 Mellanox Technologies. All rights reserved.
> + * Copyright (c) 2016 Vadim Pasternak 
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions are 
> met:
> + *
> + * 1. Redistributions of source code must retain the above copyright
> + *notice, this list of conditions and the following disclaimer.
> + * 2. Redistributions in binary form must reproduce the above copyright
> + *notice, this list of conditions and the following disclaimer in the
> + *documentation and/or other materials provided with the distribution.
> + * 3. 

RE: [patch v1] drivers/platform/x86: introduce support for Mellanox hotplug driver

2016-09-28 Thread Vadim Pasternak


> -Original Message-
> From: Greg KH [mailto:gre...@linuxfoundation.org]
> Sent: Wednesday, September 28, 2016 4:37 PM
> To: Vadim Pasternak 
> Cc: dvh...@infradead.org; da...@davemloft.net; ge...@linux-m68k.org;
> a...@linux-foundation.org; kv...@codeaurora.org; mche...@kernel.org;
> li...@roeck-us.net; linux-kernel@vger.kernel.org; platform-driver-
> x...@vger.kernel.org; j...@resnulli.us
> Subject: Re: [patch v1] drivers/platform/x86: introduce support for Mellanox
> hotplug driver
> 
> On Wed, Sep 28, 2016 at 12:48:37PM +, Vadim Pasternak wrote:
> >
> >
> > > -Original Message-
> > > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > > Sent: Thursday, September 22, 2016 4:53 PM
> > > To: Vadim Pasternak 
> > > Cc: dvh...@infradead.org; da...@davemloft.net; ge...@linux-m68k.org;
> > > a...@linux-foundation.org; kv...@codeaurora.org; mche...@kernel.org;
> > > li...@roeck-us.net; linux-kernel@vger.kernel.org; platform-driver-
> > > x...@vger.kernel.org; j...@resnulli.us
> > > Subject: Re: [patch v1] drivers/platform/x86: introduce support for
> > > Mellanox hotplug driver
> > >
> > > On Thu, Sep 22, 2016 at 01:50:28PM +, Vadim Pasternak wrote:
> > > >
> > > >
> > > > > -Original Message-
> > > > > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > > > > Sent: Thursday, September 22, 2016 4:43 PM
> > > > > To: Vadim Pasternak 
> > > > > Cc: dvh...@infradead.org; da...@davemloft.net;
> > > > > ge...@linux-m68k.org; a...@linux-foundation.org;
> > > > > kv...@codeaurora.org; mche...@kernel.org; li...@roeck-us.net;
> > > > > linux-kernel@vger.kernel.org; platform-driver-
> > > > > x...@vger.kernel.org; j...@resnulli.us
> > > > > Subject: Re: [patch v1] drivers/platform/x86: introduce support
> > > > > for Mellanox hotplug driver
> > > > >
> > > > > On Thu, Sep 22, 2016 at 01:01:46PM +, Vadim Pasternak wrote:
> > > > > >
> > > > > >
> > > > > > > -Original Message-
> > > > > > > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > > > > > > Sent: Thursday, September 22, 2016 3:31 PM
> > > > > > > To: Vadim Pasternak 
> > > > > > > Cc: dvh...@infradead.org; da...@davemloft.net;
> > > > > > > ge...@linux-m68k.org; a...@linux-foundation.org;
> > > > > > > kv...@codeaurora.org; mche...@kernel.org;
> > > > > > > li...@roeck-us.net; linux-kernel@vger.kernel.org;
> > > > > > > platform-driver- x...@vger.kernel.org; j...@resnulli.us
> > > > > > > Subject: Re: [patch v1] drivers/platform/x86: introduce
> > > > > > > support for Mellanox hotplug driver
> > > > > > >
> > > > > > > On Thu, Sep 22, 2016 at 01:14:27PM +,
> > > > > > > vad...@mellanox.com
> > > wrote:
> > > > > > > > From: Vadim Pasternak 
> > > > > > > >
> > > > > > > > Enable system support for the Mellanox Technologies
> > > > > > > > hotplug platform driver, which provides support for the
> > > > > > > > next Mellanox basic
> > > > > systems:
> > > > > > > > "msx6710", "msx6720", "msb7700", "msn2700", "msx1410",
> > > > > > > > "msn2410", "msb7800", "msn2740", "msn2100" and also
> > > > > > > > various number of derivative systems from the above basic types.
> > > > > > > > This driver handles hot-plug events for the power
> > > > > > > > suppliers, power cables and fans for the above systems.
> > > > > > > >
> > > > > > > > The Kconfig currently controlling compilation of this code is:
> > > > > > > > driver/platform/x86:config MLX_CPLD_PLATFORM
> > > > > > > >tristate "Mellanox platform hotplug 
> > > > > > > > driver support"
> > > > > > > >
> > > > > > > > Signed-off-by: Vadim Pasternak 
> > > > > > > > ---
> > > > > > > >  MAINTAINERS   |   7 +
> > > > > > 

Re: [patch v1] drivers/platform/x86: introduce support for Mellanox hotplug driver

2016-09-28 Thread Greg KH
On Wed, Sep 28, 2016 at 12:48:37PM +, Vadim Pasternak wrote:
> 
> 
> > -Original Message-
> > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > Sent: Thursday, September 22, 2016 4:53 PM
> > To: Vadim Pasternak 
> > Cc: dvh...@infradead.org; da...@davemloft.net; ge...@linux-m68k.org;
> > a...@linux-foundation.org; kv...@codeaurora.org; mche...@kernel.org;
> > li...@roeck-us.net; linux-kernel@vger.kernel.org; platform-driver-
> > x...@vger.kernel.org; j...@resnulli.us
> > Subject: Re: [patch v1] drivers/platform/x86: introduce support for Mellanox
> > hotplug driver
> > 
> > On Thu, Sep 22, 2016 at 01:50:28PM +, Vadim Pasternak wrote:
> > >
> > >
> > > > -Original Message-
> > > > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > > > Sent: Thursday, September 22, 2016 4:43 PM
> > > > To: Vadim Pasternak 
> > > > Cc: dvh...@infradead.org; da...@davemloft.net; ge...@linux-m68k.org;
> > > > a...@linux-foundation.org; kv...@codeaurora.org; mche...@kernel.org;
> > > > li...@roeck-us.net; linux-kernel@vger.kernel.org; platform-driver-
> > > > x...@vger.kernel.org; j...@resnulli.us
> > > > Subject: Re: [patch v1] drivers/platform/x86: introduce support for
> > > > Mellanox hotplug driver
> > > >
> > > > On Thu, Sep 22, 2016 at 01:01:46PM +, Vadim Pasternak wrote:
> > > > >
> > > > >
> > > > > > -Original Message-
> > > > > > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > > > > > Sent: Thursday, September 22, 2016 3:31 PM
> > > > > > To: Vadim Pasternak 
> > > > > > Cc: dvh...@infradead.org; da...@davemloft.net;
> > > > > > ge...@linux-m68k.org; a...@linux-foundation.org;
> > > > > > kv...@codeaurora.org; mche...@kernel.org; li...@roeck-us.net;
> > > > > > linux-kernel@vger.kernel.org; platform-driver-
> > > > > > x...@vger.kernel.org; j...@resnulli.us
> > > > > > Subject: Re: [patch v1] drivers/platform/x86: introduce support
> > > > > > for Mellanox hotplug driver
> > > > > >
> > > > > > On Thu, Sep 22, 2016 at 01:14:27PM +, vad...@mellanox.com
> > wrote:
> > > > > > > From: Vadim Pasternak 
> > > > > > >
> > > > > > > Enable system support for the Mellanox Technologies hotplug
> > > > > > > platform driver, which provides support for the next Mellanox
> > > > > > > basic
> > > > systems:
> > > > > > > "msx6710", "msx6720", "msb7700", "msn2700", "msx1410",
> > > > > > > "msn2410", "msb7800", "msn2740", "msn2100" and also various
> > > > > > > number of derivative systems from the above basic types.
> > > > > > > This driver handles hot-plug events for the power suppliers,
> > > > > > > power cables and fans for the above systems.
> > > > > > >
> > > > > > > The Kconfig currently controlling compilation of this code is:
> > > > > > > driver/platform/x86:config MLX_CPLD_PLATFORM
> > > > > > >tristate "Mellanox platform hotplug driver 
> > > > > > > support"
> > > > > > >
> > > > > > > Signed-off-by: Vadim Pasternak 
> > > > > > > ---
> > > > > > >  MAINTAINERS   |   7 +
> > > > > > >  drivers/platform/x86/Kconfig  |  10 +
> > > > > > >  drivers/platform/x86/Makefile |   1 +
> > > > > > >  drivers/platform/x86/mlxcpld-hotplug.c| 543
> > > > > > ++
> > > > > > >  include/linux/platform_data/mlxcpld-hotplug.h |  90 +
> > > > > >
> > > > > > Why do you need a platform_data .h file for a stand-alone driver?
> > > > > >
> > > > >
> > > > > I have another module mlx-platform, which is reviewed now (I also
> > > > > got a number feedbacks from you on this matter).  I want to
> > > > > activate mlxcpld-hotplug from this module.
> > > >
> > > > Ah.  Hm, I thought "platform_data" was depreciated.  Really, there
> > > > is no way to put this in acpi or device tree?  This feels so 1990's...
> > > >
> > >
> > > I can't put in ACPI, since we don't have it.
> > > Regarding device tree - I know how to do it for ARM and PPC, but I didn't 
> > > find
> > some good examples for x86.
> > > Maybe you can give me some reference for that?
> > 
> > I have no idea, sorry :(
> 
> Hi,
> 
> I'd like to kindly clarify whether the patch I sent could be applied,
> or I need to modify something?

Let the subsystem maintainer catch up with their pending patch review.

thanks,

greg k-h


RE: [patch v1] drivers/platform/x86: introduce support for Mellanox hotplug driver

2016-09-28 Thread Vadim Pasternak


> -Original Message-
> From: Greg KH [mailto:gre...@linuxfoundation.org]
> Sent: Thursday, September 22, 2016 4:53 PM
> To: Vadim Pasternak 
> Cc: dvh...@infradead.org; da...@davemloft.net; ge...@linux-m68k.org;
> a...@linux-foundation.org; kv...@codeaurora.org; mche...@kernel.org;
> li...@roeck-us.net; linux-kernel@vger.kernel.org; platform-driver-
> x...@vger.kernel.org; j...@resnulli.us
> Subject: Re: [patch v1] drivers/platform/x86: introduce support for Mellanox
> hotplug driver
> 
> On Thu, Sep 22, 2016 at 01:50:28PM +, Vadim Pasternak wrote:
> >
> >
> > > -Original Message-
> > > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > > Sent: Thursday, September 22, 2016 4:43 PM
> > > To: Vadim Pasternak 
> > > Cc: dvh...@infradead.org; da...@davemloft.net; ge...@linux-m68k.org;
> > > a...@linux-foundation.org; kv...@codeaurora.org; mche...@kernel.org;
> > > li...@roeck-us.net; linux-kernel@vger.kernel.org; platform-driver-
> > > x...@vger.kernel.org; j...@resnulli.us
> > > Subject: Re: [patch v1] drivers/platform/x86: introduce support for
> > > Mellanox hotplug driver
> > >
> > > On Thu, Sep 22, 2016 at 01:01:46PM +, Vadim Pasternak wrote:
> > > >
> > > >
> > > > > -Original Message-
> > > > > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > > > > Sent: Thursday, September 22, 2016 3:31 PM
> > > > > To: Vadim Pasternak 
> > > > > Cc: dvh...@infradead.org; da...@davemloft.net;
> > > > > ge...@linux-m68k.org; a...@linux-foundation.org;
> > > > > kv...@codeaurora.org; mche...@kernel.org; li...@roeck-us.net;
> > > > > linux-kernel@vger.kernel.org; platform-driver-
> > > > > x...@vger.kernel.org; j...@resnulli.us
> > > > > Subject: Re: [patch v1] drivers/platform/x86: introduce support
> > > > > for Mellanox hotplug driver
> > > > >
> > > > > On Thu, Sep 22, 2016 at 01:14:27PM +, vad...@mellanox.com
> wrote:
> > > > > > From: Vadim Pasternak 
> > > > > >
> > > > > > Enable system support for the Mellanox Technologies hotplug
> > > > > > platform driver, which provides support for the next Mellanox
> > > > > > basic
> > > systems:
> > > > > > "msx6710", "msx6720", "msb7700", "msn2700", "msx1410",
> > > > > > "msn2410", "msb7800", "msn2740", "msn2100" and also various
> > > > > > number of derivative systems from the above basic types.
> > > > > > This driver handles hot-plug events for the power suppliers,
> > > > > > power cables and fans for the above systems.
> > > > > >
> > > > > > The Kconfig currently controlling compilation of this code is:
> > > > > > driver/platform/x86:config MLX_CPLD_PLATFORM
> > > > > >tristate "Mellanox platform hotplug driver 
> > > > > > support"
> > > > > >
> > > > > > Signed-off-by: Vadim Pasternak 
> > > > > > ---
> > > > > >  MAINTAINERS   |   7 +
> > > > > >  drivers/platform/x86/Kconfig  |  10 +
> > > > > >  drivers/platform/x86/Makefile |   1 +
> > > > > >  drivers/platform/x86/mlxcpld-hotplug.c| 543
> > > > > ++
> > > > > >  include/linux/platform_data/mlxcpld-hotplug.h |  90 +
> > > > >
> > > > > Why do you need a platform_data .h file for a stand-alone driver?
> > > > >
> > > >
> > > > I have another module mlx-platform, which is reviewed now (I also
> > > > got a number feedbacks from you on this matter).  I want to
> > > > activate mlxcpld-hotplug from this module.
> > >
> > > Ah.  Hm, I thought "platform_data" was depreciated.  Really, there
> > > is no way to put this in acpi or device tree?  This feels so 1990's...
> > >
> >
> > I can't put in ACPI, since we don't have it.
> > Regarding device tree - I know how to do it for ARM and PPC, but I didn't 
> > find
> some good examples for x86.
> > Maybe you can give me some reference for that?
> 
> I have no idea, sorry :(

Hi,

I'd like to kindly clarify whether the patch I sent could be applied, or I need 
to modify something?

Best regards,
Vadim.


RE: [patch v1] drivers/platform/x86: introduce support for Mellanox hotplug driver

2016-09-22 Thread Vadim Pasternak


> -Original Message-
> From: Greg KH [mailto:gre...@linuxfoundation.org]
> Sent: Thursday, September 22, 2016 3:31 PM
> To: Vadim Pasternak 
> Cc: dvh...@infradead.org; da...@davemloft.net; ge...@linux-m68k.org;
> a...@linux-foundation.org; kv...@codeaurora.org; mche...@kernel.org;
> li...@roeck-us.net; linux-kernel@vger.kernel.org; platform-driver-
> x...@vger.kernel.org; j...@resnulli.us
> Subject: Re: [patch v1] drivers/platform/x86: introduce support for Mellanox
> hotplug driver
> 
> On Thu, Sep 22, 2016 at 01:14:27PM +, vad...@mellanox.com wrote:
> > From: Vadim Pasternak 
> >
> > Enable system support for the Mellanox Technologies hotplug platform
> > driver, which provides support for the next Mellanox basic systems:
> > "msx6710", "msx6720", "msb7700", "msn2700", "msx1410", "msn2410",
> > "msb7800", "msn2740", "msn2100" and also various number of derivative
> > systems from the above basic types.
> > This driver handles hot-plug events for the power suppliers, power
> > cables and fans for the above systems.
> >
> > The Kconfig currently controlling compilation of this code is:
> > driver/platform/x86:config MLX_CPLD_PLATFORM
> >tristate "Mellanox platform hotplug driver support"
> >
> > Signed-off-by: Vadim Pasternak 
> > ---
> >  MAINTAINERS   |   7 +
> >  drivers/platform/x86/Kconfig  |  10 +
> >  drivers/platform/x86/Makefile |   1 +
> >  drivers/platform/x86/mlxcpld-hotplug.c| 543
> ++
> >  include/linux/platform_data/mlxcpld-hotplug.h |  90 +
> 
> Why do you need a platform_data .h file for a stand-alone driver?
> 

I have another module mlx-platform, which is reviewed now (I also got a number 
feedbacks from you on this matter).
I want to activate mlxcpld-hotplug from this module. 
Like

/* Platform hotplug default data */
static struct mlxcpld_hotplug_platform_data 
mlxplat_mlxcpld_hotplug_default_data = {
 
/* Platform hotplug MSN21xx system family data*/
static struct mlxcpld_hotplug_platform_data 
mlxplat_mlxcpld_hotplug_msn21xx_data = {
...
priv->pdev_hotplug = platform_device_register_resndata(
&mlxplat_dev->dev, "mlxcpld-hotplug", -1,
mlxplat_mlxcpld_hotplug_resources,
ARRAY_SIZE(mlxplat_mlxcpld_hotplug_resources),
mlxplat_hotplug, sizeof(*mlxplat_hotplug));

But I can't add this code to mlx-platfrom, until this one is not accepted.

Thanks,

Vadim.

> thanks,
> 
> greg k-h


RE: [patch v1] drivers/platform/x86: introduce support for Mellanox hotplug driver

2016-09-22 Thread Vadim Pasternak


> -Original Message-
> From: Greg KH [mailto:gre...@linuxfoundation.org]
> Sent: Thursday, September 22, 2016 4:43 PM
> To: Vadim Pasternak 
> Cc: dvh...@infradead.org; da...@davemloft.net; ge...@linux-m68k.org;
> a...@linux-foundation.org; kv...@codeaurora.org; mche...@kernel.org;
> li...@roeck-us.net; linux-kernel@vger.kernel.org; platform-driver-
> x...@vger.kernel.org; j...@resnulli.us
> Subject: Re: [patch v1] drivers/platform/x86: introduce support for Mellanox
> hotplug driver
> 
> On Thu, Sep 22, 2016 at 01:01:46PM +, Vadim Pasternak wrote:
> >
> >
> > > -Original Message-
> > > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > > Sent: Thursday, September 22, 2016 3:31 PM
> > > To: Vadim Pasternak 
> > > Cc: dvh...@infradead.org; da...@davemloft.net; ge...@linux-m68k.org;
> > > a...@linux-foundation.org; kv...@codeaurora.org; mche...@kernel.org;
> > > li...@roeck-us.net; linux-kernel@vger.kernel.org; platform-driver-
> > > x...@vger.kernel.org; j...@resnulli.us
> > > Subject: Re: [patch v1] drivers/platform/x86: introduce support for
> > > Mellanox hotplug driver
> > >
> > > On Thu, Sep 22, 2016 at 01:14:27PM +, vad...@mellanox.com wrote:
> > > > From: Vadim Pasternak 
> > > >
> > > > Enable system support for the Mellanox Technologies hotplug
> > > > platform driver, which provides support for the next Mellanox basic
> systems:
> > > > "msx6710", "msx6720", "msb7700", "msn2700", "msx1410", "msn2410",
> > > > "msb7800", "msn2740", "msn2100" and also various number of
> > > > derivative systems from the above basic types.
> > > > This driver handles hot-plug events for the power suppliers, power
> > > > cables and fans for the above systems.
> > > >
> > > > The Kconfig currently controlling compilation of this code is:
> > > > driver/platform/x86:config MLX_CPLD_PLATFORM
> > > >tristate "Mellanox platform hotplug driver 
> > > > support"
> > > >
> > > > Signed-off-by: Vadim Pasternak 
> > > > ---
> > > >  MAINTAINERS   |   7 +
> > > >  drivers/platform/x86/Kconfig  |  10 +
> > > >  drivers/platform/x86/Makefile |   1 +
> > > >  drivers/platform/x86/mlxcpld-hotplug.c| 543
> > > ++
> > > >  include/linux/platform_data/mlxcpld-hotplug.h |  90 +
> > >
> > > Why do you need a platform_data .h file for a stand-alone driver?
> > >
> >
> > I have another module mlx-platform, which is reviewed now (I also got
> > a number feedbacks from you on this matter).  I want to activate
> > mlxcpld-hotplug from this module.
> 
> Ah.  Hm, I thought "platform_data" was depreciated.  Really, there is no way 
> to
> put this in acpi or device tree?  This feels so 1990's...
> 

I can't put in ACPI, since we don't have it.
Regarding device tree - I know how to do it for ARM and PPC, but I didn't find 
some good examples for x86. 
Maybe you can give me some reference for that?

Thanks,
Vadim.

> thanks,
> 
> greg k-h


RE: [patch v1] drivers/platform/x86: introduce support for Mellanox hotplug driver

2016-09-22 Thread Vadim Pasternak


> -Original Message-
> From: Greg KH [mailto:gre...@linuxfoundation.org]
> Sent: Thursday, September 22, 2016 4:53 PM
> To: Vadim Pasternak 
> Cc: dvh...@infradead.org; da...@davemloft.net; ge...@linux-m68k.org;
> a...@linux-foundation.org; kv...@codeaurora.org; mche...@kernel.org;
> li...@roeck-us.net; linux-kernel@vger.kernel.org; platform-driver-
> x...@vger.kernel.org; j...@resnulli.us
> Subject: Re: [patch v1] drivers/platform/x86: introduce support for Mellanox
> hotplug driver
> 
> On Thu, Sep 22, 2016 at 01:50:28PM +, Vadim Pasternak wrote:
> >
> >
> > > -Original Message-
> > > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > > Sent: Thursday, September 22, 2016 4:43 PM
> > > To: Vadim Pasternak 
> > > Cc: dvh...@infradead.org; da...@davemloft.net; ge...@linux-m68k.org;
> > > a...@linux-foundation.org; kv...@codeaurora.org; mche...@kernel.org;
> > > li...@roeck-us.net; linux-kernel@vger.kernel.org; platform-driver-
> > > x...@vger.kernel.org; j...@resnulli.us
> > > Subject: Re: [patch v1] drivers/platform/x86: introduce support for
> > > Mellanox hotplug driver
> > >
> > > On Thu, Sep 22, 2016 at 01:01:46PM +, Vadim Pasternak wrote:
> > > >
> > > >
> > > > > -Original Message-
> > > > > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > > > > Sent: Thursday, September 22, 2016 3:31 PM
> > > > > To: Vadim Pasternak 
> > > > > Cc: dvh...@infradead.org; da...@davemloft.net;
> > > > > ge...@linux-m68k.org; a...@linux-foundation.org;
> > > > > kv...@codeaurora.org; mche...@kernel.org; li...@roeck-us.net;
> > > > > linux-kernel@vger.kernel.org; platform-driver-
> > > > > x...@vger.kernel.org; j...@resnulli.us
> > > > > Subject: Re: [patch v1] drivers/platform/x86: introduce support
> > > > > for Mellanox hotplug driver
> > > > >
> > > > > On Thu, Sep 22, 2016 at 01:14:27PM +, vad...@mellanox.com
> wrote:
> > > > > > From: Vadim Pasternak 
> > > > > >
> > > > > > Enable system support for the Mellanox Technologies hotplug
> > > > > > platform driver, which provides support for the next Mellanox
> > > > > > basic
> > > systems:
> > > > > > "msx6710", "msx6720", "msb7700", "msn2700", "msx1410",
> > > > > > "msn2410", "msb7800", "msn2740", "msn2100" and also various
> > > > > > number of derivative systems from the above basic types.
> > > > > > This driver handles hot-plug events for the power suppliers,
> > > > > > power cables and fans for the above systems.
> > > > > >
> > > > > > The Kconfig currently controlling compilation of this code is:
> > > > > > driver/platform/x86:config MLX_CPLD_PLATFORM
> > > > > >tristate "Mellanox platform hotplug driver 
> > > > > > support"
> > > > > >
> > > > > > Signed-off-by: Vadim Pasternak 
> > > > > > ---
> > > > > >  MAINTAINERS   |   7 +
> > > > > >  drivers/platform/x86/Kconfig  |  10 +
> > > > > >  drivers/platform/x86/Makefile |   1 +
> > > > > >  drivers/platform/x86/mlxcpld-hotplug.c| 543
> > > > > ++
> > > > > >  include/linux/platform_data/mlxcpld-hotplug.h |  90 +
> > > > >
> > > > > Why do you need a platform_data .h file for a stand-alone driver?
> > > > >
> > > >
> > > > I have another module mlx-platform, which is reviewed now (I also
> > > > got a number feedbacks from you on this matter).  I want to
> > > > activate mlxcpld-hotplug from this module.
> > >
> > > Ah.  Hm, I thought "platform_data" was depreciated.  Really, there
> > > is no way to put this in acpi or device tree?  This feels so 1990's...
> > >
> >
> > I can't put in ACPI, since we don't have it.
> > Regarding device tree - I know how to do it for ARM and PPC, but I didn't 
> > find
> some good examples for x86.
> > Maybe you can give me some reference for that?
> 
> I have no idea, sorry :(

I see several not so good " artificial" examples of device tree usage in x86.
And folder include/linux/platform_data/ contains about thousand files.


Re: [patch v1] drivers/platform/x86: introduce support for Mellanox hotplug driver

2016-09-22 Thread Greg KH
On Thu, Sep 22, 2016 at 01:50:28PM +, Vadim Pasternak wrote:
> 
> 
> > -Original Message-
> > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > Sent: Thursday, September 22, 2016 4:43 PM
> > To: Vadim Pasternak 
> > Cc: dvh...@infradead.org; da...@davemloft.net; ge...@linux-m68k.org;
> > a...@linux-foundation.org; kv...@codeaurora.org; mche...@kernel.org;
> > li...@roeck-us.net; linux-kernel@vger.kernel.org; platform-driver-
> > x...@vger.kernel.org; j...@resnulli.us
> > Subject: Re: [patch v1] drivers/platform/x86: introduce support for Mellanox
> > hotplug driver
> > 
> > On Thu, Sep 22, 2016 at 01:01:46PM +, Vadim Pasternak wrote:
> > >
> > >
> > > > -Original Message-
> > > > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > > > Sent: Thursday, September 22, 2016 3:31 PM
> > > > To: Vadim Pasternak 
> > > > Cc: dvh...@infradead.org; da...@davemloft.net; ge...@linux-m68k.org;
> > > > a...@linux-foundation.org; kv...@codeaurora.org; mche...@kernel.org;
> > > > li...@roeck-us.net; linux-kernel@vger.kernel.org; platform-driver-
> > > > x...@vger.kernel.org; j...@resnulli.us
> > > > Subject: Re: [patch v1] drivers/platform/x86: introduce support for
> > > > Mellanox hotplug driver
> > > >
> > > > On Thu, Sep 22, 2016 at 01:14:27PM +, vad...@mellanox.com wrote:
> > > > > From: Vadim Pasternak 
> > > > >
> > > > > Enable system support for the Mellanox Technologies hotplug
> > > > > platform driver, which provides support for the next Mellanox basic
> > systems:
> > > > > "msx6710", "msx6720", "msb7700", "msn2700", "msx1410", "msn2410",
> > > > > "msb7800", "msn2740", "msn2100" and also various number of
> > > > > derivative systems from the above basic types.
> > > > > This driver handles hot-plug events for the power suppliers, power
> > > > > cables and fans for the above systems.
> > > > >
> > > > > The Kconfig currently controlling compilation of this code is:
> > > > > driver/platform/x86:config MLX_CPLD_PLATFORM
> > > > >tristate "Mellanox platform hotplug driver 
> > > > > support"
> > > > >
> > > > > Signed-off-by: Vadim Pasternak 
> > > > > ---
> > > > >  MAINTAINERS   |   7 +
> > > > >  drivers/platform/x86/Kconfig  |  10 +
> > > > >  drivers/platform/x86/Makefile |   1 +
> > > > >  drivers/platform/x86/mlxcpld-hotplug.c| 543
> > > > ++
> > > > >  include/linux/platform_data/mlxcpld-hotplug.h |  90 +
> > > >
> > > > Why do you need a platform_data .h file for a stand-alone driver?
> > > >
> > >
> > > I have another module mlx-platform, which is reviewed now (I also got
> > > a number feedbacks from you on this matter).  I want to activate
> > > mlxcpld-hotplug from this module.
> > 
> > Ah.  Hm, I thought "platform_data" was depreciated.  Really, there is no 
> > way to
> > put this in acpi or device tree?  This feels so 1990's...
> > 
> 
> I can't put in ACPI, since we don't have it.
> Regarding device tree - I know how to do it for ARM and PPC, but I didn't 
> find some good examples for x86. 
> Maybe you can give me some reference for that?

I have no idea, sorry :(


Re: [patch v1] drivers/platform/x86: introduce support for Mellanox hotplug driver

2016-09-22 Thread Greg KH
On Thu, Sep 22, 2016 at 01:01:46PM +, Vadim Pasternak wrote:
> 
> 
> > -Original Message-
> > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > Sent: Thursday, September 22, 2016 3:31 PM
> > To: Vadim Pasternak 
> > Cc: dvh...@infradead.org; da...@davemloft.net; ge...@linux-m68k.org;
> > a...@linux-foundation.org; kv...@codeaurora.org; mche...@kernel.org;
> > li...@roeck-us.net; linux-kernel@vger.kernel.org; platform-driver-
> > x...@vger.kernel.org; j...@resnulli.us
> > Subject: Re: [patch v1] drivers/platform/x86: introduce support for Mellanox
> > hotplug driver
> > 
> > On Thu, Sep 22, 2016 at 01:14:27PM +, vad...@mellanox.com wrote:
> > > From: Vadim Pasternak 
> > >
> > > Enable system support for the Mellanox Technologies hotplug platform
> > > driver, which provides support for the next Mellanox basic systems:
> > > "msx6710", "msx6720", "msb7700", "msn2700", "msx1410", "msn2410",
> > > "msb7800", "msn2740", "msn2100" and also various number of derivative
> > > systems from the above basic types.
> > > This driver handles hot-plug events for the power suppliers, power
> > > cables and fans for the above systems.
> > >
> > > The Kconfig currently controlling compilation of this code is:
> > > driver/platform/x86:config MLX_CPLD_PLATFORM
> > >tristate "Mellanox platform hotplug driver support"
> > >
> > > Signed-off-by: Vadim Pasternak 
> > > ---
> > >  MAINTAINERS   |   7 +
> > >  drivers/platform/x86/Kconfig  |  10 +
> > >  drivers/platform/x86/Makefile |   1 +
> > >  drivers/platform/x86/mlxcpld-hotplug.c| 543
> > ++
> > >  include/linux/platform_data/mlxcpld-hotplug.h |  90 +
> > 
> > Why do you need a platform_data .h file for a stand-alone driver?
> > 
> 
> I have another module mlx-platform, which is reviewed now (I also got
> a number feedbacks from you on this matter).  I want to activate
> mlxcpld-hotplug from this module. 

Ah.  Hm, I thought "platform_data" was depreciated.  Really, there is no
way to put this in acpi or device tree?  This feels so 1990's...

thanks,

greg k-h


Re: [patch v1] drivers/platform/x86: introduce support for Mellanox hotplug driver

2016-09-22 Thread Greg KH
On Thu, Sep 22, 2016 at 01:14:27PM +, vad...@mellanox.com wrote:
> From: Vadim Pasternak 
> 
> Enable system support for the Mellanox Technologies hotplug platform
> driver, which provides support for the next Mellanox basic systems:
> "msx6710", "msx6720", "msb7700", "msn2700", "msx1410", "msn2410",
> "msb7800", "msn2740", "msn2100" and also various number of derivative
> systems from the above basic types.
> This driver handles hot-plug events for the power suppliers, power
> cables and fans for the above systems.
> 
> The Kconfig currently controlling compilation of this code is:
> driver/platform/x86:config MLX_CPLD_PLATFORM
>tristate "Mellanox platform hotplug driver support"
> 
> Signed-off-by: Vadim Pasternak 
> ---
>  MAINTAINERS   |   7 +
>  drivers/platform/x86/Kconfig  |  10 +
>  drivers/platform/x86/Makefile |   1 +
>  drivers/platform/x86/mlxcpld-hotplug.c| 543 
> ++
>  include/linux/platform_data/mlxcpld-hotplug.h |  90 +

Why do you need a platform_data .h file for a stand-alone driver?

thanks,

greg k-h