On 02/24/2017 03:27 AM, Daniel Verkamp wrote:
The status code field is 8 bits wide starting at bit 1; the previous
code would truncate the top bit.

Signed-off-by: Daniel Verkamp <dan...@drv.nu>

Reviewed-by: Philippe Mathieu-Daudé <f4...@amsat.org>

---
 src/hw/nvme.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/hw/nvme.c b/src/hw/nvme.c
index 97b05cb..9fda011 100644
--- a/src/hw/nvme.c
+++ b/src/hw/nvme.c
@@ -74,7 +74,7 @@ nvme_poll_cq(struct nvme_cq *cq)
 static int
 nvme_is_cqe_success(struct nvme_cqe const *cqe)
 {
-    return (cqe->status & 0xFF) >> 1 == 0;
+    return ((cqe->status >> 1) & 0xFF) == 0;
 }




_______________________________________________
SeaBIOS mailing list
SeaBIOS@seabios.org
https://www.coreboot.org/mailman/listinfo/seabios

Reply via email to