Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ic avoid losing a desc on error.



details:   https://anonhg.NetBSD.org/src/rev/c50d61dfb415
branches:  trunk
changeset: 515662:c50d61dfb415
user:      yamt <yamt%NetBSD.org@localhost>
date:      Mon Oct 01 09:26:29 2001 +0000

description:
avoid losing a desc on error.

diffstat:

 sys/dev/ic/elinkxl.c |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (31 lines):

diff -r 46090459ca9e -r c50d61dfb415 sys/dev/ic/elinkxl.c
--- a/sys/dev/ic/elinkxl.c      Mon Oct 01 08:01:36 2001 +0000
+++ b/sys/dev/ic/elinkxl.c      Mon Oct 01 09:26:29 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: elinkxl.c,v 1.56 2001/09/16 16:34:37 wiz Exp $ */
+/*     $NetBSD: elinkxl.c,v 1.57 2001/10/01 09:26:29 yamt Exp $        */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -958,8 +958,6 @@
                 * Get pointer to next available tx desc.
                 */
                txp = sc->tx_free;
-               sc->tx_free = txp->tx_next;
-               txp->tx_next = NULL;
                dmamap = txp->tx_dmamap;
 
                /*
@@ -1020,6 +1018,12 @@
                        goto out;
                }
 
+               /*
+                * remove our tx desc from freelist.
+                */
+               sc->tx_free = txp->tx_next;
+               txp->tx_next = NULL;
+
                fr = &txp->tx_dpd->dpd_frags[0];
                totlen = 0;
                for (segment = 0; segment < dmamap->dm_nsegs; segment++, fr++) {



Home | Main Index | Thread Index | Old Index