ATA_FLUSHCACHE is a 36bit format command, not 48.

This commit is contained in:
mav 2009-08-30 15:36:56 +00:00
parent 6741c29011
commit e3f9e1f5fe

View File

@ -287,7 +287,7 @@ adaclose(struct disk *dp)
if (softc->flags & ADA_FLAG_CAN_48BIT)
ata_48bit_cmd(&ccb->ataio, ATA_FLUSHCACHE48, 0, 0, 0);
else
ata_48bit_cmd(&ccb->ataio, ATA_FLUSHCACHE, 0, 0, 0);
ata_36bit_cmd(&ccb->ataio, ATA_FLUSHCACHE, 0, 0, 0);
cam_periph_runccb(ccb, /*error_routine*/NULL, /*cam_flags*/0,
/*sense_flags*/SF_RETRY_UA,
softc->disk->d_devstat);
@ -441,7 +441,7 @@ adadump(void *arg, void *virtual, vm_offset_t physical, off_t offset, size_t len
if (softc->flags & ADA_FLAG_CAN_48BIT)
ata_48bit_cmd(&ccb.ataio, ATA_FLUSHCACHE48, 0, 0, 0);
else
ata_48bit_cmd(&ccb.ataio, ATA_FLUSHCACHE, 0, 0, 0);
ata_36bit_cmd(&ccb.ataio, ATA_FLUSHCACHE, 0, 0, 0);
xpt_polled_action(&ccb);
if ((ccb.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP)
@ -878,7 +878,7 @@ adastart(struct cam_periph *periph, union ccb *start_ccb)
if (softc->flags & ADA_FLAG_CAN_48BIT)
ata_48bit_cmd(ataio, ATA_FLUSHCACHE48, 0, 0, 0);
else
ata_48bit_cmd(ataio, ATA_FLUSHCACHE, 0, 0, 0);
ata_36bit_cmd(ataio, ATA_FLUSHCACHE, 0, 0, 0);
break;
}
start_ccb->ccb_h.ccb_state = ADA_CCB_BUFFER_IO;
@ -1126,7 +1126,7 @@ adashutdown(void * arg, int howto)
if (softc->flags & ADA_FLAG_CAN_48BIT)
ata_48bit_cmd(&ccb.ataio, ATA_FLUSHCACHE48, 0, 0, 0);
else
ata_48bit_cmd(&ccb.ataio, ATA_FLUSHCACHE, 0, 0, 0);
ata_36bit_cmd(&ccb.ataio, ATA_FLUSHCACHE, 0, 0, 0);
xpt_polled_action(&ccb);
if ((ccb.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP)