]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
scsi: storvsc: Correctly handle multiple flags in srb_status
authorMichael Kelley <mikelley@microsoft.com>
Fri, 4 Jun 2021 17:21:03 +0000 (10:21 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Jul 2021 14:02:09 +0000 (16:02 +0200)
commitb7915650e7d6025dede51c98d97a7551d8234277
treefa0e75bedd29d5cbf626e16700744fa0589cc248
parent95065bc0b378e1ac49aca20bb153f08dde1e6c2a
scsi: storvsc: Correctly handle multiple flags in srb_status

[ Upstream commit 52e1b3b3daa9d53f0204bf474ee1d4b1beb38234 ]

Hyper-V is observed to sometimes set multiple flags in the srb_status, such
as ABORTED and ERROR. Current code in storvsc_handle_error() handles only a
single flag being set, and does nothing when multiple flags are set.  Fix
this by changing the case statement into a series of "if" statements
testing individual flags. The functionality for handling each flag is
unchanged.

Link: https://lore.kernel.org/r/1622827263-12516-3-git-send-email-mikelley@microsoft.com
Signed-off-by: Michael Kelley <mikelley@microsoft.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/storvsc_drv.c