From owner-freebsd-current Thu Jan 21 04:21:35 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id EAA28074 for freebsd-current-outgoing; Thu, 21 Jan 1999 04:21:35 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from freebsd.dk (freebsd.dk [212.242.42.178]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id EAA28064 for ; Thu, 21 Jan 1999 04:21:32 -0800 (PST) (envelope-from sos@freebsd.dk) Received: (from sos@localhost) by freebsd.dk (8.9.1/8.9.1) id NAA16525; Thu, 21 Jan 1999 13:21:03 +0100 (CET) (envelope-from sos) From: Søren Schmidt Message-Id: <199901211221.NAA16525@freebsd.dk> Subject: Re: Promise FastTrack PCI IDE controller In-Reply-To: <19990121230129.D5377@rf900.physics.usyd.edu.au> from David Dawes at "Jan 21, 1999 11: 1:29 pm" To: dawes@rf900.physics.usyd.edu.au (David Dawes) Date: Thu, 21 Jan 1999 13:21:03 +0100 (CET) Cc: current@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL43 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG It seems David Dawes wrote: > I've been playing with a Promise FastTrack RAID (IDE) controller with > 3.0-current as of yesterday. Although it is recognised in the PCI bus > probe as a "Promise Ultra/33" (it has the same vendor/chip ID as the > non-RAID card), the probes in i386/isa/wd.c fail. I added some debugging > printfs to the code, and have found that wdreset() is failing. By > changing the code to ignore that failure, it gets further, and correctly > identifies the attached disks. I can even access the disks sufficiently > to read the partition table with fdisk (but with timeouts). Hmm, I run one of my systems with the Ultra/33, but with the following patch, without that it wont recognise a lone CDROM/TAPE, but requires a disk to be present. It also includes some other patches, including a fix for SMP system which Julian broke in rev1.183 of wd.c. I also run the card without its BIOS, as that tends to get in the way. I think the FastTrack is just an Ultra/33 with another BIOS chip on it. - Søren Index: wd.c =================================================================== RCS file: /home/ncvs/src/sys/i386/isa/wd.c,v retrieving revision 1.186 diff -u -r1.186 wd.c --- wd.c 1999/01/17 05:46:24 1.186 +++ wd.c 1999/01/19 18:29:23 @@ -350,9 +350,11 @@ goto reset_ok; #endif DELAY(RECOVERYTIME); +/* Allow atapi only channels to work proberly SOS if (wdreset(du) != 0) { goto nodevice; } +*/ reset_ok: /* execute a controller only command */ @@ -1084,10 +1086,11 @@ du = wddrives[dkunit(bp->b_dev)]; /* finish off DMA */ - if (du->dk_flags & (DKFL_DMA|DKFL_USEDMA)) { + if ((du->dk_flags & (DKFL_DMA|DKFL_SINGLE)) == DKFL_DMA) { /* XXX SMP boxes sometimes generate an early intr. Why? */ - if ((wddma[du->dk_interface].wdd_dmastatus(du->dk_dmacookie) & WDDS_INTERRUPT) - != 0) + if ((wddma[du->dk_interface].wdd_dmastatus(du->dk_dmacookie) & + WDDS_INTERRUPT) == 0) + return; dmastat = wddma[du->dk_interface].wdd_dmadone(du->dk_dmacookie); } @@ -1568,6 +1571,7 @@ if (wdwait(du, 0, TIMEOUT) < 0) return (1); if( command == WDCC_FEATURES) { + outb(wdc + wd_sdh, WDSD_IBM | (du->dk_unit << 4) | head); outb(wdc + wd_features, count); if ( count == WDFEA_SETXFER ) outb(wdc + wd_seccnt, sector); @@ -2289,9 +2293,8 @@ { int err = 0; - if ((du->dk_flags & (DKFL_DMA|DKFL_USEDMA)) && du->dk_dmacookie) + if ((du->dk_flags & (DKFL_DMA|DKFL_SINGLE)) == DKFL_DMA) wddma[du->dk_interface].wdd_dmadone(du->dk_dmacookie); - (void)wdwait(du, 0, TIMEOUT); outb(du->dk_altport, WDCTL_IDS | WDCTL_RST); DELAY(10 * 1000); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message