Re: [PATCH 1/2] bnx2: factor out gzip unpacker

Previous thread: Git as a filesystem by Peter Stahlir on Friday, September 21, 2007 - 6:48 am. (8 messages)

Next thread: [PATCH] sb1250-mac: Driver model & phylib update by Maciej W. Rozycki on Friday, September 21, 2007 - 7:52 am. (9 messages)
To: Jeff Garzik <jeff@...>
Cc: Michael Chan <mchan@...>, David Miller <davem@...>, <linux-kernel@...>, <netdev@...>
Date: Friday, September 21, 2007 - 7:01 am

Hi Jeff,

This patch modifies gzip unpacking code in bnx2 driver so that
it does not depend on bnx2 internals. I will move this code
out of the driver and into zlib in follow-on patch.

It can be useful in other drivers which need to store firmwares
or any other relatively big binary blobs - fonts, cursor bitmaps,
whatever.

Patch is run tested by Michael Chan (driver author).

Michael, can you add your ACK?

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
--
vda

To: <vda.linux@...>
Cc: <jeff@...>, <mchan@...>, <linux-kernel@...>, <netdev@...>
Date: Friday, September 21, 2007 - 12:14 pm

From: Denys Vlasenko <vda.linux@googlemail.com>

BNX2 and TG3 patches goes through Michael Chan and myself,
and I usually merge them in instead of Jeff.
-

To: David Miller <davem@...>
Cc: <jeff@...>, <mchan@...>, <linux-kernel@...>, <netdev@...>
Date: Friday, September 21, 2007 - 1:03 pm

Didn't know that, sorry.

Do patches look ok to you?
--
vda
-

To: <vda.linux@...>
Cc: <jeff@...>, <mchan@...>, <linux-kernel@...>, <netdev@...>
Date: Friday, September 21, 2007 - 1:49 pm

From: Denys Vlasenko <vda.linux@googlemail.com>

I'm travelling so I haven't looked closely yet :-)

Michael can take a look and I'll try to do so as well
tonight.
-

To: David Miller <davem@...>
Cc: <vda.linux@...>, <jeff@...>, <linux-kernel@...>, netdev <netdev@...>
Date: Friday, September 21, 2007 - 10:47 pm

I've already reviewed the earlier versions of the patch and have made
some suggestions. This latest one looks ok to me and tested ok.

I'll follow up later with another patch to remove all the zeros in other
firmware sections, and to remove the gzip headers completely.

Acked-by: Michael Chan <mchan@broadcom.com>

-

To: <mchan@...>
Cc: <vda.linux@...>, <jeff@...>, <linux-kernel@...>, <netdev@...>
Date: Sunday, September 30, 2007 - 8:57 pm

From: "Michael Chan" <mchan@broadcom.com>

I've added these patches to net-2.6.24, thanks.
-

To: David Miller <davem@...>
Cc: <jeff@...>, <mchan@...>, <linux-kernel@...>, <netdev@...>
Date: Friday, September 21, 2007 - 2:05 pm

Good.

I plan to use gzip compression on following drivers' firmware,
if patches will be accepted:

text data bss dec hex filename
17653 109968 240 127861 1f375 drivers/net/acenic.o
6628 120448 4 127080 1f068 drivers/net/dgrs.o
^^^^^^

--
vda
-

To: Denys Vlasenko <vda.linux@...>
Cc: David Miller <davem@...>, <jeff@...>, <mchan@...>, <linux-kernel@...>, <netdev@...>
Date: Friday, September 21, 2007 - 4:13 pm

Just change the makefiles to always install gzip'ed modules
modutils knows how to unzip them on the fly.

That will catch all the firmware and all the other code too.

-Andi
-

To: Andi Kleen <andi@...>
Cc: David Miller <davem@...>, <jeff@...>, <mchan@...>, <linux-kernel@...>, <netdev@...>
Date: Friday, September 21, 2007 - 6:37 pm

But I compile net/* into bzImage. I like netbooting :)
--
vda
-

To: Denys Vlasenko <vda.linux@...>
Cc: Andi Kleen <andi@...>, David Miller <davem@...>, <jeff@...>, <mchan@...>, <linux-kernel@...>, <netdev@...>
Date: Monday, September 24, 2007 - 1:32 pm

Isn't it possible to netboot with an initramfs image? I am pretty sure
I have seen some systems do exactly that.

--
Len Sorensen
-

To: Lennart Sorensen <lsorense@...>
Cc: Denys Vlasenko <vda.linux@...>, Andi Kleen <andi@...>, David Miller <davem@...>, <jeff@...>, <mchan@...>, <linux-kernel@...>, <netdev@...>
Date: Tuesday, September 25, 2007 - 12:20 am

Yeah, I've got Debian boxes that have never *not* netbooted (one Dell
Op^?^?Craptiplex box whose BIOS and ACPI sucks so bad it can't even
load GRUB/LILO, although Windows somehow works fine). So they boot
PXELinux using the PXE boot ROM on the NICs and it loads both a
kernel and an initramfs into memory. Kernel is stock Debian and
hardly has enough built-in to spit at you, let alone find network/
disks, but it manages to load everything it needs off the
automagically-generated initramfs.

Cheers,
Kyle Moffett

-

To: Andi Kleen <andi@...>
Cc: Denys Vlasenko <vda.linux@...>, David Miller <davem@...>, <jeff@...>, <mchan@...>, <linux-kernel@...>, <netdev@...>
Date: Friday, September 21, 2007 - 4:31 pm

> Just change the makefiles to always install gzip'ed modules
> modutils knows how to unzip them on the fly.

But that leaves the uncompressed firmware blobs in .data that ends up
in unswappable kernel memory.

- R.
-

To: Denys Vlasenko <vda.linux@...>
Cc: David Miller <davem@...>, <jeff@...>, <mchan@...>, <linux-kernel@...>, <netdev@...>
Date: Friday, September 21, 2007 - 2:36 pm

Should this be redone to use the existing firmware loading framework to
load the firmware instead?

To: <Valdis.Kletnieks@...>
Cc: David Miller <davem@...>, <jeff@...>, <mchan@...>, <linux-kernel@...>, <netdev@...>
Date: Friday, September 21, 2007 - 3:18 pm

Not in every case.

For example, bnx2 maintainer says that driver and
firmware are closely tied for his driver. IOW: you upgrade kernel
and your NIC is not working anymore.

Another argument is to make kernel be able to bring up NICs
without needing firmware images in initramfs/initrd/hard drive.
--
vda
-

To: Denys Vlasenko <vda.linux@...>
Cc: <Valdis.Kletnieks@...>, David Miller <davem@...>, <jeff@...>, <mchan@...>, <linux-kernel@...>, <netdev@...>
Date: Friday, September 21, 2007 - 5:03 pm

dgrs should be using the request_firmware interface. Actually dgrs is
probably a good candidate for /dev/null

Alan
-

To: Alan Cox <alan@...>
Cc: Denys Vlasenko <vda.linux@...>, <Valdis.Kletnieks@...>, David Miller <davem@...>, <mchan@...>, <linux-kernel@...>, <netdev@...>
Date: Friday, September 21, 2007 - 6:33 pm

According to an earlier thread, dgrs was never really maintained,
written for hardware that was never really distributed widely, and very
likely hasn't had users in years... if ever.

If that picture is accurate (it's a story I was told), then I am
definitely queueing up a deletion patch.

Jeff

-

To: Jeff Garzik <jeff@...>
Cc: Denys Vlasenko <vda.linux@...>, <Valdis.Kletnieks@...>, David Miller <davem@...>, <mchan@...>, <linux-kernel@...>, <netdev@...>
Date: Friday, September 21, 2007 - 6:48 pm

I think thats sensible. If someone whines it can be put back but I really
don't think anyone will
-

To: Alan Cox <alan@...>
Cc: Jeff Garzik <jeff@...>, Denys Vlasenko <vda.linux@...>, <Valdis.Kletnieks@...>, David Miller <davem@...>, <mchan@...>, <linux-kernel@...>, <netdev@...>
Date: Friday, September 21, 2007 - 8:02 pm

nobody did yet, please yell if you need a rebased patch.

--
maks
-

To: Denys Vlasenko <vda.linux@...>
Cc: <Valdis.Kletnieks@...>, David Miller <davem@...>, <jeff@...>, <mchan@...>, <linux-kernel@...>, <netdev@...>
Date: Friday, September 21, 2007 - 3:33 pm

Firmware may come with a kernel. We have a "install modules", we can also=
=20

It is not possible to bring up things like FC or WiFi without firmware,=20
what special is in classic NICs?

Best regards,

=09=09=09=09Krzysztof Ol=EAdzki

To: Krzysztof Oledzki <olel@...>
Cc: <Valdis.Kletnieks@...>, David Miller <davem@...>, <jeff@...>, <mchan@...>, <linux-kernel@...>, <netdev@...>
Date: Friday, September 21, 2007 - 6:43 pm

Nothing.

It is just not (yet?) decreed from The Very Top that all and every
firmware image should be loaded using request_firmware().

Also people may want to gzip something else than firmware.
--
vda
-

To: Denys Vlasenko <vda.linux@...>
Cc: Krzysztof Oledzki <olel@...>, <Valdis.Kletnieks@...>, David Miller <davem@...>, <mchan@...>, <linux-kernel@...>, <netdev@...>
Date: Friday, September 21, 2007 - 6:57 pm

Special cases already fail when using distro-linked targets like "make
install."

Jeff

-

To: Denys Vlasenko <vda.linux@...>
Cc: David Miller <davem@...>, <jeff@...>, <mchan@...>, <linux-kernel@...>, <netdev@...>
Date: Friday, September 21, 2007 - 3:32 pm

OK, I can live with "considered and decided against". :)

To: Jeff Garzik <jeff@...>
Cc: Michael Chan <mchan@...>, David Miller <davem@...>, <linux-kernel@...>, <netdev@...>
Date: Friday, September 21, 2007 - 7:03 am

No, I won't. I accidentally attached both patches to first email,
you can find it there. Sorry.
--
vda
-

Previous thread: Git as a filesystem by Peter Stahlir on Friday, September 21, 2007 - 6:48 am. (8 messages)

Next thread: [PATCH] sb1250-mac: Driver model & phylib update by Maciej W. Rozycki on Friday, September 21, 2007 - 7:52 am. (9 messages)