All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Make firmware vs driver major version mismatch an error.
@ 2010-02-02 21:07 linux
  2010-02-02 21:42 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: linux @ 2010-02-02 21:07 UTC (permalink / raw)
  To: patch; +Cc: tiwai, Eliot Blennerhassett, alsa-devel

From: Eliot Blennerhassett <eblennerhassett@audioscience.com>

I.e. incompatible firmware will fail driver load.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
---
 pci/asihpi/hpidspcd.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/pci/asihpi/hpidspcd.c b/pci/asihpi/hpidspcd.c
index 8c0f251..f58d5a0 100644
--- a/pci/asihpi/hpidspcd.c
+++ b/pci/asihpi/hpidspcd.c
@@ -103,6 +103,13 @@ short HpiDspCode_Open(
 		goto error2;
 	}
 
+	if (header.version / 10000 != HPI_VER_DECIMAL / 10000) {
+		HPI_DEBUG_LOG(ERROR,
+			"Firmware Major Version mismatch  DSP image %d != Driver %d\n",
+			header.version, HPI_VER_DECIMAL);
+		goto error2;
+	}
+
 	if (header.version != HPI_VER_DECIMAL) {
 		HPI_DEBUG_LOG(WARNING,
 			"Version mismatch  DSP image %d != Driver %d\n",
-- 
1.7.0.rc0.8.ge3f67d

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

* Re: [PATCH] Make firmware vs driver major version mismatch an error.
  2010-02-02 21:07 [PATCH] Make firmware vs driver major version mismatch an error linux
@ 2010-02-02 21:42 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2010-02-02 21:42 UTC (permalink / raw)
  To: linux; +Cc: Eliot Blennerhassett, alsa-devel

At Wed, 03 Feb 2010 10:07:37 +1300,
linux@audioscience.com wrote:
> 
> From: Eliot Blennerhassett <eblennerhassett@audioscience.com>
> 
> I.e. incompatible firmware will fail driver load.
> 
> Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>

Applied now.  Thanks.


Takashi

> ---
>  pci/asihpi/hpidspcd.c |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)
> 
> diff --git a/pci/asihpi/hpidspcd.c b/pci/asihpi/hpidspcd.c
> index 8c0f251..f58d5a0 100644
> --- a/pci/asihpi/hpidspcd.c
> +++ b/pci/asihpi/hpidspcd.c
> @@ -103,6 +103,13 @@ short HpiDspCode_Open(
>  		goto error2;
>  	}
>  
> +	if (header.version / 10000 != HPI_VER_DECIMAL / 10000) {
> +		HPI_DEBUG_LOG(ERROR,
> +			"Firmware Major Version mismatch  DSP image %d != Driver %d\n",
> +			header.version, HPI_VER_DECIMAL);
> +		goto error2;
> +	}
> +
>  	if (header.version != HPI_VER_DECIMAL) {
>  		HPI_DEBUG_LOG(WARNING,
>  			"Version mismatch  DSP image %d != Driver %d\n",
> -- 
> 1.7.0.rc0.8.ge3f67d
> 

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

end of thread, other threads:[~2010-02-02 21:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-02 21:07 [PATCH] Make firmware vs driver major version mismatch an error linux
2010-02-02 21:42 ` 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.