From owner-freebsd-stable@FreeBSD.ORG Wed Dec 10 08:58:27 2008 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 33EB91065676; Wed, 10 Dec 2008 08:58:27 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forwards4.yandex.ru (forwards4.yandex.ru [77.88.32.20]) by mx1.freebsd.org (Postfix) with ESMTP id A22E98FC29; Wed, 10 Dec 2008 08:58:26 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from smtp5.yandex.ru (smtp5.yandex.ru [77.88.32.24]) by forwards4.yandex.ru (Yandex) with ESMTP id 9A41D1935FE; Wed, 10 Dec 2008 11:58:24 +0300 (MSK) Received: from ns.kirov.so-cdu.ru ([77.72.136.145]:19191 "EHLO [127.0.0.1]" smtp-auth: "bu7cher" TLS-CIPHER: "DHE-RSA-AES256-SHA keybits 256/256 version TLSv1/SSLv3" TLS-PEER-CN1: ) by mail.yandex.ru with ESMTP id S6144119AbYLJI6P (ORCPT + 3 others); Wed, 10 Dec 2008 11:58:15 +0300 X-Yandex-Spam: 1 X-Yandex-Front: smtp5 X-Yandex-TimeMark: 1228899495 X-BornDate: 1137963600 X-Yandex-Karma: 0 X-Yandex-KarmaStatus: 0 X-MsgDayCount: 4 X-Comment: RFC 2476 MSA function at smtp5.yandex.ru logged sender identity as: bu7cher Message-ID: <493F84A4.1080308@yandex.ru> Date: Wed, 10 Dec 2008 11:58:12 +0300 From: "Andrey V. Elsukov" User-Agent: Mozilla Thunderbird 1.5 (FreeBSD/20051231) MIME-Version: 1.0 To: Victor Balada Diaz References: <20081209185236.GA1320@alf.bsdes.net> In-Reply-To: <20081209185236.GA1320@alf.bsdes.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-stable@freebsd.org, freebsd-amd64@freebsd.org, =?UTF-8?B?U8O4?= =?UTF-8?B?cmVuIFNjaG1pZHQ=?= Subject: Re: [ATA] and re(4) stability issues 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, 10 Dec 2008 08:58:27 -0000 Victor Balada Diaz wrote: > Digging at linux source code i've found that they do some special things > for this chipset that i've been unable to find on our code. This is > linux code for my chipset: > > 371 AHCI_HFLAGS (AHCI_HFLAG_IGN_SERR_INTERNAL | > 372 AHCI_HFLAG_32BIT_ONLY | AHCI_HFLAG_NO_MSI | > 373 AHCI_HFLAG_SECT255), > > File and the rest of the code in here[3]. > > As i saw AHCI_HFLAG_NO_MSI i tried doing the easiest thing i could > think of, switching MSI and MSI-x off for the whole system, so > i added to /boot/loader.conf this tunables: FreeBSD's ata(4) driver doesn't support MSI. This flag in linux's libata used in if ((hpriv->flags & AHCI_HFLAG_NO_MSI) || pci_enable_msi(pdev)) pci_intx(pdev, 1); In FreeBSD's code we have the same: /* enable PCI interrupt */ pci_write_config(dev, PCIR_COMMAND, pci_read_config(dev, PCIR_COMMAND, 2) & ~0x0400, 2); AHCI_HFLAG_IGN_SERR_INTERNAL flag targeted to ignore SERR_INTERNAL errors. FreeBSD's ata(4) driver ignores they too. AHCI_HFLAG_32BIT_ONLY flag limits to use 32-bit DMA only. If AHCI CAP register reports that controller supports 64-bit DMA driver will use 64-bit. So i think there can be added one quirk for you, but i'm not sure that problem is here.. AHCI_HFLAG_SECT255 flag limits I/O operation to 255 sectors, FreeBSD uses 128-limit by default. -- WBR, Andrey V. Elsukov