Fix copy-paste bug. Use regular non-polled mode for executing FLUSHCACHE

command on disk close.

Approved by:	re (implicitly)
This commit is contained in:
Alexander Motin 2009-07-17 21:48:08 +00:00
parent d82ccc60d9
commit b2da774623

View File

@ -275,7 +275,6 @@ adaclose(struct disk *dp)
if (softc->flags & ADA_FLAG_CAN_FLUSHCACHE) {
ccb = cam_periph_getccb(periph, /*priority*/1);
ccb->ccb_h.ccb_state = ADA_CCB_DUMP;
cam_fill_ataio(&ccb->ataio,
1,
adadone,
@ -289,7 +288,9 @@ adaclose(struct disk *dp)
ata_48bit_cmd(&ccb->ataio, ATA_FLUSHCACHE48, 0, 0, 0);
else
ata_48bit_cmd(&ccb->ataio, ATA_FLUSHCACHE, 0, 0, 0);
xpt_polled_action(ccb);
cam_periph_runccb(ccb, /*error_routine*/NULL, /*cam_flags*/0,
/*sense_flags*/SF_RETRY_UA,
softc->disk->d_devstat);
if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP)
xpt_print(periph->path, "Synchronize cache failed\n");