aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ata/libata-core.c26
-rw-r--r--drivers/ata/libata.h1
2 files changed, 0 insertions, 27 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 4d78f5debb6c..fa205d7c5bea 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -4800,32 +4800,6 @@ int ata_link_offline(struct ata_link *link)
4800 return 0; 4800 return 0;
4801} 4801}
4802 4802
4803int ata_flush_cache(struct ata_device *dev)
4804{
4805 unsigned int err_mask;
4806 u8 cmd;
4807
4808 if (!ata_try_flush_cache(dev))
4809 return 0;
4810
4811 if (dev->flags & ATA_DFLAG_FLUSH_EXT)
4812 cmd = ATA_CMD_FLUSH_EXT;
4813 else
4814 cmd = ATA_CMD_FLUSH;
4815
4816 /* This is wrong. On a failed flush we get back the LBA of the lost
4817 sector and we should (assuming it wasn't aborted as unknown) issue
4818 a further flush command to continue the writeback until it
4819 does not error */
4820 err_mask = ata_do_simple_cmd(dev, cmd);
4821 if (err_mask) {
4822 ata_dev_printk(dev, KERN_ERR, "failed to flush cache\n");
4823 return -EIO;
4824 }
4825
4826 return 0;
4827}
4828
4829#ifdef CONFIG_PM 4803#ifdef CONFIG_PM
4830static int ata_host_request_pm(struct ata_host *host, pm_message_t mesg, 4804static int ata_host_request_pm(struct ata_host *host, pm_message_t mesg,
4831 unsigned int action, unsigned int ehi_flags, 4805 unsigned int action, unsigned int ehi_flags,
diff --git a/drivers/ata/libata.h b/drivers/ata/libata.h
index 5e8d0359bccb..11b5f67a19d4 100644
--- a/drivers/ata/libata.h
+++ b/drivers/ata/libata.h
@@ -96,7 +96,6 @@ extern void ata_qc_issue(struct ata_queued_cmd *qc);
96extern void __ata_qc_complete(struct ata_queued_cmd *qc); 96extern void __ata_qc_complete(struct ata_queued_cmd *qc);
97extern int ata_check_atapi_dma(struct ata_queued_cmd *qc); 97extern int ata_check_atapi_dma(struct ata_queued_cmd *qc);
98extern void swap_buf_le16(u16 *buf, unsigned int buf_words); 98extern void swap_buf_le16(u16 *buf, unsigned int buf_words);
99extern int ata_flush_cache(struct ata_device *dev);
100extern void ata_dev_init(struct ata_device *dev); 99extern void ata_dev_init(struct ata_device *dev);
101extern void ata_link_init(struct ata_port *ap, struct ata_link *link, int pmp); 100extern void ata_link_init(struct ata_port *ap, struct ata_link *link, int pmp);
102extern int sata_link_init_spd(struct ata_link *link); 101extern int sata_link_init_spd(struct ata_link *link);