From owner-freebsd-current Wed Jan 13 20:29:16 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id UAA13604 for freebsd-current-outgoing; Wed, 13 Jan 1999 20:29:16 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from smtpott1.nortel.ca (smtpott1.nortel.ca [192.58.194.78]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id UAA13599 for ; Wed, 13 Jan 1999 20:29:15 -0800 (PST) (envelope-from atrens@nortelnetworks.com) Received: from zcars01t by smtpott1; Wed, 13 Jan 1999 23:27:51 -0500 Received: from wmerh01z.ca.nortel.com by zcars01t; Wed, 13 Jan 1999 23:27:09 -0500 Received: from hcarp00g.ca.nortel.com (atrens@hcarp00g.ca.nortel.com@wmerh01z) by wmerh01z.ca.nortel.com with ESMTP (8.7.1/8.7.1) id XAA04149; Wed, 13 Jan 1999 23:27:08 -0500 (EST) Date: Wed, 13 Jan 1999 23:36:13 -0500 (EST) From: "Andrew Atrens" Reply-To: "Andrew Atrens" To: current@FreeBSD.ORG cc: lcremean@tidalwave.net Subject: testers wanted: ide_pci.c bugster In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi All, Recall that around the middle of December a patch to pci_ide.c was committed which I suspected has been hosing my system. Okay, so I've looked into the usage of this, and I'm convinced the patch is _wrong_. For those of you experiencing PCI IDE grief, try _backing out_ this change ... In ide_pci.c: 1452 /* 1453 * Return a cookie if we can do DMA on the specified (iobase_wd, unit). 1454 */ 1455 static void * 1456 ide_pci_candma(int iobase_wd, int unit) 1457 { 1458 struct ide_pci_cookie *cp; 1459 1460 cp = softc.cookies.lh_first; 1461 while(cp) { 1462 <<*OLD*<< if (cp->ctlr == unit && 1462 >>*NEW*<< if (cp->unit == unit && 1463 ((iobase_wd == 0) || (cp->iobase_wd==iobase_wd))) 1464 break; 1465 cp = cp->le.le_next; 1466 } 1467 1468 return cp; 1469 } ide_pci_candma() is a registered callback function used in wd.c in the following way: 327: if (wddma[interface].wdd_candma) { 328: du->dk_dmacookie = 329: wddma[interface].wdd_candma(dvp->id_iobase,du->dk_ctrlr); Notice the second argument is a controller _not_ a drive. Therefore the comparison between cp->ctlr == du->dk_ctrlr was correct, and should not have been changed to cp->unit == du->dk_ctrlr. Cheers, Andrew. -- +----------------------------------------------------+ = Andrew Atrens - Nortel Networks (atrens@nortel.ca) = = P.O. Box 3511, Station C Ottawa, Canada = = = = All opinions expressed are mine, not Nortel's. = +----------------------------------------------------+ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message