[PATCH] libata: cosmetic changes to constants
[sfrench/cifs-2.6.git] / include / linux / libata.h
index 8715305f611fc77dffd990b6d2097e36aeff3c1b..e54a5fd6a41eca76454e1918fb41afd235c7b32e 100644 (file)
 #include <linux/workqueue.h>
 #include <scsi/scsi_host.h>
 
+/*
+ * Define if arch has non-standard setup.  This is a _PCI_ standard
+ * not a legacy or ISA standard.
+ */
+#ifdef CONFIG_ATA_NONSTANDARD
 #include <asm/libata-portmap.h>
+#else
+#include <asm-generic/libata-portmap.h>
+#endif
 
 /*
  * compile-time options: to be removed as soon as all the drivers are
@@ -101,6 +109,10 @@ static inline u32 ata_msg_init(int dval, int default_msg_enable_bits)
 #define ATA_TAG_POISON         0xfafbfcfdU
 
 /* move to PCI layer? */
+#define PCI_VDEVICE(vendor, device)            \
+       PCI_VENDOR_ID_##vendor, (device),       \
+       PCI_ANY_ID, PCI_ANY_ID, 0, 0
+
 static inline struct device *pci_dev_to_dev(struct pci_dev *pdev)
 {
        return &pdev->dev;
@@ -130,8 +142,8 @@ enum {
        ATA_DFLAG_NCQ           = (1 << 3), /* device supports NCQ */
        ATA_DFLAG_CFG_MASK      = (1 << 8) - 1,
 
-       ATA_DFLAG_PIO           = (1 << 8), /* device currently in PIO mode */
-       ATA_DFLAG_SUSPENDED     = (1 << 9), /* device suspended */
+       ATA_DFLAG_PIO           = (1 << 8), /* device limited to PIO mode */
+       ATA_DFLAG_SUSPENDED     = (1 << 10), /* device suspended */
        ATA_DFLAG_INIT_MASK     = (1 << 16) - 1,
 
        ATA_DFLAG_DETACH        = (1 << 16),
@@ -289,6 +301,11 @@ enum {
         * most devices.
         */
        ATA_SPINUP_WAIT         = 8000,
+       
+       /* Horkage types. May be set by libata or controller on drives
+          (some horkage may be drive/controller pair dependant */
+
+       ATA_HORKAGE_DIAGNOSTIC  = (1 << 0),     /* Failed boot diag */
 };
 
 enum hsm_task_states {
@@ -361,6 +378,14 @@ struct ata_probe_ent {
        unsigned long           _host_flags;
        void __iomem            *mmio_base;
        void                    *private_data;
+
+       /* port_info for the secondary port.  Together with irq2, it's
+        * used to implement non-uniform secondary port.  Currently,
+        * the only user is ata_piix combined mode.  This workaround
+        * will be removed together with ata_probe_ent when init model
+        * is updated.
+        */
+       const struct ata_port_info *pinfo2;
 };
 
 struct ata_host {
@@ -468,6 +493,7 @@ struct ata_device {
 
        /* error history */
        struct ata_ering        ering;
+       unsigned int            horkage;        /* List of broken features */
 };
 
 /* Offset into struct ata_device.  Fields above it are maintained