Date: Tue, 01 May 2001 22:34:41 -0400 From: Andrew Heybey <ath@niksun.com> To: msmith@freebsd.org Cc: freebsd-scsi@freebsd.org Subject: AMI MegaRAID on 4.2-RELEASE and bus_dmamap_load errors Message-ID: <200105020234.WAA11069@stiegl.niksun.com>
next in thread | raw e-mail | index | archive | help
When running rawio on an (unmounted) partition, the kernel starts
logging many messages of the form:
Apr 23 11:00:03 raid /kernel: bus_dmamap_load: Too many segs! buf_len = 0x900
Apr 23 11:00:03 raid /kernel: bus_dmamap_load: Too many segs! buf_len = 0x100
Apr 23 11:00:03 raid /kernel: bus_dmamap_load: Too many segs! buf_len = 0xf00
Apr 23 11:00:03 raid last message repeated 4 times
Relevant boot messages:
amr0: <AMI MegaRAID> mem 0xf8000000-0xfbffffff irq 11 at device 0.0 on pci4
amr0: <Series 493 40 Logical Drive Firmware> Firmware l148, BIOS 3.11, 64MB RAM
amrd0: <MegaRAID logical drive> on amr0
amrd0: 140008MB (286736384 sectors) RAID 5 (optimal)
amrd1: <MegaRAID logical drive> on amr0
amrd1: 140008MB (286736384 sectors) RAID 5 (optimal)
System is an Intel L440GX+, 512MB RAM. It is currently set up to
stripe (using ccd) across the two RAID 5 arrays. The rawio is run on
/dev/rccd0c.
I found an exchange on freebsd-scsi in January about a similar problem
with Mylex controllers:
> > If you need someone to do testing of FreeBSD patches, revisions, etc for
> > these controllers, the RAID cards and PC in question is just a
> > play-around with PC and doesn't hold any critical data. I can
> > format/destroy/reload stuff at will with no problems. Just let me know.
>
> I'll keep you on file. 8) If you have any C hacking experience, I
> *really* need to know why the 'too many segs' error is being thrown. All
> the indications I've received so far are that the region in question
> shouldn't have "too many" segments, so I'm a bit confused.
I added the following to sys/i386/i386/busdma_machdep.c:
@@ -470,8 +470,13 @@
} while (buflen > 0);
if (buflen != 0) {
- printf("bus_dmamap_load: Too many segs! buf_len = 0x%lx\n",
- (u_long)buflen);
+ int i;
+ printf("bus_dmamap_load: Too many segs! buf_len = 0x%lx, seg = %d, nseg = %d\n",
+ (u_long)buflen, seg, dmat->nsegments);
+ for (i = 0; i < dmat->nsegments; i++)
+ printf("bus_dmamap_load: seg %d addr 0x%lx len %d\n",
+ i, (u_long)dm_segments[i].ds_addr,
+ dm_segments[i].ds_len);
error = EFBIG;
}
Then I get:
bus_dmamap_load: Too many segs! buf_len = 0xea0, seg = 17, nseg = 16
bus_dmamap_load: seg 0 addr 0x8dabea0 len 352
bus_dmamap_load: seg 1 addr 0x8f8c000 len 4096
bus_dmamap_load: seg 2 addr 0x8f6d000 len 4096
bus_dmamap_load: seg 3 addr 0x8dae000 len 4096
bus_dmamap_load: seg 4 addr 0x8b0f000 len 4096
bus_dmamap_load: seg 5 addr 0x8c30000 len 4096
bus_dmamap_load: seg 6 addr 0x8e31000 len 4096
bus_dmamap_load: seg 7 addr 0x8b12000 len 4096
bus_dmamap_load: seg 8 addr 0x8cb3000 len 4096
bus_dmamap_load: seg 9 addr 0x8954000 len 4096
bus_dmamap_load: seg 10 addr 0x8ad5000 len 4096
bus_dmamap_load: seg 11 addr 0x8ab6000 len 4096
bus_dmamap_load: seg 12 addr 0x8bd7000 len 4096
bus_dmamap_load: seg 13 addr 0x8af8000 len 4096
bus_dmamap_load: seg 14 addr 0x8b79000 len 4096
bus_dmamap_load: seg 15 addr 0x7b7a000 len 4096
Someone is trying to do a 64k DMA to a non-page-aligned address. This
requires 17 segments, but there are only 16 available.
Any suggestions?
thanks,
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?200105020234.WAA11069>
