From owner-freebsd-stable@FreeBSD.ORG Sat Feb 23 21:19:35 2013 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 6C90F289 for ; Sat, 23 Feb 2013 21:19:35 +0000 (UTC) (envelope-from jdc@koitsu.org) Received: from qmta03.emeryville.ca.mail.comcast.net (qmta03.emeryville.ca.mail.comcast.net [IPv6:2001:558:fe2d:43:76:96:30:32]) by mx1.freebsd.org (Postfix) with ESMTP id 3E5C43CB for ; Sat, 23 Feb 2013 21:19:35 +0000 (UTC) Received: from omta09.emeryville.ca.mail.comcast.net ([76.96.30.20]) by qmta03.emeryville.ca.mail.comcast.net with comcast id 3w421l0040S2fkCA3xKZwL; Sat, 23 Feb 2013 21:19:33 +0000 Received: from koitsu.strangled.net ([67.180.84.87]) by omta09.emeryville.ca.mail.comcast.net with comcast id 3xKY1l00T1t3BNj8VxKZo2; Sat, 23 Feb 2013 21:19:33 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id BF56E73A31; Sat, 23 Feb 2013 13:19:32 -0800 (PST) Date: Sat, 23 Feb 2013 13:19:32 -0800 From: Jeremy Chadwick To: Michael BlackHeart Subject: Re: Old ICH7 SATA-2 question Message-ID: <20130223211932.GA41809@icarus.home.lan> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20121106; t=1361654373; bh=EvHVvPAHSLm8zOGYwgxdi85Gsgwjwb5kh5AnXtefw/g=; h=Received:Received:Received:Date:From:To:Subject:Message-ID: MIME-Version:Content-Type; b=pFoSwFEapk6CEk67KagtwoL0sLqA7cPeZg4va/qrnPiyCzX+FREIz28S6OtRxFp77 BVA6+l3is04BRiTpJudxexraD+U3m040UokzE/Iqt3OANeJgfRCRd9p4x+fpdxacu4 sJm+Faoekh+2D0G6MSOqPamzxjsH/QLfyB7RzR1dEg0PeSjP2wNXkxlogmSMV0qYRH V1TSNedzv4HBrcQlDy87oG5wP43+eQNl57wJV14SJU8mxDYIDDoralMXQ0Ep8rxrVR 296IBXBubewC1EyxcRLlX1KGQgBAPRJtx0pz+C+A5AV6UiB6AFa80pQap4szJgKm46 QV7JhzJYtsIIA== Cc: freebsd-stable X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Feb 2013 21:19:35 -0000 On Sun, Feb 24, 2013 at 12:46:43AM +0400, Michael BlackHeart wrote: > Hello there, I've got a question about SATA. > > I've got ASUS P5GC-MX/1333 with ICH7. (SATA2 support) > A few HDD with SATA2. > > system: > uname -a > FreeBSD diablo.miekoff.local 9.1-STABLE FreeBSD 9.1-STABLE #1 r246666: > Tue Feb 12 00:19:07 MSK 2013 > root@diablo.miekoff.local:/usr/obj/usr/src/sys/DIABLO64 amd64 > > > camcontrol info > > camcontrol iden ada2 > pass2: ATA-8 SATA 2.x device > pass2: 150.000MB/s transfers (SATA, UDMA5, PIO 8192bytes) > > protocol ATA/ATAPI-8 SATA 2.x > device model ST3500320AS > firmware revision SD1A > serial number 5QM3LB0N > WWN 5000c50011db1e03 > cylinders 16383 > heads 16 > sectors/track 63 > sector size logical 512, physical 512, offset 0 > LBA supported 268435455 sectors > LBA48 supported 976773168 sectors > PIO supported PIO4 > DMA supported WDMA2 UDMA6 > media RPM 7200 > > Feature Support Enabled Value Vendor > read ahead yes yes > write cache yes yes > flush cache yes yes > overlap no > Tagged Command Queuing (TCQ) no no > Native Command Queuing (NCQ) yes 32 tags > SMART yes yes > microcode download yes yes > security yes no > power management yes yes > advanced power management no no > automatic acoustic management no no > media status notification no no > power-up in Standby no no > write-read-verify yes yes 2/0x2 > unload no no > free-fall no no > data set management (TRIM) no The "protocol" line in camcontrol identify output indicates the maximum capability the device can support, not what the current negotiated PHY speed is. Let me clarify by being more technical: "camcontrol identify" issues the ATA IDENTIFY (0xec) command to the underlying disk; all the output you get back is information that the disk itself returns (not the controller). For example, SATA signalling speed capability is returned in word 76 of the output (ref T13/2015-D rev 3 WD spec). > smartctl -a /dev/ada2 | more > smartctl 6.0 2012-10-10 r3643 [FreeBSD 9.1-STABLE amd64] (local build) > Copyright (C) 2002-12, Bruce Allen, Christian Franke, www.smartmontools.org > > === START OF INFORMATION SECTION === > Model Family: Seagate Barracuda 7200.11 > Device Model: ST3500320AS > Serial Number: 5QM3LB0N > LU WWN Device Id: 5 000c50 011db1e03 > Firmware Version: SD1A > User Capacity: 500 107 862 016 bytes [500 GB] > Sector Size: 512 bytes logical/physical > Rotation Rate: 7200 rpm > Device is: In smartctl database [for details use: -P show] > ATA Version is: ATA8-ACS T13/1699-D revision 4 > SATA Version is: SATA 2.6, 3.0 Gb/s > Local Time is: Sun Feb 24 00:29:47 2013 MSK > SMART support is: Available - device has SMART capability. > SMART support is: Enabled The "SATA Version is" line in smartmontools 6.0 can indicate both operational PHY speed **as well** as disk capability. For example, a drive which has SATA600 capability but has negotiated SATA300 speed will show something like this: SATA Version is: SATA 3.0, 6.0 Gb/s (current: 3.0 Gb/s) Lines lacking "(current: xxx)" notation indicate either lack of a way to determine current PHY speed with the OS, or, the maximum capability matches the negotiated speed. In other words, there's no point to saying something like "SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)"; the author feels its redundant. However, I have seen this reporting mechanism in smartmontools work incorrectly in some cases. In those cases, from what I've seen, the "SATA Version" line indicates **only** what the maximum capability is of the device. > At this point all seems SATA2 capatible. > > But at loading: > atapci0: port > 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xffa0-0xffaf at device 31.1 on > pci0 > ata0: at channel 0 on atapci0 > atapci1: port > 0xb800-0xb807,0xb400-0xb403,0xb000-0xb007,0xa800-0xa803,0xa400-0xa40f > irq 23 at device 31.2 on pci0 > ata2: at channel 0 on atapci1 > ata3: at channel 1 on atapci1 > > Looks like it's also SATA2 (SATA300) Your ICH7 controller is SATA300 capable. However, what you have not provided is output from "pciconf -lvbc". The exact revision of controller matters greatly here. Wikipedia sums this up -- read the first paragraph fully: http://en.wikipedia.org/wiki/I/O_Controller_Hub#ICH7 > But HDD says this: > > ada2 at ata2 bus 0 scbus1 target 0 lun 0 > ada2: ATA-8 SATA 2.x device > ada2: 150.000MB/s transfers (SATA, UDMA5, PIO 8192bytes) > ada2: 476940MB (976773168 512 byte sectors: 16H 63S/T 16383C) > ada2: Previously was known as ad2 To me, this indicates the ada2 device is capable of SATA300 speeds ("SATA 2.x device"), but has negotiated SATA150 speed. The ST3500320AS is a model of hard disk which also has a jumper that can limit the drive controller PHY to SATA150; please see page 22 of this PDF: http://www.seagate.com/staticfiles/support/disc/manuals/desktop/Barracuda%207200.11/100452348g.pdf You will need to check to see if that jumper is installed. This particular model of disk will never exceed SATA150 speeds, so there is no reliable way to test what the actual PHY is operating at (throughput-wise). At this point, the only "mismatch" I can see is between smartmontools and what dmesg shows. As mentioned, I have seen smartmontools get this wrong. > At this point I've a quiestion - what's the real operation speed and why's that. > And for the record - I can't switch ICH 7 to ahci due to bios limitations. It may not be a BIOS limitation but revision of ICH7 chipset. There are some revisions which offer AHCI capability, others which offer AHCI and RAID, and others which offer none of these. Which revision your vendor chose to put on their mainboard is up to them. > And one more, I've got netbook with ICH7 (NM-10 mb). > It uses achi driver, and HDD says it's > > ahci0: <...> > ahic0: AHCI v1.10 with 4 3Gbs ports <...> > <...> > ada0: ATA-8 SATA 2.x device > ada0: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes) > ada0: Command Queueing enabled This disk (no idea if it's the same disk as what you listed above; you have opted to hand-type information and exclude things) is SATA300 capable and is operating at SATA300 speed. Again: no "pciconf -lvbc" output means nobody can tell you what revision of ICH7 you're using on this (different) system. But regardless, it's obvious that the two systems use different ICH7 revisions. There is nothing you can do about that. > As far as I remember without AHCI there's no NCQ support. For ICHxx-based controllers that's correct. > But why with SATA300 controller on P5GC-MX/1333 I've got only 150 > transfers? Is it's a limitations of this driver for old chip? See above. -- | Jeremy Chadwick jdc@koitsu.org | | UNIX Systems Administrator http://jdc.koitsu.org/ | | Mountain View, CA, US | | Making life hard for others since 1977. PGP 4BD6C0CB |