From owner-cvs-all@FreeBSD.ORG Tue Oct 21 12:20:39 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0334916A4C3; Tue, 21 Oct 2003 12:20:39 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7F96743F3F; Tue, 21 Oct 2003 12:20:38 -0700 (PDT) (envelope-from sos@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h9LJKcXJ097010; Tue, 21 Oct 2003 12:20:38 -0700 (PDT) (envelope-from sos@repoman.freebsd.org) Received: (from sos@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h9LJKb7D097008; Tue, 21 Oct 2003 12:20:37 -0700 (PDT) (envelope-from sos) Message-Id: <200310211920.h9LJKb7D097008@repoman.freebsd.org> From: Søren Schmidt Date: Tue, 21 Oct 2003 12:20:37 -0700 (PDT) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/dev/ata ata-all.h ata-chipset.c ata-dma.c ata-lowlevel.c ata-pci.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Oct 2003 19:20:39 -0000 sos 2003/10/21 12:20:37 PDT FreeBSD src repository Modified files: sys/dev/ata ata-all.h ata-chipset.c ata-dma.c ata-lowlevel.c ata-pci.c Log: Fix the DMA problem that most severely hit on the DS3112a SATA chip in connection with Marvell based SATA->PATA dongles. The problem was caused by a combination of things working together to make it hard to spot... The ATA driver has always started the ATA command, then build the SG list for DMA and then finally started the DMA engine. While this is according to specs, it poses a potential problem as some controllers apparently do not allow for unlimitted time between starting the ATA command and starting the DMA engine. At about the same time as ATAng was committed there were lots of other changes applied, some of which was locking in parts that causes the busdma load functions to take significantly longer to load the SG list. This pushed the time spent between starting the ATA command and starting the DMA engine over the hill for some controllers (especially the Silicon Image DS3112a) and caused what looked like lost interrupts. The solution is to get all the SG list work or rather all busdma related stuff done before we even try to start anything. This has the nice side effect of seperating busdma out the way it should be, so the working of the ATA machinery is not cluttered up with busdma droppings, making the code easier to read and understand. Revision Changes Path 1.66 +4 -2 src/sys/dev/ata/ata-all.h 1.41 +12 -21 src/sys/dev/ata/ata-chipset.c 1.122 +20 -19 src/sys/dev/ata/ata-dma.c 1.21 +20 -17 src/sys/dev/ata/ata-lowlevel.c 1.70 +3 -7 src/sys/dev/ata/ata-pci.c