From: Stephen Clark <Stephen.Clark@seclark.us>
To: Mark Lord <lkml@rtr.ca>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>, Tejun Heo <htejun@gmail.com>,
7eggert@gmx.de, Chuck Ebbert <cebbert@redhat.com>,
emisca <emisca.ml@gmail.com>,
Jan Engelhardt <jengelh@linux01.gwdg.de>,
Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
linux-ide@vger.kernel.org, Adrian Bunk <bunk@stusta.de>,
Andrew Morton <akpm@osdl.org>
Subject: Re: Loud "pop" coming from hard drive on reboot
Date: Wed, 18 Apr 2007 13:04:37 -0400 [thread overview]
Message-ID: <46264FA5.1070304@seclark.us> (raw)
In-Reply-To: <46263650.3080705@rtr.ca>
Mark Lord wrote:
>Alan Cox wrote:
>
>
>>>+ if (dev->needs_flush && ata_try_flush_cache(dev)) {
>>> return ata_scsi_flush_xlat;
>>>+ dev->needs_flush = 0;
>>>
>>>
>>Works better if you swap the dev-> and return lines
>>
>>
>
>Heh, yeah, I noticed that!
>
>Here it is, *tested* now, with another fix.
>
>It would be nice if somebody who can hear the "pop" would also test this,
>as it will confirm that this is a complete fix for the problem.
>My "pop" drives are busy elsewhere right now.
>
>Tejun might use something like this, or do something better in libata-core,
>but it's still helpful to have confirmation that we're on the right track.
>
>This patch eliminates the redundant "SYNCHRONIZE_CACHE" request at shutdown
>which is causing undue wear/tear/alarm to various systems.
>
>Signed-off-by: Mark Lord <mlord@pobox.com>
>---
>--- old/include/linux/libata.h 2007-04-18 10:30:25.000000000 -0400
>+++ linux/include/linux/libata.h 2007-04-18 10:30:28.000000000 -0400
>@@ -499,6 +499,7 @@
> struct ata_ering ering;
> int spdn_cnt;
> unsigned int horkage; /* List of broken features */
>+ int needs_sync_cache; /* 0==sync-cache not needed */
> #ifdef CONFIG_SATA_ACPI
> /* ACPI objects info */
> acpi_handle obj_handle;
>--- old/drivers/ata/libata-scsi.c 2007-04-18 10:48:34.000000000 -0400
>+++ linux/drivers/ata/libata-scsi.c 2007-04-18 10:51:09.000000000 -0400
>@@ -2749,18 +2749,20 @@
> return atapi_xlat;
>
> switch (cmd) {
>- case READ_6:
>- case READ_10:
>- case READ_16:
>-
> case WRITE_6:
> case WRITE_10:
> case WRITE_16:
>+ dev->needs_sync_cache = 1;
>+ case READ_6:
>+ case READ_10:
>+ case READ_16:
> return ata_scsi_rw_xlat;
>
> case SYNCHRONIZE_CACHE:
>- if (ata_try_flush_cache(dev))
>+ if (dev->needs_sync_cache && ata_try_flush_cache(dev)) {
>+ dev->needs_sync_cache = 0;
> return ata_scsi_flush_xlat;
>+ }
> break;
>
> case VERIFY:
>@@ -2769,6 +2771,7 @@
>
> case ATA_12:
> case ATA_16:
>+ dev->needs_sync_cache = 1;
> return ata_scsi_pass_thru;
>
> case START_STOP:
>-
>To unsubscribe from this list: send the line "unsubscribe linux-ide" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
>
I tried this on 2.6.20.2 it applied to libata with some fuzz and I had
to manually edit libata.h
When I did a shutdown I still got the click/pop.
I also noticed the last thing displayed on the lcd before it goes blank is
Synchronizing SCSI Disks - then the click/pop.
HTH,
Steve
--
"They that give up essential liberty to obtain temporary safety,
deserve neither liberty nor safety." (Ben Franklin)
"The course of history shows that as a government grows, liberty
decreases." (Thomas Jefferson)
next prev parent reply other threads:[~2007-04-18 17:04 UTC|newest]
Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <88SeR-5Sf-15@gated-at.bofh.it>
[not found] ` <88Sov-662-3@gated-at.bofh.it>
[not found] ` <88SHV-6uL-29@gated-at.bofh.it>
[not found] ` <8agVk-3wc-81@gated-at.bofh.it>
[not found] ` <8b3IR-4mE-25@gated-at.bofh.it>
[not found] ` <8b3SA-4z3-5@gated-at.bofh.it>
[not found] ` <8b42g-51N-15@gated-at.bofh.it>
[not found] ` <8bbdm-7iS-27@gated-at.bofh.it>
2007-04-18 11:47 ` Loud "pop" coming from hard drive on reboot Bodo Eggert
2007-04-18 12:05 ` Tejun Heo
2007-04-18 12:29 ` Alan Cox
2007-04-18 12:46 ` Tejun Heo
2007-04-18 12:50 ` Tejun Heo
2007-04-18 13:03 ` Alan Cox
2007-04-18 13:05 ` Tejun Heo
2007-04-18 13:39 ` Stephen Clark
2007-04-19 7:18 ` Jan Engelhardt
2007-04-19 12:59 ` Stephen Clark
2007-04-19 13:32 ` Mark Lord
2007-04-18 14:32 ` Mark Lord
2007-04-18 14:35 ` Mark Lord
2007-04-18 15:06 ` Alan Cox
2007-04-18 15:16 ` Mark Lord
2007-04-18 15:25 ` Tejun Heo
2007-04-18 17:08 ` Mark Lord
2007-04-18 17:19 ` Mark Lord
2007-04-18 17:46 ` Chuck Ebbert
2007-04-18 21:22 ` Bartlomiej Zolnierkiewicz
2007-04-18 21:27 ` Chuck Ebbert
2007-04-21 23:20 ` Peter Zijlstra
2007-04-23 23:27 ` Chuck Ebbert
2007-04-18 21:29 ` Greg Freemyer
2007-04-18 17:46 ` Stephen Clark
2007-04-19 17:50 ` Chuck Ebbert
2007-04-20 12:15 ` Stephen Clark
2007-04-20 19:57 ` Fabio Comolli
2007-04-21 9:45 ` emisca
2007-04-21 9:50 ` Fabio Comolli
2007-04-21 14:33 ` Jan Engelhardt
2007-04-21 15:11 ` Fabio Comolli
2007-04-18 17:04 ` Stephen Clark [this message]
[not found] <fa.C4axrtm0R4NUqTWfuNUHmUuWy3s@ifi.uio.no>
[not found] ` <fa.VWJWPLq+/tQvH9AK4UjcjZqbJe4@ifi.uio.no>
[not found] ` <fa.EnoRw2EXyWNvVcFxHrcbfZBCcsg@ifi.uio.no>
[not found] ` <fa.M3hXdZRYWoxu+2mG+LfZsZs6AKA@ifi.uio.no>
[not found] ` <fa.9O8bUjY5F4TzNzCQp6dHXDtOIR0@ifi.uio.no>
[not found] ` <fa.kwrK207qOU0rARQuJJKqsJ7Nk4w@ifi.uio.no>
2007-04-18 22:58 ` Robert Hancock
[not found] <fa.XZdGeaFaW9WSFIAsz5f9RETfH0c@ifi.uio.no>
[not found] ` <fa.8Q2FxIVtQ1sfsfDBeXACAS7rK6Y@ifi.uio.no>
2007-04-18 22:57 ` Robert Hancock
[not found] <fa.nTNVZ3bPe8773+gVV7CvcwBT5zY@ifi.uio.no>
2007-04-13 23:21 ` Robert Hancock
[not found] ` <fa.r8VLu18GDND9EByYV/EX2mH9V88@ifi.uio.no>
[not found] ` <fa.30Zxf5IYhdVc+I5v0caKmHH3HmE@ifi.uio.no>
[not found] ` <fa.EFm9zBLufsOlxdviaZmnBDcbYgY@ifi.uio.no>
[not found] ` <fa.TBFIUvjBaGbwUHy5JUiGJpvOeMI@ifi.uio.no>
[not found] ` <fa.jDn5j5GVDwXXnVYH74vVT3m+Gq8@ifi.uio.no>
2007-04-18 23:00 ` Robert Hancock
2007-04-18 23:25 ` Chuck Ebbert
2007-04-19 13:30 ` emisca
2007-04-11 21:07 Chuck Ebbert
2007-04-11 21:16 ` Jan Engelhardt
2007-04-11 21:35 ` Chuck Ebbert
2007-04-11 21:49 ` Jan Engelhardt
2007-04-11 22:07 ` Chuck Ebbert
2007-04-13 19:42 ` Bartlomiej Zolnierkiewicz
2007-04-13 19:36 ` Chuck Ebbert
2007-04-13 20:47 ` Bartlomiej Zolnierkiewicz
2007-04-13 21:13 ` Chuck Ebbert
2007-04-15 16:07 ` emisca
2007-04-15 19:06 ` auxsvr
2007-04-17 21:41 ` Mark Lord
2007-04-17 21:49 ` Chuck Ebbert
2007-04-17 22:03 ` Mark Lord
2007-04-18 5:39 ` Tejun Heo
2007-04-18 21:31 ` Bartlomiej Zolnierkiewicz
2007-04-18 23:36 ` Mark Lord
2007-04-18 23:51 ` Mark Lord
2007-04-14 10:52 ` Pavel Machek
2007-04-15 15:53 ` Henrique de Moraes Holschuh
2007-04-15 18:50 ` Jan Engelhardt
2007-04-16 22:26 ` Chuck Ebbert
2007-04-17 7:00 ` emisca
2007-04-17 7:00 ` emisca
2007-04-17 7:37 ` Fabio Comolli
2007-04-17 20:15 ` Henrique de Moraes Holschuh
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=46264FA5.1070304@seclark.us \
--to=stephen.clark@seclark.us \
--cc=7eggert@gmx.de \
--cc=akpm@osdl.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=bunk@stusta.de \
--cc=bzolnier@gmail.com \
--cc=cebbert@redhat.com \
--cc=emisca.ml@gmail.com \
--cc=htejun@gmail.com \
--cc=jengelh@linux01.gwdg.de \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkml@rtr.ca \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.