Re: [PATCH v2] mpt3sas: correct reset of smid while clearing scsi tracker

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

 



On Fri, 2018-08-03 at 06:31 -0400, Sreekanth Reddy wrote:
+AD4- In mpt3sas+AF8-base+AF8-clear+AF8-st() function smid value is reseted in
                                                    +AF4AXgBeAF4AXgBeAF4-
That's not an English word. Please read
https://forum.wordreference.com/threads/set-reset-vs-setted-resetted-programming.70776/

+AD4- diff --git a/drivers/scsi/mpt3sas/mpt3sas+AF8-base.c b/drivers/scsi/mpt3sas/mpt3sas+AF8-base.c
+AD4- index 902610d..94f7236 100644
+AD4- --- a/drivers/scsi/mpt3sas/mpt3sas+AF8-base.c
+AD4- +-+-+- b/drivers/scsi/mpt3sas/mpt3sas+AF8-base.c
+AD4- +AEAAQA- -1702,6 +-1702,11 +AEAAQA- static int mpt3sas+AF8-remove+AF8-dead+AF8-ioc+AF8-func(void +ACo-arg)
+AD4-  		return NULL+ADs-
+AD4-  
+AD4-  	chain+AF8-req +AD0- +ACY-ioc-+AD4-chain+AF8-lookup+AFs-smid - 1+AF0-.chains+AF8-per+AF8-smid+AFs-chain+AF8-offset+AF0AOw-
+AD4- +-	/+ACo- Added memory barrier to make sure that correct chain tracker
+AD4- +-	 +ACo- is retrieved before incrementing the smid pool's chain+AF8-offset
+AD4- +-	 +ACo- value in chain lookup table.
+AD4- +-	 +ACo-/

Please verify your patch with checkpatch and use the proper kernel comment style.

+AD4- +-	smp+AF8-mb+AF8AXw-before+AF8-atomic()+ADs-

The purpose of smp+AF8-mb+AF8AXw-before+AF8-atomic() / smp+AF8-mb+AF8AXw-after+AF8-atomic() is to implement
acquire / release semantics. I think what you need here is a regular barrier
(smp+AF8-mb()).

+AD4- +AEAAQA- -3283,8 +-3288,13 +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- +-	/+ACo- Added memory barrier to make sure that smid is set to zero
+AD4- +-	 +ACo- only after resetting corresponding smid pool's chain+AF8-offset to zero
+AD4- +-	 +ACo- in chain lookup table.
+AD4- +-	 +ACo-/
+AD4- +-	smp+AF8-mb+AF8AXw-after+AF8-atomic()+ADs-
+AD4- +-	st-+AD4-smid +AD0- 0+ADs-

The two above comments also apply to these two changes.

Thanks,

Bart.





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux