CVSROOT:        /cvs
Module name:    src
Changes by:     [email protected]    2010/07/09 16:33:21

Modified files:
        sys/dev/pci    : mpii.c 

Log message:
rewrite the polling codepath in mpii.

it basically has the poll code swap the ccb completion path out for
something that clears the flag the poll code is looping on. it just
runs the interrupt handler to try and get that ccb back off the
hardware.

the reply queue is now protected by a semaphore, meaning that if
one cpu is already pulling stuff off the chip, another cpu may try
to also pull stuff off, but will return immediately cos the first
cpu will end up doing the work it wants anyway.

i did it this way so the ccb completion paths wouldnt be run while
a mutex was held, and to avoid reordering of ccb completions and
updates to the reply queue consumer that could be caused by allowing
concurrent runs of the interrupt handler to step on each other.

there is a big change here in that polling doesnt time out anymore.
it keeps trying until it succeeds, or it keeps trying. i think it
is dangerous to complete a ccb until th echip has returned it.

the only safe alternative is to do a full reset of the chip, but
that is a massive amount of work.

reviewed by mikeb
ok krw@
testing by me on real and logical disks

Reply via email to