Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d47333dd authored by Torsten Schenk's avatar Torsten Schenk Committed by Takashi Iwai
Browse files

ALSA: usb-6fire: Modify firmware version check



Check only the uppermost 16 bits instead of the whole 32 bits of
the version information. Do this because all firmware version tested
with this version information worked correctly and the strict check
causes problems for several users.

Signed-off-by: default avatarTorsten Schenk <torsten.schenk@zoho.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent e6135fe9
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -42,8 +42,8 @@ static const u8 ep_w_max_packet_size[] = {
	0x94, 0x01, 0x5c, 0x02  /* alt 3: 404 EP2 and 604 EP6 (25 fpp) */
};

static const u8 known_fw_versions[][4] = {
	{ 0x03, 0x01, 0x0b, 0x00 }
static const u8 known_fw_versions[][2] = {
	{ 0x03, 0x01 }
};

struct ihex_record {
@@ -343,7 +343,7 @@ static int usb6fire_fw_check(u8 *version)
	int i;

	for (i = 0; i < ARRAY_SIZE(known_fw_versions); i++)
		if (!memcmp(version, known_fw_versions + i, 4))
		if (!memcmp(version, known_fw_versions + i, 2))
			return 0;

	snd_printk(KERN_ERR PREFIX "invalid fimware version in device: %*ph. "