From owner-svn-src-stable-8@FreeBSD.ORG Tue Nov 17 20:20:56 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5FB9106566C; Tue, 17 Nov 2009 20:20:56 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7B88D8FC1A; Tue, 17 Nov 2009 20:20:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nAHKKuOX035975; Tue, 17 Nov 2009 20:20:56 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nAHKKugd035973; Tue, 17 Nov 2009 20:20:56 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200911172020.nAHKKugd035973@svn.freebsd.org> From: Alexander Motin Date: Tue, 17 Nov 2009 20:20:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r199428 - stable/8/sys/cam X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Nov 2009 20:20:56 -0000 Author: mav Date: Tue Nov 17 20:20:56 2009 New Revision: 199428 URL: http://svn.freebsd.org/changeset/base/199428 Log: MFC r198394: Make "Retrying Command" to be printed before actual retrying. It should make debug/error log a bit more readable. Modified: stable/8/sys/cam/cam_periph.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/cam/cam_periph.c ============================================================================== --- stable/8/sys/cam/cam_periph.c Tue Nov 17 20:19:20 2009 (r199427) +++ stable/8/sys/cam/cam_periph.c Tue Nov 17 20:20:56 2009 (r199428) @@ -1767,16 +1767,27 @@ cam_periph_error(union ccb *ccb, cam_fla break; } + /* + * If we have and error and are booting verbosely, whine + * *unless* this was a non-retryable selection timeout. + */ + if (error != 0 && bootverbose && + !(status == CAM_SEL_TIMEOUT && (camflags & CAM_RETRY_SELTO) == 0)) { + if (error != ERESTART) { + if (action_string == NULL) + action_string = "Unretryable Error"; + xpt_print(ccb->ccb_h.path, "error %d\n", error); + xpt_print(ccb->ccb_h.path, "%s\n", action_string); + } else + xpt_print(ccb->ccb_h.path, "Retrying Command\n"); + } + /* Attempt a retry */ - if (error == ERESTART || error == 0) { + if (error == ERESTART || error == 0) { if (frozen != 0) ccb->ccb_h.status &= ~CAM_DEV_QFRZN; - - if (error == ERESTART) { - action_string = "Retrying Command"; + if (error == ERESTART) xpt_action(ccb); - } - if (frozen != 0) cam_release_devq(ccb->ccb_h.path, relsim_flags, @@ -1785,21 +1796,5 @@ cam_periph_error(union ccb *ccb, cam_fla /*getcount_only*/0); } - /* - * If we have and error and are booting verbosely, whine - * *unless* this was a non-retryable selection timeout. - */ - if (error != 0 && bootverbose && - !(status == CAM_SEL_TIMEOUT && (camflags & CAM_RETRY_SELTO) == 0)) { - - - if (action_string == NULL) - action_string = "Unretryable Error"; - if (error != ERESTART) { - xpt_print(ccb->ccb_h.path, "error %d\n", error); - } - xpt_print(ccb->ccb_h.path, "%s\n", action_string); - } - return (error); }