libata: kill the infamous abnormal status message
[sfrench/cifs-2.6.git] / include / linux / libata.h
index 8a7cc13c8516816cfaa94c82c3dde6e0b12ea67a..a3380f8086300703dcbe96fdc589c4033e2a547a 100644 (file)
@@ -140,6 +140,7 @@ enum {
 
        ATA_DFLAG_PIO           = (1 << 8), /* device limited to PIO mode */
        ATA_DFLAG_NCQ_OFF       = (1 << 9), /* device limited to non-NCQ mode */
+       ATA_DFLAG_SPUNDOWN      = (1 << 10), /* XXX: for spindown_compat */
        ATA_DFLAG_INIT_MASK     = (1 << 16) - 1,
 
        ATA_DFLAG_DETACH        = (1 << 16),
@@ -170,9 +171,9 @@ enum {
        ATA_FLAG_SKIP_D2H_BSY   = (1 << 12), /* can't wait for the first D2H
                                              * Register FIS clearing BSY */
        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 */
+       ATA_FLAG_ACPI_SATA      = (1 << 17), /* need native SATA ACPI layout */
 
        /* The following flag belongs to ap->pflags but is kept in
         * ap->flags because it's referenced in many LLDs and will be
@@ -190,6 +191,7 @@ enum {
        ATA_PFLAG_LOADING       = (1 << 4), /* boot/loading probe */
        ATA_PFLAG_UNLOADING     = (1 << 5), /* module is unloading */
        ATA_PFLAG_SCSI_HOTPLUG  = (1 << 6), /* SCSI hotplug scheduled */
+       ATA_PFLAG_INITIALIZING  = (1 << 7), /* being initialized, don't touch */
 
        ATA_PFLAG_FLUSH_PORT_TASK = (1 << 16), /* flush port task */
        ATA_PFLAG_SUSPENDED     = (1 << 17), /* port is suspended (power) */
@@ -253,10 +255,6 @@ enum {
        ATA_DMA_PAD_SZ          = 4,
        ATA_DMA_PAD_BUF_SZ      = ATA_DMA_PAD_SZ * ATA_MAX_QUEUE,
 
-       /* masks for port functions */
-       ATA_PORT_PRIMARY        = (1 << 0),
-       ATA_PORT_SECONDARY      = (1 << 1),
-
        /* ering size */
        ATA_ERING_SIZE          = 32,
 
@@ -434,7 +432,6 @@ struct ata_device {
        struct scsi_device      *sdev;          /* attached SCSI device */
        /* n_sector is used as CLEAR_OFFSET, read comment above CLEAR_OFFSET */
        u64                     n_sectors;      /* size of device, if ATA */
-       u64                     n_sectors_boot; /* size of ATA device at startup */
        unsigned int            class;          /* ATA_DEV_xxx */
        u16                     id[ATA_ID_WORDS]; /* IDENTIFY xxx DEVICE data */
        u8                      pio_mode;
@@ -461,7 +458,7 @@ struct ata_device {
        struct ata_ering        ering;
        int                     spdn_cnt;
        unsigned int            horkage;        /* List of broken features */
-#ifdef CONFIG_SATA_ACPI
+#ifdef CONFIG_ATA_ACPI
        /* ACPI objects info */
        acpi_handle obj_handle;
 #endif
@@ -576,8 +573,6 @@ struct ata_port_operations {
        void (*phy_reset) (struct ata_port *ap); /* obsolete */
        int  (*set_mode) (struct ata_port *ap, struct ata_device **r_failed_dev);
 
-       void (*post_set_mode) (struct ata_port *ap);
-
        int (*cable_detect) (struct ata_port *ap);
 
        int  (*check_atapi_dma) (struct ata_queued_cmd *qc);
@@ -688,8 +683,8 @@ extern void ata_std_postreset(struct ata_port *ap, unsigned int *classes);
 extern void ata_port_disable(struct ata_port *);
 extern void ata_std_ports(struct ata_ioports *ioaddr);
 #ifdef CONFIG_PCI
-extern int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_info,
-                            unsigned int n_ports);
+extern int ata_pci_init_one (struct pci_dev *pdev,
+                            const struct ata_port_info * const * ppi);
 extern void ata_pci_remove_one (struct pci_dev *pdev);
 #ifdef CONFIG_PM
 extern void ata_pci_device_do_suspend(struct pci_dev *pdev, pm_message_t mesg);
@@ -758,6 +753,7 @@ extern u8 ata_check_status(struct ata_port *ap);
 extern u8 ata_altstatus(struct ata_port *ap);
 extern void ata_exec_command(struct ata_port *ap, const struct ata_taskfile *tf);
 extern int ata_port_start (struct ata_port *ap);
+extern int ata_sff_port_start (struct ata_port *ap);
 extern irqreturn_t ata_interrupt (int irq, void *dev_instance);
 extern void ata_data_xfer(struct ata_device *adev, unsigned char *buf,
                          unsigned int buflen, int write_data);
@@ -854,11 +850,11 @@ struct pci_bits {
        unsigned long           val;
 };
 
-extern int ata_pci_init_native_host(struct ata_host *host,
-                                   unsigned int port_mask);
+extern int ata_pci_init_native_host(struct ata_host *host);
+extern int ata_pci_init_bmdma(struct ata_host *host);
 extern int ata_pci_prepare_native_host(struct pci_dev *pdev,
                                const struct ata_port_info * const * ppi,
-                               int n_ports, struct ata_host **r_host);
+                               struct ata_host **r_host);
 extern int pci_test_config_bits(struct pci_dev *pdev, const struct pci_bits *bits);
 extern unsigned long ata_pci_default_filter(struct ata_device *, unsigned long);
 #endif /* CONFIG_PCI */
@@ -1092,11 +1088,9 @@ static inline u8 ata_wait_idle(struct ata_port *ap)
 {
        u8 status = ata_busy_wait(ap, ATA_BUSY | ATA_DRQ, 1000);
 
-       if (status != 0xff && (status & (ATA_BUSY | ATA_DRQ))) {
-               if (ata_msg_warn(ap))
-                       printk(KERN_WARNING "ATA: abnormal status 0x%X on port 0x%p\n",
-                               status, ap->ioaddr.status_addr);
-       }
+       if (status != 0xff && (status & (ATA_BUSY | ATA_DRQ)))
+               DPRINTK("ATA: abnormal status 0x%X on port 0x%p\n",
+                       status, ap->ioaddr.status_addr);
 
        return status;
 }