|
@@ -211,12 +211,13 @@ static irqreturn_t nps_enet_irq_handler(s32 irq, void *dev_instance)
|
|
|
{
|
|
{
|
|
|
struct net_device *ndev = dev_instance;
|
|
struct net_device *ndev = dev_instance;
|
|
|
struct nps_enet_priv *priv = netdev_priv(ndev);
|
|
struct nps_enet_priv *priv = netdev_priv(ndev);
|
|
|
- struct nps_enet_buf_int_cause buf_int_cause;
|
|
|
|
|
|
|
+ struct nps_enet_rx_ctl rx_ctrl;
|
|
|
|
|
+ struct nps_enet_tx_ctl tx_ctrl;
|
|
|
|
|
|
|
|
- buf_int_cause.value =
|
|
|
|
|
- nps_enet_reg_get(priv, NPS_ENET_REG_BUF_INT_CAUSE);
|
|
|
|
|
|
|
+ rx_ctrl.value = nps_enet_reg_get(priv, NPS_ENET_REG_RX_CTL);
|
|
|
|
|
+ tx_ctrl.value = nps_enet_reg_get(priv, NPS_ENET_REG_TX_CTL);
|
|
|
|
|
|
|
|
- if (buf_int_cause.tx_done || buf_int_cause.rx_rdy)
|
|
|
|
|
|
|
+ if ((!tx_ctrl.ct && priv->tx_packet_sent) || rx_ctrl.cr)
|
|
|
if (likely(napi_schedule_prep(&priv->napi))) {
|
|
if (likely(napi_schedule_prep(&priv->napi))) {
|
|
|
nps_enet_reg_set(priv, NPS_ENET_REG_BUF_INT_ENABLE, 0);
|
|
nps_enet_reg_set(priv, NPS_ENET_REG_BUF_INT_ENABLE, 0);
|
|
|
__napi_schedule(&priv->napi);
|
|
__napi_schedule(&priv->napi);
|