sfc: Log interrupt and reset type names, not numbers
Define name tables for these enumerations in a similar way as for loopback. Move the loopback name table together with them. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
f5e7adc3d4
commit
c459302db6
@ -25,6 +25,50 @@
|
||||
#include "mdio_10g.h"
|
||||
#include "falcon.h"
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* Type name strings
|
||||
*
|
||||
**************************************************************************
|
||||
*/
|
||||
|
||||
/* Loopback mode names (see LOOPBACK_MODE()) */
|
||||
const unsigned int efx_loopback_mode_max = LOOPBACK_MAX;
|
||||
const char *efx_loopback_mode_names[] = {
|
||||
[LOOPBACK_NONE] = "NONE",
|
||||
[LOOPBACK_GMAC] = "GMAC",
|
||||
[LOOPBACK_XGMII] = "XGMII",
|
||||
[LOOPBACK_XGXS] = "XGXS",
|
||||
[LOOPBACK_XAUI] = "XAUI",
|
||||
[LOOPBACK_GPHY] = "GPHY",
|
||||
[LOOPBACK_PHYXS] = "PHYXS",
|
||||
[LOOPBACK_PCS] = "PCS",
|
||||
[LOOPBACK_PMAPMD] = "PMA/PMD",
|
||||
[LOOPBACK_NETWORK] = "NETWORK",
|
||||
};
|
||||
|
||||
/* Interrupt mode names (see INT_MODE())) */
|
||||
const unsigned int efx_interrupt_mode_max = EFX_INT_MODE_MAX;
|
||||
const char *efx_interrupt_mode_names[] = {
|
||||
[EFX_INT_MODE_MSIX] = "MSI-X",
|
||||
[EFX_INT_MODE_MSI] = "MSI",
|
||||
[EFX_INT_MODE_LEGACY] = "legacy",
|
||||
};
|
||||
|
||||
const unsigned int efx_reset_type_max = RESET_TYPE_MAX;
|
||||
const char *efx_reset_type_names[] = {
|
||||
[RESET_TYPE_INVISIBLE] = "INVISIBLE",
|
||||
[RESET_TYPE_ALL] = "ALL",
|
||||
[RESET_TYPE_WORLD] = "WORLD",
|
||||
[RESET_TYPE_DISABLE] = "DISABLE",
|
||||
[RESET_TYPE_TX_WATCHDOG] = "TX_WATCHDOG",
|
||||
[RESET_TYPE_INT_ERROR] = "INT_ERROR",
|
||||
[RESET_TYPE_RX_RECOVERY] = "RX_RECOVERY",
|
||||
[RESET_TYPE_RX_DESC_FETCH] = "RX_DESC_FETCH",
|
||||
[RESET_TYPE_TX_DESC_FETCH] = "TX_DESC_FETCH",
|
||||
[RESET_TYPE_TX_SKIP] = "TX_SKIP",
|
||||
};
|
||||
|
||||
#define EFX_MAX_MTU (9 * 1024)
|
||||
|
||||
/* RX slow fill workqueue. If memory allocation fails in the fast path,
|
||||
@ -1772,7 +1816,7 @@ static int efx_reset(struct efx_nic *efx)
|
||||
goto out_unlock;
|
||||
}
|
||||
|
||||
EFX_INFO(efx, "resetting (%d)\n", method);
|
||||
EFX_INFO(efx, "resetting (%s)\n", RESET_TYPE(method));
|
||||
|
||||
efx_reset_down(efx, method, &ecmd);
|
||||
|
||||
@ -1851,9 +1895,10 @@ void efx_schedule_reset(struct efx_nic *efx, enum reset_type type)
|
||||
}
|
||||
|
||||
if (method != type)
|
||||
EFX_LOG(efx, "scheduling reset (%d:%d)\n", type, method);
|
||||
EFX_LOG(efx, "scheduling %s reset for %s\n",
|
||||
RESET_TYPE(method), RESET_TYPE(type));
|
||||
else
|
||||
EFX_LOG(efx, "scheduling reset (%d)\n", method);
|
||||
EFX_LOG(efx, "scheduling %s reset\n", RESET_TYPE(method));
|
||||
|
||||
efx->reset_pending = method;
|
||||
|
||||
|
Reference in New Issue
Block a user