aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/mcdi_mon.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-06-19treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500Thomas Gleixner1-4/+1
Based on 2 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation # extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 4122 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Enrico Weigelt <info@metux.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-26ethernet: Use octal not symbolic permissionsJoe Perches1-1/+1
Prefer the direct use of octal for permissions. Done with checkpatch -f --types=SYMBOLIC_PERMS --fix-inplace and some typing. Miscellanea: o Whitespace neatening around these conversions. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-12-03sfc: remove EFX_BUG_ON_PARANOID, use EFX_WARN_ON_[ONCE_]PARANOID insteadEdward Cree1-2/+2
Logically, EFX_BUG_ON_PARANOID can never be correct. For, BUG_ON should only be used if it is not possible to continue without potential harm; and since the non-DEBUG driver will continue regardless (as the BUG_ON is compiled out), clearly the BUG_ON cannot be needed in the DEBUG driver. So, replace every EFX_BUG_ON_PARANOID with either an EFX_WARN_ON_PARANOID or the newly defined EFX_WARN_ON_ONCE_PARANOID. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-12sfc: Add new sensor namesBen Hutchings1-0/+3
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-12-12sfc: Revise sensor names to be more understandable and consistentEdward Cree1-23/+26
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-12-12sfc: Report units in sensor warningsEdward Cree1-4/+20
Add units to the "Sensor reports condition X for raw value Y" messages. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-11-29sfc: Convert to use hwmon_device_register_with_groupsGuenter Roeck1-48/+30
Simplify the code. Avoid race conditions caused by attributes being created after hwmon device registration. Implicitly (through hwmon API) add mandatory 'name' sysfs attribute. Reviewed-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-29sfc: Update copyright bannersBen Hutchings1-2/+2
Update the dates for files that have been added to in 2012-2013. Drop the 'Solarstorm' brand name that's still lingering here. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-08-29sfc: Add support for new board sensorsBen Hutchings1-30/+91
Add support for power and current sensors, which need to be named differently in sysfs. Power sensors also require values to be scaled between MCDI and sysfs, and have no minimum value. Add definitions of the power, current, fan, and additional temperature and voltage sensors found on SFA6902F, SFN7022F and SFN7122F. (Includes a bug fix from Andrew Jackson.) Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-08-27sfc: Use extended MC_CMD_SENSOR_INFO and MC_CMD_READ_SENSORSBen Hutchings1-44/+95
We need to use extended requests to read and get metadata for sensors numbered > 31. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-08-27sfc: Return an error code when a sensor is busy.Alexandre Rames1-1/+6
[bwh: Also name this new state, though we don't expect to see it in an event] Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-08-21sfc: Add GFP flags to efx_nic_alloc_buffer() and make most callers allow blockingBen Hutchings1-1/+1
Most call sites for efx_nic_alloc_buffer() are part of the probe or reconfiguration paths and can allocate with GFP_KERNEL. A few others should use GFP_NOIO (I think). Only one is in atomic context and must use the current GFP_ATOMIC. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-08-21sfc: Add and use MCDI_SET_QWORD() and MCDI_SET_ARRAY_QWORD()Ben Hutchings1-4/+2
No need to keep open-coding the assignment of high and low dwords. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-08-21sfc: Introduce and use MCDI_DECLARE_BUF macroBen Hutchings1-2/+2
MCDI_DECLARE_BUF declares a variable as an MCDI buffer of the requested length, adding any necessary padding. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-08-21sfc: Use efx_mcdi_mon() to find efx_mcdi_mon structure from efx_nicBen Hutchings1-2/+1
This needs to be done before we separate MCDI from siena_nic_data. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-07-19sfc: initialize dynamic sysfs attributes for lockdepMichal Schmidt1-0/+1
Dynamically allocated sysfs attributes must be initialized using sysfs_attr_init(), otherwise lockdep complains: BUG: key <address> not in .data! Signed-off-by: Michal Schmidt <mschmidt@redhat.com> Acked-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-22sfc: Minor formatting cleanupBen Hutchings1-1/+1
Fix some indentation and line continuations. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2012-01-27sfc: Add hwmon driver for boards using SFC9000-family controllersBen Hutchings1-0/+415
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>