CC: [email protected]
CC: [email protected]
TO: Sreekanth Reddy <[email protected]>
CC: "Martin K. Petersen" <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   2ac69819ba9e3d8d550bb5d2d2df74848e556812
commit: e8c2307e6a690db9aaff84153b2857c5c4dfd969 scsi: mpt3sas: Add support 
IOCs new state named COREDUMP
date:   8 months ago
:::::: branch date: 11 hours ago
:::::: commit date: 8 months ago
config: riscv-randconfig-m031-20200826 (attached as .config)
compiler: riscv64-linux-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>
Reported-by: Dan Carpenter <[email protected]>

New smatch warnings:
drivers/scsi/mpt3sas/mpt3sas_base.c:5723 _base_send_ioc_reset() error: double 
unlocked 'ioc->ioc_reset_in_progress_lock' (orig line 5715)

Old smatch warnings:
arch/riscv/include/asm/current.h:30 get_current() error: uninitialized symbol 
'tp'.
drivers/scsi/mpt3sas/mpt3sas_base.c:683 _base_fault_reset_work() error: double 
unlocked 'ioc->ioc_reset_in_progress_lock' (orig line 617)
arch/riscv/include/asm/atomic.h:206 atomic_fetch_add_unless() warn: 
inconsistent indenting
drivers/scsi/mpt3sas/mpt3sas_base.c:7640 mpt3sas_base_hard_reset_handler() 
error: double unlocked 'ioc->ioc_reset_in_progress_lock' (orig line 7586)

# 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e8c2307e6a690db9aaff84153b2857c5c4dfd969
git remote add linus 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout e8c2307e6a690db9aaff84153b2857c5c4dfd969
vim +5723 drivers/scsi/mpt3sas/mpt3sas_base.c

f92363d1235949 Sreekanth Reddy 2012-11-30  5663  
f92363d1235949 Sreekanth Reddy 2012-11-30  5664  /**
f92363d1235949 Sreekanth Reddy 2012-11-30  5665   * _base_send_ioc_reset - send 
doorbell reset
f92363d1235949 Sreekanth Reddy 2012-11-30  5666   * @ioc: per adapter object
f92363d1235949 Sreekanth Reddy 2012-11-30  5667   * @reset_type: currently only 
supports: MPI2_FUNCTION_IOC_MESSAGE_UNIT_RESET
f92363d1235949 Sreekanth Reddy 2012-11-30  5668   * @timeout: timeout in second
f92363d1235949 Sreekanth Reddy 2012-11-30  5669   *
4beb4867f049ae Bart Van Assche 2018-06-15  5670   * Return: 0 for success, 
non-zero for failure.
f92363d1235949 Sreekanth Reddy 2012-11-30  5671   */
f92363d1235949 Sreekanth Reddy 2012-11-30  5672  static int
98c56ad32c33f0 Calvin Owens    2016-07-28  5673  _base_send_ioc_reset(struct 
MPT3SAS_ADAPTER *ioc, u8 reset_type, int timeout)
f92363d1235949 Sreekanth Reddy 2012-11-30  5674  {
f92363d1235949 Sreekanth Reddy 2012-11-30  5675         u32 ioc_state;
f92363d1235949 Sreekanth Reddy 2012-11-30  5676         int r = 0;
e8c2307e6a690d Sreekanth Reddy 2019-12-26  5677         unsigned long flags;
f92363d1235949 Sreekanth Reddy 2012-11-30  5678  
f92363d1235949 Sreekanth Reddy 2012-11-30  5679         if (reset_type != 
MPI2_FUNCTION_IOC_MESSAGE_UNIT_RESET) {
919d8a3f3fef99 Joe Perches     2018-09-17  5680                 ioc_err(ioc, 
"%s: unknown reset_type\n", __func__);
f92363d1235949 Sreekanth Reddy 2012-11-30  5681                 return -EFAULT;
f92363d1235949 Sreekanth Reddy 2012-11-30  5682         }
f92363d1235949 Sreekanth Reddy 2012-11-30  5683  
f92363d1235949 Sreekanth Reddy 2012-11-30  5684         if 
(!(ioc->facts.IOCCapabilities &
f92363d1235949 Sreekanth Reddy 2012-11-30  5685            
MPI2_IOCFACTS_CAPABILITY_EVENT_REPLAY))
f92363d1235949 Sreekanth Reddy 2012-11-30  5686                 return -EFAULT;
f92363d1235949 Sreekanth Reddy 2012-11-30  5687  
919d8a3f3fef99 Joe Perches     2018-09-17  5688         ioc_info(ioc, "sending 
message unit reset !!\n");
f92363d1235949 Sreekanth Reddy 2012-11-30  5689  
f92363d1235949 Sreekanth Reddy 2012-11-30  5690         writel(reset_type << 
MPI2_DOORBELL_FUNCTION_SHIFT,
f92363d1235949 Sreekanth Reddy 2012-11-30  5691             
&ioc->chip->Doorbell);
98c56ad32c33f0 Calvin Owens    2016-07-28  5692         if 
((_base_wait_for_doorbell_ack(ioc, 15))) {
f92363d1235949 Sreekanth Reddy 2012-11-30  5693                 r = -EFAULT;
f92363d1235949 Sreekanth Reddy 2012-11-30  5694                 goto out;
f92363d1235949 Sreekanth Reddy 2012-11-30  5695         }
e8c2307e6a690d Sreekanth Reddy 2019-12-26  5696  
98c56ad32c33f0 Calvin Owens    2016-07-28  5697         ioc_state = 
_base_wait_on_iocstate(ioc, MPI2_IOC_STATE_READY, timeout);
f92363d1235949 Sreekanth Reddy 2012-11-30  5698         if (ioc_state) {
919d8a3f3fef99 Joe Perches     2018-09-17  5699                 ioc_err(ioc, 
"%s: failed going to ready state (ioc_state=0x%x)\n",
919d8a3f3fef99 Joe Perches     2018-09-17  5700                         
__func__, ioc_state);
f92363d1235949 Sreekanth Reddy 2012-11-30  5701                 r = -EFAULT;
f92363d1235949 Sreekanth Reddy 2012-11-30  5702                 goto out;
f92363d1235949 Sreekanth Reddy 2012-11-30  5703         }
f92363d1235949 Sreekanth Reddy 2012-11-30  5704   out:
e8c2307e6a690d Sreekanth Reddy 2019-12-26  5705         if (r != 0) {
e8c2307e6a690d Sreekanth Reddy 2019-12-26  5706                 ioc_state = 
mpt3sas_base_get_iocstate(ioc, 0);
e8c2307e6a690d Sreekanth Reddy 2019-12-26  5707                 
spin_lock_irqsave(&ioc->ioc_reset_in_progress_lock, flags);
e8c2307e6a690d Sreekanth Reddy 2019-12-26  5708                 /*
e8c2307e6a690d Sreekanth Reddy 2019-12-26  5709                  * Wait for IOC 
state CoreDump to clear only during
e8c2307e6a690d Sreekanth Reddy 2019-12-26  5710                  * HBA 
initialization & release time.
e8c2307e6a690d Sreekanth Reddy 2019-12-26  5711                  */
e8c2307e6a690d Sreekanth Reddy 2019-12-26  5712                 if ((ioc_state 
& MPI2_IOC_STATE_MASK) ==
e8c2307e6a690d Sreekanth Reddy 2019-12-26  5713                     
MPI2_IOC_STATE_COREDUMP && (ioc->is_driver_loading == 1 ||
e8c2307e6a690d Sreekanth Reddy 2019-12-26  5714                     
ioc->fault_reset_work_q == NULL)) {
e8c2307e6a690d Sreekanth Reddy 2019-12-26 @5715                         
spin_unlock_irqrestore(
e8c2307e6a690d Sreekanth Reddy 2019-12-26  5716                             
&ioc->ioc_reset_in_progress_lock, flags);
e8c2307e6a690d Sreekanth Reddy 2019-12-26  5717                         
mpt3sas_base_coredump_info(ioc, ioc_state);
e8c2307e6a690d Sreekanth Reddy 2019-12-26  5718                         
mpt3sas_base_wait_for_coredump_completion(ioc,
e8c2307e6a690d Sreekanth Reddy 2019-12-26  5719                             
__func__);
e8c2307e6a690d Sreekanth Reddy 2019-12-26  5720                         
spin_lock_irqsave(
e8c2307e6a690d Sreekanth Reddy 2019-12-26  5721                             
&ioc->ioc_reset_in_progress_lock, flags);
e8c2307e6a690d Sreekanth Reddy 2019-12-26  5722                 }
e8c2307e6a690d Sreekanth Reddy 2019-12-26 @5723                 
spin_unlock_irqrestore(&ioc->ioc_reset_in_progress_lock, flags);
e8c2307e6a690d Sreekanth Reddy 2019-12-26  5724         }
919d8a3f3fef99 Joe Perches     2018-09-17  5725         ioc_info(ioc, "message 
unit reset: %s\n",
919d8a3f3fef99 Joe Perches     2018-09-17  5726                  r == 0 ? 
"SUCCESS" : "FAILED");
f92363d1235949 Sreekanth Reddy 2012-11-30  5727         return r;
f92363d1235949 Sreekanth Reddy 2012-11-30  5728  }
f92363d1235949 Sreekanth Reddy 2012-11-30  5729  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]

Attachment: .config.gz
Description: application/gzip

_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to