[Bug 268393] system always reboots once from a powered off state
- In reply to: bugzilla-noreply_a_freebsd.org: "[Bug 268393] system always reboots once from a powered off state"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 31 Aug 2023 00:04:30 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268393
--- Comment #63 from Ivan Rozhuk <rozhuk.im@gmail.com> ---
Why no one suggest patch like this?
diff --git a/sys/dev/sound/pci/hda/hdac.c b/sys/dev/sound/pci/hda/hdac.c
index 82b1baacfa9..f7be436aef6 100644
--- a/sys/dev/sound/pci/hda/hdac.c
+++ b/sys/dev/sound/pci/hda/hdac.c
@@ -956,6 +956,8 @@ hdac_rirb_flush(struct hdac_softc *sc)
int ret;
rirb_base = (struct hdac_rirb *)sc->rirb_dma.dma_vaddr;
+ if (rirb_base == NULL)
+ return (0);
rirbwp = HDAC_READ_1(&sc->mem, HDAC_RIRBWP);
bus_dmamap_sync(sc->rirb_dma.dma_tag, sc->rirb_dma.dma_map,
BUS_DMASYNC_POSTREAD);
@@ -965,6 +967,8 @@ hdac_rirb_flush(struct hdac_softc *sc)
sc->rirb_rp++;
sc->rirb_rp %= sc->rirb_size;
rirb = &rirb_base[sc->rirb_rp];
+ if (rirb == NULL)
+ break;
resp = le32toh(rirb->response);
resp_ex = le32toh(rirb->response_ex);
cad = HDAC_RIRB_RESPONSE_EX_SDATA_IN(resp_ex);
--
You are receiving this mail because:
You are the assignee for the bug.