aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2008-11-10 00:48:21 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2008-11-10 11:04:47 -0500
commit8a8bc22332ee6ea49137508467a76aa7f4367719 (patch)
treef41c62dc99c4249d592935b4659569081d4a190a /drivers/ata/libata.h
parentf7160c7573615ec82c691e294cf80d920b5d588d (diff)
libata: revert convert-to-block-tagging patches
This patch reverts the following three commits which convert libata to use block layer tagging. 43a49cbdf31e812c0d8f553d433b09b421f5d52c e013e13bf605b9e6b702adffbe2853cfc60e7806 2fca5ccf97d2c28bcfce44f5b07d85e74e3cd18e Although using block layer tagging is the right direction, due to the tight coupling among tag number, data structure allocation and hardware command slot allocation, libata doesn't work correctly with the current conversion. The biggest problem is guaranteeing that tag 0 is always used for non-NCQ commands. Due to the way blk-tag is implemented and how SCSI starts and finishes requests, such guarantee can't be made. I'm not sure whether this would actually break any low level driver but it doesn't look like a good idea to break such assumption given the frailty of ATA controllers. So, for the time being, keep using the old dumb in-libata qc allocation. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Jens Axobe <jens.axboe@oracle.com> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/ata/libata.h')
-rw-r--r--drivers/ata/libata.h19
1 files changed, 2 insertions, 17 deletions
diff --git a/drivers/ata/libata.h b/drivers/ata/libata.h
index d3831d39bdaa..fe2839e58774 100644
--- a/drivers/ata/libata.h
+++ b/drivers/ata/libata.h
@@ -74,7 +74,7 @@ extern struct ata_link *ata_dev_phys_link(struct ata_device *dev);
74extern void ata_force_cbl(struct ata_port *ap); 74extern void ata_force_cbl(struct ata_port *ap);
75extern u64 ata_tf_to_lba(const struct ata_taskfile *tf); 75extern u64 ata_tf_to_lba(const struct ata_taskfile *tf);
76extern u64 ata_tf_to_lba48(const struct ata_taskfile *tf); 76extern u64 ata_tf_to_lba48(const struct ata_taskfile *tf);
77extern struct ata_queued_cmd *ata_qc_new_init(struct ata_device *dev, int tag); 77extern struct ata_queued_cmd *ata_qc_new_init(struct ata_device *dev);
78extern int ata_build_rw_tf(struct ata_taskfile *tf, struct ata_device *dev, 78extern int ata_build_rw_tf(struct ata_taskfile *tf, struct ata_device *dev,
79 u64 block, u32 n_block, unsigned int tf_flags, 79 u64 block, u32 n_block, unsigned int tf_flags,
80 unsigned int tag); 80 unsigned int tag);
@@ -103,6 +103,7 @@ extern int ata_dev_configure(struct ata_device *dev);
103extern int sata_down_spd_limit(struct ata_link *link); 103extern int sata_down_spd_limit(struct ata_link *link);
104extern int ata_down_xfermask_limit(struct ata_device *dev, unsigned int sel); 104extern int ata_down_xfermask_limit(struct ata_device *dev, unsigned int sel);
105extern void ata_sg_clean(struct ata_queued_cmd *qc); 105extern void ata_sg_clean(struct ata_queued_cmd *qc);
106extern void ata_qc_free(struct ata_queued_cmd *qc);
106extern void ata_qc_issue(struct ata_queued_cmd *qc); 107extern void ata_qc_issue(struct ata_queued_cmd *qc);
107extern void __ata_qc_complete(struct ata_queued_cmd *qc); 108extern void __ata_qc_complete(struct ata_queued_cmd *qc);
108extern int atapi_check_dma(struct ata_queued_cmd *qc); 109extern int atapi_check_dma(struct ata_queued_cmd *qc);
@@ -118,22 +119,6 @@ extern struct ata_port *ata_port_alloc(struct ata_host *host);
118extern void ata_dev_enable_pm(struct ata_device *dev, enum link_pm policy); 119extern void ata_dev_enable_pm(struct ata_device *dev, enum link_pm policy);
119extern void ata_lpm_schedule(struct ata_port *ap, enum link_pm); 120extern void ata_lpm_schedule(struct ata_port *ap, enum link_pm);
120 121
121/**
122 * ata_qc_free - free unused ata_queued_cmd
123 * @qc: Command to complete
124 *
125 * Designed to free unused ata_queued_cmd object
126 * in case something prevents using it.
127 *
128 * LOCKING:
129 * spin_lock_irqsave(host lock)
130 */
131static inline void ata_qc_free(struct ata_queued_cmd *qc)
132{
133 qc->flags = 0;
134 qc->tag = ATA_TAG_POISON;
135}
136
137/* libata-acpi.c */ 122/* libata-acpi.c */
138#ifdef CONFIG_ATA_ACPI 123#ifdef CONFIG_ATA_ACPI
139extern void ata_acpi_associate_sata_port(struct ata_port *ap); 124extern void ata_acpi_associate_sata_port(struct ata_port *ap);