Date: Wed, 29 Jan 1997 22:29:00 +0100 From: j@uriah.heep.sax.de (J Wunsch) To: Shimon@i-Connect.Net (Simon Shapiro) Cc: freebsd-scsi@FreeBSD.ORG Subject: Re: XXXminpys question Message-ID: <Mutt.19970129222900.j@uriah.heep.sax.de> In-Reply-To: <XFMail.970129132302.Shimon@i-Connect.Net>; from Simon Shapiro on Jan 29, 1997 12:55:07 -0800 References: <XFMail.970129132302.Shimon@i-Connect.Net>
next in thread | previous in thread | raw e-mail | index | archive | help
As Simon Shapiro wrote: > When/how is the minphys entry point in an HBA driver called? I think all that minphys stuff is currently defunct. The magic is in physio(9), and it seems as if it was intended to be called once per each buf: for(i=0;i<uio->uio_iovcnt;i++) { while( uio->uio_iov[i].iov_len) { bp->b_bcount = uio->uio_iov[i].iov_len; bp->b_flags = B_BUSY | B_PHYS | B_CALL | bufflags; bp->b_iodone = physwakeup; bp->b_data = uio->uio_iov[i].iov_base; bp->b_bcount = minp( bp); if( minp != minphys) bp->b_bcount = minphys( bp); However, this also makes it very apparent that it can't work: if the provided (by the caller to physio) `minp' is different from teh default minphys(), then the default minphys() will be called in addition to minp, effectively limiting all transfers to 64 KB by now. Of course, rawread(9) and rawwrite(9) don't ever call it with something else than minphys(9) anway. The default minphys(9) uses the constant MAXPHYS as a high watermark. The SCSI minphys routines seem to be called _in addition_ to the physio(9) minphys handling, to make the mess complete (once per call to scsi_strategy(), in sys/scsi/scsi_driver.c). All this needs a redesign. -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Mutt.19970129222900.j>