From: Eliot Blennerhassett linux@audioscience.com
Signed-off-by: Eliot Blennerhassett eblennerhassett@audioscience.com
diff --git a/pci/asihpi/hpidspcd.c b/pci/asihpi/hpidspcd.c index 2665370..8c0f251 100644 --- a/pci/asihpi/hpidspcd.c +++ b/pci/asihpi/hpidspcd.c @@ -56,6 +56,9 @@ struct code_header { #pragma pack(pop) #endif
+#define HPI_VER_DECIMAL ((int)(HPI_VER_MAJOR(HPI_VER) * 10000 + \ + HPI_VER_MINOR(HPI_VER) * 100 + HPI_VER_RELEASE(HPI_VER))) + /***********************************************************************/ #include "linux/pci.h" /*-------------------------------------------------------------------*/ @@ -100,6 +103,13 @@ short HpiDspCode_Open( goto error2; }
+ if (header.version != HPI_VER_DECIMAL) { + HPI_DEBUG_LOG(WARNING, + "Version mismatch DSP image %d != Driver %d\n", + header.version, HPI_VER_DECIMAL); + /* goto error2; still allow driver to load */ + } + HPI_DEBUG_LOG(INFO, "Dsp code %s opened\n", fw_name); psDspCode->psFirmware = psFirmware; psDspCode->dwBlockLength = header.size / sizeof(u32);