This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [ECOS] Re: Bug in crc32 routine?


On Fri, Oct 18, 2002 at 06:13:15AM -0600, Gary Thomas wrote:
> On Thu, 2002-10-17 at 21:10, Jonathan Larmour wrote:
> > Gary Thomas wrote:
> > > On Thu, 2002-10-17 at 20:14, Jonathan Larmour wrote:
> > > 
> > >>Andrew Lunn wrote:
> > >>
> > >>>I checked around and found a few more CRC calculations. In summary
> > >>>
> > >>>1) zlib
> > >>>2) jffs2
> > >>>3) gdb stubs
> > >>>4) cygmon
> > >>>5) ks32c5000 net driver
> > >>>6) Redboot - already using cyg_crc32()
> > >>
> > >>[snip]
> > >>
> > >>Belated reply from me (what's new!), but just a few comments:
> > >>
> > >>First of all, we aren't the master for jffs2. If there's a problem with 
> > >>the crc32 calc for jffs2 we should tell <dwmw2@redhat.com>. But then I'm 
> > >>not convinced a mismatch with zlib counts as a problem. If you agree, then 
> > >>this is a nop :).
> > > 
> > > 
> > > I tried RedBoot, FIS & ZLIB functions, and JFFS2 (I ran the eCos test
> > > program) all with no problems.  Andrew has already committed this change
> > > and I think it's OK.
> > 
> > Oh sure, it's *self* consistent, but the original problem (I believe) 
> > Roland reported was inconsistency in comparison with what zlib generates.
> 
> Wouldn't that be proved by being able to decompress a 
> downloaded file (which was compressed elsewhere)?

That seems logical to me. I presume you gziped an image, uploaded it
and decompressed it using Redboot. If there was some inconsistency, it
should fail.

Going back to Rolands messages:

> I think in the crc23 routine in the crc package is a bug.  If I use
> under linux the crc32 routine of the zlib I get not the same result
> as the one of eCos.  
>
> I have seen, that in the Samsung KS32C5000 ethernet driver is a
> crc32 routin too and it differs from the one off the crc
> package. After changing this routine like the one off the ethernet
> driver, I get the same result right.  As an attachment I send the
> patch.

The changes i made, will have had no effect on zlib. Its still using
the same algorithm now as before. So, if it was broken before it
should still be broken now. 

Roland: Please can you test it again? Could you give us some more
details if you still find a problems. 

        Andrew


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]