From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 22 07:55:26 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 330E016A4CE; Sun, 22 Feb 2004 07:55:26 -0800 (PST) Received: from mail019.syd.optusnet.com.au (mail019.syd.optusnet.com.au [211.29.132.73]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1685643D46; Sun, 22 Feb 2004 07:55:25 -0800 (PST) (envelope-from tfrank@optushome.com.au) Received: from marvin.home.local (c211-28-241-189.eburwd5.vic.optusnet.com.au [211.28.241.189])i1MFtJB31302; Mon, 23 Feb 2004 02:55:19 +1100 Received: by marvin.home.local (Postfix, from userid 1001) id 8D918103; Mon, 23 Feb 2004 02:55:18 +1100 (EST) Date: Mon, 23 Feb 2004 02:55:18 +1100 From: Tony Frank To: sos@freebsd.org Message-ID: <20040222155518.GA35422@marvin.home.local> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="UugvWAfsgieZRqgk" Content-Disposition: inline User-Agent: Mutt/1.4.2.1i cc: freebsd-hackers@freebsd.org Subject: Patch to improve one minor ata status print during error situation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Feb 2004 15:55:26 -0000 --UugvWAfsgieZRqgk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 --UugvWAfsgieZRqgk Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="ata-disk.patch" --- 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; } --UugvWAfsgieZRqgk--