]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/libata.h
Blackfin arch: enable a choice to provide 4M DMA memory
[linux-2.6-omap-h63xx.git] / include / linux / libata.h
index 165734a2dd47318af7864ce187f613cfbead6ffb..0f17643e0a6e06c6942ceba10017b99c12674027 100644 (file)
@@ -443,7 +443,7 @@ enum link_pm {
        MAX_PERFORMANCE,
        MEDIUM_POWER,
 };
-extern struct class_device_attribute class_device_attr_link_power_management_policy;
+extern struct device_attribute dev_attr_link_power_management_policy;
 
 #ifdef CONFIG_ATA_SFF
 struct ata_ioports {
@@ -548,11 +548,6 @@ struct ata_device {
        u64                     n_sectors;      /* size of device, if ATA */
        unsigned int            class;          /* ATA_DEV_xxx */
 
-       union {
-               u16             id[ATA_ID_WORDS]; /* IDENTIFY xxx DEVICE data */
-               u32             gscr[SATA_PMP_GSCR_DWORDS]; /* PMP GSCR block */
-       };
-
        u8                      pio_mode;
        u8                      dma_mode;
        u8                      xfer_mode;
@@ -574,8 +569,13 @@ struct ata_device {
        u16                     sectors;        /* Number of sectors per track */
 
        /* error history */
-       struct ata_ering        ering;
        int                     spdn_cnt;
+       struct ata_ering        ering;
+
+       union {
+               u16             id[ATA_ID_WORDS]; /* IDENTIFY xxx DEVICE data */
+               u32             gscr[SATA_PMP_GSCR_DWORDS]; /* PMP GSCR block */
+       };
 };
 
 /* Offset into struct ata_device.  Fields above it are maintained
@@ -847,7 +847,6 @@ static inline int ata_port_is_dummy(struct ata_port *ap)
        return ap->ops == &ata_dummy_port_ops;
 }
 
-extern void sata_print_link_status(struct ata_link *link);
 extern void ata_port_probe(struct ata_port *);
 extern int sata_set_spd(struct ata_link *link);
 extern int ata_std_prereset(struct ata_link *link, unsigned long deadline);
@@ -1040,6 +1039,7 @@ extern void ata_eh_thaw_port(struct ata_port *ap);
 
 extern void ata_eh_qc_complete(struct ata_queued_cmd *qc);
 extern void ata_eh_qc_retry(struct ata_queued_cmd *qc);
+extern void ata_eh_analyze_ncq_error(struct ata_link *link);
 
 extern void ata_do_eh(struct ata_port *ap, ata_prereset_fn_t prereset,
                      ata_reset_fn_t softreset, ata_reset_fn_t hardreset,
@@ -1382,6 +1382,18 @@ static inline struct ata_port *ata_shost_to_port(struct Scsi_Host *host)
        return *(struct ata_port **)&host->hostdata[0];
 }
 
+static inline int ata_check_ready(u8 status)
+{
+       if (!(status & ATA_BUSY))
+               return 1;
+
+       /* 0xff indicates either no device or device not ready */
+       if (status == 0xff)
+               return -ENODEV;
+
+       return 0;
+}
+
 
 /**************************************************************************
  * PMP - drivers/ata/libata-pmp.c