From pecquetj@jpe45305.homeunix.org  Sun Oct 26 18:25:42 2003
Return-Path: <pecquetj@jpe45305.homeunix.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 4122C16A4B3
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 26 Oct 2003 18:25:42 -0800 (PST)
Received: from jpe45305.homeunix.org (dhcp024-210-138-070.woh.rr.com [24.210.138.70])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 5FDF643F85
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 26 Oct 2003 18:25:41 -0800 (PST)
	(envelope-from pecquetj@jpe45305.homeunix.org)
Received: from jpe45305.homeunix.org (localhost [127.0.0.1])
	by jpe45305.homeunix.org (8.12.8p2/8.12.8) with ESMTP id h9R2Pd2J083711
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 26 Oct 2003 21:25:39 -0500 (EST)
	(envelope-from pecquetj@jpe45305.homeunix.org)
Received: (from pecquetj@localhost)
	by jpe45305.homeunix.org (8.12.8p2/8.12.8/Submit) id h9R2PYsM083710;
	Sun, 26 Oct 2003 21:25:34 -0500 (EST)
Message-Id: <200310270225.h9R2PYsM083710@jpe45305.homeunix.org>
Date: Sun, 26 Oct 2003 21:25:34 -0500 (EST)
From: pecquetj <pecquetj@jpe45305.homeunix.org>
Reply-To: pecquetj <pecquetj@jpe45305.homeunix.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: ATAng 5.x pio underrun dispite code preventing it 
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         58587
>Category:       kern
>Synopsis:       ATAng 5.x pio underrun dispite code preventing it
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    sos
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 26 18:30:17 PST 2003
>Closed-Date:    Mon Jan 12 11:23:56 PST 2004
>Last-Modified:  Mon Jan 12 11:23:56 PST 2004
>Originator:     pecquetj
>Release:        FreeBSD 5.1 CURRENT i386
>Organization:
>Environment:
System: FreeBSD gnunet.woh.rr.com 5.1-CURRENT FreeBSD 5.1-CURRENT #0: Sun Oct 26 11:49:08 EST 2003     root@gnunet.woh.rr.com:/usr/src/sys/i386/compile/GNUNET  i386


	
STB1030 (mediagx) with 5.1 CURRENT from cvs, buildworld
>Description:
	
Receive random infrequent errors:
ad0: WARNING - WRITE_MUL write data underrun 8192>4096
(often the last number differs, but appears to be a power of 2)
this happens dispite the following change to ata-lowlevel.c:
            wsize=min(request->transfersize, length);
            ata_pio_write(request, wsize);
            request->donecount += wsize;
in both places where length is employed instead of request->transfersize.  Obviously this makes the test for an underrun always false in ata_pio_write, yet, I still receive the above errors.  This suggests that somehow either request->transfersize is changing during the write, or the stack containting the length is being changed somehow during the write.  Also, this obviously is going to lead to random data corruption (due to the 0's written to fill from request->transfersize to length.)
>How-To-Repeat:
	
This is a random error.  During a buildworld it may occur two or three times.
>Fix:

	


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: gnats-admin->freebsd-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sun Oct 26 20:25:10 PST 2003 
Responsible-Changed-Why:  
Assign to proper category. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=58587 
Responsible-Changed-From-To: freebsd-bugs->sos 
Responsible-Changed-By: kris 
Responsible-Changed-When: Thu Oct 30 01:10:34 PST 2003 
Responsible-Changed-Why:  
Assign to ata maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=58587 
State-Changed-From-To: open->closed 
State-Changed-By: sos 
State-Changed-When: Mon Jan 12 11:23:24 PST 2004 
State-Changed-Why:  
THis is fixed in -current. 

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