Subject: port-amiga/1252: floppy driver not working on certain kernel configurations
To: None <gnats-bugs@gnats.netbsd.org>
From: Blaz Zupan <blaz.zupan@uni-mb.si>
List: netbsd-bugs
Date: 07/22/1995 13:34:11
>Number:         1252
>Category:       port-amiga
>Synopsis:       floppy driver not working on certain kernel configurations
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jul 22 08:35:01 1995
>Last-Modified:
>Originator:     Blaz Zupan
>Organization:
  Blaz Zupan, Ljubljanska 19/b, 62000 Maribor, Slovenia
     blaz.zupan@uni-mb.si, 2:380/104.40, GMIZO::BLAZ
>Release:        Jul 18 kernel, still present in latest sup
>Environment:
	
System: NetBSD amiga.uni-mb.si 1.0A NetBSD 1.0A (VECTOR) #15: Mon Jul 10 11:47:42 MET DST 1995 blaz@amiga.uni-mb.si:/home/src/sys/arch/amiga/compile/VECTOR amiga


>Description:

The floppy driver relies on grfcc setting the master DMA enable bit.
If you compile a kernel without grfcc (f.e. if you use the grfcl driver
and don't need the custom-chip graphics) then the master DMA enable
bit is not set and the floppy driver hangs when you try to access
a floppy.

>How-To-Repeat:

Compile a kernel without grfcc and try to use the floppy driver.

>Fix:

Apply the following patch to /sys/arch/amiga/dev/fd.c:

*** fd.c.orig	Wed Jul  5 08:52:38 1995
--- fd.c	Thu Jul  6 23:29:19 1995
***************
*** 353,359 ****
  	/*
  	 * enable disk related interrupts
  	 */
! 	custom.dmacon = DMAF_SETCLR | DMAF_DISK;
  	/* XXX why softint */
  	custom.intena = INTF_SETCLR |INTF_SOFTINT | INTF_DSKBLK;
  	ciaa.icr = CIA_ICR_IR_SC | CIA_ICR_FLG;
--- 353,359 ----
  	/*
  	 * enable disk related interrupts
  	 */
! 	custom.dmacon = DMAF_SETCLR | DMAF_MASTER | DMAF_DISK;
  	/* XXX why softint */
  	custom.intena = INTF_SETCLR |INTF_SOFTINT | INTF_DSKBLK;
  	ciaa.icr = CIA_ICR_IR_SC | CIA_ICR_FLG;
>Audit-Trail:
>Unformatted: