All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb-6fire: Modify firmware version check
@ 2013-05-23 11:38 Torsten Schenk
  2013-05-23 12:37 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Torsten Schenk @ 2013-05-23 11:38 UTC (permalink / raw)
  To: alsa-devel; +Cc: Takashi Iwai, clemens

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: Torsten Schenk <torsten.schenk@zoho.com>

diff -Nur a/sound/usb/6fire/firmware.c b/sound/usb/6fire/firmware.c
--- a/sound/usb/6fire/firmware.c	2013-05-23 13:32:39.432545897 +0200
+++ b/sound/usb/6fire/firmware.c	2013-05-23 13:33:21.998193012 +0200
@@ -42,8 +42,8 @@
 	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 @@
 	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. "

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] usb-6fire: Modify firmware version check
  2013-05-23 11:38 [PATCH] usb-6fire: Modify firmware version check Torsten Schenk
@ 2013-05-23 12:37 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2013-05-23 12:37 UTC (permalink / raw)
  To: Torsten Schenk; +Cc: alsa-devel, clemens

At Thu, 23 May 2013 13:38:29 +0200,
Torsten Schenk wrote:
> 
> 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: Torsten Schenk <torsten.schenk@zoho.com>

Thanks, applied.


Takashi


> diff -Nur a/sound/usb/6fire/firmware.c b/sound/usb/6fire/firmware.c
> --- a/sound/usb/6fire/firmware.c	2013-05-23 13:32:39.432545897 +0200
> +++ b/sound/usb/6fire/firmware.c	2013-05-23 13:33:21.998193012 +0200
> @@ -42,8 +42,8 @@
>  	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 @@
>  	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. "
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-05-23 12:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-23 11:38 [PATCH] usb-6fire: Modify firmware version check Torsten Schenk
2013-05-23 12:37 ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.