提交 8ef2eb8d 编写于 作者: P Paolo Bonzini

megasas: fix megasas_get_sata_addr

There are two bugs here.  First, the 16-bit id loses the high 8 bits
when shifted left by 24.  Second, the address must be combined with
an "or" or we just get zero.
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 633dccb4
......@@ -431,7 +431,7 @@ static uint64_t megasas_fw_time(void)
static uint64_t megasas_get_sata_addr(uint16_t id)
{
uint64_t addr = (0x1221ULL << 48);
return addr & (id << 24);
return addr | ((uint64_t)id << 24);
}
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册