nvme_manager: support status flag check

NVMe handler responds with incorrect raw data sometime, which
records abnormal value and triggers critical event.

Support checking "drive not ready" bit to avoid temperature reading
when NVMe is unavailable. This bit is defined in Figure 176 on page
155 of the NVMe specification.
```
Ref: https://nvmexpress.org/wp-content/uploads/NVM-Express-Management-Interface-Specification-1.2c-2022.10.06-Ratified-1.pdf
```

Tested:
```
~# journalctl -u xyz.openbmc_project.nvme.manager.service
Jan 01 23:20:35 gbs systemd[1]: Starting NVMe management...
Jan 01 23:20:35 gbs systemd[1]: Started NVMe management.
Jan 01 23:20:36 gbs nvme_main[14995]: SSD plug.
Jan 01 23:20:36 gbs nvme_main[14995]: SSD plug.
Jan 01 23:20:36 gbs nvme_main[14995]: SSD plug.
Jan 01 23:20:36 gbs nvme_main[14995]: SSD plug.
Jan 01 23:44:58 gbs nvme_main[14995]: Drive not ready!
Jan 01 23:44:58 gbs nvme_main[14995]: Drive status is good but can not get data.
```

Change-Id: I805a3b3748070d5b220f3d71aa93812f852a964d
Signed-off-by: Joseph.Fu <Joseph.Fu@quantatw.com>
diff --git a/nvme_manager.cpp b/nvme_manager.cpp
index d10d1d0..6fa82c2 100644
--- a/nvme_manager.cpp
+++ b/nvme_manager.cpp
@@ -37,6 +37,7 @@
 static constexpr int DegradesFaultMask = 1 << 2;
 static constexpr int MediaFaultMask = 1 << 3;
 static constexpr int BackupDeviceFaultMask = 1 << 4;
+static constexpr int DriveNotReadyMask = 1 << 6;
 static constexpr int NOWARNING = 255;
 
 static constexpr int SERIALNUMBER_START_INDEX = 3;
@@ -281,6 +282,17 @@
         return nvmeData.present;
     }
 
+    if (rsp_data_command_0[1] & DriveNotReadyMask)
+    {
+        if (isErrorSmbus[busID] != true)
+        {
+            log<level::ERR>("Drive not ready!");
+            isErrorSmbus[busID] = true;
+        }
+        smbus.smbusClose(busID);
+        return false;
+    }
+
     nvmeData.statusFlags = intToHex(rsp_data_command_0[1]);
     nvmeData.smartWarnings = intToHex(rsp_data_command_0[2]);
     nvmeData.driveLifeUsed = intToHex(rsp_data_command_0[4]);