From root@e189.dkm.cz  Sun Feb  3 09:05:23 2002
Return-Path: <root@e189.dkm.cz>
Received: from e189.dkm.cz (e189.dkm.cz [62.24.69.189])
	by hub.freebsd.org (Postfix) with ESMTP id 0E99537B400
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  3 Feb 2002 09:05:20 -0800 (PST)
Received: (from root@localhost)
	by hp.monitor.xx (8.11.6/8.11.6) id g13Gss916077;
	Sun, 3 Feb 2002 17:54:54 +0100 (CET)
	(envelope-from root)
Message-Id: <200202031654.g13Gss916077@hp.monitor.xx>
Date: Sun, 3 Feb 2002 17:54:54 +0100 (CET)
From: "Henryk Paluch" <paluch@KMLinux.fjfi.cvut.cz>
Reply-To: "Henryk Paluch" <paluch@KMLinux.fjfi.cvut.cz>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: read-prefetch on VIA 686B IDE causes hang with CD-R HP8100i
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         34588
>Category:       i386
>Synopsis:       read-prefetch on VIA 686B IDE causes hang with CD-R HP8100i
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    sos
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Feb 03 09:10:00 PST 2002
>Closed-Date:    Mon Apr 28 11:49:02 PDT 2003
>Last-Modified:  Mon Apr 28 11:49:02 PDT 2003
>Originator:     Henryk Paluch
>Release:        FreeBSD 4.5-RELEASE i386
>Organization:
Acron Communications, s.r.o
>Environment:
System: FreeBSD hp.monitor.xx 4.5-RELEASE FreeBSD 4.5-RELEASE #1: Sun Feb 3 17:12:34 CET 2002 root@hp.monitor.xx:/usr/src/sys/compile/GENERICHP i386

>Description:
	When IDE read-prefetch is set on VIA82C686B southbridge,
        it causes hang when accessing ATAPI device CD-R HP8100i

        It is exactly same problem as reported and corrected
        in Linux 2.4.2 kernel. Please see:

http://www.uwsg.iu.edu/hypermail/linux/kernel/0102.1/0320.html
http://www.uwsg.iu.edu/hypermail/linux/kernel/0101.2/0958.html

>How-To-Repeat:
	Just boot FreeBSD 4.x (tested on 4.5)
>Fix:
  Do not enable read-prefetch on ATAPI CD-R devices (linux kernels
  2.4.2+ leave these untouched due problems described above).
  Here is a quick fix:

--- ata-all.c.orig	Sun Feb  3 17:10:24 2002
+++ ata-all.c	Sun Feb  3 17:47:41 2002
@@ -543,7 +543,9 @@
     case 0x74111022: /* AMD 766 default setup */
 
 	/* set prefetch, postwrite */
+/*
 	pci_write_config(dev, 0x41, pci_read_config(dev, 0x41, 1) | 0xf0, 1);
+*/
 
 	/* set fifo configuration half'n'half */
 	pci_write_config(dev, 0x43, 


 BTW: IDE driver seems to completely ignore ata0 and ata0 disable comand (I tried it both in CLI and visual config, but it still attempted to access ata1 channel).

Sincerely 
  Henryk Paluch

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->sos 
Responsible-Changed-By: iedowse 
Responsible-Changed-When: Sun Dec 1 14:19:44 PST 2002 
Responsible-Changed-Why:  

ATA-related PR. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=34588 
State-Changed-From-To: open->closed 
State-Changed-By: sos 
State-Changed-When: Mon Apr 28 11:48:34 PDT 2003 
State-Changed-Why:  
This is fixed n -current. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=34588 
>Unformatted:
