Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Aug 2006 15:48:22 +0100
From:      John Murphy <sub02@freeode.co.uk>
To:        freebsd-questions@freebsd.org
Subject:   Anything stronger than hw.ata.ata_dma="0"?
Message-ID:  <jr8bf29tf36m35heogc3q1cnh7l25sls8t@4ax.com>

next in thread | raw e-mail | index | archive | help
I'm trying to get a Kingston 1GB 50x 'elite pro' Compact Flash working
as ad1 initially, and then move it to ad0 to install FreeBSD-6.1 on it.

The hardware is an Soekris net4801 and it's known that CF cards usually
only work in PIO mode.  A line in /boot/loader.conf saying:
hw.ata.ata_dma="0" is usually enough, but not in this case.  It seems,
from the output of a verbose boot (see below), that the controller is
successfully setting PIO4 mode, but then it sets UDMA33 again, eventually
failing with:

ad1: FAILURE - READ_DMA timed out LBA=0

Using 'atacontrol mode ad1 PIO4' works and I can then fdisk, label and
mount it without error.  So what can I do that would be more effective
than the hw.ata.ata_dma sysctl.  I'm willing to patch the kernel source
and build a custom kernel if necessary.

> uname -a
FreeBSD mail.freeode.co.uk 6.0-RELEASE FreeBSD 6.0-RELEASE #9: Sun May  7
22:51:56 BST 2006     xxxx@mail.freeode.co.uk:/usr/src/sys/i386/compile/
SOEKRIS  i386

Soekris comBIOS detects:
Pri Sla  CF300  (LBA Xlt 999-32-63  1007 Mbyte)

ata parts of verbose boot output:

atapci0: <National Geode SC1100 ATA33 controller> port 0x1f0-0x1f7,0x3f6,0x170-0
x177,0x376,0xe000-0xe00f at device 18.2 on pci0
atapci0: Reserved 0x10 bytes for rid 0x20 type 4 at 0xe000
ata0: <ATA channel 0> on atapci0
atapci0: Reserved 0x8 bytes for rid 0x10 type 4 at 0x1f0
atapci0: Reserved 0x1 bytes for rid 0x14 type 4 at 0x3f6
ata0: reset tp1 mask=03 ostat0=50 ostat1=50
ata0: stat0=0x50 err=0x01 lsb=0x00 msb=0x00
ata0: stat1=0x50 err=0x01 lsb=0x00 msb=0x00
ata0: reset tp2 stat0=50 stat1=50 devices=0x3<ATA_SLAVE,ATA_MASTER>
ata0: [MPSAFE]
ata1: <ATA channel 1> on atapci0
atapci0: Reserved 0x8 bytes for rid 0x18 type 4 at 0x170
atapci0: Reserved 0x1 bytes for rid 0x1c type 4 at 0x376
ata1: reset tp1 mask=00 ostat0=ff ostat1=ff
ata1: [MPSAFE]
Geode CBA@ 0x6000
Geode rev: 06 03
Timecounter "Geode" frequency 27000000 Hz quality 1000
pci0: <bridge> at device 18.5 (no driver attached)
pci0: <serial bus, USB> at device 19.0 (no driver attached)
ata: ata0 already exists; skipping it
ata: ata1 already exists; skipping it
[...]
ata0-slave: pio=PIO4 wdma=WDMA2 udma=UDMA33 cable=40 wire
ata0-master: pio=PIO4 wdma=WDMA2 udma=UDMA100 cable=80 wire
ad0: success setting PIO4 on National chip
ad0: 38154MB <FUJITSU MHT2040AT 0022> at ata0-master PIO4
ad0: 78140160 sectors [77520C/16H/63S] 16 sectors/interrupt 1 depth queue
GEOM: new disk ad0
ad1: success setting PIO4 on National chip
ad1: success setting UDMA33 on National chip
ad1: 983MB <CF300 Ver1.27> at ata0-slave UDMA33
ad1: 2014992 sectors [1999C/16H/63S] 1 sectors/interrupt 1 depth queue
GEOM: new disk ad1
ata0: reiniting channel ..
ata0: reset stray irq7
tp1 mask=03 ostat0=50 ostat1=58
ata0: stat0=0x50 err=0x01 lsb=0x00 msb=0x00
ata0: stat1=0x50 err=0x01 lsb=0x00 msb=0x00
ata0: reset tp2 stat0=50 stat1=50 devices=0x3<ATA_SLAVE,ATA_MASTER>
ad0: success setting PIO4 on National chip
ad1: success setting PIO4 on National chip
ad1: success setting UDMA33 on National chip
ata0: reinit done ..
ad1: TIMEOUT - READ_DMA retrying (1 retry left) LBA=0
ata0: reiniting channel ..
ata0: reset tp1 mask=03 ostat0=50 ostat1=58
ata0: stat0=0x50 err=0x01 lsb=0x00 msb=0x00
ata0: stat1=0x50 err=0x01 lsb=0x00 msb=0x00
ata0: reset tp2 stat0=50 stat1=50 devices=0x3<ATA_SLAVE,ATA_MASTER>
ad0: success setting PIO4 on National chip
ad1: success setting PIO4 on National chip
ad1: success setting UDMA33 on National chip
ata0: reinit done ..
ad1: TIMEOUT - READ_DMA retrying (0 retries left) LBA=0
ata0: reiniting channel ..
ata0: reset tp1 mask=03 ostat0=50 ostat1=58
ata0: stat0=0x50 err=0x01 lsb=0x00 msb=0x00
ata0: stat1=0x50 err=0x01 lsb=0x00 msb=0x00
ata0: reset tp2 stat0=50 stat1=50 devices=0x3<ATA_SLAVE,ATA_MASTER>
ad0: success setting PIO4 on National chip
ad1: success setting PIO4 on National chip
ad1: success setting UDMA33 on National chip
ata0: reinit done ..
ad1: FAILURE - READ_DMA timed out LBA=0
ata0: reiniting channel ..
ata0: reset tp1 mask=03 ostat0=50 ostat1=58
ata0: stat0=0x50 err=0x01 lsb=0x00 msb=0x00
ata0: stat1=0x50 err=0x01 lsb=0x00 msb=0x00
ata0: reset tp2 stat0=50 stat1=50 devices=0x3<ATA_SLAVE,ATA_MASTER>
ad0: success setting PIO4 on National chip
ad1: success setting PIO4 on National chip
ad1: success setting UDMA33 on National chip
ata0: reinit done ..
ad1: TIMEOUT - READ_DMA retrying (1 retry left) LBA=1
ata0: reiniting channel ..
ata0: reset tp1 mask=03 ostat0=50 ostat1=58
ata0: stat0=0x50 err=0x01 lsb=0x00 msb=0x00
ata0: stat1=0x50 err=0x01 lsb=0x00 msb=0x00
ata0: reset tp2 stat0=50 stat1=50 devices=0x3<ATA_SLAVE,ATA_MASTER>
ad0: success setting PIO4 on National chip
ad1: success setting PIO4 on National chip
ad1: success setting UDMA33 on National chip
ata0: reinit done ..
ad1: TIMEOUT - READ_DMA retrying (0 retries left) LBA=1
ata0: reiniting channel ..
ata0: reset tp1 mask=03 ostat0=50 ostat1=58
ata0: stat0=0x50 err=0x01 lsb=0x00 msb=0x00
ata0: stat1=0x50 err=0x01 lsb=0x00 msb=0x00
ata0: reset tp2 stat0=50 stat1=50 devices=0x3<ATA_SLAVE,ATA_MASTER>
ad0: success setting PIO4 on National chip
ad1: success setting PIO4 on National chip
ad1: success setting UDMA33 on National chip
ata0: reinit done ..
ad1: FAILURE - READ_DMA timed out LBA=1
ata0: reiniting channel ..
ata0: reset tp1 mask=03 ostat0=50 ostat1=58
ata0: stat0=0x50 err=0x01 lsb=0x00 msb=0x00
ata0: stat1=0x50 err=0x01 lsb=0x00 msb=0x00
ata0: reset tp2 stat0=50 stat1=50 devices=0x3<ATA_SLAVE,ATA_MASTER>
ad0: success setting PIO4 on National chip
ad1: success setting PIO4 on National chip
ad1: success setting UDMA33 on National chip
ata0: reinit done ..
ad1: TIMEOUT - READ_DMA retrying (1 retry left) LBA=0
ata0: reiniting channel ..
ata0: reset tp1 mask=03 ostat0=50 ostat1=58
ata0: stat0=0x50 err=0x01 lsb=0x00 msb=0x00
ata0: stat1=0x50 err=0x01 lsb=0x00 msb=0x00
ata0: reset tp2 stat0=50 stat1=50 devices=0x3<ATA_SLAVE,ATA_MASTER>
ad0: success setting PIO4 on National chip
ad1: success setting PIO4 on National chip
ad1: success setting UDMA33 on National chip
ata0: reinit done ..
ad1: TIMEOUT - READ_DMA retrying (0 retries left) LBA=0
ata0: reiniting channel ..
ata0: reset tp1 mask=03 ostat0=50 ostat1=58
ata0: stat0=0x50 err=0x01 lsb=0x00 msb=0x00
ata0: stat1=0x50 err=0x01 lsb=0x00 msb=0x00
ata0: reset tp2 stat0=50 stat1=50 devices=0x3<ATA_SLAVE,ATA_MASTER>
ad0: success setting PIO4 on National chip
ad1: success setting PIO4 on National chip
ad1: success setting UDMA33 on National chip
ata0: reinit done ..
ad1: FAILURE - READ_DMA timed out LBA=0
Trying to mount root from ufs:/dev/ad0s1a

-- 
Thanks, John.



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