mirror of https://github.com/hak5/openwrt-owl.git
parent
224edd2575
commit
9ab88ce62d
|
@ -51,6 +51,24 @@ ramips_fe_rr(unsigned reg)
|
||||||
return __raw_readl(ramips_fe_base + reg);
|
return __raw_readl(ramips_fe_base + reg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void
|
||||||
|
ramips_fe_int_disable(u32 mask)
|
||||||
|
{
|
||||||
|
ramips_fe_wr(ramips_fe_rr(RAMIPS_FE_INT_ENABLE) & ~mask,
|
||||||
|
RAMIPS_FE_INT_ENABLE);
|
||||||
|
/* flush write */
|
||||||
|
ramips_fe_rr(RAMIPS_FE_INT_ENABLE);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void
|
||||||
|
ramips_fe_int_enable(u32 mask)
|
||||||
|
{
|
||||||
|
ramips_fe_wr(ramips_fe_rr(RAMIPS_FE_INT_ENABLE) | mask,
|
||||||
|
RAMIPS_FE_INT_ENABLE);
|
||||||
|
/* flush write */
|
||||||
|
ramips_fe_rr(RAMIPS_FE_INT_ENABLE);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ramips_cleanup_dma(struct raeth_priv *re)
|
ramips_cleanup_dma(struct raeth_priv *re)
|
||||||
{
|
{
|
||||||
|
@ -229,8 +247,7 @@ ramips_eth_rx_hw(unsigned long ptr)
|
||||||
if (max_rx == 0)
|
if (max_rx == 0)
|
||||||
tasklet_schedule(&priv->rx_tasklet);
|
tasklet_schedule(&priv->rx_tasklet);
|
||||||
else
|
else
|
||||||
ramips_fe_wr(ramips_fe_rr(RAMIPS_FE_INT_ENABLE) | RAMIPS_RX_DLY_INT,
|
ramips_fe_int_enable(RAMIPS_RX_DLY_INT);
|
||||||
RAMIPS_FE_INT_ENABLE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -248,8 +265,7 @@ ramips_eth_tx_housekeeping(unsigned long ptr)
|
||||||
priv->skb_free_idx = 0;
|
priv->skb_free_idx = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ramips_fe_wr(ramips_fe_rr(RAMIPS_FE_INT_ENABLE) | RAMIPS_TX_DLY_INT,
|
ramips_fe_int_enable(RAMIPS_TX_DLY_INT);
|
||||||
RAMIPS_FE_INT_ENABLE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -284,8 +300,7 @@ ramips_eth_irq(int irq, void *dev)
|
||||||
ramips_fe_wr(0xFFFFFFFF, RAMIPS_FE_INT_STATUS);
|
ramips_fe_wr(0xFFFFFFFF, RAMIPS_FE_INT_STATUS);
|
||||||
|
|
||||||
if (fe_int & RAMIPS_RX_DLY_INT) {
|
if (fe_int & RAMIPS_RX_DLY_INT) {
|
||||||
ramips_fe_wr(ramips_fe_rr(RAMIPS_FE_INT_ENABLE) & ~(RAMIPS_RX_DLY_INT),
|
ramips_fe_int_disable(RAMIPS_RX_DLY_INT);
|
||||||
RAMIPS_FE_INT_ENABLE);
|
|
||||||
tasklet_schedule(&priv->rx_tasklet);
|
tasklet_schedule(&priv->rx_tasklet);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue