--- src/sys/dev/disk/ata/ata-raid.c 2006/04/30 17:22:16 1.19 +++ src/sys/dev/disk/ata/ata-raid.c 2006/05/03 06:28:01 1.20 @@ -76,6 +76,7 @@ static struct cdevsw ar_cdevsw = { /* prototypes */ static void ar_attach_raid(struct ar_softc *, int); static void ar_done(struct bio *); +static void ar_sync_done(struct bio *); static void ar_config_changed(struct ar_softc *, int); static int ar_rebuild(struct ar_softc *); static int ar_highpoint_read_conf(struct ad_softc *, struct ar_softc **); @@ -735,6 +736,13 @@ ar_done(struct bio *bio) } static void +ar_sync_done(struct bio *bio) +{ + bio->bio_buf->b_cmd = BUF_CMD_DONE; + wakeup(bio); +} + +static void ar_config_changed(struct ar_softc *rdp, int writeback) { int disk, flags; @@ -1399,7 +1407,7 @@ ar_rw(struct ad_softc *adp, u_int32_t lb bp->b_bio1.bio_offset = (off_t)lba << DEV_BSHIFT; bp->b_bcount = count; if (flags & AR_WAIT) - bp->b_bio1.bio_done = (void *)wakeup; + bp->b_bio1.bio_done = ar_sync_done; else bp->b_bio1.bio_done = ar_rw_done; if (flags & AR_READ)