global status is a 32 bit register, we try to ack if any bit is left out

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25475 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval
2008-05-12 18:16:16 +00:00
parent 7c3137b98b
commit 7652e27b3b
@@ -399,16 +399,17 @@ auich_int(void *arg)
bool gotone = false; bool gotone = false;
uint8 curblk; uint8 curblk;
auich_stream *stream = NULL; auich_stream *stream = NULL;
uint16 sr, sta; uint32 sta;
uint16 sr;
// TRACE(("auich_int(%p)\n", card)); // TRACE(("auich_int(%p)\n", card));
sta = auich_reg_read_16(&card->config, AUICH_REG_GLOB_STA); sta = auich_reg_read_32(&card->config, AUICH_REG_GLOB_STA);
if (sta & card->interrupt_mask) { if (sta & card->interrupt_mask) {
if (sta & (STA_S0RI | STA_S1RI | STA_S2RI)) { if (sta & (STA_S0RI | STA_S1RI | STA_S2RI)) {
// ignore and clear resume interrupt(s) // ignore and clear resume interrupt(s)
auich_reg_write_16(&card->config, AUICH_REG_GLOB_STA, sta & (STA_S0RI | STA_S1RI | STA_S2RI)); auich_reg_write_32(&card->config, AUICH_REG_GLOB_STA, sta & (STA_S0RI | STA_S1RI | STA_S2RI));
TRACE(("interrupt !! %x\n", sta)); TRACE(("interrupt !! %x\n", sta));
gotone = true; gotone = true;
} }
@@ -442,10 +443,17 @@ auich_int(void *arg)
auich_reg_write_16(&card->config, auich_reg_write_16(&card->config,
stream->base + GET_REG_SR(&stream->card->config), sr); stream->base + GET_REG_SR(&stream->card->config), sr);
auich_reg_write_32(&card->config, AUICH_REG_GLOB_STA, stream->sta);
sta &= ~stream->sta;
} }
if (sta != 0) {
dprintf("global status not fully handled %lx!\n", sta);
auich_reg_write_32(&card->config, AUICH_REG_GLOB_STA, sta);
}
} else { } else {
TRACE(("interrupt masked %x, ", card->interrupt_mask)); TRACE(("interrupt masked %lx, ", card->interrupt_mask));
TRACE(("sta %x\n", sta)); TRACE(("sta %lx\n", sta));
} }
if (gotone) if (gotone)