Date: 02 May 2001 09:01:29 -0400 From: Andrew Heybey <ath@niksun.com> To: msmith@FreeBSD.ORG Cc: freebsd-scsi@FreeBSD.ORG Subject: Re: AMI MegaRAID on 4.2-RELEASE and bus_dmamap_load errors Message-ID: <85y9sf7vme.fsf@stiegl.niksun.com> In-Reply-To: Andrew Heybey's message of "Tue, 01 May 2001 22:34:41 -0400" References: <200105020234.WAA11069@stiegl.niksun.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?85y9sf7vme.fsf>