mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bean Huo <beanhuo@iokpp.de>
To: "Thomas Weißschuh" <thomas@t-8ch.de>
Cc: avri.altman@wdc.com, bvanassche@acm.org, alim.akhtar@samsung.com,
	jejb@linux.ibm.com, martin.petersen@oracle.com,
	stanley.chu@mediatek.com, mani@kernel.org, quic_cang@quicinc.com,
	quic_asutoshd@quicinc.com, beanhuo@micron.com,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	mikebi@micron.com, lporzio@micron.com
Subject: Re: [PATCH v1 1/2] scsi: ufs: core: Add UFS RTC support
Date: Tue, 14 Nov 2023 19:27:37 +0100	[thread overview]
Message-ID: <e408ce14d322223c1412efa46e8e4d30f44fa98c.camel@iokpp.de> (raw)
In-Reply-To: <e2e77da5-c344-4913-a321-4cfdcc4a3915@t-8ch.de>

Hi Thomas,

Thank you for your review. I will resolve the highlighted issue in the
upcoming version. Two separate questions that require individual
answers as below: 


On Thu, 2023-11-09 at 15:05 +0100, Thomas Weißschuh wrote:
> >   static int ufs_get_device_desc(struct ufs_hba *hba)
> >   {
> >         int err;
> > @@ -8237,6 +8321,8 @@ static int ufs_get_device_desc(struct ufs_hba
> > *hba)
> >   
> >         ufshcd_temp_notif_probe(hba, desc_buf);
> >   
> > +       ufs_init_rtc(hba, desc_buf);
> > +
> 
> As somebody with no idea and no access to the specs:
> 
> Is this available for all devices and all protocol versions?
> 
> > 
I would like to mention that while I cannot confirm that RTC works on
all protocol versions, it has been consistently functional on all
devices in the market since the introduction of UFS 2.0, which also
introduced RTC. I am not aware of any UFS version lower than 2.0
currently available on the market. In the event that a vendor has a
product with a lower UFS version, we can consider implementing a
version check.

> > 
> > 

> > 
> 
> >         goto out;
> >   
> >   set_link_active:
> > @@ -9840,6 +9930,8 @@ static int __ufshcd_wl_resume(struct ufs_hba
> > *hba, enum ufs_pm_op pm_op)
> >                 if (ret)
> >                         goto set_old_link_state;
> >                 ufshcd_set_timestamp_attr(hba);
> > +               schedule_delayed_work(&hba->ufs_rtc_delayed_work,
> > +                                                       msecs_to_ji
> > ffies(UFS_RTC_UPDATE_EVERY_MS));
> >         }
> >   
> >         if (ufshcd_keep_autobkops_enabled_except_suspend(hba))
> > diff --git a/include/ufs/ufs.h b/include/ufs/ufs.h
> > index e77ab1786856..18b39c6b3a97 100644
> > --- a/include/ufs/ufs.h
> > +++ b/include/ufs/ufs.h
> > @@ -14,6 +14,7 @@
> >   #include <linux/bitops.h>
> >   #include <linux/types.h>
> >   #include <uapi/scsi/scsi_bsg_ufs.h>
> > +#include <linux/rtc.h>
> 
> Seems unnecessary.

seems it's needed, otherwise, I will get:
./include/ufs/ufs.h:599:9: error: unknown type name ‘time64_t’


Kind regards,
Bean


  reply	other threads:[~2023-11-14 18:27 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-09 12:52 [PATCH v1 0/2] " Bean Huo
2023-11-09 12:52 ` [PATCH v1 1/2] scsi: ufs: core: " Bean Huo
2023-11-09 14:05   ` Thomas Weißschuh
2023-11-14 18:27     ` Bean Huo [this message]
2023-11-14 18:53       ` Thomas Weißschuh
2023-11-09 15:09   ` Avri Altman
2023-11-14 18:42     ` Bean Huo
2023-11-09 18:06   ` Bart Van Assche
2023-11-09 12:52 ` [PATCH v1 2/2] scsi: ufs: core: Add sysfs node for UFS RTC update Bean Huo
2023-11-09 14:05   ` Thomas Weißschuh
2023-11-14 18:39     ` Bean Huo
2023-11-14 18:48       ` Thomas Weißschuh
2023-11-09 15:10   ` Avri Altman
2023-11-09 18:07   ` Bart Van Assche
2023-11-14 18:46     ` Bean Huo
2023-11-12  2:02   ` kernel test robot
2023-11-09 15:10 ` [PATCH v1 0/2] Add UFS RTC support Avri Altman
2023-11-09 18:07 ` Bart Van Assche

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e408ce14d322223c1412efa46e8e4d30f44fa98c.camel@iokpp.de \
    --to=beanhuo@iokpp.de \
    --cc=alim.akhtar@samsung.com \
    --cc=avri.altman@wdc.com \
    --cc=beanhuo@micron.com \
    --cc=bvanassche@acm.org \
    --cc=jejb@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=lporzio@micron.com \
    --cc=mani@kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=mikebi@micron.com \
    --cc=quic_asutoshd@quicinc.com \
    --cc=quic_cang@quicinc.com \
    --cc=stanley.chu@mediatek.com \
    --cc=thomas@t-8ch.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®