From owner-freebsd-current Mon Jan 3 23:22:31 2000 Delivered-To: freebsd-current@freebsd.org Received: from freebsd.dk (freebsd.dk [212.242.42.178]) by hub.freebsd.org (Postfix) with ESMTP id 69ADD14C4F; Mon, 3 Jan 2000 23:22:26 -0800 (PST) (envelope-from sos@freebsd.dk) Received: (from sos@localhost) by freebsd.dk (8.9.3/8.9.1) id IAA72101; Tue, 4 Jan 2000 08:22:24 +0100 (CET) (envelope-from sos) From: Soren Schmidt Message-Id: <200001040722.IAA72101@freebsd.dk> Subject: Re: ATA atapi-all.c problems/fixes/cleanups In-Reply-To: from Brian Fundakowski Feldman at "Jan 4, 2000 01:41:09 am" To: green@FreeBSD.org (Brian Fundakowski Feldman) Date: Tue, 4 Jan 2000 08:22:24 +0100 (CET) Cc: current@FreeBSD.org X-Mailer: ELM [version 2.4ME+ PL54 (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 Brian Fundakowski Feldman wrote: > I just noticed a problem with the ATA driver with my (not quite, but to me) > new CD-R drive. The behavior is that underruns and overruns are handled > incorrectly, due to a mixup between variables. The end result is that > too much data is sent to the drive and it chokes, borking my entire 2nd ATA > bus and thereforeo my box. > Enclosed is my fix in the form of a patch to atapi-all.c. The changes > are: > * general cleanups > * the bugfixes > * make the {over,under}run messages easier to understand/more helpful > * more use of ATA_16BIT_ONLY and *l functions to maintain consistency > I'm pretty certain that the bugfixes are correct, since it fixed the problem > for me, but I don't know about the ATA_16BIT_ONLY usage. My uncertainty > there lies in wondering if packets have to be a certain modulus. From the > code, I'd assume that all packets would have a modulus of 4 bytes. Is this > correct? Either the patch is very short, or you forgot to include it :) The ATA_16BIT_ONLY thing is to only do 16bit wide inb/outb instructions as old ISA HW don't allow 32bit wide access. This option is now deprecated as it is switched on automagically for ISA cards. > Anyone else experiencing lockups when an underrun/overrun occurs, try > this patch; it has fixed the problem for me, and now I'm on my way to > writing music CDs :) The current way to hack around that bug must be > to use the "obs" operand to dd(1), since that's what came naturally to > me :) You _should_ _always_ have dd (or whatever you use) pad the output to the given blocksize, or you will run into problems. -Søren To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message