Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Nov 1998 03:51:04 -0500 (EST)
From:      Lee Cremeans <lcremean@tidalwave.net>
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   kern/8875: Patch to allow DMA IDE with generic chipset + UDMA drives
Message-ID:  <199811280851.DAA03425@st-lcremean.tidalwave.net>

next in thread | raw e-mail | index | archive | help

>Number:         8875
>Category:       kern
>Synopsis:       Patch to allow DMA IDE with generic chipset + UDMA drives
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Nov 28 01:00:01 PST 1998
>Last-Modified:
>Originator:     
>Organization:
>Release:        FreeBSD 3.0-CURRENT i386
>Environment:

	Amptron PM-9600 motherboard (Acer Aladdin IV+ Socket 7 chipset)
	AMD K6-2-266 processor
	Seagate Medalist Pro 9140 hard drive

>Description:

	Adds option NO_GENERIC_UDMA. This option lets people who have 
	had problems getting "generic" chipsets and UDMA hard drives 
	to cooperate to use their drives in multiword DMA 2 mode--a
	slight tradeoff in speed, but enough to tide over until support
	can be written in for the Acer and SiS UDMA chips. 


>How-To-Repeat:

	N/A, this is a patch

>Fix:
	

(The lines for the Id strings can be ignored, they're just there to show which
versions of the files I diffed against.)

--- ide_pci.c.orig	Sat Nov 28 03:09:23 1998
+++ ide_pci.c	Sat Nov 28 03:47:40 1998
@@ -26,7 +26,6 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- *	$Id: ide_pci.c,v 1.14 1998/07/15 02:32:26 bde Exp $
  */
 
 #include "pci.h"
@@ -267,6 +266,19 @@
 		printf("ide_pci: generic_dmainit %04x:%d: warning, IDE controller timing not set\n",
 			cookie->iobase_wd,
 			cookie->unit);
+#ifdef NO_GENERIC_UDMA
+                /* Be pessimistic about the controller's setup, and assume it's
+                   only set for Multiword 2 DMA and not UDMA. Make the drive
+                   aware of this. */
+                int r; 
+
+		r = wdcmd(WDDMA_MDMA2, wdinfo);
+                if (!r) {
+                        printf("generic_dmainit: setting DMA mode failed\n");
+                        return 0;
+
+                }
+#endif /* NO_GENERIC_UDMA */
 		return 1;
 	}
 #ifdef IDE_PCI_DEBUG

--- options.i386.orig	Sat Nov 28 03:43:47 1998
+++ options.i386	Sat Nov 28 03:46:59 1998
@@ -1,4 +1,3 @@
-#	$Id: options.i386,v 1.92 1998/11/15 20:08:49 eivind Exp $
 
 DISABLE_PSE
 IDE_DELAY
@@ -95,6 +94,7 @@
 ATAPI_STATIC		opt_atapi.h
 
 CMD640			opt_wd.h
+NO_GENERIC_UDMA	opt_wd.h
 
 USERCONFIG		opt_userconfig.h
 VISUAL_USERCONFIG	opt_userconfig.h
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199811280851.DAA03425>