diff options
author | Brett Russ <russb@emc.com> | 2005-03-28 15:10:27 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-05-15 19:00:51 -0400 |
commit | cdcca89e1a90fa9112260bd6384f20fcc4280e21 (patch) | |
tree | 303ddceb3a324067c6a18ec00b8643d313eb71e4 /include/linux | |
parent | 21b1ed74ee3667dcabcba92e486988ea9119a085 (diff) |
[PATCH] libata: flush COMRESET set and clear
Updated patch to fix erroneous flush of COMRESET set and missing flush
of COMRESET clear. Created a new routine scr_write_flush() to try to
prevent this in the future. Also, this patch is based on libata-2.6
instead of the previous libata-dev-2.6 based patch.
Signed-off-by: Brett Russ <russb@emc.com>
Index: libata-2.6/drivers/scsi/libata-core.c
===================================================================
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/libata.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index 505160ab472..1f7e2039a04 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -584,6 +584,13 @@ static inline void scr_write(struct ata_port *ap, unsigned int reg, u32 val) ap->ops->scr_write(ap, reg, val); } +static inline void scr_write_flush(struct ata_port *ap, unsigned int reg, + u32 val) +{ + ap->ops->scr_write(ap, reg, val); + (void) ap->ops->scr_read(ap, reg); +} + static inline unsigned int sata_dev_present(struct ata_port *ap) { return ((scr_read(ap, SCR_STATUS) & 0xf) == 0x3) ? 1 : 0; |