summaryrefslogtreecommitdiffstats
path: root/sys/dev/mcd
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1994-09-14 20:28:25 +0000
committerache <ache@FreeBSD.org>1994-09-14 20:28:25 +0000
commitb95a84ec5205cccdbf604cc8b40fa49245c9a50f (patch)
tree032194e3e3deb79026a4db52855458d78ede4a62 /sys/dev/mcd
parentf9fe204a451a48eede4b0c374ae8d13f1844f7c5 (diff)
downloadFreeBSD-src-b95a84ec5205cccdbf604cc8b40fa49245c9a50f.zip
FreeBSD-src-b95a84ec5205cccdbf604cc8b40fa49245c9a50f.tar.gz
Increase transfer speed by waiting much less than 10ms after request
Submitted by: stark@sbstark.cs.sunysb.edu & slightly modifyed by me
Diffstat (limited to 'sys/dev/mcd')
-rw-r--r--sys/dev/mcd/mcd.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/sys/dev/mcd/mcd.c b/sys/dev/mcd/mcd.c
index 30170bc..53b6fee 100644
--- a/sys/dev/mcd/mcd.c
+++ b/sys/dev/mcd/mcd.c
@@ -39,7 +39,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: mcd.c,v 1.23 1994/09/03 16:48:12 ache Exp $
+ * $Id: mcd.c,v 1.24 1994/09/06 21:56:09 se Exp $
*/
static char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore";
@@ -195,7 +195,7 @@ struct isa_driver mcddriver = { mcd_probe, mcd_attach, "mcd" };
#define RDELAY_WAITREAD 800
#define MIN_DELAY 15
-#define DELAY_GETREPLY 1200000
+#define DELAY_GETREPLY 1300000
int mcd_attach(struct isa_device *dev)
{
@@ -952,6 +952,14 @@ nextblock:
mcd_put(com_port,1);
enable_intr();
+ /* Spin briefly (<= 2ms) to avoid missing next block */
+ for (i = 0; i < 20; i++) {
+ k = inb(port+mcd_xfer);
+ if (!(k & 2))
+ goto got_it;
+ DELAY(100);
+ }
+
mbx->count = RDELAY_WAITREAD;
timeout((timeout_func_t)mcd_doread,
(caddr_t)MCD_S_WAITREAD,hz/100); /* XXX */
@@ -963,6 +971,7 @@ nextblock:
if (!(k & 2)) { /* XXX */
MCD_TRACE("got data delay=%d\n",
RDELAY_WAITREAD-mbx->count,0,0,0);
+ got_it:
/* data is ready */
addr = bp->b_un.b_addr + mbx->skip;
OpenPOWER on IntegriCloud