From: Masakazu Mokuno <mokuno@sm.sony.co.jp>
To: Jeff Garzik <jeff@garzik.org>
Cc: netdev@vger.kernel.org, cbe-oss-dev@ozlabs.org
Subject: [PATCH 9/10] ps3: fix rare issue that reenabling rx DMA fails
Date: Fri, 20 Jul 2007 17:35:54 +0900 [thread overview]
Message-ID: <20070720173431.67A1.MOKUNO@sm.sony.co.jp> (raw)
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>
---
drivers/net/ps3_gelic_net.c | 9 +++++++--
drivers/net/ps3_gelic_net.h | 1 +
2 files changed, 8 insertions(+), 2 deletions(-)
--- 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(i
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);
--- a/drivers/net/ps3_gelic_net.h
+++ b/drivers/net/ps3_gelic_net.h
@@ -207,6 +207,7 @@ struct gelic_net_card {
struct gelic_net_descr_chain tx_chain;
struct gelic_net_descr_chain rx_chain;
+ int rx_dma_restart_required;
/* gurad dmac descriptor chain*/
spinlock_t chain_lock;
--
Masakazu MOKUNO
reply other threads:[~2007-07-20 8:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070720173431.67A1.MOKUNO@sm.sony.co.jp \
--to=mokuno@sm.sony.co.jp \
--cc=cbe-oss-dev@ozlabs.org \
--cc=jeff@garzik.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox