linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Lord <liml@rtr.ca>
To: Tejun Heo <htejun@gmail.com>
Cc: "Rus V. Brushkoff" <rus@SoyuzKT.Od.UA>,
	Jeff Garzik <jeff@garzik.org>,
	linux-ide@vger.kernel.org
Subject: Re: SATA HDD password problem
Date: Fri, 07 Mar 2008 09:45:04 -0500	[thread overview]
Message-ID: <47D154F0.50607@rtr.ca> (raw)
In-Reply-To: <47D0BC5A.9000208@gmail.com>

Tejun Heo wrote:
> Hello, Rus.
> Rus V. Brushkoff wrote:
...
>> [Hors]:root:~ # hdparm -K 1 /dev/sda
>>
>> /dev/sda:
>>  setting drive keep features to 1 (on)
>>  HDIO_DRIVE_CMD(keepsettings) failed: Input/output error
>> .....
> 
> Those two are different ones.  These are to keep software setting over
> soft resets and doesn't have much to do with SSP.  Mark, maybe we need
> to add a feature to hdparm to configure SSP?
..

MMmm..  yes, there are a bunch of newish things there, specificially for SATA.
I'll extend hdparm to give access to changing those things.
..
>> :To solve the problem, ATA added Software Setting Preservation
>> :featureset, which makes the drive remember configurations over
>> :hardresets but it's an optional feature and not all drives implement it.
>> : I think having SSP support in the drive is the only sane way to support
>> :password locking on SATA; otherwise, the drive can just go away while
>> :the system is running.  That said, it would be nice to have a parameter
>> :to force SRST or no reset at all for odd cases.
>>
>>  Hmm, if someone enable SSP in the drive after password unlock - does this 
>> mean that it will be unlocked forever ? Or drive can distinguish between 
>> power-on and hard-reset states ?
> 
> SSP by default stays on, so once unlocked it will stay unlocked as long
> as power stays applied.  On power loss, it gets locked again.  On
> reboots, the BIOS can always lock it again if it wants to.
..

The problem here, is that SSP itself gets turned-OFF after COMMRESET.
It does preserve settings over the COMMRESET, but it then has to be
renewed (re-issued by the driver) for things to survive a subsequent
COMMRESET after the first one.   This has to go into libata,
as it's not something we can control entirely from hdparm.

??

  parent reply	other threads:[~2008-03-07 14:45 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-05  9:50 SATA HDD password problem Rus V. Brushkoff
2008-03-05 12:30 ` Jeff Garzik
2008-03-05 12:49   ` Rus V. Brushkoff
2008-03-06  9:47     ` Tejun Heo
2008-03-06 12:31       ` Rus V. Brushkoff
2008-03-07  3:54         ` Tejun Heo
2008-03-07  9:17           ` Rus V. Brushkoff
2008-03-08  1:17             ` Tejun Heo
2008-03-08 16:12               ` Rus V. Brushkoff
2008-03-09  5:13                 ` Tejun Heo
2008-03-09  5:13                   ` Tejun Heo
2008-03-09 17:42                     ` Rus V. Brushkoff
2008-03-10  0:37                       ` Tejun Heo
2008-03-10  1:25                       ` [PATCH #upstream-fixes] ahci: implement skip_host_reset parameter Tejun Heo
2008-03-17 12:27                         ` Jeff Garzik
2008-03-07 14:45           ` Mark Lord [this message]
2008-03-08  0:51             ` SATA HDD password problem Tejun Heo

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=47D154F0.50607@rtr.ca \
    --to=liml@rtr.ca \
    --cc=htejun@gmail.com \
    --cc=jeff@garzik.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=rus@SoyuzKT.Od.UA \
    /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;
as well as URLs for NNTP newsgroup(s).