lkml.org 
[lkml]   [2021]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/2] scsi: ufs: Protect PM ops and err_handler from user access through sysfs
From
Date
On Mon, 2021-01-11 at 09:27 +0800, Can Guo wrote:
> >
> > If accessing sysfs nodes, which triggers a UFS UPIU request to
> > read/write UFS device descriptors during shutdown flow, there is
> > only
> > one issue that sysfs node access failure since UFS device and LINK
> > has
> > been shutdown. Strictly speaking, the failure comes after
> > ufshcd_set_dev_pwr_mode().
> >
> > __ufshcd_query_descriptor: opcode 0x01 for idn 0 failed, index
> > 0,
> > err = -11
>
> You misunderstood it again. You are expecting a simple query cmd
> error.
> But what really matters are NoC issues[1] and OCP[2]. And
> while/after
> UFS
> shutting down, either of them may happen.
>
> [1] When a un-clocked register access issue happens, we call it a
> NoC
> issue,
> meaning you are tring to access a register when clocks are disabled.
> This
> leads to system CRASH.
>

OK, let it simple, share this kind of crash log becuase of access sysfs
node in the shutdown flow.


> [2] OCP is over current protection. While UFS shutting down, you may
> have put UFS regulators to LPM. After that, if you are still trying
> to
> talk to UFS, OCP can happen on VCCQ/VCCQ2. This leads to system
> CRASH
> too.

the same as above, share the crash log.

>
> >
> > Since the shutdown is oneway process, this failure is not big
> > issue. If
> > you meant to avoid this failure for unsafe shutdown, I agree with
> > you,
> > But for the race issue, I don't know.
> >
>
> Easy for you to say. System crash is a big issue to any SoC vendors
> I
> belive.
>

indeed, crash is serious issue, share the log.


Thanks,
Bean


> Can Guo.

\
 
 \ /
  Last update: 2021-01-11 09:25    [W:0.149 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site