]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
mlxfw: Make the module selectable
authorOr Gerlitz <ogerlitz@mellanox.com>
Tue, 6 Jun 2017 14:40:54 +0000 (17:40 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 22 Jun 2017 11:30:13 +0000 (14:30 +0300)
There are upcoming NIC (mlx5) use-cases where people want to avoid
building the mlxfw module, allow for that. The mlxsw module is
untouched and keeps selecting mlxfw.

Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Acked-by: Yotam Gigi <yotamg@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlxfw/Kconfig
drivers/net/ethernet/mellanox/mlxfw/mlxfw.h

index 2b21af8a2b1dd122ad73633c449ff3399f916168..186ebe783f97809a700538aca945fea8cee64f20 100644 (file)
@@ -3,5 +3,11 @@
 #
 
 config MLXFW
-        tristate "mlxfw" if COMPILE_TEST
+       tristate "Mellanox Technologies firmware flash module"
+       ---help---
+         This driver supports Mellanox Technologies Firmware
+         flashing common logic.
+
+         To compile this driver as a module, choose M here: the
+         module will be called mlxfw.
        select XZ_DEC
index beea4ba83495f897d7c2b3b7a0c171b5b402fe5d..9ca85383aa35e64b842b7013bcfa3d07efdd9920 100644 (file)
@@ -96,7 +96,16 @@ struct mlxfw_dev {
        u16 psid_size;
 };
 
+#if IS_ENABLED(CONFIG_MLXFW)
 int mlxfw_firmware_flash(struct mlxfw_dev *mlxfw_dev,
                         const struct firmware *firmware);
+#else
+static inline
+int mlxfw_firmware_flash(struct mlxfw_dev *mlxfw_dev,
+                        const struct firmware *firmware)
+{
+       return -EOPNOTSUPP;
+}
+#endif
 
 #endif