[libata] ACPI: remove needless ->qc_issue hook existence test
All drivers must implement this hook, otherwise ATA commands would go nowhere (and a lot of other oopsen would appear as well). Signed-off-by: Jeff Garzik <jeff@garzik.org>
This commit is contained in:
parent
ea34e45a46
commit
fc16c25ff4
|
@ -455,6 +455,9 @@ static void taskfile_load_raw(struct ata_port *ap,
|
||||||
struct ata_device *atadev,
|
struct ata_device *atadev,
|
||||||
const struct taskfile_array *gtf)
|
const struct taskfile_array *gtf)
|
||||||
{
|
{
|
||||||
|
struct ata_taskfile tf;
|
||||||
|
unsigned int err;
|
||||||
|
|
||||||
if (ata_msg_probe(ap))
|
if (ata_msg_probe(ap))
|
||||||
ata_dev_printk(atadev, KERN_DEBUG, "%s: (0x1f1-1f7): hex: "
|
ata_dev_printk(atadev, KERN_DEBUG, "%s: (0x1f1-1f7): hex: "
|
||||||
"%02x %02x %02x %02x %02x %02x %02x\n",
|
"%02x %02x %02x %02x %02x %02x %02x\n",
|
||||||
|
@ -467,35 +470,25 @@ static void taskfile_load_raw(struct ata_port *ap,
|
||||||
&& (gtf->tfa[6] == 0))
|
&& (gtf->tfa[6] == 0))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (ap->ops->qc_issue) {
|
ata_tf_init(atadev, &tf);
|
||||||
struct ata_taskfile tf;
|
|
||||||
unsigned int err;
|
|
||||||
|
|
||||||
ata_tf_init(atadev, &tf);
|
/* convert gtf to tf */
|
||||||
|
tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE; /* TBD */
|
||||||
|
tf.protocol = atadev->class == ATA_DEV_ATAPI ?
|
||||||
|
ATA_PROT_ATAPI_NODATA : ATA_PROT_NODATA;
|
||||||
|
tf.feature = gtf->tfa[0]; /* 0x1f1 */
|
||||||
|
tf.nsect = gtf->tfa[1]; /* 0x1f2 */
|
||||||
|
tf.lbal = gtf->tfa[2]; /* 0x1f3 */
|
||||||
|
tf.lbam = gtf->tfa[3]; /* 0x1f4 */
|
||||||
|
tf.lbah = gtf->tfa[4]; /* 0x1f5 */
|
||||||
|
tf.device = gtf->tfa[5]; /* 0x1f6 */
|
||||||
|
tf.command = gtf->tfa[6]; /* 0x1f7 */
|
||||||
|
|
||||||
/* convert gtf to tf */
|
err = ata_exec_internal(atadev, &tf, NULL, DMA_NONE, NULL, 0);
|
||||||
tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE; /* TBD */
|
if (err && ata_msg_probe(ap))
|
||||||
tf.protocol = atadev->class == ATA_DEV_ATAPI ?
|
ata_dev_printk(atadev, KERN_ERR,
|
||||||
ATA_PROT_ATAPI_NODATA : ATA_PROT_NODATA;
|
"%s: ata_exec_internal failed: %u\n",
|
||||||
tf.feature = gtf->tfa[0]; /* 0x1f1 */
|
__FUNCTION__, err);
|
||||||
tf.nsect = gtf->tfa[1]; /* 0x1f2 */
|
|
||||||
tf.lbal = gtf->tfa[2]; /* 0x1f3 */
|
|
||||||
tf.lbam = gtf->tfa[3]; /* 0x1f4 */
|
|
||||||
tf.lbah = gtf->tfa[4]; /* 0x1f5 */
|
|
||||||
tf.device = gtf->tfa[5]; /* 0x1f6 */
|
|
||||||
tf.command = gtf->tfa[6]; /* 0x1f7 */
|
|
||||||
|
|
||||||
err = ata_exec_internal(atadev, &tf, NULL, DMA_NONE, NULL, 0);
|
|
||||||
if (err && ata_msg_probe(ap))
|
|
||||||
ata_dev_printk(atadev, KERN_ERR,
|
|
||||||
"%s: ata_exec_internal failed: %u\n",
|
|
||||||
__FUNCTION__, err);
|
|
||||||
} else
|
|
||||||
if (ata_msg_warn(ap))
|
|
||||||
ata_dev_printk(atadev, KERN_WARNING,
|
|
||||||
"%s: SATA driver is missing qc_issue function"
|
|
||||||
" entry points\n",
|
|
||||||
__FUNCTION__);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue