* [PATCH] libata: remove unused HSM_ST_UNKNOWN
@ 2006-11-17 3:05 Tejun Heo
2006-11-28 9:00 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: Tejun Heo @ 2006-11-17 3:05 UTC (permalink / raw)
To: Jeff Garzik, linux-ide
HSM_ST_UNKNOWN is not used anywhere. Its value is zero and supposed
to serve sanity check purpose but HSM_ST_IDLE is used for that
purpose. This unused state causes confusion. After a port is
initialized but before the first command is executed, the idle hsm
state is UNKNOWN. However, once a command has completed, the idle hsm
state is IDLE. This defeats sanity check in ata_pio_task() for the
first command.
This patch removes HSM_ST_UNKNOWN and consequently make HSM_ST_IDLE
the default state.
Signed-off-by: Tejun Heo <htejun@gmail.com>
---
include/linux/libata.h | 1 -
1 file changed, 1 deletion(-)
Index: work/include/linux/libata.h
===================================================================
--- work.orig/include/linux/libata.h
+++ work/include/linux/libata.h
@@ -315,7 +315,6 @@ enum {
};
enum hsm_task_states {
- HSM_ST_UNKNOWN, /* state unknown */
HSM_ST_IDLE, /* no command on going */
HSM_ST, /* (waiting the device to) transfer data */
HSM_ST_LAST, /* (waiting the device to) complete command */
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] libata: remove unused HSM_ST_UNKNOWN
2006-11-17 3:05 [PATCH] libata: remove unused HSM_ST_UNKNOWN Tejun Heo
@ 2006-11-28 9:00 ` Jeff Garzik
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2006-11-28 9:00 UTC (permalink / raw)
To: Tejun Heo; +Cc: linux-ide
Tejun Heo wrote:
> HSM_ST_UNKNOWN is not used anywhere. Its value is zero and supposed
> to serve sanity check purpose but HSM_ST_IDLE is used for that
> purpose. This unused state causes confusion. After a port is
> initialized but before the first command is executed, the idle hsm
> state is UNKNOWN. However, once a command has completed, the idle hsm
> state is IDLE. This defeats sanity check in ata_pio_task() for the
> first command.
>
> This patch removes HSM_ST_UNKNOWN and consequently make HSM_ST_IDLE
> the default state.
>
> Signed-off-by: Tejun Heo <htejun@gmail.com>
ACK
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-11-28 9:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-17 3:05 [PATCH] libata: remove unused HSM_ST_UNKNOWN Tejun Heo
2006-11-28 9:00 ` Jeff Garzik
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).