Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Apr 2002 18:47:01 -0700
From:      Ian Hamilton <ianh@uidaho.edu>
To:        freebsd-questions@freebsd.org
Subject:   Selectively Disabling DMA?
Message-ID:  <3CCF4915.51D9B6A7@uidaho.edu>

next in thread | raw e-mail | index | archive | help
Recently, after a few buildworld, etc, iterations, I have been receiving
the following messages seemingly at random but more often under disk
activity:

Apr 25 00:29:32 clancy /kernel: ad3: read interrupt arrived earlyad3:
read error detected (too) late
Apr 25 00:29:33 clancy /kernel: vinum: raid.p0.s2 is crashed by force
Apr 25 00:29:33 clancy /kernel: vinum: raid.p0 is corrupt
Apr 25 00:29:33 clancy /kernel: fatal:raid.p0.s2 read error, block
18111545 for 8192 bytes
Apr 25 00:29:33 clancy /kernel: raid.p0.s2: user buffer block 54334256
for 8192 bytes
Apr 25 00:29:33 clancy /kernel: ad3: read interrupt arrived earlyad3:
read error detected (too) late
Apr 25 00:29:33 clancy /kernel: fatal:raid.p0.s2 read error, block
18111561 for 16384 bytes
Apr 25 00:29:33 clancy /kernel: raid.p0.s2: user buffer block 54334272
for 16384 bytes   
Apr 25 00:29:33 clancy /kernel: ad2: timeout waiting for DRQ - resetting
Apr 25 00:29:33 clancy /kernel: ata1: resetting devices ..  
Apr 25 00:29:33 clancy /kernel: ad3: removed from configuration
Apr 25 00:29:33 clancy /kernel: ad2: simplex device, DMA on primary only
Apr 25 00:29:33 clancy /kernel: done
Apr 25 00:29:33 clancy /kernel: vinum: Can't write config to
/dev/ad3s1e, error 6
Apr 25 00:29:33 clancy /kernel: vinum: drive d3 is down
etc...

After much searching on the web, I found a message that indicated DMA
may be a problem since I have a somewhat older motherboard (Very generic
P200).  After wading though a verbose boot I found the following as each
of the disks were loaded:

Creating DISK ad0
ar: FreeBSD check1 failed
ad0: <SAMSUNG SV0761D/PA100-34> ATA-4 disk at ata0-master
ad0: 7299MB (14948640 sectors), 14830 C, 16 H, 63 S, 512 B
ad0: 16 secs/int, 1 depth queue, WDMA2
ad0: piomode=4 dmamode=2 udmamode=4 cblid=1
ad1: success setting WDMA2 on SiS chip
Creating DISK ad1
ar: FreeBSD check1 failed
ad1: <ST320413A/3.58> ATA-5 disk at ata0-slave
ad1: 19092MB (39102336 sectors), 38792 C, 16 H, 63 S, 512 B
ad1: 16 secs/int, 1 depth queue, WDMA2
ad1: piomode=4 dmamode=2 udmamode=5 cblid=1
ad2: simplex device, DMA on primary only
Creating DISK ad2
ar: FreeBSD check1 failed
ad2: <ST320413A/3.58> ATA-5 disk at ata1-master
ad2: 19092MB (39102336 sectors), 38792 C, 16 H, 63 S, 512 B
ad2: 16 secs/int, 1 depth queue, BIOSPIO
ad2: piomode=4 dmamode=2 udmamode=5 cblid=1
ad3: simplex device, DMA on primary only
Creating DISK ad3
ar: FreeBSD check1 failed
ad3: <ST320413A/3.58> ATA-5 disk at ata1-slave
ad3: 19092MB (39102336 sectors), 38792 C, 16 H, 63 S, 512 B
ad3: 16 secs/int, 1 depth queue, BIOSPIO
ad3: piomode=4 dmamode=2 udmamode=5 cblid=1

What I note is the message saying "ad(2|3): simplex device, DMA on
primary only" which indicates to me that DMA is only available on the
primary IDE controller, not the second.  My question is now this:  on my
laptop, with a slightly older version of BSD, built early March, I have
the following sysctl:

hw.atamodes: dma,---,pio,---

however, on my more recent build on this machine (Middle April) that
option is no longer present.  Am I now forced to turn off DMA altogether
with:

hw.ata.ata_dma: 0??

What I would really like is:
hw.atamodes: dma,dma,pio,pio
but that doesn't seem to be an option.

Are there other options for selectively disabling DMA?

Thanks in advance,
-Ian Hamilton

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3CCF4915.51D9B6A7>