From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tejun Heo Subject: Re: [PATCH 2/4] libata: Implement disk shock protection support Date: Thu, 11 Sep 2008 14:51:36 +0200 Message-ID: <48C91458.7090503@gmail.com> References: <87wshzplvk.fsf@denkblock.local> <20080829211345.4355.89284.stgit@denkblock.local> <48B913E6.1000104@gmail.com> <87k5dym5t9.fsf@denkblock.local> <48BA638B.2030001@gmail.com> <87ej45mlp3.fsf@denkblock.local> <48BA969C.4060207@gmail.com> <87abetmaap.fsf@denkblock.local> <48BBA8D1.8020604@gmail.com> <87myirly1p.fsf@denkblock.local> <48BC1BB8.2030007@gmail.com> <87fxoh0yil.fsf@denkblock.local> <48BFA528.2040305@gmail.com> <87ej3zrf3o.fsf@denkblock.local> <48C0F2F8.1040308@gmail.com> <87ej3snm3s.fsf@denkblock.local> <48C7DC55.30002@gmail.com> <8763p3ol55.fsf@denkblock.local> <48C82CB1.2070308@gmail.com> <871vzrogpz.fsf@denkblock.local> <48C850AA.2030409@gmail.com> <87k5diq35g.fsf@denkblock.local> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from wa-out-1112.google.com ([209.85.146.180]:37182 "EHLO wa-out-1112.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752235AbYIKMxF (ORCPT ); Thu, 11 Sep 2008 08:53:05 -0400 Received: by wa-out-1112.google.com with SMTP id j37so207918waf.23 for ; Thu, 11 Sep 2008 05:53:03 -0700 (PDT) In-Reply-To: <87k5diq35g.fsf@denkblock.local> Sender: linux-ide-owner@vger.kernel.org List-Id: linux-ide@vger.kernel.org To: Elias Oltmanns Cc: Alan Cox , Andrew Morton , Bartlomiej Zolnierkiewicz , Jeff Garzik , Randy Dunlap , linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org Elias Oltmanns wrote: > We mustn't release the lock between pulling the actions into eh_context > and clearing eh_info, so I've designed ata_eh_pull_action() to be used > instead of ata_eh_about_to_do(). Yes, right again. :-) > What about the following patch? Also, I've slipped in a minor comment > fix to ata_eh_done() which probably doesn't warrant a separate patch; on > the other hand, mixing things like that isn't quite the right thing > either, so, perhaps I should drop it in the final version? Hmmm... I think either way is okay but there's no harm in splitting them. > From: Elias Oltmanns > Subject: [PATCH] libata: Implement disk shock protection support > > On user request (through sysfs), the IDLE IMMEDIATE command with UNLOAD > FEATURE as specified in ATA-7 is issued to the device and processing of > the request queue is stopped thereafter until the specified timeout > expires or user space asks to resume normal operation. This is supposed > to prevent the heads of a hard drive from accidentally crashing onto the > platter when a heavy shock is anticipated (like a falling laptop > expected to hit the floor). In fact, the whole port stops processing > commands until the timeout has expired in order to avoid any resets due > to failed commands on another device. > > Signed-off-by: Elias Oltmanns Acked-by: Tejun Heo -- tejun