Skip to content
Commit 7ce5c8cd authored by Jens Axboe's avatar Jens Axboe
Browse files

libata: mask swap internal and hardware tag

hen we're comparing the hardware completion mask passed in from the
driver with the internal tag pending mask, we need to account for the
fact that the internal tag is different from the hardware tag. If not,
then we can end up either prematurely completing the internal tag (since
it's not set in the hw mask), or simply flag an error:

ata2: illegal qc_active transition (100000000->00000001)

If the internal tag is set, then swap that with the hardware tag in this
case before comparing with what the hardware reports.

Fixes: 28361c40 ("libata: add extra internal command")
Buglink: https://bugzilla.kernel.org/show_bug.cgi?id=201151


Cc: stable@vger.kernel.org
Reported-by: default avatarPaul Sbarra <sbarra.paul@gmail.com>
Tested-by: default avatarPaul Sbarra <sbarra.paul@gmail.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent b228ba1c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment