*BSD News Article 22714


Return to BSD News archive

Newsgroups: comp.os.386bsd.bugs
Path: sserve!csadfa.cs.adfa.oz.au!wkt
From: wkt@csadfa.cs.adfa.oz.au (Warren Toomey)
Subject: QIC-02 DRIVER PATCHES - now useable
Message-ID: <1993Oct23.000246.28975@sserve.cc.adfa.oz.au>
Sender: news@sserve.cc.adfa.oz.au
Organization: Australian Defence Force Academy, Canberra, Australia
Date: Sat, 23 Oct 1993 00:02:46 GMT


	If you have tried the QIC-02 driver written by Sergey Ryzhkov
<sir@kiae.su> and Serge Vakulenko <vak@zebub.msk.su> which was posted in
the 386bsd newsgroups in early August 1993 ( Subject: New driver for QIC-02
Archive and Wangtek tapes), here's a patch to make it go from abysmally slow
to useable. This came out of a night of mangling the code to see what was
happening, and there is no guarantee that it will work for your drive.

Apparently the fix is to convert all uses of `hz' to `hz/100' (or /50). The
rest of the patch comments out essentially useless code. So if the patch
doesn't work, try undoing it and patching the `hz' lines only. Thanks to
Sergey and Serge for writing the new driver, it's a hell of a lot more readable
than the old one.

While I'm here, I'm after some docs on my Archive QIC controller card, which I
picked up at a garage sale a few days ago. It's full-length, copyright 1985
Archive Corp, and about the only identification on it is
`FCC ID EAX6GP-SC400S'. The ROM has a silver cover with the label
`ROM 80234-003'. If anybody has any docs on this card, or knows where I might
get them, please email me!


Good luck!

	Warren Toomey	wkt@csadfa.cs.adfa.oz.au



*** wt.c.19477	Thu Oct 21 18:45:36 1993
--- wt.c	Sat Oct 23 08:03:08 1993
***************
*** 527,533 ****
  	s = inb (t->STATPORT);                  /* get status */
  	if ((s & (t->BUSY | t->NOEXCEP)) == (t->BUSY | t->NOEXCEP))
  		return;                         /* device is busy */
! 	outb (t->CTLPORT, t->ONLINE);           /* stop controller */
  
  	/*
  	 * Check if rewind finished.
--- 527,533 ----
  	s = inb (t->STATPORT);                  /* get status */
  	if ((s & (t->BUSY | t->NOEXCEP)) == (t->BUSY | t->NOEXCEP))
  		return;                         /* device is busy */
! 	/* outb (t->CTLPORT, t->ONLINE);           /* stop controller */
  
  	/*
  	 * Check if rewind finished.
***************
*** 621,627 ****
  /* write marker to the tape */
  static int wtwritefm (wtinfo_t *t)
  {
! 	tsleep (wtwritefm, WTPRI, "wtwfm", hz);         /* timeout: 1 second */
  	t->flags &= ~(TPRO | TPWO);
  	if (! wtcmd (t, QIC_WRITEFM)) {
  		wtsense (t, 0);
--- 621,627 ----
  /* write marker to the tape */
  static int wtwritefm (wtinfo_t *t)
  {
! 	tsleep (wtwritefm, WTPRI, "wtwfm", hz/100);  /* timeout: 10 msec */
  	t->flags &= ~(TPRO | TPWO);
  	if (! wtcmd (t, QIC_WRITEFM)) {
  		wtsense (t, 0);
***************
*** 651,660 ****
  	
  	outb (t->CMDPORT, cmd);                         /* output the command */
  
! 	outb (t->CTLPORT, t->REQUEST | t->ONLINE);      /* set request */
  	while (inb (t->STATPORT) & t->BUSY)             /* wait for ready */
  		continue;
! 	outb (t->CTLPORT, t->IEN | t->ONLINE);          /* reset request */
  	while (! (inb (t->STATPORT) & t->BUSY))         /* wait for not ready */
  		continue;
  
--- 651,660 ----
  	
  	outb (t->CMDPORT, cmd);                         /* output the command */
  
! 	outb (t->CTLPORT, t->REQUEST );      /* set request */
  	while (inb (t->STATPORT) & t->BUSY)             /* wait for ready */
  		continue;
! 	outb (t->CTLPORT, t->IEN );          /* reset request */
  	while (! (inb (t->STATPORT) & t->BUSY))         /* wait for not ready */
  		continue;
  
***************
*** 687,693 ****
  	else
  		isa_dmastart (t->dmaflags, t->dmavaddr, BLKSIZE, t->chan);
  
! 	outb (t->CTLPORT, t->IEN | t->ONLINE);
  }
  
  /* start i/o operation */
--- 687,693 ----
  	else
  		isa_dmastart (t->dmaflags, t->dmavaddr, BLKSIZE, t->chan);
  
! 	outb (t->CTLPORT, t->IEN );
  }
  
  /* start i/o operation */
***************
*** 711,717 ****
  {
  	if (! (t->flags & TPTIMER)) {
  		t->flags |= TPTIMER;
! 		timeout (wtimer, t, hz);
  	}
  }
  
--- 711,717 ----
  {
  	if (! (t->flags & TPTIMER)) {
  		t->flags |= TPTIMER;
! 		timeout (wtimer, t, hz/100);
  	}
  }
  
***************
*** 795,801 ****
  	wtpoll (t);                     /* wait for ready or exception */
  	outb (t->CMDPORT, QIC_RDSTAT);  /* send `read status' command */
  
! 	outb (t->CTLPORT, t->REQUEST | t->ONLINE);      /* set request */
  	while (inb (t->STATPORT) & t->BUSY)             /* wait for ready */
  		continue;
  	outb (t->CTLPORT, t->ONLINE);                   /* reset request */
--- 795,801 ----
  	wtpoll (t);                     /* wait for ready or exception */
  	outb (t->CMDPORT, QIC_RDSTAT);  /* send `read status' command */
  
! 	outb (t->CTLPORT, t->REQUEST );      /* set request */
  	while (inb (t->STATPORT) & t->BUSY)             /* wait for ready */
  		continue;
  	outb (t->CTLPORT, t->ONLINE);                   /* reset request */
#! rnews 625 sserve.cc.adfa.oz.au
Newsgroups: comp.os.386bsd.questions
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!spool.mu.edu!news.clark.edu!serval!beta.tricity.wsu.edu!msmith
From: msmith@beta.tricity.wsu.edu (Mark Smith)
Subject: Semaphore and shared memory libs?
Message-ID: <1993Oct23.022017.10698@serval.net.wsu.edu>
Sender: news@serval.net.wsu.edu (USENET News System)
Organization: Washington State University TriCities
Date: Sat, 23 Oct 93 02:20:17 GMT
Lines: 6

Greetings,

I heard some time ago that there are libraries for Shared Memory and the
Semaphore stuff.  Is this true and where/if can the be gotten?!?

Mark