From root@true4g-olari1.wlansystems.com  Sun Oct  1 21:37:09 2006
Return-Path: <root@true4g-olari1.wlansystems.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 5A4CE16A47B
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  1 Oct 2006 21:37:09 +0000 (UTC)
	(envelope-from root@true4g-olari1.wlansystems.com)
Received: from true4g-olari1.wlansystems.com (true4g-olari1.wlansystems.com [212.16.96.69])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 2362F43D55
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  1 Oct 2006 21:37:07 +0000 (GMT)
	(envelope-from root@true4g-olari1.wlansystems.com)
Received: from true4g-olari1.wlansystems.com (localhost [127.0.0.1])
	by true4g-olari1.wlansystems.com (8.13.6/8.13.6) with ESMTP id k91LVICG000580
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 2 Oct 2006 00:31:18 +0300 (EEST)
	(envelope-from root@true4g-olari1.wlansystems.com)
Received: (from root@localhost)
	by true4g-olari1.wlansystems.com (8.13.6/8.13.6/Submit) id k91LVH48000579;
	Mon, 2 Oct 2006 00:31:17 +0300 (EEST)
	(envelope-from root)
Message-Id: <200610012131.k91LVH48000579@true4g-olari1.wlansystems.com>
Date: Mon, 2 Oct 2006 00:31:17 +0300 (EEST)
From: hsu@bbnetworks.net
Reply-To: hsu@bbnetworks.net
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: DMA is not defaulted on WDMA device
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         103883
>Category:       kern
>Synopsis:       [ata] DMA is not defaulted on WDMA device (SIS integrated Vortex86 CPU)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 01 21:40:15 GMT 2006
>Closed-Date:    
>Last-Modified:  Sat Apr 21 08:48:35 GMT 2007
>Originator:     Heikki Suonsivu
>Release:        FreeBSD 6.1-RELEASE i386
>Organization:
bbnetworks.net
>Environment:
System: FreeBSD true4g-olari1.wlansystems.com 6.1-RELEASE FreeBSD 6.1-RELEASE #0: Sun May 7 04:42:56 UTC 2006 root@opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386

SIS integrated Vortex86 CPU (possibly the same problem on any system?)

>Description:

I use CF adapter to connect Compact Flash card to IDE.  The adapter and 
the card apparently support DMA, as it can be enabled by 

atacontrol mode ad0 WDMA2

The cpu load drops massively, and there is substantial improvement on
general performance.

The card/adapter does not support UDMA (I do not think that is possible with 
CF interface at all?), but WDMA2 seems to work.  From verbose boot messages
it would seem that the driver does indeed recognize WDMA2 being supported,
but does not eanble it.

ata0-master: pio=PIO4 wdma=WDMA2 udma=UNSUPPORTED cable=40 wire
ad0: setting PIO4 on 550 chip
ad0: 1983MB <TRANSCEND 20060524> at ata0-master PIO4
ad0: 4061232 sectors [4029C/16H/63S] 1 sectors/interrupt 1 depth queue
GEOM: new disk ad0
ad0: Silicon Integrated Systems check1 failed
ad0: Adaptec check1 failed
ad0: LSI (v3) check1 failed
ad0: LSI (v2) check1 failed
ad0: FreeBSD check1 failed
ATA PseudoRAID loaded
Trying to mount root from ufs:/dev/ad0s1a
start_init: trying /sbin/init

Is this somehow related to the fact that CD/DVD drives do not seem to get
DMA mode on by default either?

I have tried to tweak stuff in loader.conf with no success.

>How-To-Repeat:

Get a DMA supporting CF adapter (like new versions from pcengines.ch), and
use DMA-supporting CF card. 

>Fix:

Workaround is to set DMA in boot, but that makes booting slower than
necessary.  DMA would help, in particular with a slow cpu.



>Release-Note:
>Audit-Trail:
>Unformatted:
