From owner-freebsd-bugs Sat Nov 28 00:59:23 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id AAA20597 for freebsd-bugs-outgoing; Sat, 28 Nov 1998 00:59:23 -0800 (PST) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id AAA20589 for ; Sat, 28 Nov 1998 00:59:22 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from Unknown UID 563@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id BAA17497; Sat, 28 Nov 1998 01:00:01 -0800 (PST) Received: from st-lcremean.tidalwave.net (host-e186.tidalwave.net [208.213.203.186] (may be forged)) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id AAA20056 for ; Sat, 28 Nov 1998 00:51:14 -0800 (PST) (envelope-from lee@st-lcremean.tidalwave.net) Received: (from root@localhost) by st-lcremean.tidalwave.net (8.9.1/8.8.8) id DAA03425; Sat, 28 Nov 1998 03:51:04 -0500 (EST) (envelope-from lee) Message-Id: <199811280851.DAA03425@st-lcremean.tidalwave.net> Date: Sat, 28 Nov 1998 03:51:04 -0500 (EST) From: Lee Cremeans To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: kern/8875: Patch to allow DMA IDE with generic chipset + UDMA drives Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >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