Date: Thu, 23 Oct 2008 14:23:52 GMT From: Nathan Whitehorn <nwhitehorn@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 151806 for review Message-ID: <200810231423.m9NENq4A024691@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=151806 Change 151806 by nwhitehorn@nwhitehorn_trantor on 2008/10/23 14:23:37 Mambodisk supports 4K transfers -- let it use them. Affected files ... .. //depot/projects/ppc-g5/sys/powerpc/mambo/mambodisk.c#2 edit Differences ... ==== //depot/projects/ppc-g5/sys/powerpc/mambo/mambodisk.c#2 (text+ko) ==== @@ -49,6 +49,7 @@ struct proc *p; struct bio_queue_head bio_queue; int running; + int maxblocks; }; #define MAMBO_DISK_READ 116 @@ -116,8 +117,10 @@ d->d_drv1 = sc; d->d_maxsize = MAXPHYS; /* Maybe ask bridge? */ - d->d_sectorsize = mambocall(MAMBO_DISK_INFO,MAMBO_INFO_BLKSZ,d->d_unit) - / 8; /* Mambo gives an answer 8 times too large, for fun */ + d->d_sectorsize = 512; + sc->maxblocks = mambocall(MAMBO_DISK_INFO,MAMBO_INFO_BLKSZ,d->d_unit) + / 512; + d->d_unit = device_get_unit(dev); d->d_mediasize = mambocall(MAMBO_DISK_INFO,MAMBO_INFO_DEVSZ,d->d_unit) * 1024; /* Mambo gives size in KB */ @@ -221,7 +224,10 @@ char *vaddr = bp->bio_data + (block - bp->bio_pblkno) * sz; - numblocks = 1; + numblocks = end - block; + if (numblocks > sc->maxblocks) + numblocks = sc->maxblocks; + if (bp->bio_cmd == BIO_READ) { result = mambocall(MAMBO_DISK_READ, vaddr, (uint32_t)block, (numblocks << 16) | unit);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810231423.m9NENq4A024691>