diff options
author | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2015-08-28 16:21:42 +0000 |
---|---|---|
committer | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2015-08-28 16:21:42 +0000 |
commit | 2b9144d726b3364ed1504883b6fcc1303a6631e3 (patch) | |
tree | 2ef98805a301b01a6948e65e0c395bd94b8ad954 /sys | |
parent | a1493325896808a12801797d0c3fa922f7c588e9 (diff) |
Set the midi_isopen flag to zero before the chip is reset, as the flag
is used to determine the interrupt mask. Currently this doesn't matter,
but once suspend/resume works, this will matter.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/envy.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/pci/envy.c b/sys/dev/pci/envy.c index 4aa0d8dc006..dfe813412e0 100644 --- a/sys/dev/pci/envy.c +++ b/sys/dev/pci/envy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: envy.c,v 1.64 2015/08/28 16:15:39 ratchov Exp $ */ +/* $OpenBSD: envy.c,v 1.65 2015/08/28 16:21:41 ratchov Exp $ */ /* * Copyright (c) 2007 Alexandre Ratchov <alex@caoua.org> * @@ -1662,6 +1662,9 @@ envyattach(struct device *parent, struct device *self, void *aux) const char *intrstr; int subid; +#if NMIDI > 0 + sc->midi_isopen = 0; +#endif sc->pci_tag = pa->pa_tag; sc->pci_pc = pa->pa_pc; sc->pci_dmat = pa->pa_dmat; @@ -1709,7 +1712,6 @@ envyattach(struct device *parent, struct device *self, void *aux) envy_reset(sc); sc->audio = audio_attach_mi(&envy_hw_if, sc, &sc->dev); #if NMIDI > 0 - sc->midi_isopen = 0; if (!sc->isht || sc->eeprom[ENVY_EEPROM_CONF] & ENVY_CONF_MIDI) { sc->midi = midi_attach_mi(&envy_midi_hw_if, sc, &sc->dev); } |