From owner-freebsd-hackers@FreeBSD.ORG Sun Apr 20 19:51:11 2014 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4CC22900; Sun, 20 Apr 2014 19:51:11 +0000 (UTC) Received: from mail-wi0-x22e.google.com (mail-wi0-x22e.google.com [IPv6:2a00:1450:400c:c05::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9204E1E57; Sun, 20 Apr 2014 19:51:10 +0000 (UTC) Received: by mail-wi0-f174.google.com with SMTP id d1so1192153wiv.1 for ; Sun, 20 Apr 2014 12:51:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=eI3OPdtUmNnnV+uEqKmJDu/XZ00LvHEbA3YlHxuWs+o=; b=DfEBXvgSRnhMxZdH0tEUVor9r2hj2dZLA4zF8XjE4BcPBUYKCbYvY9bTFNLSz+pzay DSo8PaBIudWfgCAnPOAY3eWKsF1R5LC1yfFG4htEeSYYZmbQZlNQescUdY1VH2/l3KaE u2hmFoConSI6BkwrTRuXVMgO68L5gBEyOeY4Rx+YmHuDGRGg66ZDfG86Tq4Y6ExMVGha M4rMUe183vpWHFbui9yjHVj5LJVhf0fY2GeALBagJv9Fxe2dMJ39xHTbEHe9HnPCgajn fPLSPB+QmNbtbWjHCSXnPQCG9epludQZ9yk0n5JtdnEAE/W7ER6ZfI7M4iWE7APcQW+A Zn/w== MIME-Version: 1.0 X-Received: by 10.180.96.225 with SMTP id dv1mr10990996wib.37.1398023468851; Sun, 20 Apr 2014 12:51:08 -0700 (PDT) Received: by 10.194.235.68 with HTTP; Sun, 20 Apr 2014 12:51:08 -0700 (PDT) In-Reply-To: <5354238C.50100@FreeBSD.org> References: <5354238C.50100@FreeBSD.org> Date: Sun, 20 Apr 2014 23:51:08 +0400 Message-ID: Subject: Re: SATA2 mode on SATA3 SSD (marvell controller) after boot From: Andrey Fesenko To: Alexander Motin Content-Type: text/plain; charset=UTF-8 Cc: "freebsd-hackers@freebsd.org" , freebsd-current X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Apr 2014 19:51:11 -0000 On Sun, Apr 20, 2014 at 11:44 PM, Alexander Motin wrote: > On 20.04.2014 22:31, Andrey Fesenko wrote: >> >> On Thu, Apr 17, 2014 at 2:10 PM, Andrey Fesenko >> wrote: >>> >>> if disconnect ssd >>> pr 17 14:07:08 desktop kernel: ahcich3: DISCONNECT requested >>> Apr 17 14:07:08 desktop kernel: ahcich3: AHCI reset... >>> Apr 17 14:07:08 desktop kernel: ahcich3: SATA connect timeout >>> time=10000us status=00000000 >>> Apr 17 14:07:08 desktop kernel: ahcich3: AHCI reset: device not found >>> Apr 17 14:07:08 desktop kernel: pass3 at ahcich3 bus 0 scbus3 target 0 >>> lun 0 >>> Apr 17 14:07:08 desktop kernel: pass3: s/n >>> P02411112921 detached >>> Apr 17 14:07:08 desktop kernel: ada3 at ahcich3 bus 0 scbus3 target 0 lun >>> 0 >>> Apr 17 14:07:08 desktop kernel: ada3: s/n >>> P02411112921 detached >>> Apr 17 14:07:08 desktop kernel: (pass3:ahcich3:0:0:0): Periph destroyed >>> Apr 17 14:07:08 desktop kernel: (ada3:ahcich3:0:0:0): Periph destroyed >>> Apr 17 14:07:18 desktop kernel: ahcich3: CONNECT requested >>> Apr 17 14:07:18 desktop kernel: ahcich3: AHCI reset... >>> Apr 17 14:07:18 desktop kernel: ahcich3: SATA connect time=8000us >>> status=00000133 >>> Apr 17 14:07:18 desktop kernel: ahcich3: AHCI reset: device found >>> Apr 17 14:07:18 desktop kernel: ahcich3: AHCI reset: device ready after >>> 0ms >>> Apr 17 14:07:18 desktop kernel: ada3 at ahcich3 bus 0 scbus3 target 0 lun >>> 0 >>> Apr 17 14:07:18 desktop kernel: GEOM: new disk ada3 >>> Apr 17 14:07:18 desktop kernel: ada3: ATA-8 >>> SATA 3.x device >>> Apr 17 14:07:18 desktop kernel: ada3: Serial Number P02411112921 >>> Apr 17 14:07:18 desktop kernel: ada3: 600.000MB/s transfers (SATA 3.x, >>> UDMA6, PIO 8192bytes) >>> Apr 17 14:07:18 desktop kernel: ada3: Command Queueing enabled >>> Apr 17 14:07:18 desktop kernel: ada3: 122104MB (250069680 512 byte >>> sectors: 16H 63S/T 16383C) >>> Apr 17 14:07:18 desktop kernel: ada3: Previously was known as ad10 >>> Apr 17 14:07:18 desktop kernel: pass3 at ahcich3 bus 0 scbus3 target 0 >>> lun 0 >>> Apr 17 14:07:18 desktop kernel: pass3: ATA-8 >>> SATA 3.x device >>> Apr 17 14:07:18 desktop kernel: pass3: Serial Number P02411112921 >>> Apr 17 14:07:18 desktop kernel: pass3: 600.000MB/s transfers (SATA >>> 3.x, UDMA6, PIO 8192bytes) >>> Apr 17 14:07:18 desktop kernel: pass3: Command Queueing enabled >>> >>> >>> # uname -a >>> FreeBSD desktop.local 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r263932: >>> Sun Mar 30 15:43:01 MSK 2014 >>> root@desktop.local:/usr/obj/usr/src/sys/MY_DES amd64 >> >> >> Is it possible camcontrol repeat behavior as physical disable/enable >> or enable SATA 3.x mode? >> camcontrol negotiate only report not set new mode. >> >> # camcontrol negotiate pass2 >> Current parameters: >> (pass2:ahcich3:0:0:0): SATA revision: 2.x >> (pass2:ahcich3:0:0:0): ATA mode: UDMA6 >> (pass2:ahcich3:0:0:0): ATAPI packet length: 0 >> (pass2:ahcich3:0:0:0): PIO transaction length: 8192 >> (pass2:ahcich3:0:0:0): PMP presence: 0 >> (pass2:ahcich3:0:0:0): Number of tags: 32 >> (pass2:ahcich3:0:0:0): SATA capabilities: 00000030 >> (pass2:ahcich3:0:0:0): tagged queueing: enabled > > > camcontrol negotiate can limit maximal SATA mode, but not specify it > exactly. Unless you limited it previously, there should be no limitation set > and HBA should negotiate it freely. The limitations could be read/set with > `camcontrol negotiate pass2 -U`, and affect operation after following > `camcontrol reset ...`. > > -- > Alexander Motin system this installer usb image without limitation # uname -a FreeBSD 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r264634: Fri Apr 18 08:25:11 MSK 2014 andrey@desktop.local:/usr/obj/usr/src/sys/GENERIC amd64 root@:~ # camcontrol negotiate pass2 -U User parameters: (pass2:ahcich3:0:0:0): SATA revision: 0.x (pass2:ahcich3:0:0:0): ATA mode: NONE (pass2:ahcich3:0:0:0): ATAPI packet length: 0 (pass2:ahcich3:0:0:0): PIO transaction length: 8192 (pass2:ahcich3:0:0:0): PMP presence: 0 (pass2:ahcich3:0:0:0): Number of tags: 32 (pass2:ahcich3:0:0:0): SATA capabilities: 00000030 (pass2:ahcich3:0:0:0): tagged queueing: enabled root@:~ # camcontrol reset pass2 Reset of bus 0 was successful root@:~ # camcontrol negotiate pass2 Current parameters: (pass2:ahcich3:0:0:0): SATA revision: 2.x (pass2:ahcich3:0:0:0): ATA mode: UDMA6 (pass2:ahcich3:0:0:0): ATAPI packet length: 0 (pass2:ahcich3:0:0:0): PIO transaction length: 8192 (pass2:ahcich3:0:0:0): PMP presence: 0 (pass2:ahcich3:0:0:0): Number of tags: 32 (pass2:ahcich3:0:0:0): SATA capabilities: 00000030 (pass2:ahcich3:0:0:0): tagged queueing: enabled