aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/nic.h
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2012-01-06 15:25:39 -0500
committerBen Hutchings <bhutchings@solarflare.com>2012-01-26 19:10:53 -0500
commit55c5e0f85dc550f03dc8a0b0097da6af3b4865c5 (patch)
treeb6f2087958e641be791136e79912f69656391225 /drivers/net/ethernet/sfc/nic.h
parent1646a6f352a6f70fcca828589ed04797aa09d494 (diff)
sfc: Add hwmon driver for boards using SFC9000-family controllers
The SFC9000-family controllers have firmware to manage all board peripherals including temperature, heat sink continuity and voltage sensors. The firmware reports sensor alarms, which we log, and will shut down the board if necessary. Some users may want to monitor their boards more closely, so add an hwmon driver that exposes all sensors reported by the firmware. Move efx_mcdi_sensor_event() into the new file so it can share the array of sensor labels with the hwmon driver. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers/net/ethernet/sfc/nic.h')
-rw-r--r--drivers/net/ethernet/sfc/nic.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sfc/nic.h b/drivers/net/ethernet/sfc/nic.h
index a3ccd0b9d78d..905a1877d603 100644
--- a/drivers/net/ethernet/sfc/nic.h
+++ b/drivers/net/ethernet/sfc/nic.h
@@ -144,12 +144,26 @@ static inline struct falcon_board *falcon_board(struct efx_nic *efx)
144 * struct siena_nic_data - Siena NIC state 144 * struct siena_nic_data - Siena NIC state
145 * @mcdi: Management-Controller-to-Driver Interface 145 * @mcdi: Management-Controller-to-Driver Interface
146 * @wol_filter_id: Wake-on-LAN packet filter id 146 * @wol_filter_id: Wake-on-LAN packet filter id
147 * @hwmon: Hardware monitor state
147 */ 148 */
148struct siena_nic_data { 149struct siena_nic_data {
149 struct efx_mcdi_iface mcdi; 150 struct efx_mcdi_iface mcdi;
150 int wol_filter_id; 151 int wol_filter_id;
152#ifdef CONFIG_SFC_MCDI_MON
153 struct efx_mcdi_mon hwmon;
154#endif
151}; 155};
152 156
157#ifdef CONFIG_SFC_MCDI_MON
158static inline struct efx_mcdi_mon *efx_mcdi_mon(struct efx_nic *efx)
159{
160 struct siena_nic_data *nic_data;
161 EFX_BUG_ON_PARANOID(efx_nic_rev(efx) < EFX_REV_SIENA_A0);
162 nic_data = efx->nic_data;
163 return &nic_data->hwmon;
164}
165#endif
166
153extern const struct efx_nic_type falcon_a1_nic_type; 167extern const struct efx_nic_type falcon_a1_nic_type;
154extern const struct efx_nic_type falcon_b0_nic_type; 168extern const struct efx_nic_type falcon_b0_nic_type;
155extern const struct efx_nic_type siena_a0_nic_type; 169extern const struct efx_nic_type siena_a0_nic_type;