mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-30 21:15:19 +02:00
add some apparently missing dma cache ops to the korina driver
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7274 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
0771c0af36
commit
49f869938d
@ -473,8 +473,10 @@ static int rc32434_send_packet(struct sk_buff *skb, struct net_device *dev)
|
|||||||
lp->tx_skb[lp->tx_chain_tail] = skb;
|
lp->tx_skb[lp->tx_chain_tail] = skb;
|
||||||
|
|
||||||
length = skb->len;
|
length = skb->len;
|
||||||
|
dma_cache_wback((u32)skb->data, skb->len);
|
||||||
|
|
||||||
/* Setup the transmit descriptor. */
|
/* Setup the transmit descriptor. */
|
||||||
|
dma_cache_inv((u32) td, sizeof(*td));
|
||||||
td->ca = CPHYSADDR(skb->data);
|
td->ca = CPHYSADDR(skb->data);
|
||||||
|
|
||||||
if(__raw_readl(&(lp->tx_dma_regs->dmandptr)) == 0) {
|
if(__raw_readl(&(lp->tx_dma_regs->dmandptr)) == 0) {
|
||||||
@ -507,6 +509,7 @@ static int rc32434_send_packet(struct sk_buff *skb, struct net_device *dev)
|
|||||||
lp->tx_chain_tail = (lp->tx_chain_tail + 1) & RC32434_TDS_MASK; /* Move tail */
|
lp->tx_chain_tail = (lp->tx_chain_tail + 1) & RC32434_TDS_MASK; /* Move tail */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
dma_cache_wback((u32) td, sizeof(*td));
|
||||||
|
|
||||||
dev->trans_start = jiffies;
|
dev->trans_start = jiffies;
|
||||||
|
|
||||||
@ -675,7 +678,8 @@ static void rc32434_rx_tasklet(unsigned long rx_data_dev)
|
|||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
spin_lock_irqsave(&lp->lock, flags);
|
spin_lock_irqsave(&lp->lock, flags);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
dma_cache_inv((u32)rd, sizeof(*rd));
|
||||||
while ( (count = RC32434_RBSIZE - (u32)DMA_COUNT(rd->control)) != 0) {
|
while ( (count = RC32434_RBSIZE - (u32)DMA_COUNT(rd->control)) != 0) {
|
||||||
#ifdef CONFIG_IDT_USE_NAPI
|
#ifdef CONFIG_IDT_USE_NAPI
|
||||||
if(--rx_work_limit <0)
|
if(--rx_work_limit <0)
|
||||||
@ -789,6 +793,7 @@ static void rc32434_rx_tasklet(unsigned long rx_data_dev)
|
|||||||
lp->rd_ring[(lp->rx_next_done-1)& RC32434_RDS_MASK].control &= ~(DMAD_cod_m);
|
lp->rd_ring[(lp->rx_next_done-1)& RC32434_RDS_MASK].control &= ~(DMAD_cod_m);
|
||||||
|
|
||||||
lp->rx_next_done = (lp->rx_next_done + 1) & RC32434_RDS_MASK;
|
lp->rx_next_done = (lp->rx_next_done + 1) & RC32434_RDS_MASK;
|
||||||
|
dma_cache_wback((u32)rd, sizeof(*rd));
|
||||||
rd = &lp->rd_ring[lp->rx_next_done];
|
rd = &lp->rd_ring[lp->rx_next_done];
|
||||||
__raw_writel( ~DMAS_d_m, &lp->rx_dma_regs->dmas);
|
__raw_writel( ~DMAS_d_m, &lp->rx_dma_regs->dmas);
|
||||||
}
|
}
|
||||||
@ -809,6 +814,7 @@ static void rc32434_rx_tasklet(unsigned long rx_data_dev)
|
|||||||
rd->devcs = 0;
|
rd->devcs = 0;
|
||||||
skb = lp->rx_skb[lp->rx_next_done];
|
skb = lp->rx_skb[lp->rx_next_done];
|
||||||
rd->ca = CPHYSADDR(skb->data);
|
rd->ca = CPHYSADDR(skb->data);
|
||||||
|
dma_cache_wback((u32)rd, sizeof(*rd));
|
||||||
rc32434_chain_rx(lp,rd);
|
rc32434_chain_rx(lp,rd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user