diff options
author | Patrick Wildt <patrick@cvs.openbsd.org> | 2021-08-31 21:02:10 +0000 |
---|---|---|
committer | Patrick Wildt <patrick@cvs.openbsd.org> | 2021-08-31 21:02:10 +0000 |
commit | 25e3424cba2ae660fe19d5edd115fd15aa7cecf5 (patch) | |
tree | ff7e2235b164273684aa952d6d6b196ae618738a /sys/dev | |
parent | 288733e99b45f685970c8fd9efa3293bf9f4aaf0 (diff) |
Initialize some struct variables to make sure that upon reinit, caused by
a suspend/resume cycle, the values are set to a sane default.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/if_bwfm_pci.c | 4 |
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 924d20b9baf..0b31b23f599 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.53 2021/08/31 20:58:51 patrick Exp $ */ +/* $OpenBSD: if_bwfm_pci.c,v 1.54 2021/08/31 21:02:09 patrick Exp $ */ /* * Copyright (c) 2010-2016 Broadcom Corporation * Copyright (c) 2017 Patrick Wildt <patrick@blueri.se> @@ -493,6 +493,7 @@ bwfm_pci_preinit(struct bwfm_softc *bwfm) return 1; } + sc->sc_dma_idx_sz = 0; if (sc->sc_shared_flags & BWFM_SHARED_INFO_DMA_INDEX) { if (sc->sc_shared_flags & BWFM_SHARED_INFO_DMA_2B_IDX) sc->sc_dma_idx_sz = sizeof(uint16_t); @@ -684,6 +685,7 @@ bwfm_pci_preinit(struct bwfm_softc *bwfm) bus_dmamap_create(sc->sc_dmat, MSGBUF_MAX_PKT_SIZE, BWFM_NUM_TX_DESCS, MSGBUF_MAX_PKT_SIZE, 0, BUS_DMA_WAITOK, &sc->sc_tx_pkts.pkts[i].bb_map); + sc->sc_tx_pkts_full = 0; /* Maps IOCTL mbufs to a packet id and back. */ sc->sc_ioctl_pkts.npkt = BWFM_NUM_IOCTL_PKTIDS; |