Re: bnx2 dirver's firmware images

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Denys Vlasenko <vda.linux@...>
Cc: David Miller <davem@...>, <linux-kernel@...>, netdev <netdev@...>
Date: Wednesday, September 19, 2007 - 5:00 pm

On Wed, 2007-09-19 at 09:30 +0100, Denys Vlasenko wrote:
+       /* gzip header (1f,8b,08... 10 bytes total + possible asciz filename)
+        * is stripped, 32-bit unpacked size (LE) is prepended instead */
+       sz = *zbuf++;
+       sz = (sz << 8) + *zbuf++;
+       sz = (sz << 8) + *zbuf++;
+       sz = (sz << 8) + *zbuf++;

I don't have a problem with removing the gzip header.  It doesn't
contain very useful information other than a valid header for sanity
check.  But I don't think we need to arbitrarily add the unpacked size
in front of the gzipped data.  The driver knows the size (e.g. the size
of RAM on the chip) and should pass it to the call.  The driver should
also allocate the memory for the unpacked data instead of allocating the
memory inside the call and freeing it by the caller.  For example, the
driver may need to use pci_alloc_consistent() if the firmware is to be
DMA'ed to the chip.

Other than that, everything else looks fine.  Thanks.

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: bnx2 dirver's firmware images, Michael Chan, (Tue Sep 18, 2:45 pm)
Re: bnx2 dirver's firmware images, Denys Vlasenko, (Tue Sep 18, 1:55 pm)
Re: bnx2 dirver's firmware images, Michael Chan, (Tue Sep 18, 3:09 pm)
Re: bnx2 dirver's firmware images, David Miller, (Tue Sep 18, 2:23 pm)
Re: bnx2 dirver's firmware images, H. Peter Anvin, (Tue Sep 18, 2:41 pm)
Re: bnx2 dirver's firmware images, David Miller, (Tue Sep 18, 3:20 pm)
Re: bnx2 dirver's firmware images, H. Peter Anvin, (Tue Sep 18, 3:27 pm)
Re: bnx2 dirver's firmware images, David Miller, (Tue Sep 18, 4:08 pm)
Re: bnx2 dirver's firmware images, Sam Ravnborg, (Tue Sep 18, 4:35 pm)
Re: bnx2 dirver's firmware images, maximilian attems, (Wed Sep 19, 1:10 pm)
Re: bnx2 dirver's firmware images, H. Peter Anvin, (Wed Sep 19, 1:12 pm)
Re: bnx2 dirver's firmware images, maximilian attems, (Wed Sep 19, 1:18 pm)
Re: bnx2 dirver's firmware images, Sam Ravnborg, (Wed Sep 19, 1:37 pm)
Re: bnx2 dirver's firmware images, H. Peter Anvin, (Tue Sep 18, 4:40 pm)
Re: bnx2 dirver's firmware images, Michael Chan, (Tue Sep 18, 4:05 pm)
Re: bnx2 dirver's firmware images, maximilian attems, (Wed Sep 19, 12:33 pm)
Re: bnx2 dirver's firmware images, David Miller, (Wed Sep 19, 12:38 pm)
Re: bnx2 dirver's firmware images, maximilian attems, (Wed Sep 19, 12:51 pm)
Re: bnx2 dirver's firmware images, Denys Vlasenko, (Wed Sep 19, 4:30 am)
Re: bnx2 dirver's firmware images, Michael Chan, (Wed Sep 19, 5:00 pm)
Re: bnx2 dirver's firmware images, Denys Vlasenko, (Wed Sep 19, 4:29 pm)
Re: bnx2 dirver's firmware images, Michael Chan, (Wed Sep 19, 5:43 pm)
Re: bnx2 dirver's firmware images, Denys Vlasenko, (Thu Sep 20, 10:49 am)
Re: bnx2 dirver's firmware images, Michael Chan, (Thu Sep 20, 10:12 pm)
Re: bnx2 dirver's firmware images, David Miller, (Tue Sep 18, 3:21 pm)
Re: bnx2 dirver's firmware images, Bill Davidsen, (Wed Sep 19, 9:40 am)
Re: bnx2 dirver's firmware images, David Miller, (Wed Sep 19, 12:09 pm)
Re: bnx2 dirver's firmware images, Willy Tarreau, (Tue Sep 18, 5:30 pm)
Re: bnx2 dirver's firmware images, David Miller, (Tue Sep 18, 5:31 pm)
Re: bnx2 dirver's firmware images, Willy Tarreau, (Tue Sep 18, 5:37 pm)
Re: bnx2 dirver's firmware images, Michael Chan, (Tue Sep 18, 7:14 pm)