Oops, I accidentally MFC'd too much.
authorSascha Wildner <swildner@dragonflybsd.org>
Tue, 16 Sep 2008 12:51:21 +0000 (16 12:51 +0000)
committerSascha Wildner <swildner@dragonflybsd.org>
Tue, 16 Sep 2008 12:51:21 +0000 (16 12:51 +0000)
sys/dev/raid/amr/amr.c

index 70aa51c..d675af4 100644 (file)
@@ -53,7 +53,7 @@
  * SUCH DAMAGE.
  *
  *     $FreeBSD: src/sys/dev/amr/amr.c,v 1.7.2.13 2003/01/15 13:41:18 emoore Exp $
- *     $DragonFly: src/sys/dev/raid/amr/amr.c,v 1.25.4.1 2008/09/16 12:39:45 swildner Exp $
+ *     $DragonFly: src/sys/dev/raid/amr/amr.c,v 1.25.4.2 2008/09/16 12:51:21 swildner Exp $
  */
 
 /*
@@ -867,26 +867,16 @@ amr_bio_command(struct amr_softc *sc, struct amr_command **acp)
     ac->ac_bio = bio;
     ac->ac_data = bio->bio_buf->b_data;
     ac->ac_length = bio->bio_buf->b_bcount;
-
-    cmd = 0;
-    switch(bio->bio_buf->b_cmd) {
-    case BUF_CMD_READ:
+    if (bio->bio_buf->b_cmd == BUF_CMD_READ) {
        ac->ac_flags |= AMR_CMD_DATAIN;
        cmd = AMR_CMD_LREAD;
-       break;
-    case BUF_CMD_WRITE:
+    } else {
        ac->ac_flags |= AMR_CMD_DATAOUT;
        cmd = AMR_CMD_LWRITE;
-       break;
-    case BUF_CMD_FLUSH:
-       ac->ac_flags |= AMR_CMD_PRIORITY | AMR_CMD_DATAOUT;
-       cmd = AMR_CMD_FLUSH;
-       break;
     }
     amrd = (struct amrd_softc *)bio->bio_driver_info;
     driveno = amrd->amrd_drive - sc->amr_drive;
     blkcount = (bio->bio_buf->b_bcount + AMR_BLKSIZE - 1) / AMR_BLKSIZE;
-
     lba = bio->bio_offset / AMR_BLKSIZE;
     KKASSERT(lba < 0x100000000ULL);