summaryrefslogtreecommitdiff
path: root/drivers/net/ps3_gelic_net.c
diff options
context:
space:
mode:
authorMasakazu Mokuno <mokuno@sm.sony.co.jp>2007-07-20 12:35:54 +0400
committerJeff Garzik <jeff@garzik.org>2007-07-25 00:28:40 +0400
commit583aae1094d28aa1d58360318388c11d2ae7ed9c (patch)
treec05810bf1cc055d67eb71c628cb464c3622348b4 /drivers/net/ps3_gelic_net.c
parent39a3d2d19cc8dc9d7ec3a1fefe95d7de0c6dc317 (diff)
downloadlinux-583aae1094d28aa1d58360318388c11d2ae7ed9c.tar.xz
ps3: fix rare issue that reenabling rx DMA fails
Fixed rare issue that 'lv1_net_start_rx_dma failed, status=-9" was shown in dmesg. This meant restarting rx DMA had been rejected by the hypervisor. This issue would caused if the guest os requested starting DMA when the hypervisor thought the DMA was in progress. The state machine for DMA status of the hypervisor would be updated by processing interrupt in the hypervisor. Thus we should wait for the interrupt delivery before restarting DMA. Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/ps3_gelic_net.c')
-rw-r--r--drivers/net/ps3_gelic_net.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/ps3_gelic_net.c b/drivers/net/ps3_gelic_net.c
index 518c5c3ce38b..d596df987585 100644
--- a/drivers/net/ps3_gelic_net.c
+++ b/drivers/net/ps3_gelic_net.c
@@ -943,8 +943,8 @@ refill:
descr->prev->next_descr_addr = descr->bus_addr;
if (dmac_chain_ended) {
- gelic_net_enable_rxdmac(card);
- dev_dbg(ctodev(card), "reenable rx dma\n");
+ card->rx_dma_restart_required = 1;
+ dev_dbg(ctodev(card), "reenable rx dma scheduled\n");
}
return 1;
@@ -1020,6 +1020,11 @@ static irqreturn_t gelic_net_interrupt(int irq, void *ptr)
if (!status)
return IRQ_NONE;
+ if (card->rx_dma_restart_required) {
+ card->rx_dma_restart_required = 0;
+ gelic_net_enable_rxdmac(card);
+ }
+
if (status & GELIC_NET_RXINT) {
gelic_net_rx_irq_off(card);
netif_rx_schedule(netdev);