[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f6a49b77e381c274e1a4cfd11e088304@codeaurora.org>
Date: Thu, 06 Aug 2020 12:53:55 +0800
From: Can Guo <cang@...eaurora.org>
To: "Martin K. Petersen" <martin.petersen@...cle.com>
Cc: asutoshd@...eaurora.org, nguyenb@...eaurora.org,
hongwus@...eaurora.org, rnayak@...eaurora.org,
linux-scsi@...r.kernel.org, kernel-team@...roid.com,
saravanak@...gle.com, salyzyn@...gle.com,
Alim Akhtar <alim.akhtar@...sung.com>,
Avri Altman <avri.altman@....com>,
"James E.J. Bottomley" <jejb@...ux.ibm.com>,
Stanley Chu <stanley.chu@...iatek.com>,
Bean Huo <beanhuo@...ron.com>,
Bart Van Assche <bvanassche@....org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v9 8/9] scsi: ufs: Fix a racing problem btw error handler
and runtime PM ops
On 2020-08-05 09:31, Martin K. Petersen wrote:
> Can,
>
>> Current IRQ handler blocks scsi requests before scheduling eh_work,
>> when error handler calls pm_runtime_get_sync, if ufshcd_suspend/resume
>> sends a scsi cmd, most likely the SSU cmd, since scsi requests are
>> blocked, pm_runtime_get_sync() will never return because
>> ufshcd_suspend/reusme is blocked by the scsi cmd. Some changes and
>> code re-arrangement can be made to resolve it.
>
> CC [M] drivers/scsi/ufs/ufshcd.o
> drivers/scsi/ufs/ufshcd.c: In function ‘ufshcd_queuecommand’:
> drivers/scsi/ufs/ufshcd.c:2570:6: error: this statement may fall
> through [-Werror=implicit-fallthrough=]
> 2570 | if (hba->pm_op_in_progress) {
> | ^
> drivers/scsi/ufs/ufshcd.c:2575:2: note: here
> 2575 | case UFSHCD_STATE_RESET:
> | ^~~~
> cc1: all warnings being treated as errors
> make[3]: *** [scripts/Makefile.build:280: drivers/scsi/ufs/ufshcd.o]
> Error 1
> make[2]: *** [scripts/Makefile.build:497: drivers/scsi/ufs] Error 2
> make[1]: *** [scripts/Makefile.build:497: drivers/scsi] Error 2
> make: *** [Makefile:1764: drivers] Error 2
Thanks Martin, will fix it in next version.
Can Guo.
Powered by blists - more mailing lists