sfc: Move Falcon global event handling to falcon.c
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
4833f02a29
commit
40641ed93c
@@ -894,46 +894,6 @@ efx_handle_generated_event(struct efx_channel *channel, efx_qword_t *event)
|
||||
channel->channel, EFX_QWORD_VAL(*event));
|
||||
}
|
||||
|
||||
/* Global events are basically PHY events */
|
||||
static void
|
||||
efx_handle_global_event(struct efx_channel *channel, efx_qword_t *event)
|
||||
{
|
||||
struct efx_nic *efx = channel->efx;
|
||||
bool handled = false;
|
||||
|
||||
if (EFX_QWORD_FIELD(*event, FSF_AB_GLB_EV_G_PHY0_INTR) ||
|
||||
EFX_QWORD_FIELD(*event, FSF_AB_GLB_EV_XG_PHY0_INTR) ||
|
||||
EFX_QWORD_FIELD(*event, FSF_AB_GLB_EV_XFP_PHY0_INTR)) {
|
||||
/* Ignored */
|
||||
handled = true;
|
||||
}
|
||||
|
||||
if ((efx_nic_rev(efx) >= EFX_REV_FALCON_B0) &&
|
||||
EFX_QWORD_FIELD(*event, FSF_BB_GLB_EV_XG_MGT_INTR)) {
|
||||
efx->xmac_poll_required = true;
|
||||
handled = true;
|
||||
}
|
||||
|
||||
if (efx_nic_rev(efx) <= EFX_REV_FALCON_A1 ?
|
||||
EFX_QWORD_FIELD(*event, FSF_AA_GLB_EV_RX_RECOVERY) :
|
||||
EFX_QWORD_FIELD(*event, FSF_BB_GLB_EV_RX_RECOVERY)) {
|
||||
netif_err(efx, rx_err, efx->net_dev,
|
||||
"channel %d seen global RX_RESET event. Resetting.\n",
|
||||
channel->channel);
|
||||
|
||||
atomic_inc(&efx->rx_reset);
|
||||
efx_schedule_reset(efx, EFX_WORKAROUND_6555(efx) ?
|
||||
RESET_TYPE_RX_RECOVERY : RESET_TYPE_DISABLE);
|
||||
handled = true;
|
||||
}
|
||||
|
||||
if (!handled)
|
||||
netif_err(efx, hw, efx->net_dev,
|
||||
"channel %d unknown global event "
|
||||
EFX_QWORD_FMT "\n", channel->channel,
|
||||
EFX_QWORD_VAL(*event));
|
||||
}
|
||||
|
||||
static void
|
||||
efx_handle_driver_event(struct efx_channel *channel, efx_qword_t *event)
|
||||
{
|
||||
@@ -1050,15 +1010,17 @@ int efx_nic_process_eventq(struct efx_channel *channel, int budget)
|
||||
case FSE_AZ_EV_CODE_DRV_GEN_EV:
|
||||
efx_handle_generated_event(channel, &event);
|
||||
break;
|
||||
case FSE_AZ_EV_CODE_GLOBAL_EV:
|
||||
efx_handle_global_event(channel, &event);
|
||||
break;
|
||||
case FSE_AZ_EV_CODE_DRIVER_EV:
|
||||
efx_handle_driver_event(channel, &event);
|
||||
break;
|
||||
case FSE_CZ_EV_CODE_MCDI_EV:
|
||||
efx_mcdi_process_event(channel, &event);
|
||||
break;
|
||||
case FSE_AZ_EV_CODE_GLOBAL_EV:
|
||||
if (efx->type->handle_global_event &&
|
||||
efx->type->handle_global_event(channel, &event))
|
||||
break;
|
||||
/* else fall through */
|
||||
default:
|
||||
netif_err(channel->efx, hw, channel->efx->net_dev,
|
||||
"channel %d unknown event type %d (data "
|
||||
|
||||
Reference in New Issue
Block a user