diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2012-07-27 14:31:16 -0400 |
---|---|---|
committer | Ben Hutchings <bhutchings@solarflare.com> | 2012-08-24 15:10:18 -0400 |
commit | f16aeea0e679d5fd43fc02e99569c52d77d5e5d3 (patch) | |
tree | a22f669f90d69705f56718130744d196876b95c7 /drivers/net/ethernet/sfc/net_driver.h | |
parent | 9714284f83387d330496758e5c10a649fd9a677d (diff) |
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 { | |||
430 | #define EFX_INT_MODE_USE_MSI(x) (((x)->interrupt_mode) <= EFX_INT_MODE_MSI) | 430 | #define EFX_INT_MODE_USE_MSI(x) (((x)->interrupt_mode) <= EFX_INT_MODE_MSI) |
431 | 431 | ||
432 | enum nic_state { | 432 | enum nic_state { |
433 | STATE_INIT = 0, | 433 | STATE_UNINIT = 0, /* device being probed/removed or is frozen */ |
434 | STATE_RUNNING = 1, | 434 | STATE_READY = 1, /* hardware ready and netdev registered */ |
435 | STATE_FINI = 2, | 435 | STATE_DISABLED = 2, /* device disabled due to hardware errors */ |
436 | STATE_DISABLED = 3, | ||
437 | STATE_MAX, | ||
438 | }; | 436 | }; |
439 | 437 | ||
440 | /* | 438 | /* |
@@ -654,7 +652,7 @@ struct vfdi_status; | |||
654 | * @irq_rx_adaptive: Adaptive IRQ moderation enabled for RX event queues | 652 | * @irq_rx_adaptive: Adaptive IRQ moderation enabled for RX event queues |
655 | * @irq_rx_moderation: IRQ moderation time for RX event queues | 653 | * @irq_rx_moderation: IRQ moderation time for RX event queues |
656 | * @msg_enable: Log message enable flags | 654 | * @msg_enable: Log message enable flags |
657 | * @state: Device state flag. Serialised by the rtnl_lock. | 655 | * @state: Device state number (%STATE_*). Serialised by the rtnl_lock. |
658 | * @reset_pending: Bitmask for pending resets | 656 | * @reset_pending: Bitmask for pending resets |
659 | * @tx_queue: TX DMA queues | 657 | * @tx_queue: TX DMA queues |
660 | * @rx_queue: RX DMA queues | 658 | * @rx_queue: RX DMA queues |