diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2012-07-27 19:31:16 +0100 |
---|---|---|
committer | Ben Hutchings <bhutchings@solarflare.com> | 2012-08-24 20:10:18 +0100 |
commit | f16aeea0e679d5fd43fc02e99569c52d77d5e5d3 (patch) | |
tree | a22f669f90d69705f56718130744d196876b95c7 /drivers/net/ethernet/sfc/net_driver.h | |
parent | 9714284f83387d330496758e5c10a649fd9a677d (diff) | |
download | linux-f16aeea0e679d5fd43fc02e99569c52d77d5e5d3.tar.gz linux-f16aeea0e679d5fd43fc02e99569c52d77d5e5d3.tar.bz2 linux-f16aeea0e679d5fd43fc02e99569c52d77d5e5d3.zip |
sfc: Change state names to be clearer, and comment them
STATE_INIT and STATE_FINI are equivalent and represent incompletely
initialised states; combine them as STATE_UNINIT.
Rename STATE_RUNNING to STATE_READY, to avoid confusion with
netif_running() and IFF_RUNNING.
The comments do not quite match current usage, but this will be
corrected in subsequent fixes.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers/net/ethernet/sfc/net_driver.h')
-rw-r--r-- | drivers/net/ethernet/sfc/net_driver.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/net/ethernet/sfc/net_driver.h b/drivers/net/ethernet/sfc/net_driver.h index a4fe9a786ef8..7ab1232494ef 100644 --- a/drivers/net/ethernet/sfc/net_driver.h +++ b/drivers/net/ethernet/sfc/net_driver.h @@ -430,11 +430,9 @@ enum efx_int_mode { #define EFX_INT_MODE_USE_MSI(x) (((x)->interrupt_mode) <= EFX_INT_MODE_MSI) enum nic_state { - STATE_INIT = 0, - STATE_RUNNING = 1, - STATE_FINI = 2, - STATE_DISABLED = 3, - STATE_MAX, + STATE_UNINIT = 0, /* device being probed/removed or is frozen */ + STATE_READY = 1, /* hardware ready and netdev registered */ + STATE_DISABLED = 2, /* device disabled due to hardware errors */ }; /* @@ -654,7 +652,7 @@ struct vfdi_status; * @irq_rx_adaptive: Adaptive IRQ moderation enabled for RX event queues * @irq_rx_moderation: IRQ moderation time for RX event queues * @msg_enable: Log message enable flags - * @state: Device state flag. Serialised by the rtnl_lock. + * @state: Device state number (%STATE_*). Serialised by the rtnl_lock. * @reset_pending: Bitmask for pending resets * @tx_queue: TX DMA queues * @rx_queue: RX DMA queues |