Patch to improve one minor ata status print during error situation

Tony Frank tfrank at optushome.com.au
Sun Feb 22 07:55:26 PST 2004


Hi there,

Note this only applies to -STABLE as the error handling & status prints
have changed quite a bit when looking at -HEAD.

Currently I got this:

ad2s1e: hard error reading fsbn 32383 of 16160-16415 (ad2s1 bn 32383; cn 4 tn 34 sn 1)
ad2: success setting PIO4 on generic chip
 trying PIO mode
ad2: DMA problem fallback to PIO mode
ad2: DMA problem fallback to PIO mode
ad2: DMA problem fallback to PIO mode
ad2: DMA problem fallback to PIO mode
ad2: DMA problem fallback to PIO mode
ad2: DMA problem fallback to PIO mode
ad2: DMA problem fallback to PIO mode
ad2s1e: hard error reading fsbn 32495 of 16160-16415 (ad2s1 bn 32495; cn 4 tn 35 sn 50) status=59 error=01

With the attached patch it would show as:

ad2s1e: hard error reading fsbn 32383 of 16160-16415 (ad2s1 bn 32383; cn 4 tn 34 sn 1) trying PIO mode
ad2: success setting PIO4 on generic chip
ad2: DMA problem fallback to PIO mode
ad2: DMA problem fallback to PIO mode
ad2: DMA problem fallback to PIO mode
ad2: DMA problem fallback to PIO mode
ad2: DMA problem fallback to PIO mode
ad2: DMA problem fallback to PIO mode
ad2: DMA problem fallback to PIO mode
ad2s1e: hard error reading fsbn 32495 of 16160-16415 (ad2s1 bn 32495; cn 4 tn 35 sn 50) status=59 error=01

While not a big deal it may be simple enough to add?

Attached patch was created from:
 * $FreeBSD: src/sys/dev/ata/ata-disk.c,v 1.60.2.27 2003/09/05 18:27:38 dg Exp $

Regards,

Tony

-------------- next part --------------
--- ata-disk.c.orig	Mon Feb 23 02:36:28 2004
+++ ata-disk.c	Mon Feb 23 02:40:00 2004
@@ -631,9 +631,9 @@
 	if (request->flags & ADR_F_DMA_USED) {
 	    untimeout((timeout_t *)ad_timeout, request,request->timeout_handle);
 	    ad_invalidatequeue(adp, request);
+	    printf(" trying PIO mode\n");
 	    ata_dmainit(adp->device, ata_pmode(adp->device->param), -1, -1);
 	    request->flags |= ADR_F_FORCE_PIO;
-	    printf(" trying PIO mode\n");
 	    TAILQ_INSERT_HEAD(&adp->device->channel->ata_queue, request, chain);
 	    return ATA_OP_FINISHED;
 	}


More information about the freebsd-hackers mailing list