ps3_gelic: Don't kill the device on DMA failure
authorAndre Heider <a.heider@gmail.com>
Tue, 12 Jul 2011 10:13:26 +0000 (10:13 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 14 Jul 2011 17:12:16 +0000 (10:12 -0700)
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>
Acked-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ps3_gelic_net.c

index 94422fcc8576afd61961ed36b9b28d5220fca284..4acc17bffc422038777ff019fe10dc5d2e53d07b 100644 (file)
@@ -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;
 }