All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andre Heider <a.heider@gmail.com>
To: Geoff Levand <geoff@infradead.org>
Cc: netdev@vger.kernel.org, cbe-oss-dev@lists.ozlabs.org,
	Andre Heider <a.heider@gmail.com>
Subject: [PATCH 3/3] ps3_gelic: Don't kill the device on DMA failure
Date: Tue, 12 Jul 2011 22:13:26 +0200	[thread overview]
Message-ID: <1310501606-829-4-git-send-email-a.heider@gmail.com> (raw)
In-Reply-To: <1310501606-829-1-git-send-email-a.heider@gmail.com>

Reset card->tx_dma_progress when lv1_net_start_tx_dma() fails or it
won't send anything afterwards anymore

Signed-off-by: Andre Heider <a.heider@gmail.com>
---
 drivers/net/ps3_gelic_net.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ps3_gelic_net.c b/drivers/net/ps3_gelic_net.c
index 94422fc..4acc17b 100644
--- a/drivers/net/ps3_gelic_net.c
+++ b/drivers/net/ps3_gelic_net.c
@@ -838,9 +838,11 @@ static int gelic_card_kick_txdma(struct gelic_card *card,
 		card->tx_dma_progress = 1;
 		status = lv1_net_start_tx_dma(bus_id(card), dev_id(card),
 					      descr->bus_addr, 0);
-		if (status)
+		if (status) {
+			card->tx_dma_progress = 0;
 			dev_info(ctodev(card), "lv1_net_start_txdma failed," \
 				 "status=%d\n", status);
+		}
 	}
 	return status;
 }
-- 
1.7.5.4


  parent reply	other threads:[~2011-07-12 20:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-12 20:13 [PATCH 0/3] ps3_gelic: Fix error paths when a tx dma fails Andre Heider
2011-07-12 20:13 ` [PATCH 1/3] ps3_gelic: Fix typos Andre Heider
2011-07-12 20:13 ` [PATCH 2/3] ps3_gelic: Fix start_xmit kick error path Andre Heider
2011-07-12 20:13 ` Andre Heider [this message]
2011-07-13 22:31 ` [PATCH 0/3] ps3_gelic: Fix error paths when a tx dma fails Geoff Levand
2011-07-14  8:36   ` Andre Heider
2011-07-14 15:35     ` David Miller
2011-07-14 17:10       ` Geoff Levand
2011-07-14 17:12         ` David Miller

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=1310501606-829-4-git-send-email-a.heider@gmail.com \
    --to=a.heider@gmail.com \
    --cc=cbe-oss-dev@lists.ozlabs.org \
    --cc=geoff@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.