]> git.baikalelectronics.ru Git - 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)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 1 Oct 2019 02:32:46 +0000 (22:32 -0400)
commit47cb55f849a9a17ddcb9708372eefce904931234
tree96cdab295583bbf26b09ccf10f420f2305ed040c
parenta6aa776b8d443d74448de2218fd3ee93b33088b1
scsi: mpt3sas: Fix clear pending bit in ioctl status

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>
drivers/scsi/mpt3sas/mpt3sas_ctl.c