From owner-freebsd-bugs@FreeBSD.ORG Mon Jul 17 08:50:19 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4572416A4E6 for ; Mon, 17 Jul 2006 08:50:19 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9407343D55 for ; Mon, 17 Jul 2006 08:50:18 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k6H8oIBb058978 for ; Mon, 17 Jul 2006 08:50:18 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k6H8oIIn058972; Mon, 17 Jul 2006 08:50:18 GMT (envelope-from gnats) Resent-Date: Mon, 17 Jul 2006 08:50:18 GMT Resent-Message-Id: <200607170850.k6H8oIIn058972@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Karsten Brandt Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D29FB16A4DD for ; Mon, 17 Jul 2006 08:41:46 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 84E5E43D46 for ; Mon, 17 Jul 2006 08:41:46 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k6H8fklH075645 for ; Mon, 17 Jul 2006 08:41:46 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id k6H8fkd3075644; Mon, 17 Jul 2006 08:41:46 GMT (envelope-from nobody) Message-Id: <200607170841.k6H8fkd3075644@www.freebsd.org> Date: Mon, 17 Jul 2006 08:41:46 GMT From: Karsten Brandt To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Cc: Subject: kern/100428: no WDMA mode available for ATAPI drives X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jul 2006 08:50:19 -0000 >Number: 100428 >Category: kern >Synopsis: no WDMA mode available for ATAPI drives >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jul 17 08:50:17 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Karsten Brandt >Release: FreeBSD 6.1-STABLE >Organization: >Environment: FreeBSD Pegasus.mai.de.internal 6.1-STABLE FreeBSD 6.1-STABLE #67: Mon Jul 17 07:43:10 UTC 2006 root@Pegasus.mai.de.internal:/usr/obj/usr/src/sys/PEGASUS i386 >Description: I've tested video playback with vlc and ogle on my machine. But all what I could see was a spluttered video output. Therefore I've searched the reason for that. After some hours I've found the reason in the ATA source. For ATAPI devices is the WDMA mode unused. After this correction the video playback runs without spluttering. Now I've created a patch for this problem and I'v added this to the Fix section. This patch is build for the following file in the source tree: /usr/src/dev/ata/ata-all.c The __FBSDID of the original source file is: __FBSDID("$FreeBSD: src/sys/dev/ata/ata-all.c,v 1.252.2.9 2006/04/04 16:07:42 sos Exp $"); The changes are: ---------------- - use of WDMA-Modes for ATAPI-Devices in the ata_getparam() function - remove magic numbers in the ata_getparam() function >How-To-Repeat: Play video DVD's on an ATAPI drive, which only have WDMA support. >Fix: *** /usr/src_org/sys/dev/ata/ata-all.c Fri Jul 14 08:30:53 2006 --- /usr/src/sys/dev/ata/ata-all.c Mon Jul 17 06:53:06 2006 *************** *** 640,655 **** sprintf(buffer, "%.40s/%.8s", atacap->model, atacap->revision); device_set_desc_copy(atadev->dev, buffer); if (atadev->param.config & ATA_PROTO_ATAPI) { ! if (atapi_dma && ch->dma && ! (atadev->param.config & ATA_DRQ_MASK) != ATA_DRQ_INTR && ! ata_umode(&atadev->param) >= ATA_UDMA2) ! atadev->mode = ATA_DMA_MAX; } else { if (ata_dma && ch->dma && ! (ata_umode(&atadev->param) > 0 || ! ata_wmode(&atadev->param) > 0)) atadev->mode = ATA_DMA_MAX; } } } --- 640,661 ---- sprintf(buffer, "%.40s/%.8s", atacap->model, atacap->revision); device_set_desc_copy(atadev->dev, buffer); if (atadev->param.config & ATA_PROTO_ATAPI) { ! if( atapi_dma && ch->dma && (atadev->param.config & ATA_DRQ_MASK) != ATA_DRQ_INTR ){ ! if( ( ata_umode(&atadev->param) < ATA_UDMA0 && ! ata_wmode(&atadev->param) >= ATA_WDMA0 ) || ! ( ata_umode(&atadev->param) >= ATA_UDMA2 ) ) ! { ! atadev->mode = ATA_DMA_MAX; ! } ! } } else { if (ata_dma && ch->dma && ! (ata_umode(&atadev->param) >= ATA_UDMA0 || ! ata_wmode(&atadev->param) >= ATA_WDMA0)) ! { atadev->mode = ATA_DMA_MAX; + } } } } >Release-Note: >Audit-Trail: >Unformatted: