From owner-freebsd-hackers Sun Aug 26 12:18:33 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from freebsd.dk (fw-rl0.freebsd.dk [212.242.86.114]) by hub.freebsd.org (Postfix) with ESMTP id 60D6437B401 for ; Sun, 26 Aug 2001 12:18:28 -0700 (PDT) (envelope-from sos@freebsd.dk) Received: (from sos@localhost) by freebsd.dk (8.11.3/8.11.3) id f7QJIgM68585; Sun, 26 Aug 2001 21:18:42 +0200 (CEST) (envelope-from sos) From: Søren Schmidt Message-Id: <200108261918.f7QJIgM68585@freebsd.dk> Subject: Re: ata0-master: non aligned DMA transfer attempted In-Reply-To: <200108261917.f7QJHnT68379@freebsd.dk> =?ISO-8859-1?Q?from_S=F8ren_Schmidt_at_Aug_26=2C_2001_09=3A17=3A49_pm?= To: sos@freebsd.dk Date: Sun, 26 Aug 2001 21:18:42 +0200 (CEST) Cc: Zhihui Zhang , freebsd-hackers@FreeBSD.ORG Reply-To: sos@freebsd.dk X-Mailer: ELM [version 2.4ME+ PL88 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=ISO-8859-1 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG It seems Søren Schmidt wrote: > It seems Zhihui Zhang wrote: > > > > Thanks for your replay. I use gdb to find out that the buffer address is > > not 16-byte aligned. This leads to a question as to how to align a > > statically allocated data structure properly. Using union seems to be able > > to align you on a long boundary (or even long long?), but that is not 16 > > byte aligned. > > For all ATA controllers except for one crappy exception, the buffer > should just be on a 2byte aligned adresss, so using 16 or even > 64 bytes as Julian suggested is not needed. > > But you can ONLY transfer 512bytes at a time. Or a multiple there of... -Søren To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message