Subject: Re: Lucent USB problem
To: None <port-sparc64@netbsd.org>
From: Lloyd Parkes <lloyd@must-have-coffee.gen.nz>
List: port-sparc64
Date: 06/08/2003 12:35:47
So, I started looking more closely at the the contents of intrhand[]
to see why the for loop kept looping and I noticed some really odd
behaviour from my debugging function.

I wrote a function to print out the linked list of interrupt handlers
any given interrupt level, and the sequence of calls to it was very
strange. I called this function just before inserting the new
interrupt handler into the list. For ohci0 it didn't get called, which
I expected. For ohci1 it did get called, which I also expected, but it
told be that the linked list was empty, which I didn't expect. Then,
for ohci2 it told me that there were two items in the list. For ohci3
it hit my hard-coded limit of eight items to print out.

This got me to thinking about when it was getting called. It seemed to
be called for the correct devices, but something was obviously wrong.
I started to wonder what was going on with the variable 'q' in
intr_establish. I decided to look for any recent changes in
cvsweb.netbsd.org while I was waiting for my Ultra 10 to reboot. The
first thing I saw was the change comment 'Fix yet another inverted
comparison' and the diff was for a comparison of 'q'. 

I pulled up the latest rev of intr.c into my source tree and it all
works like a charm. I know what I'll be putting my my PR.

Cheers,
Lloyd