From owner-freebsd-hackers Sun Aug 26 12:17:36 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 4756E37B408 for ; Sun, 26 Aug 2001 12:17:33 -0700 (PDT) (envelope-from sos@freebsd.dk) Received: (from sos@localhost) by freebsd.dk (8.11.3/8.11.3) id f7QJHnT68379; Sun, 26 Aug 2001 21:17:49 +0200 (CEST) (envelope-from sos) From: Søren Schmidt Message-Id: <200108261917.f7QJHnT68379@freebsd.dk> Subject: Re: ata0-master: non aligned DMA transfer attempted In-Reply-To: "from Zhihui Zhang at Aug 26, 2001 02:16:12 pm" To: Zhihui Zhang Date: Sun, 26 Aug 2001 21:17:49 +0200 (CEST) Cc: 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 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. -Søren To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message