From: Andrew Morton Update libata_suspend.patch for changes in git-libata-all (removal of ata_qc_complete_noop()). Cc: Mark Lord Cc: Pavel Machek Cc: Jeff Garzik Cc: Tejun Heo Signed-off-by: Andrew Morton --- drivers/scsi/libata-core.c | 30 +++++++++++------------------- 1 files changed, 11 insertions(+), 19 deletions(-) diff -puN drivers/scsi/libata-core.c~libata_suspend-fix drivers/scsi/libata-core.c --- devel/drivers/scsi/libata-core.c~libata_suspend-fix 2005-12-14 17:46:01.000000000 -0800 +++ devel-akpm/drivers/scsi/libata-core.c 2005-12-14 17:46:26.000000000 -0800 @@ -4427,29 +4427,21 @@ irqreturn_t ata_interrupt (int irq, void static int ata_do_simple_cmd(struct ata_port *ap, struct ata_device *dev, u8 cmd) { - DECLARE_COMPLETION(wait); - struct ata_queued_cmd *qc; - unsigned long flags; - int rc; + struct ata_taskfile tf; + int err; - while ((qc = ata_qc_new_init(ap, dev)) == NULL) - msleep(10); + ata_tf_init(ap, &tf, dev->devno); - qc->tf.command = cmd; - qc->tf.flags |= ATA_TFLAG_DEVICE; - qc->tf.protocol = ATA_PROT_NODATA; - - qc->waiting = &wait; - qc->complete_fn = ata_qc_complete_noop; - - spin_lock_irqsave(&ap->host_set->lock, flags); - rc = ata_qc_issue(qc); - spin_unlock_irqrestore(&ap->host_set->lock, flags); + tf.command = cmd; + tf.flags |= ATA_TFLAG_DEVICE; + tf.protocol = ATA_PROT_NODATA; - if (!rc) - wait_for_completion(&wait); + err = ata_exec_internal(ap,dev,&tf,DMA_NONE,dev->id,sizeof(dev->id)); + if (err) + printk(KERN_ERR "%s: ata command failed: %d\n", + __FUNCTION__, err); - return rc; + return err; } static int ata_flush_cache(struct ata_port *ap, struct ata_device *dev) _