--- libata-dev-2.6/drivers/scsi/libata-core.c 2005-03-31 21:20:17.000000000 +0800 +++ libata-dev-2.6-mod/drivers/scsi/libata-core.c 2005-04-01 11:21:22.000000000 +0800 @@ -952,7 +952,7 @@ unsigned int major_version; u16 tmp; unsigned long xfer_modes; - u8 status; + u8 status = 0; unsigned int using_edd; DECLARE_COMPLETION(wait); struct ata_queued_cmd *qc; @@ -995,6 +995,7 @@ } qc->waiting = &wait; + qc->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->private_data) = drv_stat; return 0; }