From owner-freebsd-current@FreeBSD.ORG Fri Dec 4 10:01:03 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B91F11065676 for ; Fri, 4 Dec 2009 10:01:03 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bw0-f213.google.com (mail-bw0-f213.google.com [209.85.218.213]) by mx1.freebsd.org (Postfix) with ESMTP id 43EDE8FC19 for ; Fri, 4 Dec 2009 10:01:02 +0000 (UTC) Received: by bwz5 with SMTP id 5so1776453bwz.3 for ; Fri, 04 Dec 2009 02:01:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=Vvo8LHsPJDu6VSe0QJgmbymMBYM6Ac7njOIYpnuXSoQ=; b=w0HMl6RvEamExRj6N2XRWf7jqkWy3lxF46PgGTfzxga9TPYh9Hg4En6GEZ9IGN/zl4 gBbGUrTa/mH7564Fqb+AIvuUPGjs2j0coJI7ms6qCk2CGSgB8ZWAGvFgjqOJCgDJcjKC 2QGe/XTr4/3z6uYi4OdBV5JanroFpT9xLT1ro= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=XnUxWyAfqqP+iUqC9hU1WsVz9rei5UjJz4j5bPNhCRhfO1wuMeRQ5zRn071GND54hR mTq0xYPOl5KGZK3Y4DS/5QCKnHuMRJgHrrkRX7sikxZxOFg/cZc2MN7OwTihLZNrydwp 6N9//zGRlMpwIsHQ/y3IzsHgoXmVrwItZS7VM= Received: by 10.204.153.220 with SMTP id l28mr2999785bkw.86.1259920862035; Fri, 04 Dec 2009 02:01:02 -0800 (PST) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id 13sm1030030fxm.1.2009.12.04.02.01.00 (version=SSLv3 cipher=RC4-MD5); Fri, 04 Dec 2009 02:01:00 -0800 (PST) Sender: Alexander Motin Message-ID: <4B18DDDA.3050608@FreeBSD.org> Date: Fri, 04 Dec 2009 12:00:58 +0200 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20090901) MIME-Version: 1.0 To: Goran Lowkrantz References: <4B1671EE.1010301@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: FreeBSD-Current Subject: Re: Testing CAM wrapper for ata(4) controller drivers X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2009 10:01:03 -0000 Goran Lowkrantz wrote: > Tested on a ASUSTeK M2N-VM DVI with good results. Only problem found was > with a CF card in a SATA-CF adapter. It lies that it can handle DMA but > fails miserably. Searched the web but could find no way to disable DMA > when using CAM-ATA. I have also seen problems with DMA on SATA-CF adapters. What's interesting is that same cards in PATA-CF adapter are working fine. Will try them more. Generally modes can be controlled via `camcontrol negotiate ...`. To change SATA connection speed (in addition to driver hints) you may do: camcontrol negotiate ada0 -U -R 1500 camcontrol reset X camcontrol rescan X camcontrol negotiate ada0 To change PATA mode you may do now: camcontrol negotiate ada0 -U -M WDMA0 camcontrol rescan X camcontrol negotiate ada0 But now it is impossible to switch between PIO and DMA PATA modes after device was probed. This part is to be implemented yet. > Here is the inital rescan result after attaching it and the timeout when > doing an identify: > (aprobe0:ahcich0:0:0:0): SIGNATURE: 0000 > ada2 at ahcich0 bus 0 scbus2 target 0 lun 0 > ada2: ATA/ATAPI-4 device > ada2: 150.000MB/s transfers (SATA 1.x, PIO4, PIO size 2048bytes) It reported itself as working in PIO mode ^^^. It is some different case. > ada2: 977MB (2001888 512 byte sectors: 16H 63S/T 1986C) > (aprobe0:ahcich1:0:15:0): SIGNATURE: 0000 > (aprobe0:ahcich2:0:15:0): SIGNATURE: 0000 > ahcich0: Timeout on slot 0 > ahcich0: is 00000000 cs 00000001 ss 00000000 rs 00000001 tfd d0 serr > 00000000 Looks like card doesn't dropped BUSY flag (tfd d0). Or SATA adapter haven't translated it properly. > # camcontrol readcap ada2 > (pass5:ahcich0:0:0:0): READ CAPACITY(10). CDB: 25 0 0 0 0 0 0 0 0 0 > (pass5:ahcich0:0:0:0): CAM Status: Unconditionally Re-queue Request readcap uses SCSI command to read capacity. It won't work for ATA devices, only for ATAPI. Thanks. -- Alexander Motin