* [PATCH] libata: fix translation for START STOP UNIT
@ 2007-01-29 1:29 Robert Hancock
2007-01-30 14:24 ` Jeff Garzik
0 siblings, 1 reply; 8+ messages in thread
From: Robert Hancock @ 2007-01-29 1:29 UTC (permalink / raw)
To: linux-kernel, linux-ide, Jeff Garzik
[-- Attachment #1: Type: text/plain, Size: 736 bytes --]
Applies to 2.6.20-rc6.
---
libata's SCSI translation for the SCSI START STOP UNIT command with the
START bit clear (i.e. stopping the drive) appears to be incorrect. It
sends an ATA STANDBY command with the time period set to 0, which the
code comment says means "now", but the ATA standard says this means
disable the standby timer, which effectively does nothing. Change this
to issue a STANDBY IMMEDIATE command which will actually spin the drive
down. The SAT (SCSI/ATA Translation) standard revision 9 concurs with
this choice.
Signed-off-by: Robert Hancock <hancockr@shaw.ca>
--
Robert Hancock Saskatoon, SK, Canada
To email, remove "nospam" from hancockr@nospamshaw.ca
Home Page: http://www.roberthancock.com/
[-- Attachment #2: libata-fix-start-stop-unit-translation.patch --]
[-- Type: text/plain, Size: 688 bytes --]
--- linux-2.6.20-rc6nv/drivers/ata/libata-scsi.c 2007-01-28 16:59:58.000000000 -0600
+++ linux-2.6.20-rc6nvedit/drivers/ata/libata-scsi.c 2007-01-28 17:30:12.000000000 -0600
@@ -983,11 +983,10 @@ static unsigned int ata_scsi_start_stop_
}
tf->command = ATA_CMD_VERIFY; /* READ VERIFY */
- } else {
- tf->nsect = 0; /* time period value (0 implies now) */
- tf->command = ATA_CMD_STANDBY;
- /* Consider: ATA STANDBY IMMEDIATE command */
- }
+ } else
+ /* Issue ATA STANDBY IMMEDIATE command */
+ tf->command = ATA_CMD_STANDBYNOW1;
+
/*
* Standby and Idle condition timers could be implemented but that
* would require libata to implement the Power condition mode page
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] libata: fix translation for START STOP UNIT
2007-01-29 1:29 [PATCH] libata: fix translation for START STOP UNIT Robert Hancock
@ 2007-01-30 14:24 ` Jeff Garzik
2007-01-30 14:36 ` Robert Hancock
0 siblings, 1 reply; 8+ messages in thread
From: Jeff Garzik @ 2007-01-30 14:24 UTC (permalink / raw)
To: Robert Hancock; +Cc: linux-kernel, linux-ide
Robert Hancock wrote:
> Applies to 2.6.20-rc6.
>
> ---
>
> libata's SCSI translation for the SCSI START STOP UNIT command with the
> START bit clear (i.e. stopping the drive) appears to be incorrect. It
> sends an ATA STANDBY command with the time period set to 0, which the
> code comment says means "now", but the ATA standard says this means
> disable the standby timer, which effectively does nothing. Change this
> to issue a STANDBY IMMEDIATE command which will actually spin the drive
> down. The SAT (SCSI/ATA Translation) standard revision 9 concurs with
> this choice.
>
> Signed-off-by: Robert Hancock <hancockr@shaw.ca>
FWIW, I am having to apply Andrew Morton's version of your patches,
because your patch form isn't quite right. Review
Documentation/SubmittingPatches and http://linux.yyz.us/patch-format.html
Most notably:
* Your patch description follows the "---" terminator, which is
precisely the opposite of what should happen. In the correct form, any
comments such as "Applies to 2.6.20-rc6" should follow the "---"
terminator, which in turn follows the patch description and signoff.
* Include the patch inline rather than as an attachment. Even a
text/plain attachment is very difficult to review and quote in popular
email programs.
Jeff
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] libata: fix translation for START STOP UNIT
2007-01-30 14:24 ` Jeff Garzik
@ 2007-01-30 14:36 ` Robert Hancock
2007-01-30 14:43 ` Jeff Garzik
2007-01-31 0:38 ` Mark Lord
0 siblings, 2 replies; 8+ messages in thread
From: Robert Hancock @ 2007-01-30 14:36 UTC (permalink / raw)
To: Jeff Garzik; +Cc: linux-kernel, linux-ide
Jeff Garzik wrote:
> * Include the patch inline rather than as an attachment. Even a
> text/plain attachment is very difficult to review and quote in popular
> email programs.
>
> Jeff
I'd love to, but unfortunately nobody seems to have come up with a way
of doing this in Thunderbird that keeps it from mangling whitespace
without a ton of hassle. I was able to get it to cooperate once (sort
of, anyway, I think it may have still damaged something on the first
try), but it required mangling a bunch of settings that made using it
for normal mail impossible.
The last time I looked, the main "how-to" page I found had an addendum
that "I gave up on this, it's too hard, I just attach the patches". If
anyone has gotten any new insight..
--
Robert Hancock Saskatoon, SK, Canada
To email, remove "nospam" from hancockr@nospamshaw.ca
Home Page: http://www.roberthancock.com/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] libata: fix translation for START STOP UNIT
2007-01-30 14:36 ` Robert Hancock
@ 2007-01-30 14:43 ` Jeff Garzik
2007-01-31 8:22 ` Martin J. Bligh
2007-01-31 0:38 ` Mark Lord
1 sibling, 1 reply; 8+ messages in thread
From: Jeff Garzik @ 2007-01-30 14:43 UTC (permalink / raw)
To: Robert Hancock; +Cc: linux-kernel, linux-ide
Robert Hancock wrote:
> Jeff Garzik wrote:
>> * Include the patch inline rather than as an attachment. Even a
>> text/plain attachment is very difficult to review and quote in popular
>> email programs.
>>
>> Jeff
>
> I'd love to, but unfortunately nobody seems to have come up with a way
> of doing this in Thunderbird that keeps it from mangling whitespace
> without a ton of hassle. I was able to get it to cooperate once (sort
> of, anyway, I think it may have still damaged something on the first
> try), but it required mangling a bunch of settings that made using it
> for normal mail impossible.
>
> The last time I looked, the main "how-to" page I found had an addendum
> that "I gave up on this, it's too hard, I just attach the patches". If
> anyone has gotten any new insight..
Just use "cat mail | sendmail -t" or git-send-email, Thunderbird will
never get this stuff right.
I'm fighting Thunderbird right this second, in fact, because it randomly
decided to stop supporting drag-n-drop to sub-folders in Fedora Core 6 :(
Jeff
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] libata: fix translation for START STOP UNIT
2007-01-30 14:43 ` Jeff Garzik
@ 2007-01-31 8:22 ` Martin J. Bligh
0 siblings, 0 replies; 8+ messages in thread
From: Martin J. Bligh @ 2007-01-31 8:22 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Robert Hancock, linux-kernel, linux-ide, Andrew Morton
Jeff Garzik wrote:
> Robert Hancock wrote:
>> Jeff Garzik wrote:
>>> * Include the patch inline rather than as an attachment. Even a
>>> text/plain attachment is very difficult to review and quote in
>>> popular email programs.
>>>
>>> Jeff
>>
>> I'd love to, but unfortunately nobody seems to have come up with a way
>> of doing this in Thunderbird that keeps it from mangling whitespace
>> without a ton of hassle. I was able to get it to cooperate once (sort
>> of, anyway, I think it may have still damaged something on the first
>> try), but it required mangling a bunch of settings that made using it
>> for normal mail impossible.
>>
>> The last time I looked, the main "how-to" page I found had an addendum
>> that "I gave up on this, it's too hard, I just attach the patches". If
>> anyone has gotten any new insight..
>
> Just use "cat mail | sendmail -t" or git-send-email, Thunderbird will
> never get this stuff right.
>
> I'm fighting Thunderbird right this second, in fact, because it randomly
> decided to stop supporting drag-n-drop to sub-folders in Fedora Core 6 :(
http://mbligh.org/linuxdocs/Email/Clients/Thunderbird
Describes how to fix this.
M.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] libata: fix translation for START STOP UNIT
2007-01-30 14:36 ` Robert Hancock
2007-01-30 14:43 ` Jeff Garzik
@ 2007-01-31 0:38 ` Mark Lord
2007-02-01 0:27 ` Tejun Heo
1 sibling, 1 reply; 8+ messages in thread
From: Mark Lord @ 2007-01-31 0:38 UTC (permalink / raw)
To: Robert Hancock; +Cc: Jeff Garzik, linux-kernel, linux-ide
Robert Hancock wrote:
> Jeff Garzik wrote:
>> * Include the patch inline rather than as an attachment.
..
>
> I'd love to, but unfortunately nobody seems to have come up with a way
> of doing this in Thunderbird that keeps it from mangling whitespace
Yup, major nuisance. I have to fire up Kmail whenever I'm posting patches,
and then go back to Thunderbird again afterwards.
Cheers
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] libata: fix translation for START STOP UNIT
2007-01-31 0:38 ` Mark Lord
@ 2007-02-01 0:27 ` Tejun Heo
2007-02-01 1:04 ` Mark Lord
0 siblings, 1 reply; 8+ messages in thread
From: Tejun Heo @ 2007-02-01 0:27 UTC (permalink / raw)
To: Mark Lord; +Cc: Robert Hancock, Jeff Garzik, linux-kernel, linux-ide
Mark Lord wrote:
> Robert Hancock wrote:
>> I'd love to, but unfortunately nobody seems to have come up with a way
>> of doing this in Thunderbird that keeps it from mangling whitespace
>
> Yup, major nuisance. I have to fire up Kmail whenever I'm posting patches,
> and then go back to Thunderbird again afterwards.
A much better solution with thunderbird is using external editor
extension.
http://globs.org/articles.php?lng=en&pg=2
Install the extension. Configure it with your favorite editor.
Thunderbird won't do a thing about your message if you turn off
linewrap.
For example, this line starts with a tab and a space and (double tab) is very long and I'm writing in emacs fired up from thunderbird. (double space)
Cheers.
--
tejun
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2007-02-01 1:04 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-29 1:29 [PATCH] libata: fix translation for START STOP UNIT Robert Hancock
2007-01-30 14:24 ` Jeff Garzik
2007-01-30 14:36 ` Robert Hancock
2007-01-30 14:43 ` Jeff Garzik
2007-01-31 8:22 ` Martin J. Bligh
2007-01-31 0:38 ` Mark Lord
2007-02-01 0:27 ` Tejun Heo
2007-02-01 1:04 ` Mark Lord
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).