Re: [PATCH, RFC 02/30] scsi: atari_scsi: fix sleep_on race

Michael Schmitz
2014-01-13T07:35:53Z

Arnd,

>> your patch breaks the Atari NCR5380 SCSI driver (easily verified using
>> ARAnyM). Last console output:
>>
>
> Thanks so much for testing and sorry for your troubles. It seems I

Not to worry - without the occasional incentive to work on it, the
driver would just keep on bitrotting more. Not that I ever officially
took it on ...

> got the wrong polarity on at least one of the conditions when
> converting
> from a while()-style loop to an until()-style wait_event loop.

Yep, that's my hunch too. From what I've seen so far it blocks at the
falcon_fairness_wait stage, but more tests are needed.

> I did double-check all the patches before, but this one must have
> slipped through because the use is so obscure.

Just say it - it is a nightmare. The code dates back to the times of
the Big Kernel Lock, and interrupt priorities on Atari made it
necessary to enable interrupts while in the SCSI inthandler at that
time (after masking off the SCSI interrupt).

Sharing the interrupt with DMA completion, floppy and IDE without a way
to properly check which one raised it just does not help.

If you want me to try something else, let me know.

Cheers,

Michael