Searched refs:checksum (Results 1 - 200 of 1051) sorted by relevance

123456

/linux-4.4.14/arch/cris/arch-v10/lib/
H A DMakefile5 lib-y = checksum.o checksumcopy.o string.o usercopy.o memset.o csumcpfruser.o
H A Dchecksum.S2 * A fast checksum routine using movem
13 ;; r12 - checksum
16 ;; we also do _NOT_ want to compute a checksum over more than the
31 ;; do a movem checksum
59 ;; fold the carry into the checksum, to avoid having to loop the carry
79 ;; fold 32-bit checksum into a 16-bit checksum, to avoid carries below.
86 lsrq 16,$r13 ; r13 = checksum >> 16
87 and.d $r9,$r12 ; checksum = checksum & 0xffff
88 add.d $r13,$r12 ; checksum += r13
95 ;; checksum the rest of the words
114 ;; copy and checksum the last byte
H A Dchecksumcopy.S2 * A fast checksum+copy routine using movem
17 ;; r13 - checksum
20 ;; we also do _NOT_ want to compute a checksum over more than the
35 ;; do a movem copy and checksum
65 ;; fold the carry into the checksum, to avoid having to loop the carry
85 ;; fold 32-bit checksum into a 16-bit checksum, to avoid carries below
89 lsrq 16,$r9 ; r0 = checksum >> 16
90 and.d 0xffff,$r13 ; checksum = checksum & 0xffff
91 add.d $r9,$r13 ; checksum += r0
98 ;; copy and checksum the rest of the words
120 ;; copy and checksum the last byte
H A Dcsumcpfruser.S50 ;; checksum for the readable bytes.
/linux-4.4.14/arch/cris/arch-v32/lib/
H A DMakefile5 lib-y = checksum.o checksumcopy.o string.o usercopy.o memset.o \
H A Dchecksum.S2 * A fast checksum routine using movem
14 ;; r12 - checksum
25 ;; do a movem checksum
61 lsrq 16,$r13 ; r13 = checksum >> 16
62 and.d $r9,$r12 ; checksum = checksum & 0xffff
67 add.d $r13,$r12 ; checksum += r13
69 ;; checksum the rest of the words
83 ;; copy and checksum the last byte
H A Dchecksumcopy.S2 * A fast checksum+copy routine using movem
18 ;; r13 - checksum
29 ;; do a movem copy and checksum
60 ;; fold 32-bit checksum into a 16-bit checksum, to avoid carries below
63 lsrq 16,$r9 ; r0 = checksum >> 16
64 and.d 0xffff,$r13 ; checksum = checksum & 0xffff
68 add.d $r9,$r13 ; checksum += r0
70 ;; copy and checksum the rest of the words
86 ;; copy and checksum the last byte
H A Dcsumcpfruser.S52 ;; checksum for the readable bytes.
/linux-4.4.14/arch/hexagon/lib/
H A DMakefile4 obj-y = checksum.o io.o memcpy.o memset.o
H A Dchecksum.c21 /* This was derived from arch/alpha/lib/checksum.c */
28 #include <net/checksum.h>
60 * computes the checksum of the TCP/UDP pseudo-header
61 * returns a 16-bit checksum, already complemented.
92 * Do a 64-bit checksum on an arbitrary memory area..
/linux-4.4.14/arch/m32r/lib/
H A DMakefile5 lib-y := checksum.o ashxdi3.o memset.o memcpy.o \
H A Dcsum_partial_copy.c23 #include <net/checksum.h>
41 * Copy from userspace and compute checksum. If we catch an exception
/linux-4.4.14/arch/alpha/lib/
H A Dcsum_partial_copy.c103 long len, unsigned long checksum, csum_partial_cfu_aligned()
112 checksum += carry; csum_partial_cfu_aligned()
114 checksum += word; csum_partial_cfu_aligned()
116 carry = checksum < word; csum_partial_cfu_aligned()
121 checksum += carry; csum_partial_cfu_aligned()
127 checksum += word; csum_partial_cfu_aligned()
129 carry = checksum < word; csum_partial_cfu_aligned()
131 checksum += carry; csum_partial_cfu_aligned()
134 return checksum; csum_partial_cfu_aligned()
145 long len, unsigned long checksum, csum_partial_cfu_dest_aligned()
163 checksum += carry; csum_partial_cfu_dest_aligned()
166 checksum += word; csum_partial_cfu_dest_aligned()
169 carry = checksum < word; csum_partial_cfu_dest_aligned()
172 checksum += carry; csum_partial_cfu_dest_aligned()
182 checksum += word; csum_partial_cfu_dest_aligned()
184 carry = checksum < word; csum_partial_cfu_dest_aligned()
186 checksum += carry; csum_partial_cfu_dest_aligned()
189 return checksum; csum_partial_cfu_dest_aligned()
199 long len, unsigned long checksum, csum_partial_cfu_src_aligned()
213 checksum += carry; csum_partial_cfu_src_aligned()
216 checksum += word; csum_partial_cfu_src_aligned()
218 carry = checksum < word; csum_partial_cfu_src_aligned()
223 checksum += carry; csum_partial_cfu_src_aligned()
227 checksum += word; csum_partial_cfu_src_aligned()
230 carry = checksum < word; csum_partial_cfu_src_aligned()
244 checksum += carry; csum_partial_cfu_src_aligned()
246 return checksum; csum_partial_cfu_src_aligned()
257 long len, unsigned long checksum, csum_partial_cfu_unaligned()
275 checksum += carry; csum_partial_cfu_unaligned()
282 checksum += word; csum_partial_cfu_unaligned()
284 carry = checksum < word; csum_partial_cfu_unaligned()
289 checksum += carry; csum_partial_cfu_unaligned()
300 checksum += word; csum_partial_cfu_unaligned()
302 carry = checksum < word; csum_partial_cfu_unaligned()
310 checksum += carry; csum_partial_cfu_unaligned()
321 checksum += word; csum_partial_cfu_unaligned()
323 carry = checksum < word; csum_partial_cfu_unaligned()
326 checksum += carry; csum_partial_cfu_unaligned()
329 return checksum; csum_partial_cfu_unaligned()
336 unsigned long checksum = (__force u32) sum; csum_partial_copy_from_user() local
348 checksum = csum_partial_cfu_aligned( csum_partial_copy_from_user()
351 len-8, checksum, errp); csum_partial_copy_from_user()
353 checksum = csum_partial_cfu_dest_aligned( csum_partial_copy_from_user()
356 soff, len-8, checksum, errp); csum_partial_copy_from_user()
361 checksum = csum_partial_cfu_src_aligned( csum_partial_copy_from_user()
364 doff, len-8, checksum, csum_partial_copy_from_user()
367 checksum = csum_partial_cfu_unaligned( csum_partial_copy_from_user()
370 soff, doff, len-8, checksum, csum_partial_copy_from_user()
373 checksum = from64to16 (checksum); csum_partial_copy_from_user()
375 return (__force __wsum)checksum; csum_partial_copy_from_user()
381 __wsum checksum; csum_partial_copy_nocheck() local
384 checksum = csum_partial_copy_from_user((__force const void __user *)src, csum_partial_copy_nocheck()
387 return checksum; csum_partial_copy_nocheck()
102 csum_partial_cfu_aligned(const unsigned long __user *src, unsigned long *dst, long len, unsigned long checksum, int *errp) csum_partial_cfu_aligned() argument
142 csum_partial_cfu_dest_aligned(const unsigned long __user *src, unsigned long *dst, unsigned long soff, long len, unsigned long checksum, int *errp) csum_partial_cfu_dest_aligned() argument
196 csum_partial_cfu_src_aligned(const unsigned long __user *src, unsigned long *dst, unsigned long doff, long len, unsigned long checksum, unsigned long partial_dest, int *errp) csum_partial_cfu_src_aligned() argument
254 csum_partial_cfu_unaligned(const unsigned long __user * src, unsigned long * dst, unsigned long soff, unsigned long doff, long len, unsigned long checksum, unsigned long partial_dest, int *errp) csum_partial_cfu_unaligned() argument
H A Dchecksum.c2 * arch/alpha/lib/checksum.c
4 * This file contains network checksum routines that are better done
41 * computes the checksum of the TCP/UDP pseudo-header
42 * returns a 16-bit checksum, already complemented.
75 * Do a 64-bit checksum on an arbitrary memory area..
145 * which always checksum on 4 octet boundaries.
153 * computes the checksum of a memory block at buff, length len,
H A DMakefile20 checksum.o \
/linux-4.4.14/arch/parisc/lib/
H A DMakefile5 lib-y := lusercopy.o bitops.o checksum.o io.o memset.o fixup.o memcpy.o \
H A Dchecksum.c20 #include <net/checksum.h>
100 * computes a partial checksum, e.g. for TCP/UDP fragments
132 * Copy from userspace and compute checksum. If we catch an exception
/linux-4.4.14/arch/unicore32/include/asm/
H A Dchecksum.h2 * linux/arch/unicore32/include/asm/checksum.h
12 * IP checksum routines
18 * computes the checksum of the TCP/UDP pseudo-header
19 * returns a 16-bit checksum, already complemented
39 #include <asm-generic/checksum.h>
/linux-4.4.14/arch/blackfin/include/asm/
H A Dchecksum.h12 * computes the checksum of the TCP/UDP pseudo-header
13 * returns a 16-bit checksum, already complemented
42 #include <asm-generic/checksum.h>
/linux-4.4.14/arch/c6x/lib/
H A DMakefile7 lib-y += checksum.o csum_64plus.o memcpy_64plus.o strasgi_64plus.o
H A Dchecksum.c8 #include <net/checksum.h>
H A Dcsum_64plus.S161 ; unsigned int checksum = 0;
172 ; checksum += *tosum++;
175 ; checksum += *(unsigned char*) tosum;
177 ; while(checksum >> 16)
178 ; checksum = (checksum & 0xffff) + (checksum >> 16);
180 ; return ~checksum;
185 ; return checksum in A4
289 ; return checksum in A4
411 ; return checksum in A4
/linux-4.4.14/arch/mn10300/lib/
H A DMakefile5 lib-y = delay.o usercopy.o checksum.o bitops.o memcpy.o memmove.o memset.o
H A Ddo_csum.S1 /* Optimised simple memory checksum
57 # we want to checksum as much as we can in chunks of 32 bytes
141 # compress the checksum down to 16 bits
/linux-4.4.14/arch/frv/lib/
H A DMakefile7 checksum.o memcpy.o memset.o atomic-ops.o atomic64-ops.o \
/linux-4.4.14/include/uapi/linux/
H A Dnvram.h7 #define NVRAM_INIT _IO('p', 0x40) /* initialize NVRAM and set checksum */
8 #define NVRAM_SETCKS _IO('p', 0x41) /* recalculate checksum */
H A Dromfs_fs.h28 __be32 checksum; member in struct:romfs_super_block
38 __be32 checksum; member in struct:romfs_inode
H A Dudp.h32 #define UDP_NO_CHECK6_TX 101 /* Disable sending checksum for UDP6X */
33 #define UDP_NO_CHECK6_RX 102 /* Disable accpeting checksum for UDP6 */
H A Dnetfilter_bridge.h13 /* After promisc drops, checksum checks. */
H A Dcycx_cfm.h80 * @checksum - info + image
89 unsigned short checksum; member in struct:cycx_firmware
H A Dbpf.h163 * l3_csum_replace(skb, offset, from, to, flags) - recompute IP checksum
165 * @offset: offset within packet where IP checksum is located
175 * l4_csum_replace(skb, offset, from, to, flags) - recompute TCP/UDP checksum
177 * @offset: offset within packet where TCP/UDP checksum is located
H A Defs_fs_sb.h45 __be32 fs_checksum; /* checksum of volume portion of fs */
H A Dn_r3964.h36 * calculation of checksum characters
H A Dnetfilter_decnet.h29 /* After promisc drops, checksum checks. */
H A Dnetfilter_ipv4.h44 /* After promisc drops, checksum checks. */
H A Dnetfilter_ipv6.h48 /* After promisc drops, checksum checks. */
/linux-4.4.14/arch/x86/include/asm/
H A Dchecksum_64.h7 * with some code from asm-x86/checksum.h
15 * csum_fold - Fold and invert a 32bit checksum.
18 * Fold a 32bit running checksum to 16bit and invert it. This is usually
19 * the last step before putting a checksum into a packet.
34 * which always checksum on 4 octet boundaries.
41 * ip_fast_csum - Compute the IPv4 header checksum efficiently.
76 * csum_tcpup_nofold - Compute an IPv4 pseudo header checksum.
83 * Returns the pseudo header checksum the input data. Result is
102 * csum_tcpup_magic - Compute an IPv4 pseudo header checksum.
109 * Returns the 16bit pseudo header checksum the input data already
120 * csum_partial - Compute an internet checksum.
125 * Returns the 32bit unfolded internet checksum of the buffer.
153 * ip_compute_csum - Compute an 16bit IP checksum.
157 * Returns the 16bit folded/inverted checksum of the passed buffer.
163 * csum_ipv6_magic - Compute checksum of an IPv6 pseudo header.
170 * Computes an IPv6 pseudo header checksum. This sum is added the checksum
172 * Returns the unfolded 32bit checksum.
H A Dchecksum_32.h9 * computes the checksum of a memory block at buff, length len,
65 * which always checksum on 4 octet boundaries.
101 * Fold a partial checksum
130 * computes the checksum of the TCP/UDP pseudo-header
131 * returns a 16-bit checksum, already complemented
177 * Copy and checksum to user
199 return (__force __wsum)-1; /* invalid checksum */ csum_and_copy_to_user()
H A Dmpspec_def.h26 unsigned char checksum; /* Checksum (makes sum 0) */ member in struct:mpf_intel
40 char checksum; member in struct:mpc_table
152 char checksum; member in struct:mpc_oemtable
/linux-4.4.14/arch/microblaze/include/asm/
H A Dchecksum.h14 * computes the checksum of the TCP/UDP pseudo-header
15 * returns a 16-bit checksum, already complemented
37 #include <asm-generic/checksum.h>
/linux-4.4.14/arch/x86/um/
H A Dksyms.c3 #include <asm/checksum.h>
/linux-4.4.14/arch/m68k/lib/
H A DMakefile14 lib-y += checksum.o
/linux-4.4.14/fs/xfs/libxfs/
H A Dxfs_cksum.h7 * Calculate the intermediate checksum for a buffer that has the CRC field
17 /* Calculate CRC up to the checksum. */ xfs_start_cksum()
20 /* Skip checksum field */ xfs_start_cksum()
29 * Convert the intermediate checksum to the final ondisk format.
42 * Helper to generate the checksum for a buffer.
53 * Helper to verify the checksum for a buffer.
/linux-4.4.14/arch/s390/include/asm/
H A Dchecksum.h2 * S390 fast network checksum routines
17 * computes the checksum of a memory block at buff, length len,
35 "0: cksm %0,%1\n" /* do checksum on longs */ csum_partial()
47 * Copy from userspace and compute checksum.
68 * Fold a partial checksum without adding pseudo headers
81 * which always checksum on 4 octet boundaries.
90 * computes the checksum of the TCP/UDP pseudo-header
91 * returns a 32-bit checksum
116 * computes the checksum of the TCP/UDP pseudo-header
117 * returns a 16-bit checksum, already complemented
/linux-4.4.14/include/linux/platform_data/
H A Dsht15.h25 * @checksum: flag to indicate the checksum should be validated.
33 bool checksum; member in struct:sht15_platform_data
/linux-4.4.14/arch/cris/include/asm/
H A Dchecksum.h6 #include <arch/checksum.h>
9 * computes the checksum of a memory block at buff, length len,
34 * Fold a partial checksum into a word
51 * which always checksum on 4 octet boundaries.
61 * computes the checksum of the TCP/UDP pseudo-header
62 * returns a 16-bit checksum, already complemented
H A Daxisflashmap.h19 __u32 checksum; /* simple longword sum, over entries + end marker */ member in struct:partitiontable_head
26 __u32 checksum; /* simple longword sum */ member in struct:partitiontable_entry
/linux-4.4.14/arch/ia64/lib/
H A Dchecksum.c2 * Network checksum routines
7 * Most of the code coming from arch/alpha/lib/checksum.c
9 * This file contains network checksum routines that are better done
33 * computes the checksum of the TCP/UDP pseudo-header
34 * returns a 16-bit checksum, already complemented.
68 * computes the checksum of a memory block at buff, length len,
H A Ddo_csum.S5 * Return: a 64bit quantity containing the 16bit Internet checksum
8 * in0: address of buffer to checksum (char *)
15 * Data locality study on the checksum buffer.
31 // we can checksum 16 bytes/loop. Before reaching that point we must
35 // before entering the core loop, if any. The checksum is a sum so it
46 // The end of the function deals with folding the checksum from 64bits
50 // pipeline for the accumulation of the checksum in resultx[] (x=1,2).
58 // | | LOAD_LATENCY : current value to add to checksum
60 // | | LOAD_LATENCY+1 : previous value added to checksum
67 // | | LOAD_LATENCY-1 : new checksum
69 // | | LOAD_LATENCY : previous value of checksum
71 // | | LOAD_LATENCY+1 : final checksum when out of the loop
76 // calculating the Internet checksum.
84 // where we know we have at least 20bytes worth of data to checksum.
88 // on the data that buffer points to (partly because the checksum is often preceded by
204 // Fall through to calculate the checksum, feeding result1[0] as
207 // Calculate the checksum loading two 8-byte words per loop.
H A Dip_fast_csum.S3 * Used for calculating IP header checksum
5 * Return: 16bit checksum, complemented
8 * in0: address of buffer to checksum (char *)
H A DMakefile9 checksum.o clear_page.o csum_partial_copy.o \
/linux-4.4.14/arch/metag/kernel/
H A Dmetag_ksyms.c4 #include <asm/checksum.h>
20 /* Network checksum functions */
/linux-4.4.14/arch/arm/include/asm/
H A Dchecksum.h2 * arch/arm/include/asm/checksum.h
4 * IP checksum routines
6 * Copyright (C) Original authors of ../asm-i386/checksum.h
15 * computes the checksum of a memory block at buff, length len,
43 * Fold a partial checksum without adding pseudo headers
57 * which always checksum on 4 octet boundaries.
120 * computes the checksum of the TCP/UDP pseudo-header
121 * returns a 16-bit checksum, already complemented
/linux-4.4.14/include/uapi/linux/netfilter/
H A Dxt_CHECKSUM.h14 #define XT_CHECKSUM_OP_FILL 0x01 /* fill in checksum in IP header */
H A Dnfnetlink_queue.h114 /* csum not validated (incoming device doesn't support hw checksum, etc.) */
/linux-4.4.14/arch/powerpc/lib/
H A Dppc_ksyms.c4 #include <net/checksum.h>
H A Dchecksum_wrappers_64.c23 #include <asm/checksum.h>
83 csum = -1; /* invalid checksum */ csum_and_copy_to_user()
95 csum = -1; /* invalid checksum */ csum_and_copy_to_user()
/linux-4.4.14/arch/nios2/include/asm/
H A Dchecksum.h13 /* Take these from lib/checksum.c */
26 * Fold a partial checksum
43 * computes the checksum of the TCP/UDP pseudo-header
44 * returns a 16-bit checksum, already complemented
/linux-4.4.14/arch/unicore32/kernel/
H A Dpm.c30 unsigned long sleep_save_checksum = 0, checksum = 0; puv3_pm_enter() local
36 /* before sleeping, calculate and save a checksum */ puv3_pm_enter()
51 /* after sleeping, validate the checksum */ puv3_pm_enter()
53 checksum += sleep_save[i]; puv3_pm_enter()
56 if (checksum != sleep_save_checksum) { puv3_pm_enter()
H A Dksyms.c22 #include <asm/checksum.h>
/linux-4.4.14/arch/alpha/include/asm/
H A Dchecksum.h8 * which always checksum on 4 octet boundaries.
13 * computes the checksum of the TCP/UDP pseudo-header
14 * returns a 16-bit checksum, already complemented
26 * computes the checksum of a memory block at buff, length len,
59 * Fold a partial checksum without adding pseudo headers
H A Dgct.h29 u32 checksum; member in struct:__gct6_node
/linux-4.4.14/include/linux/
H A Dzutil.h51 /* checksum functions */
65 Update a running Adler-32 checksum with the bytes buf[0..len-1] and
66 return the updated checksum. If buf is NULL, this function returns
67 the required initial value for the checksum.
68 An Adler-32 checksum is almost as reliable as a CRC32 but can be computed
H A Dadfs_fs.h7 * Calculate the boot block checksum on an ADFS drive. Note that this will
H A Damigaffs.h52 __be32 checksum; member in struct:affs_root_head
78 __be32 checksum; member in struct:affs_head
106 __be32 checksum; member in struct:slink_front
117 __be32 checksum; member in struct:affs_data_head
H A Dipmi-fru.h34 uint8_t checksum; /* sum modulo 256 must be 0 */ member in struct:fru_common_header
65 * checksum (sum of all stuff module 256 must be zero)
H A Dskbuff.h31 #include <net/checksum.h>
46 * Device failed to checksum this packet e.g. due to lack of capabilities.
47 * The packet contains full (though not verified) checksum in packet but
52 * The hardware you're dealing with doesn't calculate the full checksum
63 * zero UDP checksum for either IPv4 or IPv6, the networking stack
65 * GRE: only if the checksum is present in the header.
72 * GRE (checksum flag is set), and TCP-- skb->csum_level would be set to
73 * two. If the device were only able to verify the UDP checksum and not
74 * GRE, either because it doesn't support GRE checksum of because GRE
75 * checksum is bad, skb->csum_level would be set to zero (TCP checksum is
80 * This is the most generic way. The device supplied checksum of the _whole_
89 * A checksum is set up to be offloaded to a device as described in the
93 * checksum offload. For the purposes of checksum verification, the checksum
96 * packet that are after the checksum being offloaded are not considered to
103 * The skb was already checksummed by the protocol, or a checksum is not
108 * The device is required to checksum the packet as seen by hard_start_xmit()
109 * from skb->csum_start up to the end, and to record/write the checksum at
115 * NETIF_F_HW_CSUM - It's a clever device, it's able to checksum everything.
116 * NETIF_F_IP_CSUM - Device is dumb, it's able to checksum only TCP/UDP over
125 * implementations that do not want the NIC to perform the checksum
298 * If we need to compute a TX checksum, we'll need to copy
299 * all frags to avoid possible bad checksum
494 * @csum_offset: Offset from csum_start where checksum should be stored
498 * @ip_summed: Driver fed us an IP checksum
2729 * skb_postpull_rcsum - update checksum for received skb after pull
2735 * update the CHECKSUM_COMPLETE checksum, or set ip_summed to
2769 * pskb_trim_rcsum - trim received skb and update checksum
2774 * checksum of received packets are still valid after the operation.
3111 * skb_checksum_complete - Calculate checksum of an entire packet
3114 * This function calculates the checksum over the entire packet plus
3116 * checksum of a pseudo header as used by TCP/UDP. It returns the
3117 * checksum.
3120 * this function can be used to verify that checksum on received
3122 * checksum is correct. In particular, this function will return zero
3124 * hardware has already verified the correctness of the checksum.
3155 /* Mark current checksum as bad (typically called from GRO __skb_mark_checksum_bad()
3157 * this must be the first checksum encountered in the packet. __skb_mark_checksum_bad()
3159 * checksum after the last one validated. For UDP, a zero __skb_mark_checksum_bad()
3160 * checksum can not be marked as bad. __skb_mark_checksum_bad()
3168 /* Check if we need to perform checksum complete validation.
3170 * Returns true if checksum complete is needed, false otherwise
3171 * (either checksum is unnecessary or zero checksum is allowed).
3186 /* For small packets <= CHECKSUM_BREAK peform checksum complete directly
3191 /* Unset checksum-complete
3193 * Unset checksum complete can be done when packet is being modified
3194 * (uncompressed for instance) and checksum-complete value is
3203 /* Validate (init) checksum based on checksum complete.
3206 * 0: checksum is validated or try to in skb_checksum_complete. In the latter
3208 * checksum is stored in skb->csum for use in __skb_checksum_complete
3209 * non-zero: value of invalid checksum
3244 /* Perform checksum validate (init). Note that this is a macro since we only
3246 * First we try to validate without any computation (checksum unnecessary) and
3247 * then calculate based on checksum complete calling the function to compute
3251 * 0: checksum is validated or try to in skb_checksum_complete
3252 * non-zero: value of invalid checksum
3309 /* Update skbuf and packet to reflect the remote checksum offload operation.
3311 * ip_summed is CHECKSUM_COMPLETE. If we need create checksum complete
3515 /* Compute the checksum for a gso segment. First compute the checksum value
3517 * then add in skb->csum (checksum from csum_start to end of packet).
3518 * skb->csum and csum_start are then updated to reflect the checksum of the
3519 * resultant packet starting from the transport header-- the resultant checksum
3520 * is in the res argument (i.e. normally zero or ~ of checksum of a pseudo
H A Defs_vh.h38 __be32 vh_csum; /* volume header checksum */
/linux-4.4.14/include/asm-generic/
H A Dchecksum.h5 * computes the checksum of a memory block at buff, length len,
44 * which always checksum on 4 octet boundaries.
51 * Fold a partial checksum
64 * computes the checksum of the TCP/UDP pseudo-header
65 * returns a 16-bit checksum, already complemented
/linux-4.4.14/arch/metag/include/asm/
H A Dchecksum.h5 * computes the checksum of a memory block at buff, length len,
41 * Fold a partial checksum
53 * which always checksum on 4 octet boundaries.
58 * computes the checksum of the TCP/UDP pseudo-header
59 * returns a 16-bit checksum, already complemented
/linux-4.4.14/arch/ia64/include/asm/
H A Dchecksum.h11 * which always checksum on 4 octet boundaries.
16 * Computes the checksum of the TCP/UDP pseudo-header returns a 16-bit
17 * checksum, already complemented
30 * Computes the checksum of a memory block at buff, length len,
63 * Fold a partial checksum without adding pseudo headers.
/linux-4.4.14/arch/arm/mach-pxa/
H A Dpm.c26 unsigned long sleep_save_checksum = 0, checksum = 0; pxa_pm_enter() local
38 /* before sleeping, calculate and save a checksum */ pxa_pm_enter()
47 /* after sleeping, validate the checksum */ pxa_pm_enter()
49 checksum += sleep_save[i]; pxa_pm_enter()
52 if (checksum != sleep_save_checksum) { pxa_pm_enter()
/linux-4.4.14/drivers/platform/chrome/
H A Dcros_ec_lpc.c99 /* Read response and process checksum */ cros_ec_pkt_xfer_lpc()
108 "bad packet checksum %02x\n", cros_ec_pkt_xfer_lpc()
109 response.checksum); cros_ec_pkt_xfer_lpc()
141 /* Initialize checksum */ cros_ec_cmd_xfer_lpc()
145 /* Copy data and update checksum */ cros_ec_cmd_xfer_lpc()
151 /* Finalize checksum and write args */ cros_ec_cmd_xfer_lpc()
152 args.checksum = csum & 0xFF; cros_ec_cmd_xfer_lpc()
156 outb(args.checksum, EC_LPC_ADDR_HOST_ARGS + 3); cros_ec_cmd_xfer_lpc()
177 args.checksum = inb(EC_LPC_ADDR_HOST_ARGS + 3); cros_ec_cmd_xfer_lpc()
187 /* Start calculating response checksum */ cros_ec_cmd_xfer_lpc()
191 /* Read response and update checksum */ cros_ec_cmd_xfer_lpc()
197 /* Verify checksum */ cros_ec_cmd_xfer_lpc()
198 if (args.checksum != (csum & 0xFF)) { cros_ec_cmd_xfer_lpc()
200 "bad packet checksum, expected %02x, got %02x\n", cros_ec_cmd_xfer_lpc()
201 args.checksum, csum & 0xFF); cros_ec_cmd_xfer_lpc()
/linux-4.4.14/arch/x86/lib/
H A Dcsum-wrappers_64.c5 * Wrappers of assembly checksum functions for x86-64.
7 #include <asm/checksum.h>
12 * csum_partial_copy_from_user - Copy and checksum from user space.
19 * Returns an 32bit unfolded checksum of the buffer.
35 * checksum which is defined as an 16bit accumulator. The csum_partial_copy_from_user()
73 * csum_partial_copy_to_user - Copy and checksum to user space.
80 * Returns an 32bit unfolded checksum of the buffer.
121 * csum_partial_copy_nocheck - Copy and checksum.
127 * Returns an 32bit unfolded checksum of the buffer.
H A Dcsum-partial_64.c4 * This file contains network checksum routines that are better done
10 #include <asm/checksum.h>
23 * Do a 64-bit checksum on an arbitrary memory area.
24 * Returns a 32bit checksum.
122 * computes the checksum of a memory block at buff, length len,
/linux-4.4.14/arch/x86/um/asm/
H A Dchecksum.h9 * computes the checksum of a memory block at buff, length len,
59 * csum_fold - Fold and invert a 32bit checksum.
62 * Fold a 32bit running checksum to 16bit and invert it. This is usually
63 * the last step before putting a checksum into a packet.
79 * csum_tcpup_nofold - Compute an IPv4 pseudo header checksum.
86 * Returns the pseudo header checksum the input data. Result is
103 * computes the checksum of the TCP/UDP pseudo-header
104 * returns a 16-bit checksum, already complemented
115 * ip_fast_csum - Compute the IPv4 header checksum efficiently.
H A Dchecksum_32.h39 * Copy and checksum to user
58 return (__force __wsum)-1; /* invalid checksum */ csum_and_copy_to_user()
/linux-4.4.14/drivers/nfc/s3fwrn5/
H A Dnci.c96 u32 checksum; s3fwrn5_nci_rf_configure() local
104 /* Compute rfreg checksum */ s3fwrn5_nci_rf_configure()
106 checksum = 0; s3fwrn5_nci_rf_configure()
108 checksum += *((u32 *)(fw->data+i)); s3fwrn5_nci_rf_configure()
151 stop_rfreg.checksum = checksum & 0xffff; s3fwrn5_nci_rf_configure()
H A Dnci.h65 __u16 checksum; member in struct:nci_prop_stop_rfreg_cmd
/linux-4.4.14/include/net/
H A Dudplite.h40 /* In UDPv4 a zero checksum means that the transmitter generated no udplite_checksum_init()
41 * checksum. UDP-Lite (like IPv6) mandates checksums, hence packets udplite_checksum_init()
42 * with a zero checksum field are illegal. */ udplite_checksum_init()
44 net_dbg_ratelimited("UDPLite: zeroed checksum field\n"); udplite_checksum_init()
70 /* Slow-path computation of checksum. Socket is locked. */ udplite_csum_outgoing()
113 /* Fast-path computation of checksum. Socket may not be locked. */ udplite_csum()
H A Dchecksum.h26 #include <asm/checksum.h>
56 return (__force __wsum)-1; /* invalid checksum */ csum_and_copy_to_user()
164 /* Subtract out checksum up to start */ remcsum_adjust()
167 /* Set derived checksum in packet */ remcsum_adjust()
H A Dip6_checksum.h22 * Ralf Baechle : generic ipv6 checksum
32 #include <asm/checksum.h>
H A Dtransp_v6.h4 #include <net/checksum.h>
/linux-4.4.14/arch/arm/lib/
H A Dcsumpartial.S17 * Params : r0 = buffer, r1 = len, r2 = checksum
18 * Returns : r0 = new checksum
72 adcnes sum, sum, td0, put_byte_0 @ update checksum
77 movne r0, r0, ror #8 @ rotate checksum by 8 bits
83 adcnes sum, sum, td0, put_byte_1 @ update checksum
99 adcnes sum, sum, td0 @ update checksum
H A Dcsumpartialcopy.S16 * Params : r0 = src, r1 = dst, r2 = len, r3 = checksum
17 * Returns : r0 = new checksum
H A Dcsumpartialcopyuser.S71 * Returns : r0 = checksum, [[sp, #0], #0] = 0 or -EFAULT
81 * We don't return the checksum for the data present in the buffer. To do
/linux-4.4.14/net/ipv6/
H A Dip6_checksum.c4 #include <asm/checksum.h>
78 /* To support RFC 6936 (allow zero checksum in UDP/IPV6 for tunnels) udp6_csum_init()
79 * we accept a checksum of zero here. When we find the socket udp6_csum_init()
80 * for the UDP packet we'll check if that socket allows zero checksum udp6_csum_init()
88 /* Function to set UDP checksum for an IPv6 UDP packet. This is intended
89 * for the simple case like when setting the checksum for a UDP tunnel.
H A Dila.c8 #include <net/checksum.h>
51 /* First update checksum */ update_ipv6_locator()
162 /* Precompute checksum difference for translation since we ila_build_state()
H A Dudp_offload.c73 /* Do software UFO. Complete and fill in the UDP checksum as HW cannot udp6_ufo_fragment()
74 * do checksum of UDP packets sent as multiple IP fragments. udp6_ufo_fragment()
137 /* Don't bother verifying checksum if we're going to flush anyway. */ udp6_gro_receive()
/linux-4.4.14/fs/udf/
H A Dmisc.c76 /* check checksum/crc */ udf_add_extendedattr()
135 /* rewrite CRC + checksum of eahd */ udf_add_extendedattr()
164 /* check checksum/crc */ udf_get_extendedattr()
206 u8 checksum; udf_read_tagged() local
229 /* Verify the tag checksum */ udf_read_tagged()
230 checksum = udf_tag_checksum(tag_p); udf_read_tagged()
231 if (checksum != tag_p->tagChecksum) { udf_read_tagged()
232 udf_err(sb, "tag checksum failed, block %u: 0x%02x != 0x%02x\n", udf_read_tagged()
233 block, checksum, tag_p->tagChecksum); udf_read_tagged()
292 u8 checksum = 0; udf_tag_checksum() local
295 if (i != 4) /* position of checksum */ udf_tag_checksum()
296 checksum += data[i]; udf_tag_checksum()
297 return checksum; udf_tag_checksum()
/linux-4.4.14/arch/xtensa/include/asm/
H A Dchecksum.h2 * include/asm-xtensa/checksum.h
19 * computes the checksum of a memory block at buff, length len,
66 * Fold a partial checksum
88 * which always checksum on 4 octet boundaries.
156 * computes the checksum of the TCP/UDP pseudo-header
157 * returns a 16-bit checksum, already complemented
241 * Copy and checksum to user
254 return (__force __wsum)-1; /* invalid checksum */ csum_and_copy_to_user()
/linux-4.4.14/block/partitions/
H A Datari.h33 u16 checksum; /* checksum for bootable disks */ member in struct:rootsector
H A Damiga.c62 pr_err("Trashed word at 0xd0 in block %d ignored in checksum calculation\n", amiga_partition()
67 pr_err("Dev %s: RDB in block %d has bad checksum\n", amiga_partition()
H A Dsun.c56 __be16 csum; /* Label xor'd checksum */ sun_partition()
75 /* Look at the checksum */ sun_partition()
H A Dsgi.c26 __be32 csum; /* Disk label checksum */
/linux-4.4.14/arch/powerpc/include/asm/
H A Dchecksum.h14 * which always checksum on 4 octet boundaries. ihl is the number
18 #include <asm-generic/checksum.h>
23 * computes the checksum of a memory block at buff, length len,
37 * Computes the checksum of a memory block at src, length len,
71 * turns a 32-bit partial checksum (e.g. from csum_partial) into a
72 * 1's complement 16-bit checksum.
122 * computes the checksum of the TCP/UDP pseudo-header
123 * returns a 16-bit checksum, already complemented
/linux-4.4.14/arch/sparc/include/asm/
H A Dchecksum_64.h4 /* checksum.h: IP/UDP/TCP checksum routines on the V9.
13 * Alpha checksum c-code
21 /* computes the checksum of a memory block at buff, length len,
59 * Copy and checksum to user
82 /* Fold a partial checksum without adding pseudo headers. */ csum_fold()
115 * computes the checksum of the TCP/UDP pseudo-header
116 * returns a 16-bit checksum, already complemented
H A Dchecksum_32.h4 /* checksum.h: IP/UDP/TCP checksum routines on the Sparc.
13 * Alpha checksum c-code
21 /* computes the checksum of a memory block at buff, length len,
157 /* Fold a partial checksum without adding pseudo headers. */ csum_fold()
189 * computes the checksum of the TCP/UDP pseudo-header
190 * returns a 16-bit checksum, already complemented
/linux-4.4.14/arch/avr32/lib/
H A Dcsum_partial.S18 /* checksum complete words, aligned or not */
31 /* checksum any remaining bytes at the end */
/linux-4.4.14/arch/tile/lib/
H A DMakefile5 lib-y = cacheflush.o checksum.o cpumask.o delay.o uaccess.o \
H A Dchecksum.c13 * Support code for the main lib/checksum.c.
16 #include <net/checksum.h>
/linux-4.4.14/arch/cris/include/arch-v32/arch/
H A Dchecksum.h9 * checksum. Which means it would be necessary to split all those into
/linux-4.4.14/arch/sh/lib/
H A DMakefile6 checksum.o strlen.o div64.o div64-generic.o
/linux-4.4.14/arch/arc/include/asm/
H A Dchecksum.h23 * Fold a partial checksum
38 * which always checksum on 4 octet boundaries.
99 #include <asm-generic/checksum.h>
/linux-4.4.14/arch/hexagon/include/asm/
H A Dchecksum.h37 * computes the checksum of the TCP/UDP pseudo-header
38 * returns a 16-bit checksum, already complemented
48 #include <asm-generic/checksum.h>
/linux-4.4.14/arch/s390/kernel/
H A Dos_info.c14 #include <asm/checksum.h>
24 * Compute checksum over OS info structure
33 * Add crashkernel info to OS info and update checksum
43 * Add OS info entry and update checksum
98 msg = "checksum failed"; os_info_old_alloc()
/linux-4.4.14/arch/m68k/include/asm/
H A Dchecksum.h7 #include <asm-generic/checksum.h>
11 * computes the checksum of a memory block at buff, length len,
43 * which always checksum on 4 octet boundaries.
97 * computes the checksum of the TCP/UDP pseudo-header
98 * returns a 16-bit checksum, already complemented
/linux-4.4.14/arch/avr32/include/asm/
H A Dchecksum.h12 * computes the checksum of a memory block at buff, length len,
60 * which always checksum on 4 octet boundaries.
95 * Fold a partial checksum
131 * computes the checksum of the TCP/UDP pseudo-header
132 * returns a 16-bit checksum, already complemented
/linux-4.4.14/drivers/acpi/acpica/
H A Dtbprint.c182 * exception on bad checksum.
188 u8 checksum; acpi_tb_verify_checksum() local
192 * They are the odd tables, have no standard ACPI header and no checksum acpi_tb_verify_checksum()
200 /* Compute the checksum on the table */ acpi_tb_verify_checksum()
202 checksum = acpi_tb_checksum(ACPI_CAST_PTR(u8, table), length); acpi_tb_verify_checksum()
206 if (checksum) { acpi_tb_verify_checksum()
208 "Incorrect checksum in table [%4.4s] - 0x%2.2X, " acpi_tb_verify_checksum()
210 table->signature, table->checksum, acpi_tb_verify_checksum()
211 (u8)(table->checksum - checksum))); acpi_tb_verify_checksum()
230 * DESCRIPTION: Calculates circular checksum of memory region.
H A Dtbxfroot.c97 * The signature and checksum must both be correct acpi_tb_validate_rsdp()
100 * RSDP has a valid checksum, all others have an invalid checksum. acpi_tb_validate_rsdp()
109 /* Check the standard checksum */ acpi_tb_validate_rsdp()
115 /* Check extended checksum if table version >= 2 */ acpi_tb_validate_rsdp()
274 /* The RSDP signature and checksum must both be correct */ acpi_tb_scan_memory_for_rsdp()
281 /* Sig and checksum valid, we have found a real RSDP */ acpi_tb_scan_memory_for_rsdp()
289 /* No sig match or bad checksum, keep searching */ acpi_tb_scan_memory_for_rsdp()
H A Dtbutils.c117 /* Compare original length and checksum to current values */ acpi_tb_check_dsdt_header()
120 acpi_gbl_original_dsdt_header.checksum != acpi_gbl_DSDT->checksum) { acpi_tb_check_dsdt_header()
134 acpi_gbl_original_dsdt_header.checksum = acpi_tb_check_dsdt_header()
135 acpi_gbl_DSDT->checksum; acpi_tb_check_dsdt_header()
334 /* Validate the root table checksum */ acpi_tb_parse_root_table()
/linux-4.4.14/arch/score/include/asm/
H A Dchecksum.h8 * computes the checksum of a memory block at buff, length len,
31 * Copy and checksum to user
41 return (__force __wsum) -1; /* invalid checksum */ csum_and_copy_to_user()
49 * Fold a partial checksum without adding pseudo headers
78 * which always checksum on 4 octet boundaries.
160 * computes the checksum of the TCP/UDP pseudo-header
161 * returns a 16-bit checksum, already complemented
/linux-4.4.14/arch/sh/include/asm/
H A Dchecksum_32.h15 * computes the checksum of a memory block at buff, length len,
63 * Fold a partial checksum
84 * which always checksum on 4 octet boundaries.
141 * computes the checksum of the TCP/UDP pseudo-header
142 * returns a 16-bit checksum, already complemented
198 * Copy and checksum to user
213 return (__force __wsum)-1; /* invalid checksum */ csum_and_copy_to_user()
/linux-4.4.14/arch/m32r/include/asm/
H A Dchecksum.h6 * include/asm-m32r/checksum.h
8 * IP/TCP/UDP checksum routines
23 * computes the checksum of a memory block at buff, length len,
54 * Fold a partial checksum
77 * which always checksum on 4 octet boundaries.
144 * computes the checksum of the TCP/UDP pseudo-header
145 * returns a 16-bit checksum, already complemented
/linux-4.4.14/drivers/net/wireless/ath/ath9k/
H A Dar9003_mac.c30 int checksum = 0; ar9003_set_txdesc() local
41 checksum += val; ar9003_set_txdesc()
44 checksum += i->link; ar9003_set_txdesc()
47 checksum += i->buf_addr[0]; ar9003_set_txdesc()
49 checksum += i->buf_addr[1]; ar9003_set_txdesc()
51 checksum += i->buf_addr[2]; ar9003_set_txdesc()
53 checksum += i->buf_addr[3]; ar9003_set_txdesc()
56 checksum += (val = (i->buf_len[0] << AR_BufLen_S) & AR_BufLen); ar9003_set_txdesc()
58 checksum += (val = (i->buf_len[1] << AR_BufLen_S) & AR_BufLen); ar9003_set_txdesc()
60 checksum += (val = (i->buf_len[2] << AR_BufLen_S) & AR_BufLen); ar9003_set_txdesc()
62 checksum += (val = (i->buf_len[3] << AR_BufLen_S) & AR_BufLen); ar9003_set_txdesc()
65 checksum = (u16) (((checksum & 0xffff) + (checksum >> 16)) & 0xffff); ar9003_set_txdesc()
66 ACCESS_ONCE(ads->ctl10) = checksum; ar9003_set_txdesc()
162 int checksum; ar9003_calc_ptr_chksum() local
164 checksum = ads->info + ads->link ar9003_calc_ptr_chksum()
170 return ((checksum & 0xffff) + (checksum >> 16)) & AR_TxPtrChkSum; ar9003_calc_ptr_chksum()
/linux-4.4.14/drivers/net/ethernet/intel/e1000e/
H A Dmanage.c25 * e1000_calculate_checksum - Calculate checksum for buffer
27 * @length: size of EEPROM to calculate a checksum for
29 * Calculates the checksum for some buffer on a specified length. The
30 * checksum calculated is returned.
141 hdr_csum = hdr->checksum; e1000e_enable_tx_pkt_filtering()
142 hdr->checksum = 0; e1000e_enable_tx_pkt_filtering()
166 * Writes the command header after does the checksum calculation.
173 /* Write the whole command header structure with new checksum. */ e1000_mng_write_cmd_header()
175 hdr->checksum = e1000_calculate_checksum((u8 *)hdr, length); e1000_mng_write_cmd_header()
193 * @sum: sum of the data (not checksum)
207 /* sum = only sum of the data and it is not checksum */ e1000_mng_host_if_write()
277 hdr.checksum = 0; e1000e_mng_write_dhcp_info()
286 sizeof(hdr), &(hdr.checksum)); e1000e_mng_write_dhcp_info()
H A Dnvm.c351 * EEPROM will most likely contain an invalid checksum.
558 * e1000e_validate_nvm_checksum_generic - Validate EEPROM checksum
561 * Calculates the EEPROM checksum by reading/adding each word of the EEPROM
567 u16 checksum = 0; e1000e_validate_nvm_checksum_generic() local
576 checksum += nvm_data; e1000e_validate_nvm_checksum_generic()
579 if (checksum != (u16)NVM_SUM) { e1000e_validate_nvm_checksum_generic()
588 * e1000e_update_nvm_checksum_generic - Update EEPROM checksum
591 * Updates the EEPROM checksum by reading/adding each word of the EEPROM
592 * up to the checksum. Then calculates the EEPROM checksum and writes the
598 u16 checksum = 0; e1000e_update_nvm_checksum_generic() local
604 e_dbg("NVM Read Error while updating checksum.\n"); e1000e_update_nvm_checksum_generic()
607 checksum += nvm_data; e1000e_update_nvm_checksum_generic()
609 checksum = (u16)NVM_SUM - checksum; e1000e_update_nvm_checksum_generic()
610 ret_val = e1000_write_nvm(hw, NVM_CHECKSUM_REG, 1, &checksum); e1000e_update_nvm_checksum_generic()
612 e_dbg("NVM Write Error while updating checksum.\n"); e1000e_update_nvm_checksum_generic()
H A Dhw.h294 u8 ipcss; /* IP checksum start */
295 u8 ipcso; /* IP checksum offset */
296 __le16 ipcse; /* IP checksum end */
302 u8 tucss; /* TCP checksum start */
303 u8 tucso; /* TCP checksum offset */
304 __le16 tucse; /* TCP checksum end */
419 u8 checksum; member in struct:e1000_host_mng_dhcp_cookie
427 u8 checksum; member in struct:e1000_host_command_header
439 u8 checksum; member in struct:e1000_host_mng_command_header
/linux-4.4.14/arch/cris/boot/rescue/
H A Dhead_v10.S35 * 4 bytes [checksum for the partitiontable itself]
41 * 4 bytes [checksum, simple longword sum]
53 * to check the checksum for RO partitions, since the others will
160 ;; we now should go through the checksum-table and check the listed
180 ;; check for correct ptable checksum
185 move.d [$r3+], $r4 ; ptable checksum
187 jsr checksum ; r1 source, r2 length, returns in r0
200 move.d $r8, $r1 ; for its checksum check, skip the ptable
209 bosse: move.d [$r3+], $r5 ; checksum
222 jsr checksum ; checksum the partition
323 ;; Will checksum by simple addition
327 checksum: label
/linux-4.4.14/drivers/staging/lustre/lustre/include/
H A Dobd_cksum.h50 CERROR("Unknown checksum type (%x)!!!\n", cksum_type); cksum_obd2cfs()
57 * only be a single checksum type per RPC.
60 * since they need to represent the full range of checksum algorithms that
115 /* Return a bitmask of the checksum types supported on this system.
159 /* Select the best checksum algorithm among those supplied in the cksum_types
163 * checksum type due to its benchmarking at libcfs module load.
/linux-4.4.14/drivers/mtd/
H A Dar7part.c40 unsigned int checksum; member in struct:ar7_bin_rec
77 if (header.checksum == LOADER_MAGIC1) create_mtd_partitions()
79 if (header.checksum == LOADER_MAGIC2) create_mtd_partitions()
91 switch (header.checksum) { create_mtd_partitions()
110 printk(KERN_WARNING "Unknown magic: %08x\n", header.checksum); create_mtd_partitions()
115 if (header.checksum != SQUASHFS_MAGIC) { create_mtd_partitions()
H A Dafs.c42 u32 checksum; /* Just this structure */ member in struct:footer_struct
55 u32 checksum; /* Image checksum (inc. this struct) */ member in struct:image_info_struct
97 * Check the checksum. afs_read_footer()
/linux-4.4.14/drivers/nvdimm/
H A Dclaim.c181 * nd_sb_checksum: compute checksum for a generic info block
183 * Returns a fletcher64 checksum of everything in the given info block
184 * except the last field (since that's where the checksum lives).
195 sum_save = nd_gen_sb->checksum; nd_sb_checksum()
196 nd_gen_sb->checksum = 0; nd_sb_checksum()
198 nd_gen_sb->checksum = sum_save; nd_sb_checksum()
H A Dpfn.h33 __le64 checksum; member in struct:nd_pfn_sb
H A Dbtt_devs.c219 * the checksum, and with the parent namespace by verifying the
228 u64 checksum; nd_btt_arena_is_valid() local
237 checksum = le64_to_cpu(super->checksum); nd_btt_arena_is_valid()
238 super->checksum = 0; nd_btt_arena_is_valid()
239 if (checksum != nd_sb_checksum((struct nd_gen_sb *) super)) nd_btt_arena_is_valid()
241 super->checksum = cpu_to_le64(checksum); nd_btt_arena_is_valid()
H A Dpfn_devs.c236 u64 checksum, offset; nd_pfn_validate() local
254 checksum = le64_to_cpu(pfn_sb->checksum); nd_pfn_validate()
255 pfn_sb->checksum = 0; nd_pfn_validate()
256 if (checksum != nd_sb_checksum((struct nd_gen_sb *) pfn_sb)) nd_pfn_validate()
258 pfn_sb->checksum = cpu_to_le64(checksum); nd_pfn_validate()
/linux-4.4.14/arch/x86/kernel/cpu/microcode/
H A Dintel_lib.c86 /* check extended table checksum */ microcode_sanity_check()
96 pr_warn("aborting, bad extended signature table checksum\n"); microcode_sanity_check()
101 /* calculate the checksum */ microcode_sanity_check()
108 pr_err("aborting, bad checksum\n"); microcode_sanity_check()
113 /* check extended signature checksum */ microcode_sanity_check()
122 pr_err("aborting, bad checksum\n"); microcode_sanity_check()
/linux-4.4.14/arch/frv/include/asm/
H A Dchecksum.h0 /* checksum.h: FRV checksumming
18 * computes the checksum of a memory block at buff, length len,
51 * which always checksum on 4 octet boundaries.
85 * Fold a partial checksum
104 * computes the checksum of the TCP/UDP pseudo-header
105 * returns a 16-bit checksum, already complemented
/linux-4.4.14/drivers/net/ethernet/adi/
H A Dbfin_mac.h20 * Disable hardware checksum for bug #5600 if writeback cache is
40 unsigned short ip_hdr_csum; /* ip header checksum */
41 /* ip payload(udp or tcp or others) checksum */
/linux-4.4.14/include/net/sctp/
H A Dchecksum.h64 __le32 ret, old = sh->checksum; sctp_compute_cksum()
70 sh->checksum = 0; sctp_compute_cksum()
73 sh->checksum = old; sctp_compute_cksum()
/linux-4.4.14/arch/mn10300/include/asm/
H A Dchecksum.h64 * computes the checksum of the TCP/UDP pseudo-header
65 * returns a 16-bit checksum, already complemented
79 * Copy and checksum to user
/linux-4.4.14/drivers/net/ethernet/intel/ixgb/
H A Dixgb_ee.c317 * Verifies that the EEPROM has a valid checksum
322 * If the sum of the 64 16 bit words is 0xBABA, the EEPROM's checksum is
332 u16 checksum = 0; ixgb_validate_eeprom_checksum() local
336 checksum += ixgb_read_eeprom(hw, i); ixgb_validate_eeprom_checksum()
338 if (checksum == (u16) EEPROM_SUM) ixgb_validate_eeprom_checksum()
345 * Calculates the EEPROM checksum and writes it to the EEPROM
355 u16 checksum = 0; ixgb_update_eeprom_checksum() local
359 checksum += ixgb_read_eeprom(hw, i); ixgb_update_eeprom_checksum()
361 checksum = (u16) EEPROM_SUM - checksum; ixgb_update_eeprom_checksum()
363 ixgb_write_eeprom(hw, EEPROM_CHECKSUM_REG, checksum); ixgb_update_eeprom_checksum()
374 * EEPROM will most likely contain an invalid checksum.
456 * Validates eeprom checksum and eeprom signature.
468 u16 checksum = 0; ixgb_get_eeprom_data() local
479 checksum += ee_data; ixgb_get_eeprom_data()
483 if (checksum != (u16) EEPROM_SUM) { ixgb_get_eeprom_data()
/linux-4.4.14/arch/x86/kernel/
H A Di386_ksyms_32.c3 #include <asm/checksum.h>
H A Dx8664_ksyms_64.c7 #include <net/checksum.h>
/linux-4.4.14/drivers/char/
H A Dnvram.c19 * bad checksum, reads and writes return -EIO. The checksum can be initialized
21 * ioctl(NVRAM_SETCKS) (doesn't change contents, just makes checksum valid
60 /* On PCs, the checksum is built only over bytes 2..31 */
82 /* On Ataris, the checksum is over all bytes except the checksum bytes
132 * the kernel. It's up to the caller to ensure correct checksum before reading
159 /* This races nicely with trying to read with checksum checking (nvram_read) */ __nvram_write_byte()
309 /* initialize NVRAM contents and checksum */ nvram_ioctl()
325 /* just set checksum, contents unchanged (maybe useful after nvram_ioctl()
326 * checksum garbaged somehow...) */ nvram_ioctl()
526 int checksum; pc_proc_infos() local
530 checksum = __nvram_check_checksum(); pc_proc_infos()
533 seq_printf(seq, "Checksum status: %svalid\n", checksum ? "" : "not "); pc_proc_infos()
656 int checksum = nvram_check_checksum(); atari_proc_infos() local
660 seq_printf(seq, "Checksum status : %svalid\n", checksum ? "" : "not "); atari_proc_infos()
/linux-4.4.14/arch/c6x/include/asm/
H A Dchecksum.h32 #include <asm-generic/checksum.h>
/linux-4.4.14/arch/cris/include/arch-v10/arch/
H A Dchecksum.h7 * for the 32-bit components of the checksum, so otherwise we would have had
/linux-4.4.14/fs/qnx6/
H A Dsuper_mmi.c59 /* checksum check - start at byte 8 and end at byte 512 */ qnx6_mmi_fill_super()
62 pr_err("superblock #1 checksum error\n"); qnx6_mmi_fill_super()
95 /* checksum check - start at byte 8 and end at byte 512 */ qnx6_mmi_fill_super()
98 pr_err("superblock #1 checksum error\n"); qnx6_mmi_fill_super()
/linux-4.4.14/arch/mips/include/asm/mach-bcm63xx/
H A Dbcm63xx_nvram.h11 * its checksum.
/linux-4.4.14/arch/metag/lib/
H A Dip_fast_csum.S5 * which always checksum on 4 octet boundaries.
/linux-4.4.14/sound/pci/oxygen/
H A Dxonar_hdmi.c33 u8 checksum; hdmi_write_command() local
41 checksum = 0xfb + 0xef + command + count; hdmi_write_command()
43 checksum += params[i]; hdmi_write_command()
44 oxygen_write_uart(chip, checksum); hdmi_write_command()
/linux-4.4.14/drivers/media/platform/vivid/
H A Dvivid-vbi-gen.c191 u8 checksum, i; vivid_vbi_gen_set_time_of_day() local
206 for (checksum = i = 0; i <= 8; i++) vivid_vbi_gen_set_time_of_day()
207 checksum += packet[i] & 0x7f; vivid_vbi_gen_set_time_of_day()
208 packet[9] = calc_parity(0x100 - checksum); vivid_vbi_gen_set_time_of_day()
209 checksum = 0; vivid_vbi_gen_set_time_of_day()
218 for (checksum = 0, i = 10; i <= 14; i++) vivid_vbi_gen_set_time_of_day()
219 checksum += packet[i] & 0x7f; vivid_vbi_gen_set_time_of_day()
220 packet[15] = calc_parity(0x100 - checksum); vivid_vbi_gen_set_time_of_day()
/linux-4.4.14/arch/mn10300/unit-asb2305/
H A Dpci-asb2305.h58 u8 checksum; /* Modulo 256 checksum must give zero */ member in struct:irq_routing_table
/linux-4.4.14/net/netfilter/
H A Dnf_nat_proto_sctp.c13 #include <net/sctp/checksum.h>
52 hdr->checksum = sctp_compute_cksum(skb, hdroff); sctp_manip_pkt()
H A Dxt_CHECKSUM.c1 /* iptables module for the packet checksum mangling
21 MODULE_DESCRIPTION("Xtables: checksum modification");
/linux-4.4.14/arch/sparc/lib/
H A Dchecksum_64.S0 /* checksum.S: Sparc V9 optimized checksum code.
9 * Linux/Alpha checksum c-code
10 * Linux/ix86 inline checksum assembly
13 * BSD4.4 portable checksum routine
/linux-4.4.14/drivers/pnp/isapnp/
H A Dcore.c299 unsigned char checksum = 0x6a; isapnp_isolate() local
319 checksum = isapnp_isolate()
320 ((((checksum ^ (checksum >> 1)) & 0x01) ^ bit) << 7) isapnp_isolate()
321 | (checksum >> 1); isapnp_isolate()
332 if (checksum != 0x00 && checksum == chksum) { isapnp_isolate()
355 checksum = 0x6a; isapnp_isolate()
767 * Compute ISA PnP checksum for first eight bytes.
772 unsigned char checksum = 0x6a, bit, b; isapnp_checksum() local
780 checksum = isapnp_checksum()
781 ((((checksum ^ (checksum >> 1)) & 0x01) ^ bit) << 7) isapnp_checksum()
782 | (checksum >> 1); isapnp_checksum()
785 return checksum; isapnp_checksum()
794 unsigned char header[9], checksum; isapnp_build_device_list() local
804 checksum = isapnp_checksum(header); isapnp_build_device_list()
819 dev_err(&card->dev, "invalid checksum %#x\n", isapnp_build_device_list()
821 card->checksum = isapnp_checksum_value; isapnp_build_device_list()
/linux-4.4.14/drivers/mfd/
H A Dcros_ec_i2c.c160 /* copy response packet payload and compute checksum */ cros_ec_pkt_xfer_i2c()
173 dev_err(ec_dev->dev, "bad packet checksum\n"); cros_ec_pkt_xfer_i2c()
206 * allocate larger packet (one byte for checksum, one byte for cros_ec_cmd_xfer_i2c()
217 * allocate larger packet (one byte for checksum, one for cros_ec_cmd_xfer_i2c()
231 /* copy message payload and compute checksum */ cros_ec_cmd_xfer_i2c()
264 /* copy response packet payload and compute checksum */ cros_ec_cmd_xfer_i2c()
273 dev_err(ec_dev->dev, "bad packet checksum\n"); cros_ec_cmd_xfer_i2c()
H A Dipaq-micro.c39 u8 checksum; ipaq_micro_trigger_tx() local
45 checksum = ((msg->id & 0x0f) << 4) | (msg->tx_len & 0x0f); ipaq_micro_trigger_tx()
46 tx->buf[bp++] = checksum; ipaq_micro_trigger_tx()
50 checksum += msg->tx_data[i]; ipaq_micro_trigger_tx()
53 tx->buf[bp++] = checksum; ipaq_micro_trigger_tx()
169 case STATE_CHKSUM: /* Looking for the checksum */ micro_process_char()
/linux-4.4.14/include/uapi/linux/can/
H A Dgw.h72 CGW_CS_XOR, /* set data[] XOR checksum into data[index] */
73 CGW_CS_CRC8, /* set data[] CRC8 checksum into data[index] */
127 /* length of checksum operation parameters. idx = index in CAN frame data[] */
171 * Set a simple XOR checksum starting with an initial value into
174 * The XOR checksum is calculated like this:
188 * The CRC8 checksum is calculated like this:
198 * defined in the handling of 'checksum profiles' e.g. shown in AUTOSAR specs
/linux-4.4.14/arch/mips/include/asm/
H A Dchecksum.h16 #include <asm-generic/checksum.h>
24 * computes the checksum of a memory block at buff, length len,
76 * Copy and checksum to user
97 return (__force __wsum)-1; /* invalid checksum */ csum_and_copy_to_user()
109 * Fold a partial checksum without adding pseudo headers
126 * which always checksum on 4 octet boundaries.
282 #include <asm-generic/checksum.h>
/linux-4.4.14/drivers/net/ethernet/intel/igbvf/
H A Ddefines.h40 #define E1000_RXD_STAT_IXSM 0x04 /* Ignore checksum */
83 #define E1000_TXD_POPTS_IXSM 0x01 /* Insert IP checksum */
84 #define E1000_TXD_POPTS_TXSM 0x02 /* Insert TCP/UDP checksum */
/linux-4.4.14/drivers/net/ethernet/intel/ixgbe/
H A Dixgbe_x540.c312 * ixgbe_calc_eeprom_checksum_X540 - Calculates and returns the checksum
323 u16 checksum = 0; ixgbe_calc_eeprom_checksum_X540() local
336 /* Include 0x0-0x3F in the checksum */ ixgbe_calc_eeprom_checksum_X540()
342 checksum += word; ixgbe_calc_eeprom_checksum_X540()
379 checksum += word; ixgbe_calc_eeprom_checksum_X540()
383 checksum = (u16)IXGBE_EEPROM_SUM - checksum; ixgbe_calc_eeprom_checksum_X540()
385 return (s32)checksum; ixgbe_calc_eeprom_checksum_X540()
389 * ixgbe_validate_eeprom_checksum_X540 - Validate EEPROM checksum
391 * @checksum_val: calculated checksum
393 * Performs checksum calculation and validates the EEPROM checksum. If the
400 u16 checksum; ixgbe_validate_eeprom_checksum_X540() local
407 status = hw->eeprom.ops.read(hw, 0, &checksum); ixgbe_validate_eeprom_checksum_X540()
420 checksum = (u16)(status & 0xffff); ixgbe_validate_eeprom_checksum_X540()
430 /* Verify read checksum from EEPROM is the same as ixgbe_validate_eeprom_checksum_X540()
431 * calculated checksum ixgbe_validate_eeprom_checksum_X540()
433 if (read_checksum != checksum) { ixgbe_validate_eeprom_checksum_X540()
434 hw_dbg(hw, "Invalid EEPROM checksum"); ixgbe_validate_eeprom_checksum_X540()
438 /* If the user cares, return the calculated checksum */ ixgbe_validate_eeprom_checksum_X540()
440 *checksum_val = checksum; ixgbe_validate_eeprom_checksum_X540()
449 * ixgbe_update_eeprom_checksum_X540 - Updates the EEPROM checksum and flash
453 * checksum and updates the EEPROM and instructs the hardware to update
459 u16 checksum; ixgbe_update_eeprom_checksum_X540() local
465 status = hw->eeprom.ops.read(hw, 0, &checksum); ixgbe_update_eeprom_checksum_X540()
478 checksum = (u16)(status & 0xffff); ixgbe_update_eeprom_checksum_X540()
483 status = ixgbe_write_eewr_generic(hw, IXGBE_EEPROM_CHECKSUM, checksum); ixgbe_update_eeprom_checksum_X540()
H A Dixgbe_x550.c510 buffer.hdr.req.checksum = FW_DEFAULT_CHECKSUM; ixgbe_read_ee_hostif_data_X550()
562 buffer.hdr.req.checksum = FW_DEFAULT_CHECKSUM; ixgbe_read_ee_hostif_buffer_X550()
603 * @csum: address of checksum to update
668 /** ixgbe_calc_checksum_X550 - Calculates and returns the checksum
670 * @buffer: pointer to buffer containing calculated checksum
673 * Returns a negative error code on error, or the 16-bit checksum
681 u16 checksum = 0; ixgbe_calc_checksum_X550() local
702 /* For X550 hardware include 0x0-0x41 in the checksum, skip the ixgbe_calc_checksum_X550()
703 * checksum word itself ixgbe_calc_checksum_X550()
707 checksum += local_buffer[i]; ixgbe_calc_checksum_X550()
736 status = ixgbe_checksum_ptr_x550(hw, pointer, size, &checksum, ixgbe_calc_checksum_X550()
742 checksum = (u16)IXGBE_EEPROM_SUM - checksum; ixgbe_calc_checksum_X550()
744 return (s32)checksum; ixgbe_calc_checksum_X550()
747 /** ixgbe_calc_eeprom_checksum_X550 - Calculates and returns the checksum
750 * Returns a negative error code on error, or the 16-bit checksum
778 /** ixgbe_validate_eeprom_checksum_X550 - Validate EEPROM checksum
780 * @checksum_val: calculated checksum
782 * Performs checksum calculation and validates the EEPROM checksum. If the
789 u16 checksum; ixgbe_validate_eeprom_checksum_X550() local
796 status = hw->eeprom.ops.read(hw, 0, &checksum); ixgbe_validate_eeprom_checksum_X550()
806 checksum = (u16)(status & 0xffff); ixgbe_validate_eeprom_checksum_X550()
813 /* Verify read checksum from EEPROM is the same as ixgbe_validate_eeprom_checksum_X550()
814 * calculated checksum ixgbe_validate_eeprom_checksum_X550()
816 if (read_checksum != checksum) { ixgbe_validate_eeprom_checksum_X550()
818 hw_dbg(hw, "Invalid EEPROM checksum"); ixgbe_validate_eeprom_checksum_X550()
821 /* If the user cares, return the calculated checksum */ ixgbe_validate_eeprom_checksum_X550()
823 *checksum_val = checksum; ixgbe_validate_eeprom_checksum_X550()
844 buffer.hdr.req.checksum = FW_DEFAULT_CHECKSUM; ixgbe_write_ee_hostif_data_X550()
892 buffer.req.checksum = FW_DEFAULT_CHECKSUM; ixgbe_update_flash_X550()
941 fw_cmd.hdr.checksum = FW_DEFAULT_CHECKSUM; ixgbe_disable_rx_x550()
959 /** ixgbe_update_eeprom_checksum_X550 - Updates the EEPROM checksum and flash
963 * checksum and updates the EEPROM and instructs the hardware to update
969 u16 checksum = 0; ixgbe_update_eeprom_checksum_X550() local
975 status = ixgbe_read_ee_hostif_X550(hw, 0, &checksum); ixgbe_update_eeprom_checksum_X550()
985 checksum = (u16)(status & 0xffff); ixgbe_update_eeprom_checksum_X550()
988 checksum); ixgbe_update_eeprom_checksum_X550()
/linux-4.4.14/drivers/net/ethernet/intel/igb/
H A De1000_nvm.c427 * EEPROM will most likley contain an invalid checksum.
637 * igb_validate_nvm_checksum - Validate EEPROM checksum
640 * Calculates the EEPROM checksum by reading/adding each word of the EEPROM
646 u16 checksum = 0; igb_validate_nvm_checksum() local
655 checksum += nvm_data; igb_validate_nvm_checksum()
658 if (checksum != (u16) NVM_SUM) { igb_validate_nvm_checksum()
669 * igb_update_nvm_checksum - Update EEPROM checksum
672 * Updates the EEPROM checksum by reading/adding each word of the EEPROM
673 * up to the checksum. Then calculates the EEPROM checksum and writes the
679 u16 checksum = 0; igb_update_nvm_checksum() local
685 hw_dbg("NVM Read Error while updating checksum.\n"); igb_update_nvm_checksum()
688 checksum += nvm_data; igb_update_nvm_checksum()
690 checksum = (u16) NVM_SUM - checksum; igb_update_nvm_checksum()
691 ret_val = hw->nvm.ops.write(hw, NVM_CHECKSUM_REG, 1, &checksum); igb_update_nvm_checksum()
693 hw_dbg("NVM Write Error while updating checksum.\n"); igb_update_nvm_checksum()
H A De1000_i210.c245 * Shadow Ram will most likely contain an invalid checksum.
302 * contain an invalid checksum.
551 * igb_validate_nvm_checksum_i210 - Validate EEPROM checksum
554 * Calculates the EEPROM checksum by reading/adding each word of the EEPROM
585 * igb_update_nvm_checksum_i210 - Update EEPROM checksum
588 * Updates the EEPROM checksum by reading/adding each word of the EEPROM
589 * up to the checksum. Then calculates the EEPROM checksum and writes the
595 u16 checksum = 0; igb_update_nvm_checksum_i210() local
618 hw_dbg("NVM Read Error while updating checksum.\n"); igb_update_nvm_checksum_i210()
621 checksum += nvm_data; igb_update_nvm_checksum_i210()
623 checksum = (u16) NVM_SUM - checksum; igb_update_nvm_checksum_i210()
625 &checksum); igb_update_nvm_checksum_i210()
628 hw_dbg("NVM Write Error while updating checksum.\n"); igb_update_nvm_checksum_i210()
/linux-4.4.14/drivers/scsi/aic94xx/
H A Daic94xx_sds.h95 u32 ImageChecksum; /* Image checksum */
101 u32 checksum; /*Entire file checksum with this field zero */ member in struct:bios_file_header
102 u32 antidote; /* Entire file checksum with this field 0xFFFFFFFF */
/linux-4.4.14/drivers/scsi/isci/
H A Dprobe_roms.c78 /* calculate checksum */ isci_request_oprom()
89 "OEM table checksum failed\n"); isci_request_oprom()
210 /* calculate checksum */ isci_get_efi_var()
217 "OEM table checksum failed\n"); isci_get_efi_var()
/linux-4.4.14/arch/tile/include/asm/
H A Dchecksum.h18 #include <asm-generic/checksum.h>
/linux-4.4.14/net/6lowpan/
H A Dnhc_udp.c39 /* checksum elided */
79 /* checksum */ udp_uncompress()
81 pr_debug_ratelimited("checksum elided currently not supported\n"); udp_uncompress()
171 /* checksum is always inline */ udp_compress()
/linux-4.4.14/net/sunrpc/
H A Dsocklib.c42 * xdr_skb_read_and_csum_bits - copy and checksum from skb to buffer
47 * Same as skb_read_bits, but calculate a checksum at the same time.
146 * csum_partial_copy_to_xdr - checksum and copy data
150 * We have set things up such that we perform the checksum of the UDP
/linux-4.4.14/arch/powerpc/platforms/ps3/
H A Dgelic_udbg.c78 u16 checksum; member in struct:iphdr
87 u16 checksum; member in struct:udphdr
232 h_ip->checksum = 0; gelic_sendbuf()
237 h_ip->checksum = ~(sum + (sum >> 16)); gelic_sendbuf()
/linux-4.4.14/arch/sh/kernel/
H A Dsh_ksyms_64.c22 #include <asm/checksum.h>
/linux-4.4.14/arch/microblaze/kernel/
H A Dmicroblaze_ksyms.c17 #include <asm/checksum.h>
/linux-4.4.14/arch/openrisc/kernel/
H A Dor32_ksyms.c28 #include <asm/checksum.h>
/linux-4.4.14/drivers/net/ethernet/atheros/alx/
H A Dhw.h58 * if bit8 =='1', the definition is just for custom checksum offload.
63 * checksum or LSO(TSO) offload.
76 * 9 General IPv4 checksum 9 General IPv4 checksum
77 * 10 General TCP checksum 10 General TCP checksum
78 * 11 General UDP checksum 11 General UDP checksum
177 * 7 | IP payload checksum 7 | VLAN tag
219 * 14 L4 Header checksum error
220 * 15 IPv4 checksum error
/linux-4.4.14/arch/xtensa/kernel/
H A Dxtensa_ksyms.c24 #include <asm/checksum.h>
34 #include <net/checksum.h>
/linux-4.4.14/arch/sparc/kernel/
H A Didprom.c63 /* Calculate the IDPROM checksum (xor of the data bytes). */ calc_idprom_cksum()
85 prom_printf("IDPROM: Warning, checksum failure (nvram=%x, calc=%x)!\n", idprom_init()
/linux-4.4.14/arch/mips/bcm63xx/
H A Dnvram.c52 /* check checksum before using data */ bcm63xx_nvram_init()
66 pr_warn("nvram checksum failed, contents may be invalid (expected %08x, got %08x)\n", bcm63xx_nvram_init()
/linux-4.4.14/arch/parisc/include/asm/
H A Dchecksum.h7 * computes the checksum of a memory block at buff, length len,
36 * Optimized for IP headers, which always checksum on 4 octet boundaries.
74 * Fold a partial checksum
103 * computes the checksum of the TCP/UDP pseudo-header
104 * returns a 16-bit checksum, already complemented
190 * Copy and checksum to user
/linux-4.4.14/arch/arm/mach-orion5x/
H A Dkurobox_pro-setup.c225 unsigned char checksum = 0; kurobox_pro_miconsend() local
231 /* Generate checksum */ kurobox_pro_miconsend()
233 checksum -= data[i]; kurobox_pro_miconsend()
239 /* send checksum */ kurobox_pro_miconsend()
240 kurobox_pro_miconwrite(&checksum, 1); kurobox_pro_miconsend()
258 /* checksum Check */ kurobox_pro_miconsend()
H A Dterastation_pro2-setup.c204 unsigned char checksum = 0; tsp2_miconsend() local
210 /* Generate checksum */ tsp2_miconsend()
212 checksum -= data[i]; tsp2_miconsend()
218 /* send checksum */ tsp2_miconsend()
219 tsp2_miconwrite(&checksum, 1); tsp2_miconsend()
237 /* checksum Check */ tsp2_miconsend()
/linux-4.4.14/drivers/scsi/aic7xxx/
H A Daic7xxx_93cx6.c309 uint32_t checksum; ahc_verify_cksum() local
313 checksum = 0; ahc_verify_cksum()
317 checksum = checksum + scarray[i]; ahc_verify_cksum()
318 if (checksum == 0 ahc_verify_cksum()
319 || (checksum & 0xFFFF) != sc->checksum) { ahc_verify_cksum()
/linux-4.4.14/drivers/media/usb/dvb-usb/
H A Daf9005.c568 u16 checksum; af9005_boot_packet() local
579 checksum = buf[4] + buf[5]; af9005_boot_packet()
580 buf[6] = (u8) ((checksum >> 8) & 0xff); af9005_boot_packet()
581 buf[7] = (u8) (checksum & 0xff); af9005_boot_packet()
588 checksum = buf[4] + buf[5]; af9005_boot_packet()
589 buf[6] = (u8) ((checksum >> 8) & 0xff); af9005_boot_packet()
590 buf[7] = (u8) (checksum & 0xff); af9005_boot_packet()
601 checksum = 0; af9005_boot_packet()
603 checksum += buf[i]; af9005_boot_packet()
604 buf[10] = (u8) ((checksum >> 8) & 0xff); af9005_boot_packet()
605 buf[11] = (u8) (checksum & 0xff); af9005_boot_packet()
633 checksum = 0; af9005_boot_packet()
653 checksum += buf[i]; af9005_boot_packet()
654 if (buf[7] * 256 + buf[8] != checksum) { af9005_boot_packet()
655 err("boot bad config checksum."); af9005_boot_packet()
678 checksum += buf[i]; af9005_boot_packet()
679 if (buf[7] * 256 + buf[8] != checksum) { af9005_boot_packet()
680 err("boot bad confirm checksum."); af9005_boot_packet()
707 checksum += buf[i]; af9005_boot_packet()
708 if (buf[7] * 256 + buf[8] != checksum) { af9005_boot_packet()
709 err("boot bad boot checksum."); af9005_boot_packet()
/linux-4.4.14/kernel/debug/
H A Dgdbstub.c89 /* scan for the sequence $<data>#<checksum> */ get_packet()
92 unsigned char checksum; get_packet() local
106 checksum = 0; get_packet()
118 checksum = checksum + ch; get_packet()
127 if (checksum != xmitcsum) get_packet()
128 /* failed checksum */ get_packet()
137 } while (checksum != xmitcsum); get_packet()
146 unsigned char checksum; put_packet() local
151 * $<packet info>#<checksum>. put_packet()
155 checksum = 0; put_packet()
160 checksum += ch; put_packet()
165 dbg_io_ops->write_char(hex_asc_hi(checksum)); put_packet()
166 dbg_io_ops->write_char(hex_asc_lo(checksum)); put_packet()
1115 unsigned char checksum, ch, buffer[3]; gdbstub_exit() local
1130 checksum = 0; gdbstub_exit()
1134 checksum += ch; gdbstub_exit()
1139 dbg_io_ops->write_char(hex_asc_hi(checksum)); gdbstub_exit()
1140 dbg_io_ops->write_char(hex_asc_lo(checksum)); gdbstub_exit()
/linux-4.4.14/drivers/scsi/qla4xxx/
H A Dql4_nvram.c183 uint16_t checksum = 0; qla4xxx_is_nvram_configuration_valid() local
189 checksum += rd_nvram_word(ha, index); qla4xxx_is_nvram_configuration_valid()
192 if (checksum == 0) qla4xxx_is_nvram_configuration_valid()
/linux-4.4.14/drivers/scsi/fnic/
H A Dcq_enet_desc.h97 u8 *vlan_stripped, u16 *vlan, u16 *checksum, u8 *fcoe_sof, cq_enet_rq_desc_dec()
145 *checksum = 0; cq_enet_rq_desc_dec()
151 *checksum = le16_to_cpu(desc->checksum_fcoe); cq_enet_rq_desc_dec()
93 cq_enet_rq_desc_dec(struct cq_enet_rq_desc *desc, u8 *type, u8 *color, u16 *q_number, u16 *completed_index, u8 *ingress_port, u8 *fcoe, u8 *eop, u8 *sop, u8 *rss_type, u8 *csum_not_calc, u32 *rss_hash, u16 *bytes_written, u8 *packet_error, u8 *vlan_stripped, u16 *vlan, u16 *checksum, u8 *fcoe_sof, u8 *fcoe_fc_crc_ok, u8 *fcoe_enc_error, u8 *fcoe_eof, u8 *tcp_udp_csum_ok, u8 *udp, u8 *tcp, u8 *ipv4_csum_ok, u8 *ipv6, u8 *ipv4, u8 *ipv4_fragment, u8 *fcs_ok) cq_enet_rq_desc_dec() argument
/linux-4.4.14/drivers/hid/
H A Dhid-roccat-kone.h129 uint16_t checksum; /* \brief holds checksum of struct */ member in struct:kone_profile
146 uint16_t checksum; member in struct:kone_settings
/linux-4.4.14/drivers/net/ethernet/cisco/enic/
H A Dcq_enet_desc.h108 u8 *vlan_stripped, u16 *vlan_tci, u16 *checksum, u8 *fcoe_sof, cq_enet_rq_desc_dec()
163 *checksum = 0; cq_enet_rq_desc_dec()
169 *checksum = le16_to_cpu(desc->checksum_fcoe); cq_enet_rq_desc_dec()
104 cq_enet_rq_desc_dec(struct cq_enet_rq_desc *desc, u8 *type, u8 *color, u16 *q_number, u16 *completed_index, u8 *ingress_port, u8 *fcoe, u8 *eop, u8 *sop, u8 *rss_type, u8 *csum_not_calc, u32 *rss_hash, u16 *bytes_written, u8 *packet_error, u8 *vlan_stripped, u16 *vlan_tci, u16 *checksum, u8 *fcoe_sof, u8 *fcoe_fc_crc_ok, u8 *fcoe_enc_error, u8 *fcoe_eof, u8 *tcp_udp_csum_ok, u8 *udp, u8 *tcp, u8 *ipv4_csum_ok, u8 *ipv6, u8 *ipv4, u8 *ipv4_fragment, u8 *fcs_ok) cq_enet_rq_desc_dec() argument
/linux-4.4.14/lib/
H A Dchecksum.c36 #include <net/checksum.h>
108 * which always checksum on 4 octet boundaries.
118 * computes the checksum of a memory block at buff, length len,
/linux-4.4.14/include/xen/interface/io/
H A Dnetif.h107 * "feature-no-csum-offload" should be used to turn IPv4 TCP/UDP checksum
109 * "feature-ipv6-csum-offload" should be used to turn IPv6 TCP/UDP checksum
131 /* Protocol checksum field is blank in the packet (hardware offload)? */
135 /* Packet data has been validated against protocol checksum. */
224 /* Packet data has been validated against protocol checksum. */
228 /* Protocol checksum field is blank in the packet (hardware offload)? */
/linux-4.4.14/net/ipv4/
H A Dudp_offload.c61 /* Try to offload checksum if possible */ __skb_udp_tunnel_segment()
88 * inner checksum. __skb_udp_tunnel_segment()
118 /* Need to calculate checksum from scratch, __skb_udp_tunnel_segment()
220 /* Do software UFO. Complete and fill in the UDP checksum as udp4_ufo_fragment()
221 * HW cannot do checksum of UDP packets sent as multiple udp4_ufo_fragment()
360 /* Don't bother verifying checksum if we're going to flush anyway. */ udp4_gro_receive()
/linux-4.4.14/fs/cachefiles/
H A Dkey.c60 max += 5; /* @checksum/M */ cachefiles_cook_key()
70 max += 5; /* @checksum/M */ cachefiles_cook_key()
/linux-4.4.14/arch/powerpc/boot/
H A Dmktree.c34 uint32_t bb_checksum; /* 32 bit checksum including header */
137 /* rewrite the header with the computed checksum. main()
/linux-4.4.14/drivers/fmc/
H A Dfmc-match.c84 pr_info(" FRU: wrong header checksum\n"); fmc_fill_id_info()
89 pr_info(" FRU: wrong board area checksum\n"); fmc_fill_id_info()
/linux-4.4.14/net/ipv4/netfilter/
H A Dnf_dup_ipv4.c17 #include <net/checksum.h>
77 * If we are in PREROUTING/INPUT, the checksum must be recalculated nf_dup_ipv4()
/linux-4.4.14/sound/pci/asihpi/
H A Dhpidspcd.h45 /** Data checksum */
46 u32 checksum; member in struct:code_header
/linux-4.4.14/include/linux/mfd/
H A Dipaq-micro.h39 STATE_CHKSUM /* Next byte should be checksum */
57 * @chksum: calculated checksum
/linux-4.4.14/arch/mn10300/kernel/
H A Dgdb-stub.c51 * checksum. A packet consists of
53 * $<packet info>#<checksum>.
57 * <checksum> :: < two hex digits computed as modulo 256 sum of <packetinfo>>
231 * scan for the sequence $<data>#<checksum>
235 unsigned char checksum; getpacket() local
249 checksum = 0; getpacket()
264 checksum += ch; getpacket()
282 /* read the checksum */ getpacket()
302 /* check the checksum */ getpacket()
303 if (checksum != xmitcsum) { getpacket()
305 gdbstub_io_tx_char('-'); /* failed checksum */ getpacket()
309 gdbstub_proto("### GDB Rx '$%s#%02x' ###\n", buffer, checksum); getpacket()
342 unsigned char checksum; putpacket() local
347 * $<packet info>#<checksum>. putpacket()
353 checksum = 0; putpacket()
358 checksum += ch; putpacket()
363 gdbstub_io_tx_char(hex_asc_hi(checksum)); putpacket()
364 gdbstub_io_tx_char(hex_asc_lo(checksum)); putpacket()
1811 unsigned char checksum; gdbstub_exit() local
1822 checksum = 0; gdbstub_exit()
1827 checksum += ch; gdbstub_exit()
1832 gdbstub_io_tx_char(hex_asc_hi(checksum)); gdbstub_exit()
1833 gdbstub_io_tx_char(hex_asc_lo(checksum)); gdbstub_exit()
/linux-4.4.14/drivers/net/ethernet/intel/i40e/
H A Di40e_nvm.c475 * i40e_calc_nvm_checksum - Calculates and returns the checksum
477 * @checksum: pointer to the checksum
485 u16 *checksum) i40e_calc_nvm_checksum()
516 /* Calculate SW checksum that covers the whole 64kB shadow RAM i40e_calc_nvm_checksum()
550 *checksum = (u16)I40E_SR_SW_CHECKSUM_BASE - checksum_local; i40e_calc_nvm_checksum()
558 * i40e_update_nvm_checksum - Updates the NVM checksum
568 u16 checksum; i40e_update_nvm_checksum() local
571 ret_code = i40e_calc_nvm_checksum(hw, &checksum); i40e_update_nvm_checksum()
573 le_sum = cpu_to_le16(checksum); i40e_update_nvm_checksum()
582 * i40e_validate_nvm_checksum - Validate EEPROM checksum
584 * @checksum: calculated checksum
586 * Performs checksum calculation and validates the NVM SW checksum. If the
587 * caller does not need checksum, the value can be NULL.
590 u16 *checksum) i40e_validate_nvm_checksum()
605 /* Verify read checksum from EEPROM is the same as i40e_validate_nvm_checksum()
606 * calculated checksum i40e_validate_nvm_checksum()
611 /* If the user cares, return the calculated checksum */ i40e_validate_nvm_checksum()
612 if (checksum) i40e_validate_nvm_checksum()
613 *checksum = checksum_local; i40e_validate_nvm_checksum()
484 i40e_calc_nvm_checksum(struct i40e_hw *hw, u16 *checksum) i40e_calc_nvm_checksum() argument
589 i40e_validate_nvm_checksum(struct i40e_hw *hw, u16 *checksum) i40e_validate_nvm_checksum() argument
/linux-4.4.14/arch/cris/arch-v10/kernel/
H A Dkgdb.c150 * checksum. A packet consists of
152 * $<packet info>#<checksum>.
156 * <checksum> :: < two hex digits computed as modulo 256 sum of <packetinfo>>
472 /* Await the sequence $<data>#<checksum> and store <data> in the array buffer
477 unsigned char checksum; getpacket() local
485 checksum = 0; getpacket()
493 checksum = checksum + ch; getpacket()
502 if (checksum != xmitcsum) { getpacket()
503 /* Wrong checksum */ getpacket()
507 /* Correct checksum */ getpacket()
520 } while (checksum != xmitcsum); getpacket()
523 /* Send $<data>#<checksum> from the <data> in the array buffer. */
528 int checksum; putpacket() local
535 checksum = 0; putpacket()
539 checksum += *src; putpacket()
547 checksum += '*'; putpacket()
550 checksum += encode; putpacket()
558 putDebugChar(hex_asc_hi(checksum)); putpacket()
559 putDebugChar(hex_asc_lo(checksum)); putpacket()
900 response ($#<checksum>). This way we can extend the protocol and GDB handle_exception()
/linux-4.4.14/drivers/scsi/esas2r/
H A Desas2r_flash.c60 0, /* checksum */
184 /* calculate the checksum */ build_flash_msg()
255 /* Recalculate the checksum in the PNP header if there */ fix_bios()
270 /* Recalculate the checksum needed by the PC */ fix_bios()
271 pi->checksum = pi->checksum - fix_bios()
685 * 2) verify the checksum of the entire image.
702 /* Verify the length - length must even since we do a word checksum */ verify_fi()
817 /* Compute the checksum - it should come out zero */ verify_fi()
818 if (fi->checksum != calc_fi_checksum(fc)) { verify_fi()
904 fsc->checksum, esas2r_process_fs_ioctl()
1295 n->checksum = n->checksum - esas2r_nvramcalc_cksum(n); esas2r_nvram_write()
1340 esas2r_hdebug("invalid NVRAM checksum"); esas2r_nvram_validate()
1442 * Since the image was just modified, compute the checksum on esas2r_fm_api()
1446 fi->checksum = calc_fi_checksum(fc); esas2r_fm_api()
/linux-4.4.14/drivers/net/ethernet/toshiba/
H A Dps3_gelic_net.h80 GELIC_DESCR_RXIPCHK = 0x20000000, /* IP checksum performed */
111 GELIC_DESCR_RXIPCHKERR = 0x08000000, /* IP checksum error */
112 GELIC_DESCR_RXTCPCHKERR = 0x04000000, /* TCP/UDP checksum error */
151 GELIC_DESCR_TX_DMA_NO_CHKSUM = 0x00000000, /* no checksum */
/linux-4.4.14/drivers/net/ethernet/stmicro/stmmac/
H A Dnorm_desc.c210 /* The type-1 checksum offload engines append the checksum at ndesc_get_rx_frame_len()
211 * the end of frame and the two bytes of checksum are added in ndesc_get_rx_frame_len()
213 * Adjust for that in the framelen for type-1 checksum offload ndesc_get_rx_frame_len()
/linux-4.4.14/drivers/net/ethernet/cavium/liquidio/
H A Dliquidio_image.h54 __be32 crc32; /* header checksum */
/linux-4.4.14/arch/tile/kernel/
H A Dmachine_kexec.c33 #include <asm/checksum.h>
126 * If we get a checksum mismatch, warn with the checksum kexec_bn2cl()
131 pr_warn("%s: bad checksum %#x (size %d)\n", kexec_bn2cl()
/linux-4.4.14/arch/alpha/kernel/
H A Dalpha_ksyms.c11 #include <asm/checksum.h>
/linux-4.4.14/arch/c6x/kernel/
H A Dc6x_ksyms.c13 #include <asm/checksum.h>
/linux-4.4.14/fs/f2fs/
H A Dhash.c85 /* Initialize the default seed for the hash checksum functions */ f2fs_dentry_hash()
/linux-4.4.14/security/apparmor/
H A Dcrypto.c13 * Fns to provide a checksum of policy that has been loaded this can be

Completed in 5208 milliseconds

123456