summaryrefslogtreecommitdiff
path: root/drivers/net/sfc/net_driver.h
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2009-11-23 16:03:45 +0000
committerDavid S. Miller <davem@davemloft.net>2009-11-24 10:58:39 -0800
commit398468ed1b5c61fe8bcbc8cc1ed323e3c23b58ef (patch)
tree2c9f8932143b91d8affe388bd21d98beab7c7488 /drivers/net/sfc/net_driver.h
parentdcf477b2d205abb8ccdb3b1cb668a0db2de202c0 (diff)
sfc: Use a single blink implementation
Only some PHYs have firmware support for a LED blink mode, so we currently blink the others in a timer function. Since all PHYs have simple on and off modes, we don't gain anything by using multiple blink implementations. Also, since we have a process context there is no need to use a timer. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/net_driver.h')
-rw-r--r--drivers/net/sfc/net_driver.h18
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/net/sfc/net_driver.h b/drivers/net/sfc/net_driver.h
index bc6fb2b29664..6b05d69429ee 100644
--- a/drivers/net/sfc/net_driver.h
+++ b/drivers/net/sfc/net_driver.h
@@ -388,6 +388,12 @@ struct efx_channel {
};
+enum efx_led_mode {
+ EFX_LED_OFF = 0,
+ EFX_LED_ON = 1,
+ EFX_LED_DEFAULT = 2
+};
+
/**
* struct efx_board - board information
* @type: Board model type
@@ -395,13 +401,9 @@ struct efx_channel {
* @minor: Minor rev. (0, 1, ...)
* @init: Initialisation function
* @init_leds: Sets up board LEDs. May be called repeatedly.
- * @set_id_led: Turns the identification LED on or off
- * @blink: Starts/stops blinking
+ * @set_id_led: Set state of identifying LED or revert to automatic function
* @monitor: Board-specific health check function
* @fini: Cleanup function
- * @blink_state: Current blink state
- * @blink_resubmit: Blink timer resubmission flag
- * @blink_timer: Blink timer
* @hwmon_client: I2C client for hardware monitor
* @ioexp_client: I2C client for power/port control
*/
@@ -414,13 +416,9 @@ struct efx_board {
* have a separate init callback that happens later than
* board init. */
void (*init_leds)(struct efx_nic *efx);
- void (*set_id_led) (struct efx_nic *efx, bool state);
+ void (*set_id_led) (struct efx_nic *efx, enum efx_led_mode mode);
int (*monitor) (struct efx_nic *nic);
- void (*blink) (struct efx_nic *efx, bool start);
void (*fini) (struct efx_nic *nic);
- bool blink_state;
- bool blink_resubmit;
- struct timer_list blink_timer;
struct i2c_client *hwmon_client, *ioexp_client;
};