From 75683fe7153c3817bb4fd4491e2a5913af6c463e Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Thu, 5 Jul 2007 13:31:27 +0900 Subject: 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 Signed-off-by: Jeff Garzik --- include/linux/libata.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include/linux/libata.h') diff --git a/include/linux/libata.h b/include/linux/libata.h index 0c8b6578bd5..47cd2a1c554 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -434,6 +434,7 @@ struct ata_device { struct ata_port *ap; unsigned int devno; /* 0 or 1 */ unsigned long flags; /* ATA_DFLAG_xxx */ + unsigned int horkage; /* List of broken features */ struct scsi_device *sdev; /* attached SCSI device */ #ifdef CONFIG_ATA_ACPI acpi_handle acpi_handle; @@ -465,7 +466,6 @@ struct ata_device { /* error history */ struct ata_ering ering; int spdn_cnt; - unsigned int horkage; /* List of broken features */ }; /* 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, extern void ata_id_c_string(const u16 *id, unsigned char *s, unsigned int ofs, unsigned int len); extern void ata_id_to_dma_mode(struct ata_device *dev, u8 unknown); -extern unsigned long ata_device_blacklisted(const struct ata_device *dev); extern void ata_bmdma_setup (struct ata_queued_cmd *qc); extern void ata_bmdma_start (struct ata_queued_cmd *qc); extern void ata_bmdma_stop(struct ata_queued_cmd *qc); -- cgit v1.2.3