]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
scsi: ufs: fix exception event handling
authorMaya Erez <merez@codeaurora.org>
Thu, 3 May 2018 11:07:16 +0000 (16:37 +0530)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 1 Mar 2019 13:20:41 +0000 (14:20 +0100)
commit2892a28e9979b4a871c14aef00e0b7c70c0fdc30
treea136df3c9c5c88821c9d37d1e2d4429530f24b3c
parent3be1143134158355da6753355fc5e6331294bbe7
scsi: ufs: fix exception event handling

BugLink: http://bugs.launchpad.net/bugs/1815234
[ Upstream commit 2e3611e9546c2ed4def152a51dfd34e8dddae7a5 ]

The device can set the exception event bit in one of the response UPIU,
for example to notify the need for urgent BKOPs operation.  In such a
case, the host driver calls ufshcd_exception_event_handler to handle
this notification.  When trying to check the exception event status (for
finding the cause for the exception event), the device may be busy with
additional SCSI commands handling and may not respond within the 100ms
timeout.

To prevent that, we need to block SCSI commands during handling of
exception events and allow retransmissions of the query requests, in
case of timeout.

Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
Signed-off-by: Can Guo <cang@codeaurora.org>
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
Reviewed-by: Subhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/scsi/ufs/ufshcd.c