Skip to content

Commit 68e57dd

Browse files
committed
Fix 5.19 Kernel NVMe CC info issue
1 parent d298883 commit 68e57dd

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

hw/femu/femu.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,13 @@ static void nvme_write_bar(FemuCtrl *n, hwaddr offset, uint64_t data, unsigned s
9090
n->bar.intmc = n->bar.intms;
9191
break;
9292
case 0x14:
93+
/* If first sending data, then sending enable bit */
94+
if (!NVME_CC_EN(data) && !NVME_CC_EN(n->bar.cc) &&
95+
!NVME_CC_SHN(data) && !NVME_CC_SHN(n->bar.cc))
96+
{
97+
n->bar.cc = data;
98+
}
99+
93100
if (NVME_CC_EN(data) && !NVME_CC_EN(n->bar.cc)) {
94101
n->bar.cc = data;
95102
if (nvme_start_ctrl(n)) {

0 commit comments

Comments
 (0)