public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Evan Green <evgreen@chromium.org>
Cc: Vinayak Holikatti <vinholikatti@gmail.com>,
	"James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Stanislav Nijnikov <stanislav.nijnikov@wdc.com>,
	Bart Van Assche <Bart.VanAssche@wdc.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: [PATCH v2 1/4] scsi: ufs: Add Configuration Descriptor to sysfs
Date: Sat, 16 Jun 2018 09:16:32 +0200	[thread overview]
Message-ID: <20180616071632.GD30558@kroah.com> (raw)
In-Reply-To: <20180615210049.126123-2-evgreen@chromium.org>

On Fri, Jun 15, 2018 at 02:00:46PM -0700, Evan Green wrote:
> This change adds the configuration descriptor to the UFS
> sysfs interface. This is done in preparation for making the
> interface writable, which will enable provisioning UFS devices
> via Linux.
> 
> The configuration descriptor is laid out as a header, then a set of
> (usually 8) copies of the same descriptor for each unit.
> 
> Signed-off-by: Evan Green <evgreen@chromium.org>
> ---
> Changes since v1:
> 	- Squashed documentation changes into this change.
> 	- Reworked sysfs layout so that instead of a sysfs file for a
> unit selector and then a common set of unit attributes, each unit in
> the config descriptor has its own directory. This required a little
> bit of kobject magic. Alternatively I could use standard device
> attributes and simply allocate N*M of them from a template. I have
> that coded up, and can go with that if preferred, but I thought
> this was a little nicer since it wasted less memory.

Ick, don't use "raw" kobjects please, as userspace will not see them
correctly in the libraries that track devices and attributes, like
libudev.

And what is wrong with using configfs?  I thought that was the better
way to go for something like this.  You are configuring the device,
which is exactly what configfs was created for, to keep people from
having to do this type of mess in sysfs.

thanks,

greg k-h

  reply	other threads:[~2018-06-16  7:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-15 21:00 [PATCH v2 0/4] Enable UFS provisioning via Linux Evan Green
2018-06-15 21:00 ` [PATCH v2 1/4] scsi: ufs: Add Configuration Descriptor to sysfs Evan Green
2018-06-16  7:16   ` Greg Kroah-Hartman [this message]
2018-06-18 16:54     ` Evan Green
2018-06-15 21:00 ` [PATCH v2 2/4] scsi: ufs: Make sysfs attributes writable Evan Green
2018-06-15 21:00 ` [PATCH v2 3/4] scsi: ufs: Refactor descriptor read for write Evan Green
2018-06-15 21:00 ` [PATCH v2 4/4] scsi: ufs: Enable writing config descriptor Evan Green
2018-06-15 21:33   ` kbuild test robot

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=20180616071632.GD30558@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=Bart.VanAssche@wdc.com \
    --cc=adrian.hunter@intel.com \
    --cc=evgreen@chromium.org \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=stanislav.nijnikov@wdc.com \
    --cc=vinholikatti@gmail.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