ATI AHCI seems not to put slot number into the command register on error as the spec requires. This triggers kernel assertion error because zero is read from the register and wrong ccb is picked from the queue. To cope with it if there's only one outstanding command get its slot number from the active commands mask, otherwise fail all active commands.
ATI AHCI seems not to put slot number into the command register
on error as the spec requires. This triggers kernel assertion
error because zero is read from the register and wrong ccb is picked
from the queue. To cope with it if there's only one outstanding
command get its slot number from the active commands mask, otherwise
fail all active commands.

ok krw@ dlg@

orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars