diff -ur dev01_orig_sys/bus/cam/scsi/scsi_cd.c dev01_sys/bus/cam/scsi/scsi_cd.c --- dev01_orig_sys/bus/cam/scsi/scsi_cd.c 2004-05-15 08:08:55.000000000 -0700 +++ dev01_sys/bus/cam/scsi/scsi_cd.c 2004-05-15 06:39:28.000000000 -0700 @@ -1445,15 +1445,15 @@ * only one physical transfer. */ static void -cdstrategy(struct buf *bp) +cdstrategy(dev_t dev, struct buf *bp) { struct cam_periph *periph; struct cd_softc *softc; u_int unit, part; int s; - unit = dkunit(bp->b_dev); - part = dkpart(bp->b_dev); + unit = dkunit(dev); + part = dkpart(dev); periph = cam_extend_get(cdperiphs, unit); if (periph == NULL) { bp->b_error = ENXIO; diff -ur dev01_orig_sys/bus/cam/scsi/scsi_da.c dev01_sys/bus/cam/scsi/scsi_da.c --- dev01_orig_sys/bus/cam/scsi/scsi_da.c 2004-05-15 08:08:55.000000000 -0700 +++ dev01_sys/bus/cam/scsi/scsi_da.c 2004-05-15 06:37:08.000000000 -0700 @@ -710,7 +710,7 @@ * only one physical transfer. */ static void -dastrategy(struct buf *bp) +dastrategy(dev_t dev, struct buf *bp) { struct cam_periph *periph; struct da_softc *softc; @@ -718,8 +718,8 @@ u_int part; int s; - unit = dkunit(bp->b_dev); - part = dkpart(bp->b_dev); + unit = dkunit(dev); + part = dkpart(dev); periph = cam_extend_get(daperiphs, unit); if (periph == NULL) { bp->b_error = ENXIO; diff -ur dev01_orig_sys/bus/cam/scsi/scsi_pass.c dev01_sys/bus/cam/scsi/scsi_pass.c --- dev01_orig_sys/bus/cam/scsi/scsi_pass.c 2004-05-15 08:08:55.000000000 -0700 +++ dev01_sys/bus/cam/scsi/scsi_pass.c 2004-05-15 06:40:13.000000000 -0700 @@ -452,7 +452,7 @@ * only one physical transfer. */ static void -passstrategy(struct buf *bp) +passstrategy(dev_t dev, struct buf *bp) { struct cam_periph *periph; struct pass_softc *softc; @@ -469,7 +469,7 @@ /* unit = dkunit(bp->b_dev); */ /* XXX KDM fix this */ - unit = minor(bp->b_dev) & 0xff; + unit = minor(dev) & 0xff; periph = cam_extend_get(passperiphs, unit); if (periph == NULL) { diff -ur dev01_orig_sys/bus/cam/scsi/scsi_sa.c dev01_sys/bus/cam/scsi/scsi_sa.c --- dev01_orig_sys/bus/cam/scsi/scsi_sa.c 2004-05-15 08:08:55.000000000 -0700 +++ dev01_sys/bus/cam/scsi/scsi_sa.c 2004-05-15 06:38:43.000000000 -0700 @@ -670,18 +670,18 @@ * only one physical transfer. */ static void -sastrategy(struct buf *bp) +sastrategy(dev_t dev, struct buf *bp) { struct cam_periph *periph; struct sa_softc *softc; u_int unit; int s; - if (SA_IS_CTRL(bp->b_dev)) { + if (SA_IS_CTRL(dev)) { bp->b_error = EINVAL; goto bad; } - unit = SAUNIT(bp->b_dev); + unit = SAUNIT(dev); periph = cam_extend_get(saperiphs, unit); if (periph == NULL) { bp->b_error = ENXIO; @@ -706,7 +706,7 @@ splx(s); /* - * If it's a null transfer, return immediatly + * If it's a null transfer, return immediately */ if (bp->b_bcount == 0) goto done; diff -ur dev01_orig_sys/bus/firewire/fwdev.c dev01_sys/bus/firewire/fwdev.c --- dev01_orig_sys/bus/firewire/fwdev.c 2004-05-15 08:08:55.000000000 -0700 +++ dev01_sys/bus/firewire/fwdev.c 2004-05-15 06:46:20.000000000 -0700 @@ -770,13 +770,10 @@ } static void -fw_strategy(struct bio *bp) +fw_strategy(dev_t dev, struct bio *bp) { - dev_t dev; - - dev = bp->bio_dev; if (DEV_FWMEM(dev)) { - fwmem_strategy(bp); + fwmem_strategy(dev, bp); return; } diff -ur dev01_orig_sys/bus/firewire/fwmem.c dev01_sys/bus/firewire/fwmem.c --- dev01_orig_sys/bus/firewire/fwmem.c 2004-02-05 09:51:43.000000000 -0800 +++ dev01_sys/bus/firewire/fwmem.c 2004-05-15 06:47:10.000000000 -0700 @@ -338,19 +338,17 @@ } void -fwmem_strategy(struct bio *bp) +fwmem_strategy(dev_t dev, struct bio *bp) { struct firewire_softc *sc; struct fwmem_softc *fms; struct fw_device *fwdev; struct fw_xfer *xfer; - dev_t dev; int unit, err=0, s, iolen; - dev = bp->bio_dev; /* XXX check request length */ - unit = DEV2UNIT(dev); + unit = DEV2UNIT(dev); sc = devclass_get_softc(firewire_devclass, unit); s = splfw(); diff -ur dev01_orig_sys/dev/disk/ata/ata-disk.c dev01_sys/dev/disk/ata/ata-disk.c --- dev01_orig_sys/dev/disk/ata/ata-disk.c 2004-05-15 08:08:55.000000000 -0700 +++ dev01_sys/dev/disk/ata/ata-disk.c 2004-05-15 06:29:07.000000000 -0700 @@ -302,9 +302,9 @@ * may have been translated through several layers. */ static void -adstrategy(struct buf *bp) +adstrategy(dev_t dev, struct buf *bp) { - struct ad_softc *adp = bp->b_dev->si_drv1; + struct ad_softc *adp = dev->si_drv1; int s; if (adp->device->flags & ATA_D_DETACHING) { diff -ur dev01_orig_sys/dev/disk/ata/ata-raid.c dev01_sys/dev/disk/ata/ata-raid.c --- dev01_orig_sys/dev/disk/ata/ata-raid.c 2004-05-13 16:49:14.000000000 -0700 +++ dev01_sys/dev/disk/ata/ata-raid.c 2004-05-15 06:42:39.000000000 -0700 @@ -479,9 +479,9 @@ } static void -arstrategy(struct buf *bp) +arstrategy(dev_t dev, struct buf *bp) { - struct ar_softc *rdp = bp->b_dev->si_drv1; + struct ar_softc *rdp = dev->si_drv1; int blkno, count, chunk, lba, lbs, tmplba; int drv = 0, change = 0; caddr_t data; diff -ur dev01_orig_sys/dev/disk/ata/atapi-cd.c dev01_sys/dev/disk/ata/atapi-cd.c --- dev01_orig_sys/dev/disk/ata/atapi-cd.c 2004-05-15 08:08:55.000000000 -0700 +++ dev01_sys/dev/disk/ata/atapi-cd.c 2004-05-15 06:42:59.000000000 -0700 @@ -1081,9 +1081,9 @@ } static void -acdstrategy(struct buf *bp) +acdstrategy(dev_t dev, struct buf *bp) { - struct acd_softc *cdp = bp->b_dev->si_drv1; + struct acd_softc *cdp = dev->si_drv1; int s; if (cdp->device->flags & ATA_D_DETACHING) { diff -ur dev01_orig_sys/dev/disk/ata/atapi-fd.c dev01_sys/dev/disk/ata/atapi-fd.c --- dev01_orig_sys/dev/disk/ata/atapi-fd.c 2004-05-13 16:49:14.000000000 -0700 +++ dev01_sys/dev/disk/ata/atapi-fd.c 2004-05-15 06:43:20.000000000 -0700 @@ -291,9 +291,9 @@ } static void -afdstrategy(struct buf *bp) +afdstrategy(dev_t dev, struct buf *bp) { - struct afd_softc *fdp = bp->b_dev->si_drv1; + struct afd_softc *fdp = dev->si_drv1; int s; if (fdp->device->flags & ATA_D_DETACHING) { diff -ur dev01_orig_sys/dev/disk/ata/atapi-tape.c dev01_sys/dev/disk/ata/atapi-tape.c --- dev01_orig_sys/dev/disk/ata/atapi-tape.c 2004-05-15 08:08:55.000000000 -0700 +++ dev01_sys/dev/disk/ata/atapi-tape.c 2004-05-15 06:43:51.000000000 -0700 @@ -419,9 +419,9 @@ } static void -aststrategy(struct buf *bp) +aststrategy(dev_t dev, struct buf *bp) { - struct ast_softc *stp = bp->b_dev->si_drv1; + struct ast_softc *stp = dev->si_drv1; int s; if (stp->device->flags & ATA_D_DETACHING) { diff -ur dev01_orig_sys/dev/disk/fd/fd.c dev01_sys/dev/disk/fd/fd.c --- dev01_orig_sys/dev/disk/fd/fd.c 2004-05-15 08:08:55.000000000 -0700 +++ dev01_sys/dev/disk/fd/fd.c 2004-05-15 07:20:48.000000000 -0700 @@ -1379,7 +1379,7 @@ /* fdstrategy */ /****************************************************************************/ void -fdstrategy(struct buf *bp) +fdstrategy(dev_t dev, struct buf *bp) { unsigned nblocks, blknum, cando; int s; @@ -1388,11 +1388,11 @@ fd_p fd; size_t fdblk; - fdu = FDUNIT(minor(bp->b_dev)); + fdu = FDUNIT(minor(dev)); fd = devclass_get_softc(fd_devclass, fdu); if (fd == 0) panic("fdstrategy: buf for nonexistent device (%#lx, %#lx)", - (u_long)major(bp->b_dev), (u_long)minor(bp->b_dev)); + (u_long)major(dev), (u_long)minor(dev)); fdc = fd->fdc; if (fd->type == NO_TYPE) { bp->b_error = ENXIO; diff -ur dev01_orig_sys/dev/disk/md/md.c dev01_sys/dev/disk/md/md.c --- dev01_orig_sys/dev/disk/md/md.c 2004-05-13 16:49:15.000000000 -0700 +++ dev01_sys/dev/disk/md/md.c 2004-05-15 06:50:17.000000000 -0700 @@ -142,27 +142,27 @@ } static void -mdstrategy(struct buf *bp) +mdstrategy(dev_t dev, struct buf *bp) { struct md_s *sc; if (md_debug > 1) printf("mdstrategy(%p) %s %lx, %d, %ld, %p)\n", - bp, devtoname(bp->b_dev), bp->b_flags, bp->b_blkno, + bp, devtoname(dev), bp->b_flags, bp->b_blkno, bp->b_bcount / DEV_BSIZE, bp->b_data); - sc = bp->b_dev->si_drv1; + sc = dev->si_drv1; if (sc->type == MD_MALLOC) { - mdstrategy_malloc(bp); + mdstrategy_malloc(dev, bp); } else { - mdstrategy_preload(bp); + mdstrategy_preload(dev, bp); } return; } static void -mdstrategy_malloc(struct buf *bp) +mdstrategy_malloc(dev_t dev, struct buf *bp) { int s, i; struct md_s *sc; @@ -172,10 +172,10 @@ if (md_debug > 1) printf("mdstrategy_malloc(%p) %s %lx, %d, %ld, %p)\n", - bp, devtoname(bp->b_dev), bp->b_flags, bp->b_blkno, + bp, devtoname(dev), bp->b_flags, bp->b_blkno, bp->b_bcount / DEV_BSIZE, bp->b_data); - sc = bp->b_dev->si_drv1; + sc = dev->si_drv1; s = splbio(); @@ -289,7 +289,7 @@ static void -mdstrategy_preload(struct buf *bp) +mdstrategy_preload(dev_t dev, struct buf *bp) { int s; struct md_s *sc; @@ -297,10 +297,10 @@ if (md_debug > 1) printf("mdstrategy_preload(%p) %s %lx, %d, %ld, %p)\n", - bp, devtoname(bp->b_dev), bp->b_flags, bp->b_blkno, + bp, devtoname(dev), bp->b_flags, bp->b_blkno, bp->b_bcount / DEV_BSIZE, bp->b_data); - sc = bp->b_dev->si_drv1; + sc = dev->si_drv1; s = splbio(); diff -ur dev01_orig_sys/dev/disk/vn/vn.c dev01_sys/dev/disk/vn/vn.c --- dev01_orig_sys/dev/disk/vn/vn.c 2004-05-13 16:49:15.000000000 -0700 +++ dev01_sys/dev/disk/vn/vn.c 2004-05-15 07:05:36.000000000 -0700 @@ -286,16 +286,16 @@ */ static void -vnstrategy(struct buf *bp) +vnstrategy(dev_t dev, struct buf *bp) { int unit; struct vn_softc *vn; int error; - unit = dkunit(bp->b_dev); - vn = bp->b_dev->si_drv1; + unit = dkunit(dev); + vn = dev->si_drv1; if (!vn) - vn = vnfindvn(bp->b_dev); + vn = vnfindvn(dev); IFOPT(vn, VN_DEBUG) printf("vnstrategy(%p): unit %d\n", bp, unit); @@ -339,7 +339,7 @@ * simply read or write less. */ if (pbn < 0 || pbn >= vn->sc_size) { - if (pbn != vn->sc_size) { + if (pbn != vn->sc_size) { bp->b_error = EINVAL; bp->b_flags |= B_ERROR | B_INVAL; } diff -ur dev01_orig_sys/dev/misc/kbd/kbd.c dev01_sys/dev/misc/kbd/kbd.c --- dev01_orig_sys/dev/misc/kbd/kbd.c 2004-05-15 08:08:55.000000000 -0700 +++ dev01_sys/dev/misc/kbd/kbd.c 2004-05-15 08:01:40.000000000 -0700 @@ -468,11 +468,13 @@ return EINVAL; if (keyboard[kbd->kb_index] != kbd) return EINVAL; - +#if 0 + /* XXX-DEV */ dev = makedev(kbd_cdevsw.d_maj, kbd->kb_index); if (dev->si_drv1) free(dev->si_drv1, M_DEVBUF); destroy_dev(dev); +#endif cdevsw_remove(&kbd_cdevsw); return 0; } diff -ur dev01_orig_sys/dev/raid/aac/aac_disk.c dev01_sys/dev/raid/aac/aac_disk.c --- dev01_orig_sys/dev/raid/aac/aac_disk.c 2004-05-13 16:49:18.000000000 -0700 +++ dev01_sys/dev/raid/aac/aac_disk.c 2004-05-15 06:41:18.000000000 -0700 @@ -183,13 +183,13 @@ * Handle an I/O request. */ static void -aac_disk_strategy(struct bio *bp) +aac_disk_strategy(dev_t dev, struct bio *bp) { struct aac_disk *sc; debug_called(4); - sc = (struct aac_disk *)bp->bio_dev->si_drv1; + sc = (struct aac_disk *)dev->si_drv1; /* bogus disk? */ if (sc == NULL) { diff -ur dev01_orig_sys/dev/raid/amr/amr_disk.c dev01_sys/dev/raid/amr/amr_disk.c --- dev01_orig_sys/dev/raid/amr/amr_disk.c 2004-05-13 16:49:18.000000000 -0700 +++ dev01_sys/dev/raid/amr/amr_disk.c 2004-05-15 06:44:33.000000000 -0700 @@ -256,9 +256,9 @@ * be a multiple of a sector in length. */ static void -amrd_strategy(struct bio *bio) +amrd_strategy(dev_t dev, struct bio *bio) { - struct amrd_softc *sc = (struct amrd_softc *)bio->bio_dev->si_drv1; + struct amrd_softc *sc = (struct amrd_softc *)dev->si_drv1; /* bogus disk? */ if (sc == NULL) { diff -ur dev01_orig_sys/dev/raid/asr/asr.c dev01_sys/dev/raid/asr/asr.c --- dev01_orig_sys/dev/raid/asr/asr.c 2004-05-15 08:08:57.000000000 -0700 +++ dev01_sys/dev/raid/asr/asr.c 2004-05-15 07:58:12.000000000 -0700 @@ -2850,6 +2850,9 @@ { Asr_softc_t * sc; struct scsi_inquiry_data * iq; +#if 0 + struct cdevsw *cdevsw_tmp; +#endif ATTACH_SET(); if ((sc = malloc(sizeof(*sc), M_DEVBUF, M_NOWAIT)) == (Asr_softc_t *)NULL) { @@ -3185,7 +3188,11 @@ * Generate the device node information */ (void)make_dev(&asr_cdevsw, unit, 0, 0, S_IRWXU, "rasr%d", unit); - destroy_dev(makedev(asr_cdevsw.d_maj,unit+1)); + /* XXX-DEV */ +#if 0 + if ((cdevsw_tmp = cdevsw_get(asr_cdevsw.d_maj+1)) != NULL) + destroy_dev(cdevsw_tmp); +#endif ATTACH_RETURN(0); } /* asr_attach */ diff -ur dev01_orig_sys/dev/raid/ida/ida_disk.c dev01_sys/dev/raid/ida/ida_disk.c --- dev01_orig_sys/dev/raid/ida/ida_disk.c 2004-05-13 16:49:18.000000000 -0700 +++ dev01_sys/dev/raid/ida/ida_disk.c 2004-05-15 06:47:57.000000000 -0700 @@ -155,12 +155,12 @@ * be a multiple of a sector in length. */ static void -idad_strategy(struct buf *bp) +idad_strategy(dev_t dev, struct buf *bp) { struct idad_softc *drv; int s; - drv = idad_getsoftc(bp->b_dev); + drv = idad_getsoftc(dev); if (drv == NULL) { bp->b_error = EINVAL; goto bad; diff -ur dev01_orig_sys/dev/raid/mlx/mlx_disk.c dev01_sys/dev/raid/mlx/mlx_disk.c --- dev01_orig_sys/dev/raid/mlx/mlx_disk.c 2004-05-13 16:49:19.000000000 -0700 +++ dev01_sys/dev/raid/mlx/mlx_disk.c 2004-05-15 07:03:10.000000000 -0700 @@ -164,9 +164,14 @@ * be a multiple of a sector in length. */ static void -mlxd_strategy(mlx_bio *bp) +mlxd_strategy(dev_t dev, mlx_bio *bp) { - struct mlxd_softc *sc = (struct mlxd_softc *)MLX_BIO_SOFTC(bp); + /* + * XXX-DEV mucky driver, the driver uses b_dev->si_drv1 in the very + * low-level routines in the following way: + * mlxd_strategy() -> mlx_submit_buf() -> mlx_startio() + */ + struct mlxd_softc *sc = (struct mlxd_softc *)dev->si_drv1; debug_called(1); diff -ur dev01_orig_sys/dev/raid/twe/twe_freebsd.c dev01_sys/dev/raid/twe/twe_freebsd.c --- dev01_orig_sys/dev/raid/twe/twe_freebsd.c 2004-05-15 08:08:57.000000000 -0700 +++ dev01_sys/dev/raid/twe/twe_freebsd.c 2004-05-15 07:03:37.000000000 -0700 @@ -696,10 +696,11 @@ /******************************************************************************** * Handle an I/O request. */ +/* XXX-DEV */ static void -twed_strategy(twe_bio *bp) +twed_strategy(dev_t dev, twe_bio *bp) { - struct twed_softc *sc = (struct twed_softc *)TWE_BIO_SOFTC(bp); + struct twed_softc *sc = (struct twed_softc *)dev->si_drv1; debug_called(4); Only in dev01_sys: dev01-beta.patch Only in dev01_sys/kern: .kern_conf.c.swp diff -ur dev01_orig_sys/kern/kern_device.c dev01_sys/kern/kern_device.c --- dev01_orig_sys/kern/kern_device.c 2004-05-15 08:08:58.000000000 -0700 +++ dev01_sys/kern/kern_device.c 2004-05-15 07:06:25.000000000 -0700 @@ -91,7 +91,7 @@ msg->am_close.td); break; case CDEV_CMD_STRATEGY: - devsw->old_strategy(msg->am_strategy.bp); + devsw->old_strategy(msg->am_strategy.msg.dev, msg->am_strategy.bp); error = 0; break; case CDEV_CMD_IOCTL: diff -ur dev01_orig_sys/kern/subr_disk.c dev01_sys/kern/subr_disk.c --- dev01_orig_sys/kern/subr_disk.c 2004-05-15 08:08:58.000000000 -0700 +++ dev01_sys/kern/subr_disk.c 2004-05-15 07:13:14.000000000 -0700 @@ -284,7 +284,7 @@ msg->am_ioctl.td); break; case CDEV_CMD_STRATEGY: - diskstrategy(msg->am_strategy.bp); + diskstrategy(msg->am_strategy.msg.dev, msg->am_strategy.bp); error = 0; break; case CDEV_CMD_PSIZE: @@ -421,7 +421,7 @@ * Execute strategy routine */ static void -diskstrategy(struct buf *bp) +diskstrategy(dev_t dev, struct buf *bp) { struct disk *dp; diff -ur dev01_orig_sys/sys/conf.h dev01_sys/sys/conf.h --- dev01_orig_sys/sys/conf.h 2004-05-15 08:09:00.000000000 -0700 +++ dev01_sys/sys/conf.h 2004-05-15 06:29:31.000000000 -0700 @@ -130,7 +130,7 @@ typedef int d_clone_t (dev_t dev); typedef int d_open_t (dev_t dev, int oflags, int devtype, d_thread_t *td); typedef int d_close_t (dev_t dev, int fflag, int devtype, d_thread_t *td); -typedef void d_strategy_t (struct buf *bp); +typedef void d_strategy_t (dev_t dev, struct buf *bp); typedef int d_ioctl_t (dev_t dev, u_long cmd, caddr_t data, int fflag, d_thread_t *td); typedef int d_dump_t (dev_t dev); diff -ur dev01_orig_sys/sys/device.h dev01_sys/sys/device.h --- dev01_orig_sys/sys/device.h 2004-05-15 08:09:00.000000000 -0700 +++ dev01_sys/sys/device.h 2004-05-15 07:07:31.000000000 -0700 @@ -62,7 +62,7 @@ }; /* - * void d_strategy(struct buf *bp) + * void d_strategy(dev_t dev, struct buf *bp) */ struct cdevmsg_strategy { struct cdevmsg msg;