From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 3 21:12:44 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6839216A468; Sat, 3 Nov 2007 21:12:44 +0000 (UTC) (envelope-from screwdriver@lxnt.info) Received: from mail.lxnt.info (mail.lxnt.info [217.23.143.142]) by mx1.freebsd.org (Postfix) with ESMTP id 4820013C4A6; Sat, 3 Nov 2007 21:12:21 +0000 (UTC) (envelope-from screwdriver@lxnt.info) Received: from [84.23.52.8] (helo=[192.168.1.100]) by mail.lxnt.info with esmtpa (Exim 4.68 (FreeBSD)) (envelope-from ) id 1IoQHa-000Pwo-MC; Sun, 04 Nov 2007 00:11:54 +0300 Message-ID: <472CEFDD.2020103@lxnt.info> Date: Sun, 04 Nov 2007 01:02:05 +0300 From: Alexander Sabourenkov User-Agent: Thunderbird 1.5.0.7 (X11/20061030) MIME-Version: 1.0 To: "Arno J. Klaassen" References: <472A548B.50406@lxnt.info> <472B9EA1.6060205@deepcore.dk> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Thierry Herbelot , "Matthew D. Fuller" , =?UTF-8?B?U8O4cmVuIFNjaG1pZHQ=?= , sos@freebsd.org Subject: Re: Patch RFC: Promise SATA300 TX4 hardware bug workaround. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Nov 2007 21:12:44 -0000 Arno J. Klaassen wrote: > > Rather than the marginal HW part, it seems, for me, closely related to > MB/BIOS (as well (Alexander apperently has about the same setup as I > have for this test)): > [...] > > I vaguely remember from another PR that the Promise card does > something with PCI-bursting which fbsd does not detect and/or > handle correctly (and beyond my simple skills as dumb tester, but > maybe the linux-sources contain a clue about that as well). > Analysis of chip initialization in vendor-supplied, Linux and FreeBSD drivers shows that FreeBSD's one: - does not enable something called 'BMR_BURST', - performs hotplug init in one write (instead of two read-modify-writes ), - does an extra write (offset 0x54) which is not done in other drivers. Analysis text: http://lxnt.info/tx4/chipinit.text Patch with ported chipinit (dangerous to use with anything from Promise other than sata300 tx4 !!): http://lxnt.info/tx4/freebsd/chipinit.patch (cumulative) http://lxnt.info/tx4/freebsd/ata-chipset.c+chipinit (patched source) Note two things: 1. I have not compiled or tested this patch. Please do. 2. I may have missed this bug because I'm frequently rebooting between Linux and FreeBSD, and what Linux driver initialized may have lasted the reboots. -- ./lxnt