WSL2-Linux-Kernel/drivers/scsi/ufs
Sujit Reddy Thumma f20810d8d0 scsi: ufs: Fix hardware race conditions while aborting a command
There is a possible race condition in the hardware when the abort
command is issued to terminate the ongoing SCSI command as described
below:

- A bit in the door-bell register is set in the controller for a
  new SCSI command.
- In some rare situations, before controller get a chance to issue
  the command to the device, the software issued an abort command.
- If the device recieves abort command first then it returns success
  because the command itself is not present.
- Now if the controller commits the command to device it will be
  processed.
- Software thinks that command is aborted and proceed while still
  the device is processing it.
- The software, controller and device may go out of sync because of
  this race condition.

To avoid this, query task presence in the device before sending abort
task command so that after the abort operation, the command is guaranteed
to be non-existent in both controller and the device.

Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
Reviewed-by: Yaniv Gardi <ygardi@codeaurora.org>
Tested-by: Dolev Raviv <draviv@codeaurora.org>
Acked-by: Vinayak Holikatti <vinholikatti@gmail.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-05-28 12:25:13 +02:00
..
Kconfig [SCSI] ufs: SCSI_UFSHCD should depend on SCSI_DMA 2013-06-04 11:16:20 -07:00
Makefile [SCSI] ufs: Add Platform glue driver for ufshcd 2013-05-02 16:16:50 -07:00
ufs.h scsi: ufs: fix endianness sparse warnings 2014-05-28 12:25:13 +02:00
ufshcd-pci.c SCSI: remove unnecessary pci_set_drvdata() 2013-10-14 15:26:04 +02:00
ufshcd-pltfrm.c [SCSI] ufs: don't check resource with devm_ioremap_resource 2013-08-26 12:51:29 +04:00
ufshcd.c scsi: ufs: Fix hardware race conditions while aborting a command 2014-05-28 12:25:13 +02:00
ufshcd.h scsi: ufs: Fix broken task management command implementation 2014-05-28 12:25:13 +02:00
ufshci.h scsi: ufs: fix endianness sparse warnings 2014-05-28 12:25:13 +02:00
unipro.h [SCSI] ufs: configure the attribute for power mode 2013-09-06 16:08:37 -07:00