summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2005-12-10 18:34:12 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2005-12-10 18:34:12 +0000
commit39286003ee93d2daa2d29422b4e1b833a73559c0 (patch)
treef2b0b0725d55fc70cd2b197509673380eaa5edf6 /sys/dev
parentff45a2e26cc55f1543d70c14996d22e730162845 (diff)
Check dm_nsegs > 0 rather than dm_segs > 0 when deciding if there are
valid segments to unload. Spotted by lint. ok miod@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/if_vr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/pci/if_vr.c b/sys/dev/pci/if_vr.c
index 9e7c71d303c..f825d8fefd8 100644
--- a/sys/dev/pci/if_vr.c
+++ b/sys/dev/pci/if_vr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_vr.c,v 1.53 2005/12/10 18:29:12 brad Exp $ */
+/* $OpenBSD: if_vr.c,v 1.54 2005/12/10 18:34:11 krw Exp $ */
/*
* Copyright (c) 1997, 1998
@@ -1119,7 +1119,7 @@ vr_txeof(struct vr_softc *sc)
ifp->if_collisions +=(txstat & VR_TXSTAT_COLLCNT) >> 3;
ifp->if_opackets++;
- if (cur_tx->vr_map != NULL && cur_tx->vr_map->dm_segs > 0)
+ if (cur_tx->vr_map != NULL && cur_tx->vr_map->dm_nsegs > 0)
bus_dmamap_unload(sc->sc_dmat, cur_tx->vr_map);
m_freem(cur_tx->vr_mbuf);
@@ -1624,7 +1624,7 @@ vr_stop(struct vr_softc *sc)
map = sc->vr_cdata.vr_rx_chain[i].vr_map;
if (map != NULL) {
- if (map->dm_segs > 0)
+ if (map->dm_nsegs > 0)
bus_dmamap_unload(sc->sc_dmat, map);
bus_dmamap_destroy(sc->sc_dmat, map);
sc->vr_cdata.vr_rx_chain[i].vr_map = NULL;