From owner-svn-src-all@freebsd.org Thu Mar 10 00:36:53 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E9BFCAC859B; Thu, 10 Mar 2016 00:36:53 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BB5338F; Thu, 10 Mar 2016 00:36:53 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2A0aqXj028409; Thu, 10 Mar 2016 00:36:52 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2A0aqRo028408; Thu, 10 Mar 2016 00:36:52 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201603100036.u2A0aqRo028408@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 10 Mar 2016 00:36:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r296592 - head/sys/dev/amr X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Mar 2016 00:36:54 -0000 Author: imp Date: Thu Mar 10 00:36:52 2016 New Revision: 296592 URL: https://svnweb.freebsd.org/changeset/base/296592 Log: Don't assume that bio_cmd is a bitfield. Differential revision: https://reviews.freebsd.org/D5590 Modified: head/sys/dev/amr/amr.c Modified: head/sys/dev/amr/amr.c ============================================================================== --- head/sys/dev/amr/amr.c Thu Mar 10 00:36:45 2016 (r296591) +++ head/sys/dev/amr/amr.c Thu Mar 10 00:36:52 2016 (r296592) @@ -1319,7 +1319,7 @@ amr_bio_command(struct amr_softc *sc, st blkcount = (bio->bio_bcount + AMR_BLKSIZE - 1) / AMR_BLKSIZE; ac->ac_mailbox.mb_command = cmd; - if (bio->bio_cmd & (BIO_READ|BIO_WRITE)) { + if (bio->bio_cmd == BIO_READ || bio->bio_cmd == BIO_WRITE) { ac->ac_mailbox.mb_blkcount = blkcount; ac->ac_mailbox.mb_lba = bio->bio_pblkno; if ((bio->bio_pblkno + blkcount) > sc->amr_drive[driveno].al_size) {