提交 259d5577 编写于 作者: J Jan Kiszka 提交者: Aurelien Jarno

lsi: Fix value overflow in request tag processing

This fixes a mismerge of 64d56409 (wrong
patch version): We need to mask the tag value properly to obtain its
device ID.
Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
上级 664a65b0
......@@ -543,7 +543,7 @@ static void lsi_do_dma(LSIState *s, int out)
return;
}
id = s->current->tag >> 8;
id = (s->current->tag >> 8) & 0xf;
dev = s->bus.devs[id];
if (!dev) {
lsi_bad_selection(s, id);
......@@ -745,7 +745,7 @@ static void lsi_do_command(LSIState *s)
s->sfbr = buf[0];
s->command_complete = 0;
id = s->select_tag >> 8;
id = (s->select_tag >> 8) & 0xf;
dev = s->bus.devs[id];
if (!dev) {
lsi_bad_selection(s, id);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册