aboutsummaryrefslogtreecommitdiffstats
path: root/include (follow)
AgeCommit message (Collapse)AuthorFilesLines
2008-01-11[CRYPTO] aead: Add top-level givencrypt/givdecrypt callsHerbert Xu1-0/+67
This patch finally makes the givencrypt/givdecrypt operations available to users by adding crypto_aead_givencrypt and crypto_aead_givdecrypt. A suite of helpers to allocate and fill in the request is also available. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2008-01-11[CRYPTO] aead: Add givcrypt operationsHerbert Xu2-0/+43
This patch adds the underlying givcrypt operations for aead and associated support elements. The rationale is identical to that of the skcipher givcrypt operations, i.e., sometimes only the algorithm knows how the IV should be generated. A new request type aead_givcrypt_request is added which contains an embedded aead_request structure with two new elements to support this operation. The new elements are seq and giv. The seq field should contain a strictly increasing 64-bit integer which may be used by certain IV generators as an input value. The giv field will be used to store the generated IV. It does not need to obey the alignment requirements of the algorithm because it's not used during the operation. The existing iv field must still be available as it will be used to store intermediate IVs and the output IV if chaining is desired. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2008-01-11[CRYPTO] skcipher: Add top-level givencrypt/givdecrypt callsHerbert Xu1-0/+72
This patch finally makes the givencrypt/givdecrypt operations available to users by adding crypto_skcipher_givencrypt and crypto_skcipher_givdecrypt. A suite of helpers to allocate and fill in the request is also available. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2008-01-11[CRYPTO] skcipher: Remove crypto_spawn_ablkcipherHerbert Xu1-8/+0
Now that gcm and authenc have been converted to crypto_spawn_skcipher, this patch removes the obsolete crypto_spawn_ablkcipher function. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2008-01-11[CRYPTO] skcipher: Create default givcipher instancesHerbert Xu2-7/+4
This patch makes crypto_alloc_ablkcipher/crypto_grab_skcipher always return algorithms that are capable of generating their own IVs through givencrypt and givdecrypt. Each algorithm may specify its default IV generator through the geniv field. For algorithms that do not set the geniv field, the blkcipher layer will pick a default. Currently it's chainiv for synchronous algorithms and eseqiv for asynchronous algorithms. Note that if these wrappers do not work on an algorithm then that algorithm must specify its own geniv or it can't be used at all. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2008-01-11[CRYPTO] skcipher: Added skcipher_givcrypt_completeHerbert Xu1-0/+12
This patch adds the helper skcipher_givcrypt_complete which should be called when an ablkcipher algorithm has completed a givcrypt request. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2008-01-11[CRYPTO] skcipher: Add skcipher_geniv_alloc/skcipher_geniv_freeHerbert Xu2-4/+32
This patch creates the infrastructure to help the construction of givcipher templates that wrap around existing blkcipher/ablkcipher algorithms by adding an IV generator to them. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2008-01-11[CRYPTO] skcipher: Added geniv fieldHerbert Xu1-0/+4
This patch introduces the geniv field which indicates the default IV generator for each algorithm. It should point to a string that is not freed as long as the algorithm is registered. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2008-01-11[CRYPTO] skcipher: Add givcrypt operations and givcipher typeHerbert Xu3-0/+54
Different block cipher modes have different requirements for intialisation vectors. For example, CBC can use a simple randomly generated IV while modes such as CTR must use an IV generation mechanisms that give a stronger guarantee on the lack of collisions. Furthermore, disk encryption modes have their own IV generation algorithms. Up until now IV generation has been left to the users of the symmetric key cipher API. This is inconvenient as the number of block cipher modes increase because the user needs to be aware of which mode is supposed to be paired with which IV generation algorithm. Therefore it makes sense to integrate the IV generation into the crypto API. This patch takes the first step in that direction by creating two new ablkcipher operations, givencrypt and givdecrypt that generates an IV before performing the actual encryption or decryption. The operations are currently not exposed to the user. That will be done once the underlying functionality has actually been implemented. It also creates the underlying givcipher type. Algorithms that directly generate IVs would use it instead of ablkcipher. All other algorithms (including all existing ones) would generate a givcipher algorithm upon registration. This givcipher algorithm will be constructed from the geniv string that's stored in every algorithm. That string will locate a template which is instantiated by the blkcipher/ablkcipher algorithm in question to give a givcipher algorithm. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2008-01-11[CRYPTO] skcipher: Add crypto_grab_skcipher interfaceHerbert Xu3-14/+85
Note: From now on the collective of ablkcipher/blkcipher/givcipher will be known as skcipher, i.e., symmetric key cipher. The name blkcipher has always been much of a misnomer since it supports stream ciphers too. This patch adds the function crypto_grab_skcipher as a new way of getting an ablkcipher spawn. The problem is that previously we did this in two steps, first getting the algorithm and then calling crypto_init_spawn. This meant that each spawn user had to be aware of what type and mask to use for these two steps. This is difficult and also presents a problem when the type/mask changes as they're about to be for IV generators. The new interface does both steps together just like crypto_alloc_ablkcipher. As a side-effect this also allows us to be stronger on type enforcement for spawns. For now this is only done for ablkcipher but it's trivial to extend for other types. This patch also moves the type/mask logic for skcipher into the helpers crypto_skcipher_type and crypto_skcipher_mask. Finally this patch introduces the function crypto_require_sync to determine whether the user is specifically requesting a sync algorithm. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2008-01-11[CRYPTO] ctr: Refactor into ctr and rfc3686Herbert Xu1-0/+20
As discussed previously, this patch moves the basic CTR functionality into a chainable algorithm called ctr. The IPsec-specific variant of it is now placed on top with the name rfc3686. So ctr(aes) gives a chainable cipher with IV size 16 while the IPsec variant will be called rfc3686(ctr(aes)). This patch also adjusts gcm accordingly. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2008-01-11[CRYPTO] api: Add crypto_attr_alg_nameHerbert Xu1-0/+1
This patch adds a new helper crypto_attr_alg_name which is basically the first half of crypto_attr_alg. That is, it returns an algorithm name parameter as a string without looking it up. The caller can then look it up immediately or defer it until later. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2008-01-11[CRYPTO] api: Sanitise mask when allocating ablkcipher/hashHerbert Xu1-0/+4
When allocating ablkcipher/hash objects, we use a mask that's wider than the usual type mask. This patch sanitises the mask supplied by the user so we don't end up using a narrower mask which may lead to unintended results. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2008-01-11[CRYPTO] scatterwalk: Restore custom sg chaining for nowHerbert Xu1-0/+11
Unfortunately the generic chaining hasn't been ported to all architectures yet, and notably not s390. So this patch restores the chainging that we've been using previously which does work everywhere. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2008-01-11[CRYPTO] scatterwalk: Move scatterwalk.h to linux/cryptoHerbert Xu1-0/+107
The scatterwalk infrastructure is used by algorithms so it needs to move out of crypto for future users that may live in drivers/crypto or asm/*/crypto. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2008-01-11[CRYPTO] authenc: Move enckeylen into key itselfHerbert Xu1-0/+27
Having enckeylen as a template parameter makes it a pain for hardware devices that implement ciphers with many key sizes since each one would have to be registered separately. Since the authenc algorithm is mainly used for legacy purposes where its key is going to be constructed out of two separate keys, we can in fact embed this value into the key itself. This patch does this by prepending an rtnetlink header to the key that contains the encryption key length. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2008-01-11[CRYPTO] aead: Make authsize a run-time parameterHerbert Xu1-1/+4
As it is authsize is an algorithm paramter which cannot be changed at run-time. This is inconvenient because hardware that implements such algorithms would have to register each authsize that they support separately. Since authsize is a property common to all AEAD algorithms, we can add a function setauthsize that sets it at run-time, just like setkey. This patch does exactly that and also changes authenc so that authsize is no longer a parameter of its template. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2008-01-11[CRYPTO] api: Add crypto_inc and crypto_xorHerbert Xu1-0/+4
With the addition of more stream ciphers we need to curb the proliferation of ad-hoc xor functions. This patch creates a generic pair of functions, crypto_inc and crypto_xor which does big-endian increment and exclusive or, respectively. For optimum performance, they both use u32 operations so alignment must be as that of u32 even though the arguments are of type u8 *. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2008-01-11[HWRNG]: move status polling loop to data_present callbacksPatrick McHardy1-1/+1
Handle waiting for new random within the drivers themselves, this allows to use better suited timeouts for the individual rngs. Signed-off-by: Patrick McHardy <kaber@trash.net> Acked-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2008-01-11[CRYPTO] ablkcipher: Add distinct ABLKCIPHER typeHerbert Xu2-10/+12
Up until now we have ablkcipher algorithms have been identified as type BLKCIPHER with the ASYNC bit set. This is suboptimal because ablkcipher refers to two things. On the one hand it refers to the top-level ablkcipher interface with requests. On the other hand it refers to and algorithm type underneath. As it is you cannot request a synchronous block cipher algorithm with the ablkcipher interface on top. This is a problem because we want to be able to eventually phase out the blkcipher top-level interface. This patch fixes this by making ABLKCIPHER its own type, just as we have distinct types for HASH and DIGEST. The type it associated with the algorithm implementation only. Which top-level interface is used for synchronous block ciphers is then determined by the mask that's used. If it's a specific mask then the old blkcipher interface is given, otherwise we go with the new ablkcipher interface. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2008-01-11[CRYPTO] sha256-generic: Extend sha256_generic.c to support SHA-224Jonathan Lynch1-0/+12
Resubmitting this patch which extends sha256_generic.c to support SHA-224 as described in FIPS 180-2 and RFC 3874. HMAC-SHA-224 as described in RFC4231 is then supported through the hmac interface. Patch includes test vectors for SHA-224 and HMAC-SHA-224. SHA-224 chould be chosen as a hash algorithm when 112 bits of security strength is required. Patch generated against the 2.6.24-rc1 kernel and tested against 2.6.24-rc1-git14 which includes fix for scatter gather implementation for HMAC. Signed-off-by: Jonathan Lynch <jonathan.lynch@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2008-01-11[CRYPTO] aes-generic: Make key generation exportableSebastian Siewior1-0/+16
This patch exports four tables and the set_key() routine. This ressources can be shared by other AES implementations (aes-x86_64 for instance). The decryption key has been turned around (deckey[0] is the first piece of the key instead of deckey[keylen+20]). The encrypt/decrypt functions are looking now identical (except they are using different tables and key). Signed-off-by: Sebastian Siewior <sebastian@breakpoint.cc> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2008-01-11[CRYPTO] aes: Move common defines into a header fileSebastian Siewior1-0/+15
This three defines are used in all AES related hardware. Signed-off-by: Sebastian Siewior <sebastian@breakpoint.cc> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2008-01-11[CRYPTO] des: Create header file for common macrosEvgeniy Polyakov1-0/+19
This patch creates include/crypto/des.h for common macros shared between DES implementations. Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2007-11-17x86: fix reboot with no keyboard attachedTruxton Fulton1-1/+1
Attempt to fix http://bugzilla.kernel.org/show_bug.cgi?id=8378 Hiroto Shibuya wrote to tell me that he has a VIA EPIA-EK10000 which suffers from the reboot problem when no keyboard is attached. My first patch works for him: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=59f4e7d572980a521b7bdba74ab71b21f5995538 But the latest patch does not work for him : http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8b93789808756bcc1e5c90c99f1b1ef52f839a51 We found that it was necessary to also set the "disable keyboard" flag in the command byte, as the first patch was doing. The second patch tries to minimally modify the command byte, but it is not enough. Please consider this simple one-line patch to help people with low end VIA motherboards reboot when no keyboard is attached. Hiroto Shibuya has verified that this works for him (as I no longer have an afflicted machine). Additional discussion: Note that original patch from Truxton DOES disable keyboard and this has been in main tree since 2.6.14, thus it must have quite a bit of air time already. http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.14.y.git;a=commit;h=59f4e7d572980a521b7bdba74ab71b21f5995538 Note that he only mention "System flag" in the description and comment, but in the code, "disable keyboard" flag is set. outb(0x14, 0x60); /* set "System flag" */ In 2.6.23, he made a change to read the current byte and then mask the flags, but along this change, he only set the "System flag" and dropped the setting of "disable keyboard" flag. http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.23.y.git;a=commit;h=8b93789808756bcc1e5c90c99f1b1ef52f839a51 outb(cmd | 0x04, 0x60); /* set "System flag" */ So my request is to restore the setting of disable keyboard flag which has been there since 2.6.14 but disappeared in 2.6.23. Cc: Lee Garrett <lee-in-berlin@web.de> Cc: "Hiroto Shibuya" <hiroto.shibuya@gmail.com> Cc: Natalie Protasevich <protasnb@gmail.com> Cc: Dmitry Torokhov <dtor@mail.ru> Cc: Ingo Molnar <mingo@elte.hu> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Aristeu Rozanski <aris@ruivo.org> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-11-17x86: voyager use correct header file nameRandy Dunlap1-1/+1
Fix header file name for Voyager build. In file included from arch/x86/kernel/setup_32.c:61: include/asm-x86/mach-voyager/setup_arch.h:2:26: error: asm/setup_32.h: No such file or directory make[1]: *** [arch/x86/kernel/setup_32.o] Error 1 Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-11-17x86: fix bogus memcpy in es7000_check_dsdt()Thomas Gleixner1-3/+3
es7000_check_dst() contains a memcpy from 0, which probably should have been a memset. Remove it and check the retunr value from acpi_get_table_header. Noticed by: Joe Perches <joe@perches.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-11-17SELinux: return EOPNOTSUPP not ENOTSUPPEric Paris1-1/+1
ENOTSUPP is not a valid error code in the kernel (it is defined in some NFS internal error codes and has been improperly used other places). In the !CONFIG_SECURITY_SELINUX case though it is possible that we could return this from selinux_audit_rule_init(). This patch just returns the userspace valid EOPNOTSUPP. Signed-off-by: Eric Paris <eparis@redhat.com> Signed-off-by: James Morris <jmorris@namei.org>
2007-11-15Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6Linus Torvalds1-17/+1
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: [NETFILTER]: Fix NULL pointer dereference in nf_nat_move_storage() [SUNHME]: VLAN support for sunhme [CHELSIO]: Fix skb->dev setting. [NETFILTER]: fix compat_nf_sockopt typo [INET]: Fix potential kfree on vmalloc-ed area of request_sock_queue [VIA_VELOCITY]: Don't oops on MTU change. iwl4965: fix not correctly dealing with hotunplug rt2x00: Fix chipset revision validation iwl3945: place CCK rates in front of OFDM for supported rates mac80211: Fix queuing of scan containing a SSID
2007-11-15Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linusLinus Torvalds4-6/+15
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: [MIPS] N32 needs to use the compat version of sys_nfsservctl. [MIPS] irq_cpu: use handle_percpu_irq handler to avoid dropping interrupts. [MIPS] Sibyte: Fix name of clocksource. [MIPS] SNI: s/achknowledge/acknowledge/ [MIPS] Makefile: Fix canonical system names [MIPS] vpe: handle halting TCs in an errata safe way. [MIPS] Sibyte: Stop timers before programming next even. [MIPS] Sibyte: Increase minimum oneshot timer interval to two ticks. [MIPS] Lasat: Fix overlap of interrupt number ranges. [MIPS] SNI PCIT CPLUS: workaround for b0rked irq wiring of onboard PCI bus 1 [MIPS] Fix shadow register support. [MIPS] Change get_cycles to always return 0. [MIPS] Fix typo in R3000 TRACE_IRQFLAGS code [MIPS] Sibyte: Replace use of removed IO_SPACE_BASE with IOADDR. [MIPS] iounmap if in vr41xx_pciu_init() pci clock is over 33MHz [MIPS] BCM1480: Remove duplicate acknowledge of timer interrupt. [MIPS] Sibyte: pin timer interrupt to their cores. [MIPS] Qemu: Add early printk, your friend in a cold night. [MIPS] Convert reference to mem_map to pfn_to_page(). [MIPS] Sibyte: resurrect old cache hack.
2007-11-15[MIPS] Lasat: Fix overlap of interrupt number ranges.Yoichi Yuasa2-5/+13
The range of MIPS_CPU IRQ and the range of LASAT IRQ overlap. Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-11-15[MIPS] Fix shadow register support.Ralf Baechle1-0/+1
Shadow register support would not possibly have worked on multicore systems. The support code for it was also depending not on MIPS R2 but VSMP or SMTC kernels even though it makes perfect sense with UP kernels. SR sets are a scarce resource and the expected usage pattern is that users actually hardcode the register set numbers in their code. So fix the allocator by ditching it. Move the remaining CPU probe bits into the generic CPU probe. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-11-15[MIPS] Change get_cycles to always return 0.Ralf Baechle1-1/+1
This avoids us executing an mfc0 c0_count instruction on processors which don't have but also on certain R4000 and R4400 versions where reading from the count register just in the very moment when its value equals c0_compare will result in the timer interrupt getting lost. There is still a number of users of get_cycles remaining outside the arch code: crypto/tcrypt.c: start = get_cycles(); crypto/tcrypt.c: end = get_cycles(); crypto/tcrypt.c: start = get_cycles(); crypto/tcrypt.c: end = get_cycles(); crypto/tcrypt.c: start = get_cycles(); crypto/tcrypt.c: end = get_cycles(); drivers/char/hangcheck-timer.c: return get_cycles(); drivers/char/hangcheck-timer.c: printk("Hangcheck: Using get_cycles().\n"); drivers/char/random.c: sample.cycles = get_cycles(); drivers/input/joystick/analog.c:#define GET_TIME(x) do { x = get_cycles(); } include/linux/arcdevice.h: _x = get_cycles(); \ include/linux/arcdevice.h: _y = get_cycles(); \ mm/slub.c: if (!s->defrag_ratio || get_cycles() % 1024 > s->defrag_ratio) mm/slub.c: p += 64 + (get_cycles() & 0xff) * sizeof(void *); Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-11-15Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6Linus Torvalds1-5/+0
* 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6: i2c/eeprom: Recognize VGN as a valid Sony Vaio name prefix i2c/eeprom: Hide Sony Vaio serial numbers i2c-pasemi: Fix NACK detection i2c-pasemi: Replace obsolete "driverfs" reference with "sysfs" i2c: Make i2c_check_addr static i2c-dev: Unbound new-style i2c clients aren't busy i2c-dev: "how does it work" comments
2007-11-15i2c: Make i2c_check_addr staticJean Delvare1-5/+0
i2c_check_addr is only used inside i2c-core now, so we can make it static and stop exporting it. Thanks to David Brownell for noticing. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-11-15[AVR32] Add missing bit in PCCR sysregHaavard Skinnemoen1-0/+2
The enable bit was missing... Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-11-15[AVR32] pcmcia ioaddr_t should be 32 bits on AVR32Haavard Skinnemoen1-1/+1
Define ioaddr_t as u_int on AVR32 just like on ARM and MIPS. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-11-15[INET]: Fix potential kfree on vmalloc-ed area of request_sock_queuePavel Emelyanov1-17/+1
The request_sock_queue's listen_opt is either vmalloc-ed or kmalloc-ed depending on the number of table entries. Thus it is expected to be handled properly on free, which is done in the reqsk_queue_destroy(). However the error path in inet_csk_listen_start() calls the lite version of reqsk_queue_destroy, called __reqsk_queue_destroy, which calls the kfree unconditionally. Fix this and move the __reqsk_queue_destroy into a .c file as it looks too big to be inline. As David also noticed, this is an error recovery path only, so no locking is required and the lopt is known to be not NULL. reqsk_queue_yank_listen_sk is also now only used in net/core/request_sock.c so we should move it there too. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Acked-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-14Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6Linus Torvalds1-4/+6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: [NET]: rt_check_expire() can take a long time, add a cond_resched() [ISDN] sc: Really, really fix warning [ISDN] sc: Fix sndpkt to have the correct number of arguments [TCP] FRTO: Clear frto_highmark only after process_frto that uses it [NET]: Remove notifier block from chain when register_netdevice_notifier fails [FS_ENET]: Fix module build. [TCP]: Make sure write_queue_from does not begin with NULL ptr [TCP]: Fix size calculation in sk_stream_alloc_pskb [S2IO]: Fixed memory leak when MSI-X vector allocation fails [BONDING]: Fix resource use after free [SYSCTL]: Fix warning for token-ring from sysctl checker [NET] random : secure_tcp_sequence_number should not assume CONFIG_KTIME_SCALAR [IWLWIFI]: Not correctly dealing with hotunplug. [TCP] FRTO: Plug potential LOST-bit leak [TCP] FRTO: Limit snd_cwnd if TCP was application limited [E1000]: Fix schedule while atomic when called from mii-tool. [NETX]: Fix build failure added by 2.6.24 statistics cleanup. [EP93xx_ETH]: Build fix after 2.6.24 NAPI changes. [PKT_SCHED]: Check subqueue status before calling hard_start_xmit
2007-11-14CRIS tlb.h should include linux/pagemap.hJesper Nilsson1-0/+2
Include linux/pagemap.h for release_pages and page_cache_release. Fixes compilation error in arch/cris/mm/init.c when CONFIG_SWAP is unset. Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com> Cc: Mikael Starvik <mikael.starvik@axis.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14CRISv10 improve and bugfix fasttimerJesper Nilsson1-6/+10
Improve and bugfix CRIS v10 fast timers. - irq_handler_t now only takes two arguments. - Keep interrupts disabled as long as we have a reference to the fasttimer list and only enable them while doing the callback. del_fast_timer may be called from other interrupt context. - Fix bug where debug code could return without calling local_irq_restore. - Use jiffies instead of usec (change from struct timeval to fasttime_t). - Don't initialize static variables to zero. - Remove obsolete #ifndef DECLARE_WAITQUEUE code. - fast_timer_init should be __initcall. - Change status/debug variables to unsigned. - Remove CVS log and CVS id. Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com> Cc: Mikael Starvik <mikael.starvik@axis.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14CRIS don't include bitops.h in posix_types.hJesper Nilsson1-1/+0
In file included from include/asm/byteorder.h:23, from include/asm-generic/bitops/le.h:5, from include/asm-generic/bitops/ext2-non-atomic.h:4, from include/asm/bitops.h:163, from include/linux/bitops.h:17, from include/asm/posix_types.h:55, from include/linux/posix_types.h:47, from include/linux/types.h:11, from include/linux/capability.h:16, from include/linux/sched.h:49, from arch/cris/kernel/asm-offsets.c:1: include/linux/byteorder/little_endian.h:43: parse error before "__cpu_to_le64p" include/linux/byteorder/little_endian.h:44: warning: return type defaults to `int' include/linux/byteorder/little_endian.h: In function `__cpu_to_le64p': include/linux/byteorder/little_endian.h:45: `__le64' undeclared (first use in this function) Remove include of asm/bitops.h, not needed here, corrects compilation error (__le64 undeclared). Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com> Acked-by: Mikael Starvik <starvik@axis.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14cris build fixes: corrected and improved NMI and IRQ handlingJesper Nilsson1-2/+7
Corrects compile errors and the following: - Remove oldset parameter from do_signal and do_notify_resume. - Modified to fit new consolidated IRQ handling code. - Reverse check order between external nmi and watchdog nmi to avoid false watchdog oops in case of a glitch on the nmi pin. - Return from an pin-generated NMI the same way as for other interrupts. - Moved blocking of ethernet rx/tx irq from ethernet interrupt handler to low-level asm interrupt handlers. Fixed in the multiple interrupt handler also. - Add space for thread local storage in thread_info struct. - Add NO_DMA to Kconfig, and include arch specific Kconfig using arch independent path. Include subsystem Kconfigs for pcmcia, usb, i2c, rtc and pci. Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com> Acked-by: Mikael Starvik <starvik@axis.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14cris build fixes: update eth_v10.c ethernet driverJesper Nilsson1-0/+3
New (updated) version of ethernet driver for cris v10. - First steps to simplify and make the MII code more similar between the etrax100 and etraxfs ports. - Start the transmit queue before enabling tx interrupts to avoid race with the first frame. - Flip the comparition statement to stick to physical addresses to avoid phys_to_virt mapping a potential null pointer. This was not an error but the change simplifies debugging of address-space mappings. - Made myPrevRxDesc local to e100_rx since it was only used there. Fixed out of memory handling in e100_rx. If dev_alloc_skb() fails persistently the system is hosed anyway but at least it won't loop in an interrupt handler. - Correct some code formatting issues. - Add defines SET_ETH_ENABLE_LEDS, SET_ETH_DISABLE_LEDS and SET_ETH_AUTONEG used in new cris v10 ethernet driver. Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com> Acked-by: Mikael Starvik <starvik@axis.com> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14cris build fixes: add baud rate definesJesper Nilsson1-0/+13
Add missing defines for (unsupported) baud rates. Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com> Acked-by: Mikael Starvik <starvik@axis.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14cris-build-fixes-atomich-needs-compilerh-fixAndrew Morton1-1/+2
Cc: Jesper Nilsson <jesper.nilsson@axis.com> Cc: Mikael Starvik <starvik@axis.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14cris build fixes: atomic.h needs compiler.hJesper Nilsson1-0/+1
Include file linux/compiler.h is needed for 'likely'. Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com> Acked-by: Mikael Starvik <starvik@axis.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14cris build fixes: hardirq.h: include asm/irq.hJesper Nilsson1-0/+1
Include asm/irq.h to avoid undefined value warning. Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com> Acked-by: Mikael Starvik <starvik@axis.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14cris build fixes: Add missing syscallsJesper Nilsson1-1/+38
Add missing syscalls to cris architecture. Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com> Acked-by: Mikael Starvik <starvik@axis.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14cris build fixes: fix csum_tcpudp_magic() declarationJesper Nilsson1-1/+1
Remove int from prototype, no longer needed and causes compile error. Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com> Acked-by: Mikael Starvik <starvik@axis.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>