All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [net-next] net/mlx5e: select CONFIG_MLXFW
@ 2017-06-28 20:10 ` Arnd Bergmann
  0 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2017-06-28 20:10 UTC (permalink / raw)
  To: Saeed Mahameed, Matan Barak, Leon Romanovsky
  Cc: Arnd Bergmann, David S. Miller, Erez Shitrit, Thomas Gleixner,
	Or Gerlitz, Christopher Covington, Ilan Tayari, Nicolas Pitre,
	netdev-u79uwXL29TY76Z2rM5mHXA, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

With the introduction of mlx5 firmware flash support, we get a link
error with CONFIG_MLXFW=m and CONFIG_MLX5_CORE=y:

drivers/net/ethernet/mellanox/mlx5/core/fw.o: In function `mlx5_firmware_flash':
fw.c:(.text+0x9d4): undefined reference to `mlxfw_firmware_flash'

We could have a more elaborate method to force MLX5 to be a loadable
module in this case, but the easiest fix seems to be to always enable
MLXFW as well, like we do for CONFIG_MLXSW_SPECTRUM, which is the other
user of mlxfw_firmware_flash.

Fixes: 3ffaabecd1a1 ("net/mlx5e: Support the flash device ethtool callback")
Signed-off-by: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
---
 drivers/net/ethernet/mellanox/mlx5/core/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/Kconfig b/drivers/net/ethernet/mellanox/mlx5/core/Kconfig
index cf1ef48bfd8d..09edee060b03 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/Kconfig
+++ b/drivers/net/ethernet/mellanox/mlx5/core/Kconfig
@@ -6,6 +6,7 @@ config MLX5_CORE
 	tristate "Mellanox Technologies ConnectX-4 and Connect-IB core driver"
 	depends on MAY_USE_DEVLINK
 	depends on PCI
+	select MLXFW
 	default n
 	---help---
 	  Core driver for low level functionality of the ConnectX-4 and
-- 
2.9.0

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] [net-next] net/mlx5e: select CONFIG_MLXFW
@ 2017-06-28 20:10 ` Arnd Bergmann
  0 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2017-06-28 20:10 UTC (permalink / raw)
  To: Saeed Mahameed, Matan Barak, Leon Romanovsky
  Cc: Arnd Bergmann, David S. Miller, Erez Shitrit, Thomas Gleixner,
	Or Gerlitz, Christopher Covington, Ilan Tayari, Nicolas Pitre,
	netdev, linux-rdma, linux-kernel

With the introduction of mlx5 firmware flash support, we get a link
error with CONFIG_MLXFW=m and CONFIG_MLX5_CORE=y:

drivers/net/ethernet/mellanox/mlx5/core/fw.o: In function `mlx5_firmware_flash':
fw.c:(.text+0x9d4): undefined reference to `mlxfw_firmware_flash'

We could have a more elaborate method to force MLX5 to be a loadable
module in this case, but the easiest fix seems to be to always enable
MLXFW as well, like we do for CONFIG_MLXSW_SPECTRUM, which is the other
user of mlxfw_firmware_flash.

Fixes: 3ffaabecd1a1 ("net/mlx5e: Support the flash device ethtool callback")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/net/ethernet/mellanox/mlx5/core/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/Kconfig b/drivers/net/ethernet/mellanox/mlx5/core/Kconfig
index cf1ef48bfd8d..09edee060b03 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/Kconfig
+++ b/drivers/net/ethernet/mellanox/mlx5/core/Kconfig
@@ -6,6 +6,7 @@ config MLX5_CORE
 	tristate "Mellanox Technologies ConnectX-4 and Connect-IB core driver"
 	depends on MAY_USE_DEVLINK
 	depends on PCI
+	select MLXFW
 	default n
 	---help---
 	  Core driver for low level functionality of the ConnectX-4 and
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] [net-next] net/mlx5e: select CONFIG_MLXFW
  2017-06-28 20:10 ` Arnd Bergmann
  (?)
@ 2017-06-29  3:47 ` Or Gerlitz
  2017-06-29  7:48   ` Arnd Bergmann
  -1 siblings, 1 reply; 4+ messages in thread
From: Or Gerlitz @ 2017-06-29  3:47 UTC (permalink / raw)
  To: Arnd Bergmann, Jakub Kicinski
  Cc: Saeed Mahameed, David S. Miller, Or Gerlitz, Nicolas Pitre,
	Linux Netdev List, linux-rdma, Linux Kernel

On Wed, Jun 28, 2017 at 11:10 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> With the introduction of mlx5 firmware flash support, we get a link
> error with CONFIG_MLXFW=m and CONFIG_MLX5_CORE=y:
>
> drivers/net/ethernet/mellanox/mlx5/core/fw.o: In function `mlx5_firmware_flash':
> fw.c:(.text+0x9d4): undefined reference to `mlxfw_firmware_flash'

Thanks Arnd, I got a report on that from Jakub but you were before me here..

> We could have a more elaborate method to force MLX5 to be a loadable
> module in this case, but the easiest fix seems to be to always enable
> MLXFW as well, like we do for CONFIG_MLXSW_SPECTRUM, which is the other
> user of mlxfw_firmware_flash.

We would not want to force mlx5 users to build mlxfw.

So lets either use the more elaborate method or maybe instead of using
IS_ENABLED in mlxfw.h use IS_REACHABLE (this was suggested by Jakub)

Or.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] [net-next] net/mlx5e: select CONFIG_MLXFW
  2017-06-29  3:47 ` Or Gerlitz
@ 2017-06-29  7:48   ` Arnd Bergmann
  0 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2017-06-29  7:48 UTC (permalink / raw)
  To: Or Gerlitz
  Cc: Jakub Kicinski, Saeed Mahameed, David S. Miller, Or Gerlitz,
	Nicolas Pitre, Linux Netdev List, linux-rdma, Linux Kernel

On Thu, Jun 29, 2017 at 5:47 AM, Or Gerlitz <gerlitz.or@gmail.com> wrote:
> On Wed, Jun 28, 2017 at 11:10 PM, Arnd Bergmann <arnd@arndb.de> wrote:
>> With the introduction of mlx5 firmware flash support, we get a link
>> error with CONFIG_MLXFW=m and CONFIG_MLX5_CORE=y:
>>
>> drivers/net/ethernet/mellanox/mlx5/core/fw.o: In function `mlx5_firmware_flash':
>> fw.c:(.text+0x9d4): undefined reference to `mlxfw_firmware_flash'
>
> Thanks Arnd, I got a report on that from Jakub but you were before me here..
>
>> We could have a more elaborate method to force MLX5 to be a loadable
>> module in this case, but the easiest fix seems to be to always enable
>> MLXFW as well, like we do for CONFIG_MLXSW_SPECTRUM, which is the other
>> user of mlxfw_firmware_flash.
>
> We would not want to force mlx5 users to build mlxfw.
>
> So lets either use the more elaborate method or maybe instead of using
> IS_ENABLED in mlxfw.h use IS_REACHABLE (this was suggested by Jakub)

Sure, that works. I generally try to avoid IS_REACHABLE(), as I find it more
confusing than adding a dependency like

           depends on MLXFW || MLXFW=n

(and yes, I was the one who introduced IS_REACHABLE() ;-) ).

      Arnd

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-06-29  7:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-28 20:10 [PATCH] [net-next] net/mlx5e: select CONFIG_MLXFW Arnd Bergmann
2017-06-28 20:10 ` Arnd Bergmann
2017-06-29  3:47 ` Or Gerlitz
2017-06-29  7:48   ` Arnd Bergmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.