From owner-freebsd-scsi Wed Jan 29 13:52:12 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id NAA24382 for freebsd-scsi-outgoing; Wed, 29 Jan 1997 13:52:12 -0800 (PST) Received: from sax.sax.de (sax.sax.de [193.175.26.33]) by freefall.freebsd.org (8.8.5/8.8.5) with SMTP id NAA24374 for ; Wed, 29 Jan 1997 13:52:06 -0800 (PST) Received: (from uucp@localhost) by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id WAA05383; Wed, 29 Jan 1997 22:50:10 +0100 Received: (from j@localhost) by uriah.heep.sax.de (8.8.4/8.6.9) id WAA21535; Wed, 29 Jan 1997 22:29:00 +0100 (MET) Message-ID: 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 References: X-Mailer: Mutt 0.55-PL10 Mime-Version: 1.0 X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: ; from Simon Shapiro on Jan 29, 1997 12:55:07 -0800 Sender: owner-freebsd-scsi@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk 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;iuio_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. ;-)