From owner-freebsd-current@FreeBSD.ORG Tue Dec 8 14:00:37 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 C38DD10656A3; Tue, 8 Dec 2009 14:00:37 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id C5B0E8FC14; Tue, 8 Dec 2009 14:00:36 +0000 (UTC) Received: from cicely5.cicely.de ([10.1.1.7]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id nB8E0YBA090070 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 8 Dec 2009 15:00:34 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by cicely5.cicely.de (8.14.2/8.14.2) with ESMTP id nB8E0Vp2062027 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 8 Dec 2009 15:00:31 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id nB8E0VJx014871; Tue, 8 Dec 2009 15:00:31 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id nB8E0Vrq014870; Tue, 8 Dec 2009 15:00:31 +0100 (CET) (envelope-from ticso) Date: Tue, 8 Dec 2009 15:00:31 +0100 From: Bernd Walter To: Alexander Motin Message-ID: <20091208140031.GY7556@cicely7.cicely.de> References: <4B1671EE.1010301@FreeBSD.org> <4B18DDDA.3050608@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B18DDDA.3050608@FreeBSD.org> X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, AWL=0.000, BAYES_00=-2.599 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on spamd.cicely.de Cc: Goran Lowkrantz , 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 Reply-To: ticso@cicely.de List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2009 14:00:37 -0000 On Fri, Dec 04, 2009 at 12:00:58PM +0200, Alexander Motin wrote: > 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. Just in case you are not aware of the CF DMA history. CF slots originally had not DMA support and support including pins had been assigned in a later revision. Now it can happen that a card is DMA capable, but if placed into a non DMA aware Slot the wiring is missing. Because of this you can buy CF cards, which had been setup by the vendor to not report DMA ability. Some vendors offer tools to toogle this feature. The only way to handle this automatically is to try DMA and fall back to non DMA. > 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. -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.