sfc: add tracing of MCDI commands

MCDI tracing is conditional on CONFIG_SFC_MCDI_LOGGING, which is enabled
 by default.

Each MCDI command will produce a console line like
    sfc dom🚌dev:fn ifname: MCDI RPC REQ: xxxxxxxx [yyyyyyyy...]
where xxxxxxxx etc. are the raw MCDI payload in 32-bit hex chunks.
The response will then produce a similar line with "RESP" instead of "REQ",
 and containing the MCDI response payload (if any).

Signed-off-by: Edward Cree <ecree@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Edward Cree
2015-05-27 13:13:54 +01:00
committed by David S. Miller
parent 14e1d0fa97
commit 75aba2a52d
4 changed files with 102 additions and 4 deletions

View File

@@ -58,6 +58,7 @@ enum efx_mcdi_mode {
* enabled
* @async_list: Queue of asynchronous requests
* @async_timer: Timer for asynchronous request timeout
* @logging_buffer: buffer that may be used to build MCDI tracing messages
*/
struct efx_mcdi_iface {
struct efx_nic *efx;
@@ -74,6 +75,9 @@ struct efx_mcdi_iface {
spinlock_t async_lock;
struct list_head async_list;
struct timer_list async_timer;
#ifdef CONFIG_SFC_MCDI_LOGGING
char *logging_buffer;
#endif
};
struct efx_mcdi_mon {