kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* small ata driver enhancement project for someone
@ 2011-01-03 19:21 Greg Freemyer
  2011-01-03 21:05 ` Greg Freemyer
  0 siblings, 1 reply; 2+ messages in thread
From: Greg Freemyer @ 2011-01-03 19:21 UTC (permalink / raw)
  To: kernelnewbies

All,

I don't think the kernel is yet tracking SSD vs Rotational.

It would be a nice patch if someone would do that.  I don't maintain
the subsystem, but I assume it would be accepted if well done.  You
could model your patch by looking at how the drive topology patches
were done.  Effectively this patch would do the same thing.

(Petersen wrote those, so I think these are them:
http://markmail.org/message/azj3z4tofrknnbbe)

My thoughts:

===> How to tell

For SATA:

Per T13/1699-D Revision 4a (from May 2007) word 217 of the identify
block should be populated with a "1" to identify non-rotating media.

http://www.t13.org/Documents/UploadedDocuments/docs2007/D1699r4a-ATA8-ACS.pdf

IIRC: The identify block is read during drive query time, so you
should not have to actually generate any i/o.  Just patch the portion
of the kernel working with the identify block.  ie. See the topology
patch.

For SCSI - no idea, but I'd be surprised if they did not already have
a scsi flag for it.  The topology patch also handled SCSI, so it's
just a matter of finding the scsi field to use.

===> Quirks

Lots of manufacturers don't follow the specs on something like this,
so a quirks functionality is typically how the ATA driver handles it.
ie. If you find a SSD that is not setting the flag, then setup a quirk
to override the flag.  The quirk table should be based on make & model
at a minimum, and maybe firmware.

You should be able to find existing quirk logic, so don't invent your own.

SCSI seems to be followed much more accurately, so you may not need a
quirks functionality for it.

===> userspace API

Seems like there should be a "/sys/block/sda/*" file that allows
userspace to interrogate.  The topology patches added a few of these,
so one more would be good.

If you can generate the same data for scsi, maybe just create
/sys/block/sda/rotation_speed and have it just reflect exactly word
217 of the identify block.

Greg

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-01-03 21:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-03 19:21 small ata driver enhancement project for someone Greg Freemyer
2011-01-03 21:05 ` Greg Freemyer

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).