summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_bwfm_pci.c
diff options
context:
space:
mode:
authorPatrick Wildt <patrick@cvs.openbsd.org>2021-08-31 20:58:52 +0000
committerPatrick Wildt <patrick@cvs.openbsd.org>2021-08-31 20:58:52 +0000
commit288733e99b45f685970c8fd9efa3293bf9f4aaf0 (patch)
treef7f611e2c6e73dbaf81eea559dab4636ae0aa8fc /sys/dev/pci/if_bwfm_pci.c
parente2b4d5b2d5c9b9bf0e6de61663b750a53371e5bc (diff)
Initialize ring read/write pointers to make sure that upon reinit, caused
by a suspend/resume cycle, the pointers are set to a sane default.
Diffstat (limited to 'sys/dev/pci/if_bwfm_pci.c')
-rw-r--r--sys/dev/pci/if_bwfm_pci.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/pci/if_bwfm_pci.c b/sys/dev/pci/if_bwfm_pci.c
index 949df27b899..924d20b9baf 100644
--- a/sys/dev/pci/if_bwfm_pci.c
+++ b/sys/dev/pci/if_bwfm_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bwfm_pci.c,v 1.52 2021/06/22 16:36:59 patrick Exp $ */
+/* $OpenBSD: if_bwfm_pci.c,v 1.53 2021/08/31 20:58:51 patrick Exp $ */
/*
* Copyright (c) 2010-2016 Broadcom Corporation
* Copyright (c) 2017 Patrick Wildt <patrick@blueri.se>
@@ -1158,6 +1158,8 @@ bwfm_pci_setup_ring(struct bwfm_pci_softc *sc, struct bwfm_pci_msgring *ring,
{
ring->w_idx_addr = w_idx + idx * idx_off;
ring->r_idx_addr = r_idx + idx * idx_off;
+ ring->w_ptr = 0;
+ ring->r_ptr = 0;
ring->nitem = nitem;
ring->itemsz = itemsz;
bwfm_pci_ring_write_rptr(sc, ring);