From owner-freebsd-current Mon Jan 3 22:41:32 2000 Delivered-To: freebsd-current@freebsd.org Received: from 1Cust68.tnt1.washington.dc.da.uu.net (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 79CAC14D5A; Mon, 3 Jan 2000 22:41:12 -0800 (PST) (envelope-from green@FreeBSD.org) Date: Tue, 4 Jan 2000 01:41:09 -0500 (EST) From: Brian Fundakowski Feldman X-Sender: green@green.dyndns.org To: current@FreeBSD.org Cc: sos@FreeBSD.dk Subject: ATA atapi-all.c problems/fixes/cleanups 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 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? 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 :) -- Brian Fundakowski Feldman \ FreeBSD: The Power to Serve! / green@FreeBSD.org `------------------------------' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message