Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Mar 2016 00:36:52 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r296592 - head/sys/dev/amr
Message-ID:  <201603100036.u2A0aqRo028408@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201603100036.u2A0aqRo028408>