diff options
author | Tejun Heo <htejun@gmail.com> | 2007-07-05 00:31:27 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-07-10 21:30:33 -0400 |
commit | 75683fe7153c3817bb4fd4491e2a5913af6c463e (patch) | |
tree | 5c7bb12e577a328b41df16d036c7060309493f44 /include/linux/libata.h | |
parent | 39ce7128066f2ac5954bcda9f07f429f28166da3 (diff) |
libata: clean up horkage handling
Horkage handling had the following problems.
* dev->horkage was positioned after ATA_DEVICE_CLEAR_OFFSET, so it was
cleared before the device is configured. This broke
HORKAGE_DIAGNOSTIC.
* Some used dev->horkage while others called ata_device_blacklisted()
directly. This was at best confusing.
This patch moves dev->horkage right after dev->flags and set the field
according to the blacklist during device configuration. All users
test against dev->horkage. ata_device_blacklisted() now has only one
user, make it static. While at it, rename it to ata_dev_blacklisted()
for consistency.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r-- | include/linux/libata.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index 0c8b6578bd59..47cd2a1c5544 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -434,6 +434,7 @@ struct ata_device { | |||
434 | struct ata_port *ap; | 434 | struct ata_port *ap; |
435 | unsigned int devno; /* 0 or 1 */ | 435 | unsigned int devno; /* 0 or 1 */ |
436 | unsigned long flags; /* ATA_DFLAG_xxx */ | 436 | unsigned long flags; /* ATA_DFLAG_xxx */ |
437 | unsigned int horkage; /* List of broken features */ | ||
437 | struct scsi_device *sdev; /* attached SCSI device */ | 438 | struct scsi_device *sdev; /* attached SCSI device */ |
438 | #ifdef CONFIG_ATA_ACPI | 439 | #ifdef CONFIG_ATA_ACPI |
439 | acpi_handle acpi_handle; | 440 | acpi_handle acpi_handle; |
@@ -465,7 +466,6 @@ struct ata_device { | |||
465 | /* error history */ | 466 | /* error history */ |
466 | struct ata_ering ering; | 467 | struct ata_ering ering; |
467 | int spdn_cnt; | 468 | int spdn_cnt; |
468 | unsigned int horkage; /* List of broken features */ | ||
469 | }; | 469 | }; |
470 | 470 | ||
471 | /* Offset into struct ata_device. Fields above it are maintained | 471 | /* Offset into struct ata_device. Fields above it are maintained |
@@ -793,7 +793,6 @@ extern void ata_id_string(const u16 *id, unsigned char *s, | |||
793 | extern void ata_id_c_string(const u16 *id, unsigned char *s, | 793 | extern void ata_id_c_string(const u16 *id, unsigned char *s, |
794 | unsigned int ofs, unsigned int len); | 794 | unsigned int ofs, unsigned int len); |
795 | extern void ata_id_to_dma_mode(struct ata_device *dev, u8 unknown); | 795 | extern void ata_id_to_dma_mode(struct ata_device *dev, u8 unknown); |
796 | extern unsigned long ata_device_blacklisted(const struct ata_device *dev); | ||
797 | extern void ata_bmdma_setup (struct ata_queued_cmd *qc); | 796 | extern void ata_bmdma_setup (struct ata_queued_cmd *qc); |
798 | extern void ata_bmdma_start (struct ata_queued_cmd *qc); | 797 | extern void ata_bmdma_start (struct ata_queued_cmd *qc); |
799 | extern void ata_bmdma_stop(struct ata_queued_cmd *qc); | 798 | extern void ata_bmdma_stop(struct ata_queued_cmd *qc); |