summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2014-07-10 11:15:53 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2014-07-10 11:15:53 +0000
commit3ec5adc19c356ab77db6f5b622c97dddb0412cb5 (patch)
tree8416883ca9fb1cc211971625c1d1c3685af33122
parentb69f7e02ef71581a0b0482b391965bf8d0a14d70 (diff)
record the size of the rx rings so we can wrap around them correctly.
fixes a panic, reported by paul de weerd.
-rw-r--r--sys/dev/pci/if_vic.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/pci/if_vic.c b/sys/dev/pci/if_vic.c
index 649a25eee29..5e7fa4d1ad5 100644
--- a/sys/dev/pci/if_vic.c
+++ b/sys/dev/pci/if_vic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_vic.c,v 1.78 2014/07/08 05:35:19 dlg Exp $ */
+/* $OpenBSD: if_vic.c,v 1.79 2014/07/10 11:15:52 dlg Exp $ */
/*
* Copyright (c) 2006 Reyk Floeter <reyk@openbsd.org>
@@ -605,6 +605,7 @@ vic_alloc_data(struct vic_softc *sc)
for (q = 0; q < VIC_NRXRINGS; q++) {
sc->sc_rxq[q].slots = (struct vic_rxdesc *)&kva[offset];
sc->sc_data->vd_rx_offset[q] = offset;
+ sc->sc_data->vd_rx[q].length = sc->sc_nrxbuf;
for (i = 0; i < sc->sc_nrxbuf; i++) {
rxd = &sc->sc_rxq[q].slots[i];