On Wed, 2018-07-18 at 01:22 -0400, Sreekanth Reddy wrote: +AD4- In mpt3sas+AF8-base+AF8-clear+AF8-st() function smid value is reseted in wrong line, +AD4- i.e. driver should reset smid value to zero after decrementing chain+AF8-offset +AD4- counter in chain+AF8-lookup table but in current code, driver is resetting smid +AD4- value before decrementing the chain+AF8-offset counter. which we are correcting +AD4- with this patch. +AD4- +AD4- Signed-off-by: Sreekanth Reddy +ADw-sreekanth.reddy+AEA-broadcom.com+AD4- +AD4- --- +AD4- drivers/scsi/mpt3sas/mpt3sas+AF8-base.c +AHw- 2 +-- +AD4- 1 file changed, 1 insertion(+-), 1 deletion(-) +AD4- +AD4- diff --git a/drivers/scsi/mpt3sas/mpt3sas+AF8-base.c b/drivers/scsi/mpt3sas/mpt3sas+AF8-base.c +AD4- index 902610d..94b939b 100644 +AD4- --- a/drivers/scsi/mpt3sas/mpt3sas+AF8-base.c +AD4- +-+-+- b/drivers/scsi/mpt3sas/mpt3sas+AF8-base.c +AD4- +AEAAQA- -3283,8 +-3283,8 +AEAAQA- void mpt3sas+AF8-base+AF8-clear+AF8-st(struct MPT3SAS+AF8-ADAPTER +ACo-ioc, +AD4- return+ADs- +AD4- st-+AD4-cb+AF8-idx +AD0- 0xFF+ADs- +AD4- st-+AD4-direct+AF8-io +AD0- 0+ADs- +AD4- - st-+AD4-smid +AD0- 0+ADs- +AD4- atomic+AF8-set(+ACY-ioc-+AD4-chain+AF8-lookup+AFs-st-+AD4-smid - 1+AF0-.chain+AF8-offset, 0)+ADs- +AD4- +- st-+AD4-smid +AD0- 0+ADs- +AD4- +AH0- How can this patch be correct without memory barrier between the atomic set and the st-+AD4-smid assignment? Bart.