summaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-03-12 19:04:50 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-12 19:04:50 -0500
commitc32da02342b7521df25fefc2ef20aee0e61cf887 (patch)
tree7e38f664fa3e13602c357d37f77d8adcf82fccc2 /drivers/ieee1394
parentdca1d9f6d7ae428c193f32bd3e9a4ca13176648b (diff)
parent318ae2edc3b29216abd8a2510f3f80b764f06858 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (56 commits) doc: fix typo in comment explaining rb_tree usage Remove fs/ntfs/ChangeLog doc: fix console doc typo doc: cpuset: Update the cpuset flag file Fix of spelling in arch/sparc/kernel/leon_kernel.c no longer needed Remove drivers/parport/ChangeLog Remove drivers/char/ChangeLog doc: typo - Table 1-2 should refer to "status", not "statm" tree-wide: fix typos "ass?o[sc]iac?te" -> "associate" in comments No need to patch AMD-provided drivers/gpu/drm/radeon/atombios.h devres/irq: Fix devm_irq_match comment Remove reference to kthread_create_on_cpu tree-wide: Assorted spelling fixes tree-wide: fix 'lenght' typo in comments and code drm/kms: fix spelling in error message doc: capitalization and other minor fixes in pnp doc devres: typo fix s/dev/devm/ Remove redundant trailing semicolons from macros fix typo "definetly" -> "definitely" in comment tree-wide: s/widht/width/g typo in comments ... Fix trivial conflict in Documentation/laptops/00-INDEX
Diffstat (limited to 'drivers/ieee1394')
-rw-r--r--drivers/ieee1394/pcilynx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ieee1394/pcilynx.c b/drivers/ieee1394/pcilynx.c
index 9555fd253865..bf47fee79808 100644
--- a/drivers/ieee1394/pcilynx.c
+++ b/drivers/ieee1394/pcilynx.c
@@ -1452,7 +1452,7 @@ static int __devinit add_card(struct pci_dev *dev,
1452 PRINT(KERN_ERR, lynx->id, "unable to read bus info block from i2c"); 1452 PRINT(KERN_ERR, lynx->id, "unable to read bus info block from i2c");
1453 } else { 1453 } else {
1454 PRINT(KERN_INFO, lynx->id, "got bus info block from serial eeprom"); 1454 PRINT(KERN_INFO, lynx->id, "got bus info block from serial eeprom");
1455 /* FIXME: probably we shoud rewrite the max_rec, max_ROM(1394a), 1455 /* FIXME: probably we should rewrite the max_rec, max_ROM(1394a),
1456 * generation(1394a) and link_spd(1394a) field and recalculate 1456 * generation(1394a) and link_spd(1394a) field and recalculate
1457 * the CRC */ 1457 * the CRC */
1458 1458
er */ #define HAVE_CSUM_COPY_USER extern long __csum_partial_copy_to_user(const void *src, void __user *dst, int len, __wsum sum); static inline __wsum csum_and_copy_to_user(const void *src, void __user *dst, int len, __wsum sum, int *err) { long ret = __csum_partial_copy_to_user(src, dst, len, sum); if (ret < 0) *err = -EFAULT; return (__force __wsum) ret; } /* ihl is always 5 or greater, almost always is 5, and iph is word aligned * the majority of the time. */ extern __sum16 ip_fast_csum(const void *iph, unsigned int ihl); /* Fold a partial checksum without adding pseudo headers. */ static inline __sum16 csum_fold(__wsum sum) { unsigned int tmp; __asm__ __volatile__( " addcc %0, %1, %1\n" " srl %1, 16, %1\n" " addc %1, %%g0, %1\n" " xnor %%g0, %1, %0\n" : "=&r" (sum), "=r" (tmp) : "0" (sum), "1" ((__force u32)sum<<16) : "cc"); return (__force __sum16)sum; } static inline __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned int len, unsigned short proto, __wsum sum) { __asm__ __volatile__( " addcc %1, %0, %0\n" " addccc %2, %0, %0\n" " addccc %3, %0, %0\n" " addc %0, %%g0, %0\n" : "=r" (sum), "=r" (saddr) : "r" (daddr), "r" (proto + len), "0" (sum), "1" (saddr) : "cc"); return sum; } /* * computes the checksum of the TCP/UDP pseudo-header * returns a 16-bit checksum, already complemented */ static inline __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr, unsigned short len, unsigned short proto, __wsum sum) { return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum)); } #define _HAVE_ARCH_IPV6_CSUM static inline __sum16 csum_ipv6_magic(const struct in6_addr *saddr, const struct in6_addr *daddr, __u32 len, unsigned short proto, __wsum sum) { __asm__ __volatile__ ( " addcc %3, %4, %%g7\n" " addccc %5, %%g7, %%g7\n" " lduw [%2 + 0x0c], %%g2\n" " lduw [%2 + 0x08], %%g3\n" " addccc %%g2, %%g7, %%g7\n" " lduw [%2 + 0x04], %%g2\n" " addccc %%g3, %%g7, %%g7\n" " lduw [%2 + 0x00], %%g3\n" " addccc %%g2, %%g7, %%g7\n" " lduw [%1 + 0x0c], %%g2\n" " addccc %%g3, %%g7, %%g7\n" " lduw [%1 + 0x08], %%g3\n" " addccc %%g2, %%g7, %%g7\n" " lduw [%1 + 0x04], %%g2\n" " addccc %%g3, %%g7, %%g7\n" " lduw [%1 + 0x00], %%g3\n" " addccc %%g2, %%g7, %%g7\n" " addccc %%g3, %%g7, %0\n" " addc 0, %0, %0\n" : "=&r" (sum) : "r" (saddr), "r" (daddr), "r"(htonl(len)), "r"(htonl(proto)), "r"(sum) : "g2", "g3", "g7", "cc"); return csum_fold(sum); } /* this routine is used for miscellaneous IP-like checksums, mainly in icmp.c */ static inline __sum16 ip_compute_csum(const void *buff, int len) { return csum_fold(csum_partial(buff, len, 0)); } #endif /* !(__SPARC64_CHECKSUM_H) */