From 5d254c0494187e5508b8de1ebe9d740ee3bbc64a Mon Sep 17 00:00:00 2001 From: Kip Macy Date: Sun, 17 Aug 2008 23:33:33 +0000 Subject: [PATCH] Make sure that machine addresses are vm_paddr_t MFC after: 1 month --- sys/dev/xen/blkfront/blkfront.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/sys/dev/xen/blkfront/blkfront.c b/sys/dev/xen/blkfront/blkfront.c index c448b817b832..2859d0f5ea14 100644 --- a/sys/dev/xen/blkfront/blkfront.c +++ b/sys/dev/xen/blkfront/blkfront.c @@ -129,8 +129,8 @@ static void xb_strategy(struct bio *bp); static struct mtx blkif_io_lock; -static unsigned long -pfn_to_mfn(unsigned long pfn) +static vm_paddr_t +pfn_to_mfn(vm_paddr_t pfn) { return (phystomach(pfn << PAGE_SHIFT) >> PAGE_SHIFT); } @@ -241,7 +241,8 @@ static int blkfront_probe(struct xenbus_device *dev, "virtual-device", "%i", &vdevice); if (err != 1) { xenbus_dev_fatal(dev, err, "reading virtual-device"); - return err; + printf("couldn't find virtual device"); + return (err); } info = malloc(sizeof(*info), M_DEVBUF, M_NOWAIT|M_ZERO); @@ -660,10 +661,10 @@ blkif_ioctl(struct disk *dp, u_long cmd, void *addr, int flag, struct thread *td static int blkif_queue_request(struct bio *bp) { caddr_t alignbuf; - unsigned long buffer_ma; + vm_paddr_t buffer_ma; blkif_request_t *ring_req; unsigned long id; - unsigned int fsect, lsect; + uint64_t fsect, lsect; struct xb_softc *sc = (struct xb_softc *)bp->bio_disk->d_drv1; struct blkfront_info *info = sc->xb_info; int ref; @@ -841,7 +842,7 @@ blkif_int(void *xsc) } if ( unlikely(bret->status != BLKIF_RSP_OKAY) ) { - XENPRINTF("Bad return from blkdev data request: %x\n", + printf("Bad return from blkdev data request: %x\n", bret->status); bp->bio_flags |= BIO_ERROR; }