Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Aug 2000 09:05:40 -0700
From:      Cy Schubert - ITSD Open Systems Group <Cy.Schubert@uumail.gov.bc.ca>
To:        sos@FreeBSD.org
Cc:        Cy.Schubert@uumail.gov.bc.ca, freebsd-bugs@FreeBSD.org
Subject:   Re: kern/20573: ATA MFC Breaks -STABL 
Message-ID:  <200008131606.e7DG6K900795@cwsys.cwsent.com>
In-Reply-To: Your message of "Sun, 13 Aug 2000 04:32:56 PDT." <200008131132.EAA20386@freefall.freebsd.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
Based on my testing done so far, the previous behaviour has been 
restored.  The bug has been fixed.  The messages produced are:

Aug 13 08:41:16 cwsys /kernel: ata1-master: timeout waiting to give 
command=c8 s=d0 e=00
Aug 13 08:41:16 cwsys /kernel: ad2: error executing command - resetting
Aug 13 08:41:16 cwsys /kernel: ata1: resetting devices .. done

I'm not exactly sure whether the original cause of the problem, the 
timeout itself, is a FreeBSD bug (PR 17592) or a drive problem.  This 
drive has suffered timeouts under FreeBSD using DMA mode ever since it 
was new about 5 years ago, yet the Western Digital diagnostics see no 
problem, nor does PIO mode have any problem.

This specific problem has been fixed and this PR can be closed.  I've 
updated PR 17592 to document that my Western Digital drive has the same 
timeouts.


Regards,                       Phone:  (250)387-8437
Cy Schubert                      Fax:  (250)387-5766
Team Leader, Sun/DEC Team   Internet:  Cy.Schubert@osg.gov.bc.ca
Open Systems Group, ITSD, ISTA
Province of BC

In message <200008131132.EAA20386@freefall.freebsd.org>, 
sos@FreeBSD.org writes
:
> Synopsis: ATA MFC Breaks -STABL
> 
> State-Changed-From-To: open->analyzed
> State-Changed-By: sos
> State-Changed-When: Sun Aug 13 04:29:57 PDT 2000
> State-Changed-Why: 
> 
> I'm the ATA guy :)
> 
> Please try the following patch it should help:
> 
> Index: ata-disk.c
> ===================================================================
> RCS file: /home/ncvs/src/sys/dev/ata/ata-disk.c,v
> retrieving revision 1.73
> diff -u -r1.73 ata-disk.c
> --- ata-disk.c	2000/08/06 18:01:47	1.73
> +++ ata-disk.c	2000/08/13 11:25:21
> @@ -391,7 +391,7 @@
>  
>  	if (ata_command(adp->controller, adp->unit, cmd, 
>  			cylinder, head, sector, count, 0, ATA_IMMEDIATE)) {
> -	    printf("ad%d: error executing command\n", adp->lun);
> +	    printf("ad%d: error executing command", adp->lun);
>  	    goto transfer_failed;
>  	}
>  
> @@ -429,12 +429,21 @@
>  
>  transfer_failed:
>      untimeout((timeout_t *)ad_timeout, request, request->timeout_handle);
> -    request->bp->bio_error = EIO;
> -    request->bp->bio_flags |= BIO_ERROR;
> -    request->bp->bio_resid = request->bytecount;
> -    devstat_end_transaction_bio(&adp->stats, request->bp);
> -    biodone(request->bp);
> -    free(request, M_AD);
> +    printf(" - resetting\n");
> +
> +    /* if retries still permit, reinject this request */
> +    if (request->retries++ < AD_MAX_RETRIES)
> +	TAILQ_INSERT_HEAD(&adp->controller->ata_queue, request, chain);
> +    else {
> +	/* retries all used up, return error */
> +	request->bp->bio_error = EIO;
> +	request->bp->bio_flags |= BIO_ERROR;
> +	request->bp->bio_resid = request->bytecount;
> +	devstat_end_transaction_bio(&adp->stats, request->bp);
> +	biodone(request->bp);
> +	free(request, M_AD);
> +    }
> +    ata_reinit(adp->controller);
>  }
>  
>  int32_t
> 
> 
> 
> Responsible-Changed-From-To: freebsd-bugs->sos
> Responsible-Changed-By: sos
> Responsible-Changed-When: Sun Aug 13 04:29:57 PDT 2000
> Responsible-Changed-Why: 
> 
> http://www.freebsd.org/cgi/query-pr.cgi?pr=20573




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200008131606.e7DG6K900795>