All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Habets <habetsm.xilinx@gmail.com>
To: kuba@kernel.org, pabeni@redhat.com, davem@davemloft.net
Cc: netdev@vger.kernel.org, ecree.xilinx@gmail.com
Subject: [PATCH net-next 25/28] siena: Make HWMON support specific for Siena
Date: Fri, 22 Apr 2022 16:02:20 +0100	[thread overview]
Message-ID: <165063974036.27138.18446100885751511322.stgit@palantir17.mph.net> (raw)
In-Reply-To: <165063937837.27138.6911229584057659609.stgit@palantir17.mph.net>

From: Martin Habets <martinh@xilinx.com>

Add a Siena Kconfig option and use it in stead of the sfc one.

Signed-off-by: Martin Habets <habetsm.xilinx@gmail.com>
---
 drivers/net/ethernet/sfc/Kconfig          |    2 +-
 drivers/net/ethernet/sfc/siena/Kconfig    |    7 +++++++
 drivers/net/ethernet/sfc/siena/mcdi.h     |    6 +++---
 drivers/net/ethernet/sfc/siena/mcdi_mon.c |    4 ++--
 4 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/sfc/Kconfig b/drivers/net/ethernet/sfc/Kconfig
index 4c85b26279c5..dac2f09702aa 100644
--- a/drivers/net/ethernet/sfc/Kconfig
+++ b/drivers/net/ethernet/sfc/Kconfig
@@ -40,7 +40,7 @@ config SFC_MTD
 	  (e.g. /dev/mtd1).  This is required to update the firmware or
 	  the boot configuration under Linux.
 config SFC_MCDI_MON
-	bool "Solarflare SFC9000/SFC9100-family hwmon support"
+	bool "Solarflare SFC9100-family hwmon support"
 	depends on SFC && HWMON && !(SFC=y && HWMON=m)
 	default y
 	help
diff --git a/drivers/net/ethernet/sfc/siena/Kconfig b/drivers/net/ethernet/sfc/siena/Kconfig
index 26a8cb838d47..4eb6801ff3c0 100644
--- a/drivers/net/ethernet/sfc/siena/Kconfig
+++ b/drivers/net/ethernet/sfc/siena/Kconfig
@@ -18,6 +18,13 @@ config SFC_SIENA_MTD
 	  This exposes the on-board flash and/or EEPROM as MTD devices
 	  (e.g. /dev/mtd1).  This is required to update the firmware or
 	  the boot configuration under Linux.
+config SFC_SIENA_MCDI_MON
+	bool "Solarflare SFC9000-family hwmon support"
+	depends on SFC_SIENA && HWMON && !(SFC_SIENA=y && HWMON=m)
+	default y
+	help
+	  This exposes the on-board firmware-managed sensors as a
+	  hardware monitor device.
 config SFC_SIENA_SRIOV
 	bool "Solarflare SFC9000-family SR-IOV support"
 	depends on SFC_SIENA && PCI_IOV
diff --git a/drivers/net/ethernet/sfc/siena/mcdi.h b/drivers/net/ethernet/sfc/siena/mcdi.h
index 64990f398e67..03810c570a33 100644
--- a/drivers/net/ethernet/sfc/siena/mcdi.h
+++ b/drivers/net/ethernet/sfc/siena/mcdi.h
@@ -118,7 +118,7 @@ struct efx_mcdi_mtd_partition {
  */
 struct efx_mcdi_data {
 	struct efx_mcdi_iface iface;
-#ifdef CONFIG_SFC_MCDI_MON
+#ifdef CONFIG_SFC_SIENA_MCDI_MON
 	struct efx_mcdi_mon hwmon;
 #endif
 	u32 fn_flags;
@@ -130,7 +130,7 @@ static inline struct efx_mcdi_iface *efx_mcdi(struct efx_nic *efx)
 	return &efx->mcdi->iface;
 }
 
-#ifdef CONFIG_SFC_MCDI_MON
+#ifdef CONFIG_SFC_SIENA_MCDI_MON
 static inline struct efx_mcdi_mon *efx_mcdi_mon(struct efx_nic *efx)
 {
 	EFX_WARN_ON_PARANOID(!efx->mcdi);
@@ -365,7 +365,7 @@ void efx_siena_mcdi_mac_pull_stats(struct efx_nic *efx);
 enum reset_type efx_siena_mcdi_map_reset_reason(enum reset_type reason);
 int efx_siena_mcdi_reset(struct efx_nic *efx, enum reset_type method);
 
-#ifdef CONFIG_SFC_MCDI_MON
+#ifdef CONFIG_SFC_SIENA_MCDI_MON
 int efx_siena_mcdi_mon_probe(struct efx_nic *efx);
 void efx_siena_mcdi_mon_remove(struct efx_nic *efx);
 #else
diff --git a/drivers/net/ethernet/sfc/siena/mcdi_mon.c b/drivers/net/ethernet/sfc/siena/mcdi_mon.c
index d0c25dfda0d7..c7ea703c5d7a 100644
--- a/drivers/net/ethernet/sfc/siena/mcdi_mon.c
+++ b/drivers/net/ethernet/sfc/siena/mcdi_mon.c
@@ -130,7 +130,7 @@ void efx_siena_mcdi_sensor_event(struct efx_nic *efx, efx_qword_t *ev)
 		  type, name, state_txt, value, unit);
 }
 
-#ifdef CONFIG_SFC_MCDI_MON
+#ifdef CONFIG_SFC_SIENA_MCDI_MON
 
 struct efx_mcdi_mon_attribute {
 	struct device_attribute dev_attr;
@@ -528,4 +528,4 @@ void efx_siena_mcdi_mon_remove(struct efx_nic *efx)
 	efx_siena_free_buffer(efx, &hwmon->dma_buf);
 }
 
-#endif /* CONFIG_SFC_MCDI_MON */
+#endif /* CONFIG_SFC_SIENA_MCDI_MON */


  parent reply	other threads:[~2022-04-22 15:03 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-22 14:57 [PATCH linx-net 00/28]: Move Siena into a separate subdirectory Martin Habets
2022-04-22 14:57 ` [PATCH net-next 01/28] sfc: Disable Siena support Martin Habets
2022-04-22 14:57 ` [PATCH net-next 02/28] sfc: Move Siena specific files Martin Habets
2022-04-22 14:57 ` [PATCH net-next 03/28] sfc: Copy shared files needed for Siena Martin Habets
2022-04-23 13:50   ` Jakub Kicinski
2022-04-25  7:22     ` Martin Habets
2022-04-25 19:14       ` Jakub Kicinski
2022-04-26  8:41       ` Edward Cree
2022-04-27  4:47       ` Benjamin Poirier
2022-04-22 14:57 ` [PATCH net-next 04/28] sfc: Remove build references to missing functionality Martin Habets
2022-04-22 14:58 ` [PATCH net-next 05/28] sfc/siena: Rename functions in efx_common.h to avoid conflicts with sfc Martin Habets
2022-04-22 14:58 ` [PATCH net-next 06/28] sfc/siena: Rename functions in efx.h " Martin Habets
2022-04-22 14:58 ` [PATCH net-next 07/28] sfc/siena: Rename functions in efx_channels.h " Martin Habets
2022-04-22 14:58 ` [PATCH net-next 08/28] sfc/siena: Update nic.h " Martin Habets
2022-04-22 14:59 ` [PATCH net-next 09/28] sfc/siena: Remove unused functions in tx.h " Martin Habets
2022-04-22 14:59 ` [PATCH net-next 10/28] sfc/siena: Rename functions in rx_common.h " Martin Habets
2022-04-22 14:59 ` [PATCH net-next 11/28] sfc/siena: Rename functions in tx_common.h " Martin Habets
2022-04-22 14:59 ` [PATCH net-next 12/28] sfc/siena: Rename functions in selftest.h " Martin Habets
2022-04-22 14:59 ` [PATCH net-next 13/28] sfc/siena: Rename functions in ethtool_common.h " Martin Habets
2022-04-22 15:00 ` [PATCH net-next 14/28] sfc/siena: Rename functions in ptp.h " Martin Habets
2022-04-22 15:00 ` [PATCH net-next 15/28] sfc/siena: Rename functions in mcdi.h " Martin Habets
2022-04-22 15:00 ` [PATCH net-next 16/28] sfc/siena: Rename functions in mcdi_port.h " Martin Habets
2022-04-22 15:00 ` [PATCH net-next 17/28] sfc/siena: Rename functions in mcdi_port_common.h " Martin Habets
2022-04-22 15:00 ` [PATCH net-next 18/28] sfc/siena: Rename loopback_mode in net_driver.h to avoid a conflict " Martin Habets
2022-04-22 15:01 ` [PATCH net-next 19/28] sfc/siena: Rename functions in nic_common.h to avoid conflicts " Martin Habets
2022-04-22 15:01 ` [PATCH net-next 20/28] sfc/siena: Inline functions in sriov.h " Martin Habets
2022-04-22 15:01 ` [PATCH net-next 21/28] sfc: Add a basic Siena module Martin Habets
2022-04-22 15:01 ` [PATCH net-next 22/28] siena: Make the (un)load message more specific Martin Habets
2022-04-22 15:01 ` [PATCH net-next 23/28] siena: Make MTD support specific for Siena Martin Habets
2022-04-22 15:02 ` [PATCH net-next 24/28] siena: Make SRIOV " Martin Habets
2022-04-22 15:02 ` Martin Habets [this message]
2022-04-22 15:02 ` [PATCH net-next 26/28] sfc/siena: Make MCDI logging " Martin Habets
2022-04-22 15:02 ` [PATCH net-next 27/28] sfc/siena: Make PTP and reset " Martin Habets
2022-04-22 15:02 ` [PATCH net-next 28/28] sfc/siena: Reinstate SRIOV init/fini function calls Martin Habets

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=165063974036.27138.18446100885751511322.stgit@palantir17.mph.net \
    --to=habetsm.xilinx@gmail.com \
    --cc=davem@davemloft.net \
    --cc=ecree.xilinx@gmail.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.