[3848] in Athena Bugs

home help back first fref pref prev next nref lref last post

vax 6.4R: vs3100 floppy drive

daemon@ATHENA.MIT.EDU (Ezra Peisach)
Tue Dec 19 11:38:09 1989

To: bugs@ATHENA.MIT.EDU, testers@ATHENA.MIT.EDU
Date: Tue, 19 Dec 89 11:37:32 EST
From: Ezra Peisach <epeisach@ATHENA.MIT.EDU>
System name:		medusa
Type and version:	CVAXSTAR 6.4R (1 update(s) to same version)
Display type:		SM

What were you trying to do?

  Test the floppy drive



What's wrong:
  When you go off the end of the disk (dd if=/dev/floppy of=/dev/null),
and then remove the disk, you get hard erros on replacing the disk or
putting in any other. Enabling debugging showed these to be
synchoronization errors. There was a comment that when disks are
replaced, a restore was necessary to prevent syncerr's. Not surprising,
the code was in place for the rx33 and rx50, but missing from the rx23
disk. This only happens if the last action before replacing a disk
caused an attempt to go past the end of the disk or some other error
showed up. If you overflow a disk, before removing it, dd if=/dev/floppy
of=/dev/null count=10 is sufficient to prevent the problem, but once the
floppy is removed, you've had it.


What should have happened:
  The disk drive should be useable without rebooting.

Fix folows - I have tried it and it appears to work without problem.

*** /paris/sys/vaxuba/sdc.c	Sat Oct 28 00:47:36 1989
--- /wombat/u3/sys/vaxuba/sdc.c	Tue Dec 19 10:22:24 1989
***************
*** 1003,1022 ****
--- 1003,1025 ----
  
  /* This routine gets called after 700 m.sec timeout for RX23 motor to speed up 
   */
  
  sd_rx23wakeup(bp)
      register struct buf *bp;
  {
      register int unit, maxsize, sz, xunit;
      struct buf *dp;
  
+     /* To prevent syncerr, restore to track 0 */
+     sd_restore(1); 
+ 
      unit = sdunit(bp);
      sz = (bp->b_bcount + 511) >> 9;
      xunit = minor(bp->b_dev) & 07;
      dsket_type = rx23_type();	/* find out the diskette type  */
      if (dsket_type == DT_RX23H)
  	sd_rx23htype(unit);
      else
  	sd_rx23dtype(unit);
      if (sdst[dsket_type].sizes[xunit].nblocks == -1)
  	maxsize = sd_st.ucb[unit].hostsize -

home help back first fref pref prev next nref lref last post