static int
mfi_disk_dump(void *arg, void *virt, vm_offset_t phys, off_t offset, size_t len)
{
    struct mfi_disk *sc;
    struct mfi_softc *parent_sc;
    struct disk *dp;
    int error;

    dp = arg;
    sc = dp->d_drv1;
    parent_sc = sc->ld_controller;

    if (len > 0) {
        if ((error = mfi_dump_blocks(parent_sc, sc->ld_id, offset /
                                     MFI_SECTOR_LEN, virt, len)) != 0)
            return (error);
    } else {
        /* mfi_sync_cache(parent_sc, sc->ld_id); */
    }

    return (0);
}
Beispiel #2
0
static int
mfi_disk_dump(struct dev_dump_args *ap)
{
	cdev_t dev = ap->a_head.a_dev;
	off_t offset = ap->a_offset;
	void *virt = ap->a_virtual;
	size_t len = ap->a_length;
	struct mfi_disk *sc;
	struct mfi_softc *parent_sc;
	int error;

	sc = dev->si_drv1;
	parent_sc = sc->ld_controller;

	if (len > 0) {
		if ((error = mfi_dump_blocks(parent_sc, sc->ld_id, offset /
		    MFI_SECTOR_LEN, virt, len)) != 0)
			return (error);
	} else {
		/* mfi_sync_cache(parent_sc, sc->ld_id); */
	}

	return (0);
}