From owner-freebsd-bugs@FreeBSD.ORG Mon Dec 21 06:40:03 2009 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BAD591065697 for ; Mon, 21 Dec 2009 06:40:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 90BE98FC34 for ; Mon, 21 Dec 2009 06:40:03 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id nBL6e3hX095765 for ; Mon, 21 Dec 2009 06:40:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id nBL6e3pW095764; Mon, 21 Dec 2009 06:40:03 GMT (envelope-from gnats) Date: Mon, 21 Dec 2009 06:40:03 GMT Message-Id: <200912210640.nBL6e3pW095764@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Wesha Cc: Subject: Re: kern/123980: [ata] [patch] Implement ATA UDMA speed limit (hw.ata.ata_dma_limit) X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Wesha List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Dec 2009 06:40:03 -0000 The following reply was made to PR kern/123980; it has been noted by GNATS. From: Wesha To: bug-followup@FreeBSD.org, martin@martinshouse.com Cc: Subject: Re: kern/123980: [ata] [patch] Implement ATA UDMA speed limit (hw.ata.ata_dma_limit) Date: Mon, 21 Dec 2009 00:21:50 -0600 Hello Bug-followup, Updated patch for 8.0-RELEASE: --------------------------------------------------------------- --- ata-all.c.orig 2009-12-20 19:15:15.000000000 -0600 +++ ata-all.c 2009-12-20 19:20:20.000000000 -0600 @@ -79,15 +79,19 @@ int ata_dma_check_80pin =3D 1; /* local vars */ static int ata_dma =3D 1; +static int ata_dma_limit =3D 6; static int atapi_dma =3D 1; /* sysctl vars */ SYSCTL_NODE(_hw, OID_AUTO, ata, CTLFLAG_RD, 0, "ATA driver parameters"); TUNABLE_INT("hw.ata.ata_dma", &ata_dma); SYSCTL_INT(_hw_ata, OID_AUTO, ata_dma, CTLFLAG_RDTUN, &ata_dma, 0, "ATA disk DMA mode control"); +TUNABLE_INT("hw.ata.ata_dma_limit", &ata_dma_limit); +SYSCTL_INT(_hw_ata, OID_AUTO, ata_dma_limit, CTLFLAG_RDTUN, + &ata_dma_limit, 0, "ATA disk DMA mode limit"); TUNABLE_INT("hw.ata.ata_dma_check_80pin", &ata_dma_check_80pin); SYSCTL_INT(_hw_ata, OID_AUTO, ata_dma_check_80pin, CTLFLAG_RDTUN, &ata_dma_check_80pin, 1, "Check for 80pin cable before setting ATA DMA mode"); @@ -1001,19 +1005,19 @@ int ata_umode(struct ata_params *ap) { if (ap->atavalid & ATA_FLAG_88) { - if (ap->udmamodes & 0x40) + if (ap->udmamodes & 0x40 && ata_dma_limit >=3D 6) return ATA_UDMA6; - if (ap->udmamodes & 0x20) + if (ap->udmamodes & 0x20 && ata_dma_limit >=3D 5) return ATA_UDMA5; - if (ap->udmamodes & 0x10) + if (ap->udmamodes & 0x10 && ata_dma_limit >=3D 4) return ATA_UDMA4; - if (ap->udmamodes & 0x08) + if (ap->udmamodes & 0x08 && ata_dma_limit >=3D 3) return ATA_UDMA3; - if (ap->udmamodes & 0x04) + if (ap->udmamodes & 0x04 && ata_dma_limit >=3D 2) return ATA_UDMA2; - if (ap->udmamodes & 0x02) + if (ap->udmamodes & 0x02 && ata_dma_limit >=3D 1) return ATA_UDMA1; if (ap->udmamodes & 0x01) return ATA_UDMA0; } --------------------------------------------------------------- --=20 Best regards, Wesha mailto:wesha@wesha.name