mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Can Guo <can.guo@oss.qualcomm.com>
To: "Peter Wang (王信友)" <peter.wang@mediatek.com>,
	"beanhuo@micron.com" <beanhuo@micron.com>,
	"avri.altman@wdc.com" <avri.altman@wdc.com>,
	"bvanassche@acm.org" <bvanassche@acm.org>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>
Cc: "liu.song13@zte.com.cn" <liu.song13@zte.com.cn>,
	"huobean@gmail.com" <huobean@gmail.com>,
	"ram.dwivedi@oss.qualcomm.com" <ram.dwivedi@oss.qualcomm.com>,
	"tanghuan@vivo.com" <tanghuan@vivo.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"quic_nguyenb@quicinc.com" <quic_nguyenb@quicinc.com>,
	"alim.akhtar@samsung.com" <alim.akhtar@samsung.com>,
	"chullee@google.com" <chullee@google.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"adrian.hunter@intel.com" <adrian.hunter@intel.com>,
	"James.Bottomley@HansenPartnership.com"
	<James.Bottomley@HansenPartnership.com>
Subject: Re: [PATCH v3 1/1] scsi: ufs: core: Add support to notify userspace of UniPro QoS events
Date: Wed, 4 Mar 2026 17:19:32 +0800	[thread overview]
Message-ID: <63796688-2733-4401-936b-3dc5a60f297e@oss.qualcomm.com> (raw)
In-Reply-To: <f5e4e0e44b071fb355a2900e2b8c9ef504fb15a7.camel@mediatek.com>



On 3/4/2026 5:12 PM, Peter Wang (王信友) wrote:
>
> On Sun, 2026-03-01 at 04:51 -0800, Can Guo wrote:
> > @@ -1768,3 +1768,26 @@ Description:
> >                 ====================   ===========================
> > 
> >                 The attribute is read only.
> > +
> > +What:         
> > /sys/bus/platform/drivers/ufshcd/*/dme_qos_notification
> > +What:          /sys/bus/platform/devices/*.ufs/dme_qos_notification
> > +Date:          February 2026
>
> March 2026
Good catch
>
> > @@ -9097,6 +9106,12 @@ static int ufshcd_post_device_init(struct
> > ufs_hba *hba)
> > 
> >         /* UFS device is also active now */
> >         ufshcd_set_ufs_dev_active(hba);
> > +
> > +       /* Indicate that DME QoS Monitor has been reset */
> > +       atomic_set(&hba->dme_qos_notification, 0x1);
> > 
>
> Reset value should be 0?
Bit[0] is used to communicate to userspace that DME QOS has been reset,
see also the bit assignments explained in the patch.
>
> > @@ -1116,6 +1121,10 @@ struct ufs_hba {
> >         int critical_health_count;
> >         atomic_t dev_lvl_exception_count;
> >         u64 dev_lvl_exception_id;
> > +
> > +       atomic_t dme_qos_notification;
> > +       struct kernfs_node *dme_qos_sysfs_handle;
>
> Why is dme_qos_sysfs_handle necessary?
> Wouldn't it be sufficient to use
> sysfs_notify(&hba->dev->kobj, NULL, "dme_qos_notification");
> without checking whether dme_qos_sysfs_handle is NULL?
sysfs_notify() cannot be used under atomic context, i.e., IRQ context.

Thanks,
Can Guo.
>
> Thanks
> Peter
>
> ************* MEDIATEK Confidentiality Notice
>   ********************
> The information contained in this e-mail message (including any
> attachments) may be confidential, proprietary, privileged, or otherwise
> exempt from disclosure under applicable laws. It is intended to be
> conveyed only to the designated recipient(s). Any use, dissemination,
> distribution, printing, retaining or copying of this e-mail (including its
> attachments) by unintended recipient(s) is strictly prohibited and may
> be unlawful. If you are not an intended recipient of this e-mail, or believe
>   
> that you have received this e-mail in error, please notify the sender
> immediately (by replying to this e-mail), delete any and all copies of
> this e-mail (including any attachments) from your system, and do not
> disclose the content of this e-mail to any other person. Thank you!


      reply	other threads:[~2026-03-04  9:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260301125116.808992-1-can.guo@oss.qualcomm.com>
2026-03-01 12:51 ` Can Guo
2026-03-04  9:12   ` Peter Wang (王信友)
2026-03-04  9:19     ` Can Guo [this message]

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=63796688-2733-4401-936b-3dc5a60f297e@oss.qualcomm.com \
    --to=can.guo@oss.qualcomm.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=adrian.hunter@intel.com \
    --cc=alim.akhtar@samsung.com \
    --cc=avri.altman@wdc.com \
    --cc=beanhuo@micron.com \
    --cc=bvanassche@acm.org \
    --cc=chullee@google.com \
    --cc=huobean@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=liu.song13@zte.com.cn \
    --cc=martin.petersen@oracle.com \
    --cc=peter.wang@mediatek.com \
    --cc=quic_nguyenb@quicinc.com \
    --cc=ram.dwivedi@oss.qualcomm.com \
    --cc=tanghuan@vivo.com \
    /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®