diff options
author | Tejun Heo <htejun@gmail.com> | 2008-04-07 09:47:19 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-04-17 15:44:23 -0400 |
commit | 57c9efdfb3cee5d4564fcb5f70555e2edb1bc52a (patch) | |
tree | c2289500f093736853a94d2d9577036658676498 /drivers/ata/libata.h | |
parent | 9dadd45b24145d6aee2fabb28d7aef972301892b (diff) |
libata: implement and use sata_std_hardreset()
Implement sata_std_hardreset(), which simply wraps around
sata_link_hardreset(). sata_std_hardreset() becomes new standard
hardreset method for sata_port_ops and sata_sff_hardreset() moves from
ata_base_port_ops to ata_sff_port_ops, which is where it really
belongs.
ata_is_builtin_hardreset() is added so that both
ata_std_error_handler() and ata_sff_error_handler() skip both builtin
hardresets if SCR isn't accessible.
piix_sidpr_hardreset() in ata_piix.c is identical to
sata_std_hardreset() in functionality and got replaced with the
standard function.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Diffstat (limited to 'drivers/ata/libata.h')
-rw-r--r-- | drivers/ata/libata.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/ata/libata.h b/drivers/ata/libata.h index 08af43e2c081..87f54a1db3b0 100644 --- a/drivers/ata/libata.h +++ b/drivers/ata/libata.h | |||
@@ -38,6 +38,15 @@ struct ata_scsi_args { | |||
38 | void (*done)(struct scsi_cmnd *); | 38 | void (*done)(struct scsi_cmnd *); |
39 | }; | 39 | }; |
40 | 40 | ||
41 | static inline int ata_is_builtin_hardreset(ata_reset_fn_t reset) | ||
42 | { | ||
43 | if (reset == sata_std_hardreset) | ||
44 | return 1; | ||
45 | if (reset == sata_sff_hardreset) | ||
46 | return 1; | ||
47 | return 0; | ||
48 | } | ||
49 | |||
41 | /* libata-core.c */ | 50 | /* libata-core.c */ |
42 | enum { | 51 | enum { |
43 | /* flags for ata_dev_read_id() */ | 52 | /* flags for ata_dev_read_id() */ |