linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Damien Le Moal <damien.lemoal@opensource.wdc.com>
To: Bart Van Assche <bvanassche@acm.org>,
	"linux-scsi @ vger . kernel . org" <linux-scsi@vger.kernel.org>,
	"Martin K . Petersen" <martin.petersen@oracle.com>,
	"linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>
Subject: Problem with scsi device sysfs attributes
Date: Thu, 11 Nov 2021 12:31:58 +0900	[thread overview]
Message-ID: <4b3e8a72-0b48-95e3-6617-a685d42c08fb@opensource.wdc.com> (raw)

Bart,

Your patch 92c4b58b15c5 ("scsi: core: Register sysfs attributes earlier")
modified the scsi device sysfs attributes initialization to use the scsi
template shost_groups and sdev_groups for adding attributes using groups instead
of arrays of attrs. However, this patch completely removed the
sysfs_create_groups() call to actually create the attributes listed in the groups.

As a result, I see many missing sysfs device attributes for at least ahci (e.g.
ncq_prio_enavle, ncq_prio_supported), but I suspect other device types may have
similar problems.

I do not see where the attribute groups in the arrray sdev->gendev_attr_groups
are registered with sysfs. In fact, it looks like sdev->gendev_attr_groups is
referenced only in scsi_sysfs.c but only for initializing it. It is never used
to actually register the attr groups... Am I missing something ?

This is at least breaking NCQ priority support right now. Did your patch
92c4b58b15c5 remove too much code ? Shouldn't we have a call to
sysfs_create_groups() somewhere ? I think that should be in
scsi_sysfs_device_initialize() but I am not 100% sure.



-- 
Damien Le Moal
Western Digital Research

             reply	other threads:[~2021-11-11  3:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-11  3:31 Damien Le Moal [this message]
2021-11-11  5:27 ` Damien Le Moal
2021-11-11  8:46   ` Damien Le Moal

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=4b3e8a72-0b48-95e3-6617-a685d42c08fb@opensource.wdc.com \
    --to=damien.lemoal@opensource.wdc.com \
    --cc=bvanassche@acm.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --subject='Re: Problem with scsi device sysfs attributes' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).