From owner-freebsd-current@FreeBSD.ORG Tue Aug 3 13:41:56 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 15DD816A4CE for ; Tue, 3 Aug 2004 13:41:56 +0000 (GMT) Received: from will.iki.fi (will.iki.fi [217.169.64.20]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9464F43D45 for ; Tue, 3 Aug 2004 13:41:55 +0000 (GMT) (envelope-from will+freebsd-current@will.iki.fi) Received: from [10.0.20.162] (fa-3-0-0.fw.exomi.com [217.169.64.99]) by will.iki.fi (Postfix) with ESMTP id 9A0ED24; Tue, 3 Aug 2004 16:44:06 +0300 (EEST) Message-ID: <410F961B.1080104@will.iki.fi> Date: Tue, 03 Aug 2004 16:41:47 +0300 From: Ville-Pertti Keinonen User-Agent: Mozilla Thunderbird 0.7.1 (X11/20040708) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Eriksson References: In-Reply-To: Content-Type: multipart/mixed; boundary="------------090100050901050504070405" cc: freebsd-current@freebsd.org Subject: Re: ATA driver races with interrupts X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Aug 2004 13:41:56 -0000 This is a multi-part message in MIME format. --------------090100050901050504070405 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Daniel Eriksson wrote: >Just tested this, and everything seems to work perfectly fine with only one >disc attached. Stresstest works, SMART works, ... > >I've only tested it on one of the channels so far though, but I'm confident >it will work on the other channel as well since I've used that channel in >single-drive-configuration in the past without problems. > > The attached patch should enable serialization for the controller, which is the only completely reliable fix (without chipset documentation) according to Søren. Obviously it reduces performance since it doesn't allow both channels to operate simultaneously. --------------090100050901050504070405 Content-Type: text/plain; name="sataser.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="sataser.diff" Index: ata-chipset.c =================================================================== RCS file: /cvs/freebsd/src/sys/dev/ata/ata-chipset.c,v retrieving revision 1.77 diff -u -r1.77 ata-chipset.c --- ata-chipset.c 30 Jul 2004 13:33:09 -0000 1.77 +++ ata-chipset.c 3 Aug 2004 13:32:04 -0000 @@ -2602,6 +2602,7 @@ if (ctlr->chip->max_dma >= ATA_SA150) { pci_write_config(dev, PCIR_COMMAND, pci_read_config(dev, PCIR_COMMAND, 2) & ~0x0400, 2); + ctlr->locking = ata_serialize; ctlr->setmode = ata_sata_setmode; return 0; } --------------090100050901050504070405--