Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ALSA: asihpi: relax firmware version check

Some products firmware is no longer being updated
e.g. dsp5000, dsp8700 but it should continue to work
with updated HPI versions.
Avoid regression by allowing this firmware to be loaded as
long as major version is the same.
Warn about mismatching versions, as matching versions are
preferred.

Signed-off-by: Eliot Blennerhassett <eliot@blennerhassett.gen.nz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by

Eliot Blennerhassett and committed by
Takashi Iwai
43986431 c99b9e85

+12 -14
+12 -14
sound/pci/asihpi/hpidspcd.c
··· 1 - /***********************************************************************/ 2 - /** 1 + /*********************************************************************** 3 2 4 3 AudioScience HPI driver 5 - Copyright (C) 1997-2011 AudioScience Inc. <support@audioscience.com> 4 + Functions for reading DSP code using hotplug firmware loader 5 + 6 + Copyright (C) 1997-2014 AudioScience Inc. <support@audioscience.com> 6 7 7 8 This program is free software; you can redistribute it and/or modify 8 9 it under the terms of version 2 of the GNU General Public License as ··· 18 17 along with this program; if not, write to the Free Software 19 18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 19 21 - \file 22 - Functions for reading DSP code using 23 - hotplug firmware loader from individual dsp code files 24 - */ 25 - /***********************************************************************/ 20 + ***********************************************************************/ 26 21 #define SOURCEFILE_NAME "hpidspcd.c" 27 22 #include "hpidspcd.h" 28 23 #include "hpidebug.h" ··· 65 68 goto error2; 66 69 } 67 70 68 - if ((header.version >> 9) != (HPI_VER >> 9)) { 69 - /* Consider even and subsequent odd minor versions to be compatible */ 70 - dev_err(&dev->dev, "Incompatible firmware version DSP image %X != Driver %X\n", 71 + if (HPI_VER_MAJOR(header.version) != HPI_VER_MAJOR(HPI_VER)) { 72 + /* Major version change probably means Host-DSP protocol change */ 73 + dev_err(&dev->dev, 74 + "Incompatible firmware version DSP image %X != Driver %X\n", 71 75 header.version, HPI_VER); 72 76 goto error2; 73 77 } 74 78 75 79 if (header.version != HPI_VER) { 76 - dev_info(&dev->dev, 77 - "Firmware: release version mismatch DSP image %X != Driver %X\n", 78 - header.version, HPI_VER); 80 + dev_warn(&dev->dev, 81 + "Firmware version mismatch: DSP image %X != Driver %X\n", 82 + header.version, HPI_VER); 79 83 } 80 84 81 85 HPI_DEBUG_LOG(DEBUG, "dsp code %s opened\n", fw_name);