Update scsi2sd-util6 to identify the 2021 board
authorMichael McMaster <michael@codesrc.com>
Fri, 9 Apr 2021 11:06:30 +0000 (21:06 +1000)
committerMichael McMaster <michael@codesrc.com>
Fri, 9 Apr 2021 11:06:30 +0000 (21:06 +1000)
src/scsi2sd-util6/SCSI2SD_HID.cc

index 7560c90eb70df37b46a29a8515e7fb1a4a46483c..e5b8ca3471b2ac4cc7fbef8649b7458e770c028e 100644 (file)
@@ -359,6 +359,11 @@ HID::getHardwareVersion()
                                // Definitely the 2020c or newer hardware.
                                return "V6, 2020c or newer";
                        }
+                       else if (prodStr.find(L"2021") != std::string::npos)
+                       {
+                               // Definitely the 2020c or newer hardware.
+                               return "V6, 2021 or newer";
+                       }
                        else
                        {
                                return "V6, Rev F or older";
@@ -390,7 +395,7 @@ HID::isCorrectFirmware(const std::string& path)
 {
        if (myFirmwareVersion < 0x0630)
        {
-               // Definitely the 2020c or newer hardware.
+               // Definitely the older hardware.
                return path.rfind("firmware.V6.revF.dfu") != std::string::npos ||
                        path.rfind("firmware.dfu") != std::string::npos;
        }
@@ -415,6 +420,11 @@ HID::isCorrectFirmware(const std::string& path)
                                // Definitely the 2020c or newer hardware.
                                return path.rfind("firmware.V6.2020.dfu") != std::string::npos;
                        }
+                       else if (prodStr.find(L"2021") != std::string::npos)
+                       {
+                               // Definitely the 2020c or newer hardware.
+                               return path.rfind("firmware.V6.2021.dfu") != std::string::npos;
+                       }
                        else
                        {
                                return path.rfind("firmware.V6.revF.dfu") != std::string::npos ||