X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=include%2Flinux%2Flibata.h;h=5233e47eeb896dbcc5430ea03a2da2da1cad318d;hb=6d1245bf294e9ea65b3717be9fa0338bfb6ff6c9;hp=bdfe6ea8edf7633f873ca867bfb86b5732010543;hpb=836250069fc0eeebe8b6aed772281535cc6e34f9;p=powerpc.git diff --git a/include/linux/libata.h b/include/linux/libata.h index bdfe6ea8ed..5233e47eeb 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -35,6 +35,7 @@ #include #include #include +#include /* * Define if arch has non-standard setup. This is a _PCI_ standard @@ -54,8 +55,6 @@ #undef ATA_VERBOSE_DEBUG /* yet more debugging output */ #undef ATA_IRQ_TRAP /* define to ack screaming irqs */ #undef ATA_NDEBUG /* define to disable quick runtime checks */ -#define ATA_ENABLE_PATA /* define to enable PATA support in some - * low-level drivers */ /* note: prints function name for you */ @@ -174,6 +173,7 @@ enum { ATA_FLAG_DEBUGMSG = (1 << 13), ATA_FLAG_SETXFER_POLLING= (1 << 14), /* use polling for SETXFER */ ATA_FLAG_IGN_SIMPLEX = (1 << 15), /* ignore SIMPLEX */ + ATA_FLAG_NO_IORDY = (1 << 16), /* controller lacks iordy */ /* The following flag belongs to ap->pflags but is kept in * ap->flags because it's referenced in many LLDs and will be @@ -495,7 +495,12 @@ struct ata_device { /* error history */ struct ata_ering ering; + int spdn_cnt; unsigned int horkage; /* List of broken features */ +#ifdef CONFIG_SATA_ACPI + /* ACPI objects info */ + acpi_handle obj_handle; +#endif }; /* Offset into struct ata_device. Fields above it are maintained @@ -755,6 +760,7 @@ extern void ata_port_queue_task(struct ata_port *ap, work_func_t fn, extern u32 ata_wait_register(void __iomem *reg, u32 mask, u32 val, unsigned long interval_msec, unsigned long timeout_msec); +extern unsigned int ata_dev_try_classify(struct ata_port *, unsigned int, u8 *); /* * Default driver ops implementations @@ -1027,6 +1033,21 @@ static inline u8 ata_chk_status(struct ata_port *ap) return ap->ops->check_status(ap); } +/** + * ata_ncq_enabled - Test whether NCQ is enabled + * @dev: ATA device to test for + * + * LOCKING: + * spin_lock_irqsave(host lock) + * + * RETURNS: + * 1 if NCQ is enabled for @dev, 0 otherwise. + */ +static inline int ata_ncq_enabled(struct ata_device *dev) +{ + return (dev->flags & (ATA_DFLAG_PIO | ATA_DFLAG_NCQ_OFF | + ATA_DFLAG_NCQ)) == ATA_DFLAG_NCQ; +} /** * ata_pause - Flush writes and pause 400 nanoseconds.