diff options
author | Jeff Garzik <jeff@garzik.org> | 2007-02-24 21:05:01 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-02-24 21:05:01 -0500 |
commit | fc16c25ff431d0c5b12693108f0ec3809ef1e804 (patch) | |
tree | 52258926569a84738effdeb5dedd1852cb72f25b /drivers/ata | |
parent | ea34e45a4670c4fa0da3442fc74789fd66c1201b (diff) |
[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>
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/libata-acpi.c | 51 |
1 files changed, 22 insertions, 29 deletions
diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c index 1bdf7a2c2743..d14a48e75f1b 100644 --- a/drivers/ata/libata-acpi.c +++ b/drivers/ata/libata-acpi.c | |||
@@ -455,6 +455,9 @@ static void taskfile_load_raw(struct ata_port *ap, | |||
455 | struct ata_device *atadev, | 455 | struct ata_device *atadev, |
456 | const struct taskfile_array *gtf) | 456 | const struct taskfile_array *gtf) |
457 | { | 457 | { |
458 | struct ata_taskfile tf; | ||
459 | unsigned int err; | ||
460 | |||
458 | if (ata_msg_probe(ap)) | 461 | if (ata_msg_probe(ap)) |
459 | ata_dev_printk(atadev, KERN_DEBUG, "%s: (0x1f1-1f7): hex: " | 462 | ata_dev_printk(atadev, KERN_DEBUG, "%s: (0x1f1-1f7): hex: " |
460 | "%02x %02x %02x %02x %02x %02x %02x\n", | 463 | "%02x %02x %02x %02x %02x %02x %02x\n", |
@@ -467,35 +470,25 @@ static void taskfile_load_raw(struct ata_port *ap, | |||
467 | && (gtf->tfa[6] == 0)) | 470 | && (gtf->tfa[6] == 0)) |
468 | return; | 471 | return; |
469 | 472 | ||
470 | if (ap->ops->qc_issue) { | 473 | ata_tf_init(atadev, &tf); |
471 | struct ata_taskfile tf; | 474 | |
472 | unsigned int err; | 475 | /* convert gtf to tf */ |
473 | 476 | tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE; /* TBD */ | |
474 | ata_tf_init(atadev, &tf); | 477 | tf.protocol = atadev->class == ATA_DEV_ATAPI ? |
475 | 478 | ATA_PROT_ATAPI_NODATA : ATA_PROT_NODATA; | |
476 | /* convert gtf to tf */ | 479 | tf.feature = gtf->tfa[0]; /* 0x1f1 */ |
477 | tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE; /* TBD */ | 480 | tf.nsect = gtf->tfa[1]; /* 0x1f2 */ |
478 | tf.protocol = atadev->class == ATA_DEV_ATAPI ? | 481 | tf.lbal = gtf->tfa[2]; /* 0x1f3 */ |
479 | ATA_PROT_ATAPI_NODATA : ATA_PROT_NODATA; | 482 | tf.lbam = gtf->tfa[3]; /* 0x1f4 */ |
480 | tf.feature = gtf->tfa[0]; /* 0x1f1 */ | 483 | tf.lbah = gtf->tfa[4]; /* 0x1f5 */ |
481 | tf.nsect = gtf->tfa[1]; /* 0x1f2 */ | 484 | tf.device = gtf->tfa[5]; /* 0x1f6 */ |
482 | tf.lbal = gtf->tfa[2]; /* 0x1f3 */ | 485 | tf.command = gtf->tfa[6]; /* 0x1f7 */ |
483 | tf.lbam = gtf->tfa[3]; /* 0x1f4 */ | 486 | |
484 | tf.lbah = gtf->tfa[4]; /* 0x1f5 */ | 487 | err = ata_exec_internal(atadev, &tf, NULL, DMA_NONE, NULL, 0); |
485 | tf.device = gtf->tfa[5]; /* 0x1f6 */ | 488 | if (err && ata_msg_probe(ap)) |
486 | tf.command = gtf->tfa[6]; /* 0x1f7 */ | 489 | ata_dev_printk(atadev, KERN_ERR, |
487 | 490 | "%s: ata_exec_internal failed: %u\n", | |
488 | err = ata_exec_internal(atadev, &tf, NULL, DMA_NONE, NULL, 0); | 491 | __FUNCTION__, err); |
489 | if (err && ata_msg_probe(ap)) | ||
490 | ata_dev_printk(atadev, KERN_ERR, | ||
491 | "%s: ata_exec_internal failed: %u\n", | ||
492 | __FUNCTION__, err); | ||
493 | } else | ||
494 | if (ata_msg_warn(ap)) | ||
495 | ata_dev_printk(atadev, KERN_WARNING, | ||
496 | "%s: SATA driver is missing qc_issue function" | ||
497 | " entry points\n", | ||
498 | __FUNCTION__); | ||
499 | } | 492 | } |
500 | 493 | ||
501 | /** | 494 | /** |