]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
scsi: mpt3sas: Fix clear pending bit in ioctl status
authorSreekanth Reddy <sreekanth.reddy@broadcom.com>
Fri, 13 Sep 2019 13:04:40 +0000 (09:04 -0400)
committerSeth Forshee <seth.forshee@canonical.com>
Mon, 6 Jan 2020 16:03:43 +0000 (10:03 -0600)
commitc50d7719717693f86376de827fe6375dae83f75d
tree4eff4aecd3465c0e3b0149722c6c6331668d80c2
parent763e1491d43a07c6d6423774919557027fd29ef2
scsi: mpt3sas: Fix clear pending bit in ioctl status

BugLink: https://bugs.launchpad.net/bugs/1858429
[ Upstream commit 782b281883caf70289ba6a186af29441a117d23e ]

When user issues diag register command from application with required size,
and if driver unable to allocate the memory, then it will fail the register
command. While failing the register command, driver is not currently
clearing MPT3_CMD_PENDING bit in ctl_cmds.status variable which was set
before trying to allocate the memory. As this bit is set, subsequent
register command will be failed with BUSY status even when user wants to
register the trace buffer will less memory.

Clear MPT3_CMD_PENDING bit in ctl_cmds.status before returning the diag
register command with no memory status.

Link: https://lore.kernel.org/r/1568379890-18347-4-git-send-email-sreekanth.reddy@broadcom.com
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/scsi/mpt3sas/mpt3sas_ctl.c