diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2012-10-26 12:53:11 -0400 |
---|---|---|
committer | Ben Hutchings <bhutchings@solarflare.com> | 2013-08-21 15:20:41 -0400 |
commit | f76fe120d81c96fa2a17ae41f0647c963dbb43cd (patch) | |
tree | fea56210c2f51f193217473c98d9c0fc06023878 /drivers/net/ethernet | |
parent | 369327fa65f20118571643d673b90d3700166e2d (diff) |
sfc: Update and improve kernel-doc for efx_mcdi_state & efx_mcdi_iface
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/sfc/mcdi.h | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/net/ethernet/sfc/mcdi.h b/drivers/net/ethernet/sfc/mcdi.h index 0cb0d5a8b7f6..69586e02bfca 100644 --- a/drivers/net/ethernet/sfc/mcdi.h +++ b/drivers/net/ethernet/sfc/mcdi.h | |||
@@ -11,14 +11,14 @@ | |||
11 | #define EFX_MCDI_H | 11 | #define EFX_MCDI_H |
12 | 12 | ||
13 | /** | 13 | /** |
14 | * enum efx_mcdi_state | 14 | * enum efx_mcdi_state - MCDI request handling state |
15 | * @MCDI_STATE_QUIESCENT: No pending MCDI requests. If the caller holds the | 15 | * @MCDI_STATE_QUIESCENT: No pending MCDI requests. If the caller holds the |
16 | * mcdi_lock then they are able to move to MCDI_STATE_RUNNING | 16 | * mcdi @iface_lock then they are able to move to %MCDI_STATE_RUNNING |
17 | * @MCDI_STATE_RUNNING: There is an MCDI request pending. Only the thread that | 17 | * @MCDI_STATE_RUNNING: There is an MCDI request pending. Only the thread that |
18 | * moved into this state is allowed to move out of it. | 18 | * moved into this state is allowed to move out of it. |
19 | * @MCDI_STATE_COMPLETED: An MCDI request has completed, but the owning thread | 19 | * @MCDI_STATE_COMPLETED: An MCDI request has completed, but the owning thread |
20 | * has not yet consumed the result. For all other threads, equivalent to | 20 | * has not yet consumed the result. For all other threads, equivalent to |
21 | * MCDI_STATE_RUNNING. | 21 | * %MCDI_STATE_RUNNING. |
22 | */ | 22 | */ |
23 | enum efx_mcdi_state { | 23 | enum efx_mcdi_state { |
24 | MCDI_STATE_QUIESCENT, | 24 | MCDI_STATE_QUIESCENT, |
@@ -32,25 +32,23 @@ enum efx_mcdi_mode { | |||
32 | }; | 32 | }; |
33 | 33 | ||
34 | /** | 34 | /** |
35 | * struct efx_mcdi_iface | 35 | * struct efx_mcdi_iface - MCDI protocol context |
36 | * @state: Interface state. Waited for by mcdi_wq. | 36 | * @state: Request handling state. Waited for by @wq. |
37 | * @wq: Wait queue for threads waiting for state != STATE_RUNNING | ||
38 | * @iface_lock: Protects @credits, @seqno, @resprc, @resplen | ||
39 | * @mode: Poll for mcdi completion, or wait for an mcdi_event. | 37 | * @mode: Poll for mcdi completion, or wait for an mcdi_event. |
40 | * Serialised by @lock | 38 | * @wq: Wait queue for threads waiting for @state != %MCDI_STATE_RUNNING |
39 | * @iface_lock: Serialises access to all the following fields | ||
41 | * @seqno: The next sequence number to use for mcdi requests. | 40 | * @seqno: The next sequence number to use for mcdi requests. |
42 | * Serialised by @lock | ||
43 | * @credits: Number of spurious MCDI completion events allowed before we | 41 | * @credits: Number of spurious MCDI completion events allowed before we |
44 | * trigger a fatal error. Protected by @lock | 42 | * trigger a fatal error |
45 | * @resprc: Response error/success code (Linux numbering) | 43 | * @resprc: Response error/success code (Linux numbering) |
46 | * @resp_hdr_len: Response header length | 44 | * @resp_hdr_len: Response header length |
47 | * @resp_data_len: Response data (SDU or error) length | 45 | * @resp_data_len: Response data (SDU or error) length |
48 | */ | 46 | */ |
49 | struct efx_mcdi_iface { | 47 | struct efx_mcdi_iface { |
50 | atomic_t state; | 48 | atomic_t state; |
49 | enum efx_mcdi_mode mode; | ||
51 | wait_queue_head_t wq; | 50 | wait_queue_head_t wq; |
52 | spinlock_t iface_lock; | 51 | spinlock_t iface_lock; |
53 | enum efx_mcdi_mode mode; | ||
54 | unsigned int credits; | 52 | unsigned int credits; |
55 | unsigned int seqno; | 53 | unsigned int seqno; |
56 | int resprc; | 54 | int resprc; |