--- 1.74/include/linux/libata.h 2005-03-08 13:59:27 +08:00 +++ 1.75/include/linux/libata.h 2005-04-02 22:22:11 +08:00 @@ -256,6 +256,9 @@ struct completion *waiting; + /* reserved for owner of this ata_queued_cmd */ + void *upper_private_data; + void *private_data; }; --- 1.134/drivers/scsi/libata-core.c 2005-03-08 13:59:27 +08:00 +++ 1.135/drivers/scsi/libata-core.c 2005-04-02 22:30:53 +08:00 @@ -995,6 +995,7 @@ } qc->waiting = &wait; + qc->upper_private_data = &status; qc->complete_fn = ata_qc_complete_noop; spin_lock_irqsave(&ap->host_set->lock, flags); @@ -1006,7 +1007,6 @@ else wait_for_completion(&wait); - status = ata_chk_status(ap); if (status & ATA_ERR) { /* * arg! EDD works for all test cases, but seems to return @@ -2496,8 +2496,7 @@ assert(qc != NULL); drv_stat = ata_chk_status(ap); - printk(KERN_WARNING "ata%u: PIO error, drv_stat 0x%x\n", - ap->id, drv_stat); + DPRINTK("ata%u: PIO error, drv_stat 0x%x\n", ap->id, drv_stat); ap->pio_task_state = PIO_ST_IDLE; @@ -2770,6 +2769,7 @@ static int ata_qc_complete_noop(struct ata_queued_cmd *qc, u8 drv_stat) { + *((u8*)qc->upper_private_data) = drv_stat; return 0; }