dev: Don't fall through into BRAR after RFDR case
authorSiddhesh Poyarekar <siddhesh.poyarekar@gmail.com>
Sun, 18 Feb 2018 19:12:21 +0000 (00:42 +0530)
committerSiddhesh Poyarekar <siddhesh.poyarekar@gmail.com>
Tue, 6 Mar 2018 19:45:34 +0000 (19:45 +0000)
If the switch block inside the RFDR case selects the non-default case
and breaks out, it will fall through into the BRAR case, which seems
incorrect.  Put in a break to ensure that it breaks out of the parent
switch block as well.

Change-Id: Ie4cedf66954b7e8f4b884ad9e3a653968bbfaef7
Signed-off-by: Siddhesh Poyarekar <siddhesh.poyarekar@gmail.com>
Reviewed-on: https://gem5-review.googlesource.com/8563
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>

src/dev/net/ns_gige.cc

index dbed29f8b066fc004b206d1d8973f853e9d272c6..e1289b4b1008b1c00cf13d7b051ec229b68d2e27 100644 (file)
@@ -742,6 +742,7 @@ NSGigE::write(PacketPtr pkt)
                 panic("writing RFDR for something other than pattern matching "
                     "or hashing! %#x\n", rfaddr);
             }
+            break;
 
           case BRAR:
             regs.brar = reg;