CCITT-CRC16 in kernel

From: linux-os (*** Johnson) (linux-os_at_analogic.com)
Date: 08/10/05

  • Next message: Bill Davidsen: "Re: [PATCH] i386 No-Idle-Hz aka Dynamic-Ticks 3"
    Date:	Wed, 10 Aug 2005 15:54:52 -0400
    To: "Linux kernel" <linux-kernel@vger.kernel.org>
    
    

    Hello CRC Wizards,

    I am trying to use ../linux-2.6.12/lib/crc_citt in a driver.
    Basically, it doesn't return anything that closely resembles
    the CCIT-16 CRC. I note that drivers that use it expect it
    to return 0xf0b8 if it performs the CRC of something that
    has the CRC appended (weird).

    Does anybody know what the CRC of a known string is supposed
    to be? I have documentation that states that the CCITT CRC-16
    of "123456789" is supposed to be 0xe5cc and "A" is supposed
    to be 0x9479. The kernel one doesn't do this. In fact, I
    haven't found anything on the net that returns the "correct"
    value regardless of how it's initialized or how it's mucked
    with after the CRC (well I could just set the CRC to 0 and
    add the correct number). Anyway, how do I use the crc_citt
    in the kernel? I've grepped through some drivers that use
    it and they all seem to check the result against some
    magic rather than performing the CRC of data, but not the
    CRC, then comparing it to the CRC. One should not have
    to use magic to verify a CRC, one should just perform
    a CRC on the data, but not the CRC, then compare the result
    with the CRC. Am I missing something here?

    Cheers,
    *** Johnson
    Penguin : Linux version 2.6.12 on an i686 machine (5537.79 BogoMips).
    Warning : 98.36% of all statistics are fiction.
    .
    I apologize for the following. I tried to kill it with the above dot :

    ****************************************************************
    The information transmitted in this message is confidential and may be privileged. Any review, retransmission, dissemination, or other use of this information by persons or entities other than the intended recipient is prohibited. If you are not the intended recipient, please notify Analogic Corporation immediately - by replying to this message or by sending an email to DeliveryErrors@analogic.com - and destroy all copies of this information, including any attachments, without reading or disclosing them.

    Thank you.
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Bill Davidsen: "Re: [PATCH] i386 No-Idle-Hz aka Dynamic-Ticks 3"
    Loading