Accidently read one response less than needed since reworking it.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24181 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2008-02-29 16:25:35 +00:00
parent 793fb95c82
commit c607395208

View File

@ -37,10 +37,10 @@ static const struct {
};
static inline rirb_t*
static inline rirb_t&
current_rirb(hda_controller *controller)
{
return &controller->rirb[controller->rirb_read_pos];
return controller->rirb[controller->rirb_read_pos];
}
@ -401,11 +401,13 @@ hda_interrupt_handler(hda_controller* controller)
REG8(controller, RIRBSTS) = rirbStatus;
if (rirbStatus & RIRBSTS_RINTFL) {
uint16 writePos = REG16(controller, RIRBWP);
uint16 writePos = (REG16(controller, RIRBWP) + 1)
% controller->rirb_length;
for (; controller->rirb_read_pos != writePos;
controller->rirb_read_pos = next_rirb(controller)) {
uint32 response = current_rirb(controller)->response;
uint32 responseFlags = current_rirb(controller)->flags;
uint32 response = current_rirb(controller).response;
uint32 responseFlags = current_rirb(controller).flags;
uint32 cad = responseFlags & RESPONSE_FLAGS_CODEC_MASK;
hda_codec* codec = controller->codecs[cad];