From owner-svn-src-stable-8@FreeBSD.ORG Fri Sep 16 17:44:34 2011 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 746751065672; Fri, 16 Sep 2011 17:44:34 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4A2B98FC12; Fri, 16 Sep 2011 17:44:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p8GHiYVJ031897; Fri, 16 Sep 2011 17:44:34 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p8GHiYq3031895; Fri, 16 Sep 2011 17:44:34 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201109161744.p8GHiYq3031895@svn.freebsd.org> From: John Baldwin Date: Fri, 16 Sep 2011 17:44:34 +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: r225621 - stable/8/sys/dev/mfi 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: Fri, 16 Sep 2011 17:44:34 -0000 Author: jhb Date: Fri Sep 16 17:44:33 2011 New Revision: 225621 URL: http://svn.freebsd.org/changeset/base/225621 Log: MFC 224039: Use MFI_STAT_* constants for cmd_status field values rather than magic numbers in a few places. Modified: stable/8/sys/dev/mfi/mfi.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) Modified: stable/8/sys/dev/mfi/mfi.c ============================================================================== --- stable/8/sys/dev/mfi/mfi.c Fri Sep 16 17:41:56 2011 (r225620) +++ stable/8/sys/dev/mfi/mfi.c Fri Sep 16 17:44:33 2011 (r225621) @@ -1149,7 +1149,8 @@ mfi_aen_complete(struct mfi_command *cm) if (sc->mfi_aen_cm == NULL) return; - if (sc->mfi_aen_cm->cm_aen_abort || hdr->cmd_status == 0xff) { + if (sc->mfi_aen_cm->cm_aen_abort || + hdr->cmd_status == MFI_STAT_INVALID_STATUS) { sc->mfi_aen_cm->cm_aen_abort = 0; aborted = 1; } else { @@ -1405,7 +1406,7 @@ mfi_bio_complete(struct mfi_command *cm) hdr = &cm->cm_frame->header; sc = cm->cm_sc; - if ((hdr->cmd_status != 0) || (hdr->scsi_status != 0)) { + if ((hdr->cmd_status != MFI_STAT_OK) || (hdr->scsi_status != 0)) { bio->bio_flags |= BIO_ERROR; bio->bio_error = EIO; device_printf(sc->mfi_dev, "I/O error, status= %d " @@ -1549,7 +1550,7 @@ mfi_send_frame(struct mfi_softc *sc, str cm->cm_timestamp = time_uptime; mfi_enqueue_busy(cm); } else { - hdr->cmd_status = 0xff; + hdr->cmd_status = MFI_STAT_INVALID_STATUS; hdr->flags |= MFI_FRAME_DONT_POST_IN_REPLY_QUEUE; } @@ -1574,14 +1575,14 @@ mfi_send_frame(struct mfi_softc *sc, str return (0); /* This is a polled command, so busy-wait for it to complete. */ - while (hdr->cmd_status == 0xff) { + while (hdr->cmd_status == MFI_STAT_INVALID_STATUS) { DELAY(1000); tm -= 1; if (tm <= 0) break; } - if (hdr->cmd_status == 0xff) { + if (hdr->cmd_status == MFI_STAT_INVALID_STATUS) { device_printf(sc->mfi_dev, "Frame %p timed out " "command 0x%X\n", hdr, cm->cm_frame->dcmd.opcode); return (ETIMEDOUT);