Patch "scsi: target: tcmu: reset_ring should reset TCMU_DEV_BIT_BROKEN" has been added to the 5.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    scsi: target: tcmu: reset_ring should reset TCMU_DEV_BIT_BROKEN

to the 5.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     scsi-target-tcmu-reset_ring-should-reset-tcmu_dev_bi.patch
and it can be found in the queue-5.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit a988563a328decbed0be25c2728e52acce3f26e6
Author: Bodo Stroesser <bstroesser@xxxxxxxxxxxxxx>
Date:   Thu Apr 9 12:10:26 2020 +0200

    scsi: target: tcmu: reset_ring should reset TCMU_DEV_BIT_BROKEN
    
    [ Upstream commit 066f79a5fd6d1b9a5cc57b5cd445b3e4bb68a5b2 ]
    
    In case command ring buffer becomes inconsistent, tcmu sets device flag
    TCMU_DEV_BIT_BROKEN.  If the bit is set, tcmu rejects new commands from LIO
    core with TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE, and no longer processes
    completions from the ring.  The reset_ring attribute can be used to
    completely clean up the command ring, so after reset_ring the ring no
    longer is inconsistent.
    
    Therefore reset_ring also should reset bit TCMU_DEV_BIT_BROKEN to allow
    normal processing.
    
    Link: https://lore.kernel.org/r/20200409101026.17872-1-bstroesser@xxxxxxxxxxxxxx
    Acked-by: Mike Christie <mchristi@xxxxxxxxxx>
    Signed-off-by: Bodo Stroesser <bstroesser@xxxxxxxxxxxxxx>
    Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/target/target_core_user.c b/drivers/target/target_core_user.c
index 0b9dfa6b17bc7..f769bb1e37356 100644
--- a/drivers/target/target_core_user.c
+++ b/drivers/target/target_core_user.c
@@ -2073,6 +2073,7 @@ static void tcmu_reset_ring(struct tcmu_dev *udev, u8 err_level)
 	mb->cmd_tail = 0;
 	mb->cmd_head = 0;
 	tcmu_flush_dcache_range(mb, sizeof(*mb));
+	clear_bit(TCMU_DEV_BIT_BROKEN, &udev->flags);
 
 	del_timer(&udev->cmd_timer);
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux