[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e1b4e9f5eab891fa6615e7a4b2ed29e6@codeaurora.org>
Date: Mon, 14 Sep 2020 09:34:43 -0700
From: nguyenb@...eaurora.org
To: Avri Altman <Avri.Altman@....com>
Cc: cang@...eaurora.org, asutoshd@...eaurora.org,
martin.petersen@...cle.com, linux-scsi@...r.kernel.org,
linux-arm-msm@...r.kernel.org,
Alim Akhtar <alim.akhtar@...sung.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 v1 1/1] scsi: ufshcd: Properly set the device Icc Level
On 2020-09-10 03:02, Avri Altman wrote:
>>
>> On 2020-08-31 18:19, Bao D. Nguyen wrote:
>> > UFS version 3.0 and later devices require Vcc and Vccq power supplies
>> > with Vccq2 being optional. While earlier UFS version 2.0 and 2.1
>> > devices, the Vcc and Vccq2 are required with Vccq being optional.
>> > Check the required power supplies used by the device
>> > and set the device's supported Icc level properly.
> Practically you are correct - most flash vendors moved in UFS3.1 to
> 1.2 supply instead of 1.8.
> However, the host should provide all 3 supplies to the device because -
> a) A flash vendor might want to still use 1.8 in its UFS3.1 device, and
> b) We should allow a degenerated configurations, e.g. 3.1 devices,
> that are degenerated to 2.1 or 2.2
Thank you for your comment.
The host can provide all 3 power supplies. However, the change is to
ensure
we do not exit early and fail to properly set the Icc level because the
optional power
supply is not provided.
>
> That said, I think we can entirely remove the check in the beginning
> of the function,
> But not because the spec allows it, but because each supply is
> explicitly checked later on,
> before reading its applicable max current entry in the power
> descriptor.
We need these checks to prevent NULL pointer access subsequently in this
function.
> Thanks,
> Avri
Powered by blists - more mailing lists