From owner-cvs-src@FreeBSD.ORG Mon Jan 3 07:47:21 2005 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 333A916A4CE; Mon, 3 Jan 2005 07:47:21 +0000 (GMT) Received: from ylpvm43.prodigy.net (ylpvm43-ext.prodigy.net [207.115.57.74]) by mx1.FreeBSD.org (Postfix) with ESMTP id B8A3F43D54; Mon, 3 Jan 2005 07:47:20 +0000 (GMT) (envelope-from nate@root.org) Received: from [10.0.5.51] (adsl-64-171-186-95.dsl.snfc21.pacbell.net [64.171.186.95])j037lQtv008511; Mon, 3 Jan 2005 02:47:27 -0500 Message-ID: <41D8F883.6010806@root.org> Date: Sun, 02 Jan 2005 23:47:15 -0800 From: Nate Lawson User-Agent: Mozilla Thunderbird 1.0RC1 (X11/20041205) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Sam Leffler References: <200501011924.j01JOPpb043551@repoman.freebsd.org> <41D7AFC0.7010401@errno.com> In-Reply-To: <41D7AFC0.7010401@errno.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org cc: SXren Schmidt Subject: Re: cvs commit: src/sys/dev/ata ata-chipset.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jan 2005 07:47:21 -0000 Sam Leffler wrote: > SXren Schmidt wrote: > >> sos 2005-01-01 19:24:25 UTC >> >> FreeBSD src repository >> >> Modified files: >> sys/dev/ata ata-chipset.c Log: >> Further update to the Promise code. >> Support should now cover all old and current products. > > > My thinkpads continue to panic at boot with memory use after free when > probing the DVD drive. I've been rolling back ata-queue.c to 1.39 to > correct the problem. From a working boot: > > aku# dmesg|grep ata > atapci0: port > 0x1860-0x186f,0x376,0x170-0x177,0x3f6,0x1f0-0x1f7 at device 31.1 on pci0 > ata0: channel #0 on atapci0 > ata1: channel #1 on atapci0 > ad0: 34796MB [70697/16/63] at ata0-master > UDMA100 > ata1-slave: FAILURE - ATAPI_IDENTIFY timed out > ata1-slave: FAILURE - ATAPI_IDENTIFY timed out > ata1-slave: FAILURE - ATAPI_IDENTIFY timed out > acd0: DVDR at ata1-master UDMA33 > > When I told you this you said your code base had diverged too far from > CVS to attempt to diagnose the problem. Perhaps you have something else > yet to commit that will remedy this? This has been a recurring issue since about 8/2003 when ATAng appeared. It has been fixed and then broken again several times. I also spent some time looking into it so let me summarize what I know. On Thinkpads with the included CD, DVD, DVD/CDRW, etc. drives, a phantom slave appears on the secondary channel even though there is no device there. This "drive" appears to exist but doesn't respond to the IDENTIFY command. The current ATA driver is event-driven and does its own error handling. There's a timeout handler to attempt to restart commands if they don't respond. When probing drives at boot, the IDENTIFY command sent to the "drive" times out and the timeout handler reinjects the command. This command is started from a different path that it is synchronous, waiting until the command completes instead of doing the normal ata_start, interrupt, ata_done path. Since the timeout path is different, past issues have included not reseting the residual count resulting in a memory overwrite. The last time Soeren talked about these devices, he said he didn't have one and couldn't reproduce the error. That's likely why the workaround for them keeps getting broken with updates to the rest of the driver. -- Nate