From owner-freebsd-stable@FreeBSD.ORG Wed Jun 30 17:39:06 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69D51106566B for ; Wed, 30 Jun 2010 17:39:06 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id E988C8FC15 for ; Wed, 30 Jun 2010 17:39:05 +0000 (UTC) Received: by fxm13 with SMTP id 13so754582fxm.13 for ; Wed, 30 Jun 2010 10:38:56 -0700 (PDT) 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=EdxiXjEZ9VFIoOvU0stso47aBR+DYo3wHJfyIHRKQBE=; b=A6N5aau+V5spLEzs/J4wSyU0LE4x1F3KgQ45JnT/B3rfeCZ3zN552EtNb0kEr7y0Wu jGOMpAVU9B4xtJ8n/5MLjfNLNdX6mjahbgn4vBt3Xnyzp2VMZsgt6umhxkBxlfgAOols mYsRuWJbDSb3bUiwaa2g6kYEnvcZp5XvBhiqo= 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=nirteEKcoZvU0jaNi9Yo17PdE7cOmdPXq5twOytCw9U6o6ynrEiE7Ha56v2qQCZfsr 2SoAfln5P+qJGkTrhUfNgUT9v2rO9A4S0/52SWbjaHB3GKmCfVi3CBtZtUbb/sPmHJ5C qKxkIshySfEBdSOW1X9Mhq3G7TsfF3bueLbAM= Received: by 10.223.47.145 with SMTP id n17mr8060123faf.26.1277919534972; Wed, 30 Jun 2010 10:38:54 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id z12sm50955819fah.33.2010.06.30.10.38.53 (version=SSLv3 cipher=RC4-MD5); Wed, 30 Jun 2010 10:38:54 -0700 (PDT) Sender: Alexander Motin Message-ID: <4C2B8103.6010409@FreeBSD.org> Date: Wed, 30 Jun 2010 20:38:11 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: FreeBSD Stable References: In-Reply-To: X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Garrett Cooper , Paul Mather Subject: Re: Fwd: Problems with ATA_CAM support in RELENG_8 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2010 17:39:06 -0000 Garrett Cooper wrote: > I am running FreeBSD/amd64 RELENG_8 on a Dell Optiplex 745. The hard > drive in the system is SATA and I have "Normal", not "Legacy" SATA > support enabled in the BIOS. (BIOS is V2.6.4.) I am assuming this > will enable native AHCI mode for the drive. > > I built a kernel with ATA_CAM support, but for some reason the SATA > drive is probing at slow, UDMA2, speeds: > > ada0 at ata2 bus 0 scbus0 target 0 lun 0 > ada0: ATA-7 SATA 2.x device > ada0: 33.300MB/s transfers (UDMA2, PIO 8192bytes) > ada0: 152587MB (312500000 512 byte sectors: 16H 63S/T 16383C) > When I run "camcontrol identify" on the drive, it states the drive is > capable of UDMA6 speeds: > > backup# camcontrol identify ada0 > PIO supported PIO4 > DMA supported WDMA2 UDMA6 > Native Command Queuing (NCQ) yes 32 tags > > So, why the slower speed? Also, "camcontrol identify" states the > drive supports NCQ with up to 32 tags supported, yet "camcontrol tags > ada0" reports only 1 device opening, not 32 as I would expect: > > backup# camcontrol tags ada0 > (pass0:ata2:0:0:0): device openings: 1 Speed, number of tags and other options limited by lowest of device and controller capabilities. > To enable ATA_CAM AHCI support, I included this in my kernel config file: > > # ATA and ATAPI devices > options ATA_CAM > device ahci > device atacore > device atapci > options ATA_STATIC_ID # Static device numbering > > Is this the correct way to enable ATA_CAM AHCI support? I tried > initially including just "options ATA_CAM" and "device ahci" but the > resultant kernel would not probe my disk drive as ada0. Your controller seems to not report AHCI support. In such case legacy mode driver attaches to it. But as soon as you have no `device ataintel` line, only generic driver was there, limited by UDMA2 mode. PS: ATA_STATIC_ID is useless when ATA_CAM option enabled. > Does my problem lie with my kernel config or is the Dell Optiplex 745 > BIOS brain dead when it comes to AHCI native support? The only option > it appears to have in the BIOS is "Normal" and "Legacy" when it comes > to the SATA controller mode. Your controller is not identified as AHCI: > atapci0: port > 0xfe00-0xfe07,0xfe10-0xfe13,0xfe20-0xfe27,0xfe30-0xfe33,0xfec0-0xfecf,0xecc0-0xeccf > irq 20 at device 31.2 on pci0 > atapci0: [ITHREAD] > ata2: on atapci0 > ata2: [ITHREAD] > ata3: on atapci0 > ata3: [ITHREAD] > atapci1: port > 0xfe40-0xfe47,0xfe50-0xfe53,0xfe60-0xfe67,0xfe70-0xfe73,0xfed0-0xfedf,0xecd0-0xecdf > irq 20 at device 31.5 on pci0 > atapci1: [ITHREAD] > ata4: on atapci1 > ata4: [ITHREAD] > ata5: on atapci1 > ata5: [ITHREAD] You may check `pciconf -lvcb` output. For ICH8 with AHCI you should see there something like: ahci0@pci0:0:31:2: class=0x010601 card=0xa00c14ff chip=0x28298086 rev=0x03 hdr=0x00 vendor = 'Intel Corporation' device = 'Mobile SATA AHCI Controller' class = mass storage subclass = SATA bar [10] = type I/O Port, range 32, base 0xe880, size 8, enabled bar [14] = type I/O Port, range 32, base 0xe800, size 4, enabled bar [18] = type I/O Port, range 32, base 0xe480, size 8, enabled bar [1c] = type I/O Port, range 32, base 0xe400, size 4, enabled bar [20] = type I/O Port, range 32, base 0xe080, size 32, enabled bar [24] = type Memory, range 32, base 0xfeaff800, size 2048, enabled cap 05[80] = MSI supports 4 messages enabled with 4 messages cap 01[70] = powerspec 3 supports D0 D3 current D0 cap 12[a8] = SATA Index-Data Pair Pay attention to "subclass = SATA". -- Alexander Motin