linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [17/26] b43: refuse to load unsupported firmware
       [not found] <20111119000026.GA6679@kroah.com>
@ 2011-11-18 23:58 ` Greg KH
  0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2011-11-18 23:58 UTC (permalink / raw)
  To: linux-kernel, stable, greg
  Cc: torvalds, akpm, alan, linux-wireless, b43-dev, roman-vl,
	Rafał Miłecki

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1080 bytes --]

3.0-stable review patch.  If anyone has any objections, please let me know.

------------------

[This patch is supposed to be applied in 3.1 (and maybe older) branches only.]

New kernels support newer firmware that users may try to incorrectly use
with older kernels. Display error and explain the problem in such a case

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/wireless/b43/main.c |    7 +++++++
 1 file changed, 7 insertions(+)

--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -2401,6 +2401,13 @@ static int b43_upload_microcode(struct b
 		b43_print_fw_helptext(dev->wl, 1);
 		err = -EOPNOTSUPP;
 		goto error;
+	} else if (fwrev >= 598) {
+		b43err(dev->wl, "YOUR FIRMWARE IS TOO NEW. Support for "
+		       "firmware 598 and up requires kernel 3.2 or newer. You "
+		       "have to install older firmware or upgrade kernel.\n");
+		b43_print_fw_helptext(dev->wl, 1);
+		err = -EOPNOTSUPP;
+		goto error;
 	}
 	dev->fw.rev = fwrev;
 	dev->fw.patch = fwpatch;



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

* [17/26] b43: refuse to load unsupported firmware
       [not found] <20111119000336.GA8452@kroah.com>
@ 2011-11-19  0:02 ` Greg KH
  2011-11-19 17:22   ` Ben Hutchings
  0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2011-11-19  0:02 UTC (permalink / raw)
  To: linux-kernel, stable, greg
  Cc: torvalds, akpm, alan, linux-wireless, b43-dev, roman-vl,
	Rafał Miłecki

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1080 bytes --]

3.1-stable review patch.  If anyone has any objections, please let me know.

------------------

[This patch is supposed to be applied in 3.1 (and maybe older) branches only.]

New kernels support newer firmware that users may try to incorrectly use
with older kernels. Display error and explain the problem in such a case

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/net/wireless/b43/main.c |    7 +++++++
 1 file changed, 7 insertions(+)

--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -2508,6 +2508,13 @@ static int b43_upload_microcode(struct b
 		b43_print_fw_helptext(dev->wl, 1);
 		err = -EOPNOTSUPP;
 		goto error;
+	} else if (fwrev >= 598) {
+		b43err(dev->wl, "YOUR FIRMWARE IS TOO NEW. Support for "
+		       "firmware 598 and up requires kernel 3.2 or newer. You "
+		       "have to install older firmware or upgrade kernel.\n");
+		b43_print_fw_helptext(dev->wl, 1);
+		err = -EOPNOTSUPP;
+		goto error;
 	}
 	dev->fw.rev = fwrev;
 	dev->fw.patch = fwpatch;



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

* Re: [17/26] b43: refuse to load unsupported firmware
  2011-11-19  0:02 ` [17/26] b43: refuse to load unsupported firmware Greg KH
@ 2011-11-19 17:22   ` Ben Hutchings
  2011-11-19 19:05     ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Ben Hutchings @ 2011-11-19 17:22 UTC (permalink / raw)
  To: Greg KH
  Cc: linux-kernel, stable, greg, torvalds, akpm, alan, linux-wireless,
	b43-dev, roman-vl, Rafał Miłecki

[-- Attachment #1: Type: text/plain, Size: 1503 bytes --]

On Fri, 2011-11-18 at 16:02 -0800, Greg KH wrote:
> 3.1-stable review patch.  If anyone has any objections, please let me know.
> 
> ------------------
> 
> [This patch is supposed to be applied in 3.1 (and maybe older) branches only.]
> 
> New kernels support newer firmware that users may try to incorrectly use
> with older kernels. Display error and explain the problem in such a case
> 
> Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
> 
> ---
>  drivers/net/wireless/b43/main.c |    7 +++++++
>  1 file changed, 7 insertions(+)
> 
> --- a/drivers/net/wireless/b43/main.c
> +++ b/drivers/net/wireless/b43/main.c
> @@ -2508,6 +2508,13 @@ static int b43_upload_microcode(struct b
>  		b43_print_fw_helptext(dev->wl, 1);
>  		err = -EOPNOTSUPP;
>  		goto error;
> +	} else if (fwrev >= 598) {
> +		b43err(dev->wl, "YOUR FIRMWARE IS TOO NEW. Support for "
> +		       "firmware 598 and up requires kernel 3.2 or newer. You "
> +		       "have to install older firmware or upgrade kernel.\n");
> +		b43_print_fw_helptext(dev->wl, 1);
> +		err = -EOPNOTSUPP;
> +		goto error;
[...]

Again, I strongly object to this way of handling the incompatibility.
The revision check is fine, but the solution must be to assign a
different filename for the newer revisions.  The changes to 3.0/3.1
should be deferred until this is resolved.

Ben.

-- 
Ben Hutchings
The world is coming to an end.	Please log off.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

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

* Re: [17/26] b43: refuse to load unsupported firmware
  2011-11-19 17:22   ` Ben Hutchings
@ 2011-11-19 19:05     ` Greg KH
  2011-11-19 19:49       ` Ben Hutchings
  0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2011-11-19 19:05 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: linux-kernel, stable, greg, torvalds, akpm, alan, linux-wireless,
	b43-dev, roman-vl, Rafał Miłecki

On Sat, Nov 19, 2011 at 05:22:10PM +0000, Ben Hutchings wrote:
> On Fri, 2011-11-18 at 16:02 -0800, Greg KH wrote:
> > 3.1-stable review patch.  If anyone has any objections, please let me know.
> > 
> > ------------------
> > 
> > [This patch is supposed to be applied in 3.1 (and maybe older) branches only.]
> > 
> > New kernels support newer firmware that users may try to incorrectly use
> > with older kernels. Display error and explain the problem in such a case
> > 
> > Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
> > Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
> > 
> > ---
> >  drivers/net/wireless/b43/main.c |    7 +++++++
> >  1 file changed, 7 insertions(+)
> > 
> > --- a/drivers/net/wireless/b43/main.c
> > +++ b/drivers/net/wireless/b43/main.c
> > @@ -2508,6 +2508,13 @@ static int b43_upload_microcode(struct b
> >  		b43_print_fw_helptext(dev->wl, 1);
> >  		err = -EOPNOTSUPP;
> >  		goto error;
> > +	} else if (fwrev >= 598) {
> > +		b43err(dev->wl, "YOUR FIRMWARE IS TOO NEW. Support for "
> > +		       "firmware 598 and up requires kernel 3.2 or newer. You "
> > +		       "have to install older firmware or upgrade kernel.\n");
> > +		b43_print_fw_helptext(dev->wl, 1);
> > +		err = -EOPNOTSUPP;
> > +		goto error;
> [...]
> 
> Again, I strongly object to this way of handling the incompatibility.
> The revision check is fine, but the solution must be to assign a
> different filename for the newer revisions.  The changes to 3.0/3.1
> should be deferred until this is resolved.

You can object, however the driver author and maintainer wants it done
this way for now, so that's a valid solution that I have to accept.  It
solves real bugs that people have already hit when running the 3.0 and
3.1 kernels.  Propagating a userspace tool change for those systems
would be much harder, if not impossible, don't you think?  It would also
require a much more intrusive change to the driver infrastructure to
handle such a proposed change.

thanks,

greg k-h

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

* Re: [17/26] b43: refuse to load unsupported firmware
  2011-11-19 19:05     ` Greg KH
@ 2011-11-19 19:49       ` Ben Hutchings
  0 siblings, 0 replies; 5+ messages in thread
From: Ben Hutchings @ 2011-11-19 19:49 UTC (permalink / raw)
  To: Greg KH
  Cc: linux-kernel, stable, greg, torvalds, akpm, alan, linux-wireless,
	b43-dev, roman-vl, Rafał Miłecki

[-- Attachment #1: Type: text/plain, Size: 2879 bytes --]

On Sat, 2011-11-19 at 11:05 -0800, Greg KH wrote:
> On Sat, Nov 19, 2011 at 05:22:10PM +0000, Ben Hutchings wrote:
> > On Fri, 2011-11-18 at 16:02 -0800, Greg KH wrote:
> > > 3.1-stable review patch.  If anyone has any objections, please let me know.
> > > 
> > > ------------------
> > > 
> > > [This patch is supposed to be applied in 3.1 (and maybe older) branches only.]
> > > 
> > > New kernels support newer firmware that users may try to incorrectly use
> > > with older kernels. Display error and explain the problem in such a case
> > > 
> > > Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
> > > Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
> > > 
> > > ---
> > >  drivers/net/wireless/b43/main.c |    7 +++++++
> > >  1 file changed, 7 insertions(+)
> > > 
> > > --- a/drivers/net/wireless/b43/main.c
> > > +++ b/drivers/net/wireless/b43/main.c
> > > @@ -2508,6 +2508,13 @@ static int b43_upload_microcode(struct b
> > >  		b43_print_fw_helptext(dev->wl, 1);
> > >  		err = -EOPNOTSUPP;
> > >  		goto error;
> > > +	} else if (fwrev >= 598) {
> > > +		b43err(dev->wl, "YOUR FIRMWARE IS TOO NEW. Support for "
> > > +		       "firmware 598 and up requires kernel 3.2 or newer. You "
> > > +		       "have to install older firmware or upgrade kernel.\n");
> > > +		b43_print_fw_helptext(dev->wl, 1);
> > > +		err = -EOPNOTSUPP;
> > > +		goto error;
> > [...]
> > 
> > Again, I strongly object to this way of handling the incompatibility.
> > The revision check is fine, but the solution must be to assign a
> > different filename for the newer revisions.  The changes to 3.0/3.1
> > should be deferred until this is resolved.
> 
> You can object, however the driver author and maintainer wants it done
> this way for now, so that's a valid solution that I have to accept.  It
> solves real bugs that people have already hit when running the 3.0 and
> 3.1 kernels.

The revision check fixes a bug, yes.  What I'm concerned about is the
cop-out error message: 'We didn't deal with versioning properly, so you
get to solve the problem.'  It should be possible to reboot between
multiple installed kernel versions without modifying files.

> Propagating a userspace tool change for those systems
> would be much harder, if not impossible, don't you think? It would also
> require a much more intrusive change to the driver infrastructure to
> handle such a proposed change.

It is the new kernel version and firmware files that should be changed,
not the old ones.

There is another option which is to use the /lib/firmware/<kernel-ver>
directories to separate incompatible firmware versions.  That is not
nearly as good as using a API/ABI number in the filename, but it would
work and the error message could suggest it.

Ben.

-- 
Ben Hutchings
The world is coming to an end.	Please log off.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

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

end of thread, other threads:[~2011-11-19 19:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20111119000336.GA8452@kroah.com>
2011-11-19  0:02 ` [17/26] b43: refuse to load unsupported firmware Greg KH
2011-11-19 17:22   ` Ben Hutchings
2011-11-19 19:05     ` Greg KH
2011-11-19 19:49       ` Ben Hutchings
     [not found] <20111119000026.GA6679@kroah.com>
2011-11-18 23:58 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).