[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 19/20] hw: fix mask for ColdFire UART command registe
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 19/20] hw: fix mask for ColdFire UART command register |
Date: |
Wed, 12 Aug 2015 15:37:12 +0200 |
The "miscellaneous commands" part of the register is 3 bits wide.
Spotted by Coverity and confirmed in the datasheet, downloadable from
http://cache.freescale.com/files/32bit/doc/ref_manual/MCF5307BUM.pdf
(figure 14-6).
Signed-off-by: Paolo Bonzini <address@hidden>
---
hw/char/mcf_uart.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/char/mcf_uart.c b/hw/char/mcf_uart.c
index 98fd44e..cda22ee 100644
--- a/hw/char/mcf_uart.c
+++ b/hw/char/mcf_uart.c
@@ -126,7 +126,7 @@ static void mcf_uart_do_tx(mcf_uart_state *s)
static void mcf_do_command(mcf_uart_state *s, uint8_t cmd)
{
/* Misc command. */
- switch ((cmd >> 4) & 3) {
+ switch ((cmd >> 4) & 7) {
case 0: /* No-op. */
break;
case 1: /* Reset mode register pointer. */
--
2.4.3
- [Qemu-devel] [PULL 10/20] exec: drop cpu_can_do_io, just read cpu->can_do_io, (continued)
- [Qemu-devel] [PULL 10/20] exec: drop cpu_can_do_io, just read cpu->can_do_io, Paolo Bonzini, 2015/08/12
- [Qemu-devel] [PULL 11/20] rcu: Allow calling rcu_(un)register_thread() during synchronize_rcu(), Paolo Bonzini, 2015/08/12
- [Qemu-devel] [PULL 12/20] exec: use macro ROUND_UP for alignment, Paolo Bonzini, 2015/08/12
- [Qemu-devel] [PULL 14/20] qemu-nbd: remove unnecessary qemu_notify_event(), Paolo Bonzini, 2015/08/12
- [Qemu-devel] [PULL 15/20] configure: only add CONFIG_RDMA to config-host.h once, Paolo Bonzini, 2015/08/12
- [Qemu-devel] [PULL 13/20] vhost-scsi: Clarify vhost_virtqueue_mask argument, Paolo Bonzini, 2015/08/12
- [Qemu-devel] [PULL 16/20] scsi: create restart bottom half in the right AioContext, Paolo Bonzini, 2015/08/12
- [Qemu-devel] [PULL 18/20] scsi-generic: identify AIO callbacks more clearly, Paolo Bonzini, 2015/08/12
- [Qemu-devel] [PULL 17/20] scsi-disk: identify AIO callbacks more clearly, Paolo Bonzini, 2015/08/12
- [Qemu-devel] [PULL 20/20] disas: Defeature print_target_address, Paolo Bonzini, 2015/08/12
- [Qemu-devel] [PULL 19/20] hw: fix mask for ColdFire UART command register,
Paolo Bonzini <=
- Re: [Qemu-devel] [PULL 00/20] SCSI, build, TCG, RCU, misc patches for 2015-08-12, Peter Maydell, 2015/08/13