From owner-freebsd-scsi Wed May 2 6: 1:33 2001 Delivered-To: freebsd-scsi@freebsd.org Received: from arjun.niksun.com (gwnew.niksun.com [63.148.27.34]) by hub.freebsd.org (Postfix) with ESMTP id 8DC1437B424; Wed, 2 May 2001 06:01:30 -0700 (PDT) (envelope-from ath@niksun.com) Received: from stiegl.niksun.com (stiegl.niksun.com [10.0.0.44]) by arjun.niksun.com (8.9.3/8.9.3) with ESMTP id JAA17799; Wed, 2 May 2001 09:01:29 -0400 (EDT) (envelope-from ath@stiegl.niksun.com) Received: (from ath@localhost) by stiegl.niksun.com (8.9.2/8.8.7) id JAA14775; Wed, 2 May 2001 09:01:29 -0400 (EDT) (envelope-from ath) To: msmith@FreeBSD.ORG Cc: freebsd-scsi@FreeBSD.ORG Subject: Re: AMI MegaRAID on 4.2-RELEASE and bus_dmamap_load errors References: <200105020234.WAA11069@stiegl.niksun.com> From: Andrew Heybey Date: 02 May 2001 09:01:29 -0400 In-Reply-To: Andrew Heybey's message of "Tue, 01 May 2001 22:34:41 -0400" Message-ID: <85y9sf7vme.fsf@stiegl.niksun.com> Lines: 39 X-Mailer: Gnus v5.5/XEmacs 20.4 - "Emerald" Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org To follow up on my own email: If I change rawio to page-align the buffer it uses for I/O, then the error messages go away. I also note that (for example), dev/aic7xxx_frebbsd.h has: /* * The number of dma segments supported. The sequencer can handle any number * of physically contiguous S/G entrys. To reduce the driver's memory * consumption, we limit the number supported to be sufficient to handle * the largest mapping supported by the kernel, MAXPHYS. Assuming the * transfer is as fragmented as possible and unaligned, this turns out to * be the number of paged sized transfers in MAXPHYS plus an extra element * to handle any unaligned residual. The sequencer fetches SG elements * in 128 byte chucks, so make the number per-transaction a nice multiple * of 16 (8 byte S/G elements). */ /* XXX Worth the space??? */ #define AHC_NSEG (roundup(btoc(MAXPHYS) + 1, 16)) While dev/amr/amrreg.h has: /* * We could actually use all 17 segments, but using only 16 means that * each scatter/gather map is 128 bytes in size, and thus we don't have to worry about * maps crossing page boundaries. * * The AMI documentation says that the limit is 26. Unfortunately, there's no way to * cleanly fit more than 16 entries in without a page boundary. But is this a concern, * since we allocate the s/g maps contiguously anyway? */ #define AMR_NSEG 16 I did not feel comfortable changing AMR_NSEG without fully understanding the problem with crossing a page boundary. andrew To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message