[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <887dec18bdaec3cc048f0f4d5c0391dc338e3828.camel@iokpp.de>
Date: Fri, 08 Dec 2023 00:02:33 +0100
From: Bean Huo <beanhuo@...pp.de>
To: Bart Van Assche <bvanassche@....org>, avri.altman@....com,
alim.akhtar@...sung.com, jejb@...ux.ibm.com,
martin.petersen@...cle.com, mani@...nel.org, quic_cang@...cinc.com,
quic_asutoshd@...cinc.com, beanhuo@...ron.com, thomas@...ch.de
Cc: linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
mikebi@...ron.com, lporzio@...ron.com
Subject: Re: [PATCH v3 2/3] scsi: ufs: core: Add UFS RTC support
On Wed, 2023-12-06 at 14:59 -1000, Bart Van Assche wrote:
> A 64-bit value is truncated to a 32-bit value. What should happen if
> the
> right hand side is larger than what fits into a 32-bit integer?
> Should
> a comment perhaps be added that uptimes of more than 136 years are
> not
> supported and also for absolute times that the above code fails after
> the year 2010 + 136 = 2146?
>
> Thanks,
>
> Bart.
Bart,
you are taking into account a broader perspective. thanks for your
review!
I will add below code in the next version:
+ if (ts64.tv_sec < hba->dev_info.rtc_time_baseline) {
+ dev_warn(hba->dev, "%s: Current time precedes previous
setting!\n", __func__);
+ return;
+ }
+ /*
+ * Absolute RTC mode has 136-year limit as of 2010. Modify UFS
Spec or choosing relative
+ * RTC mode for longer (beyond year 2146) time spans.
+ */
Kind regards,
Bean
Powered by blists - more mailing lists