Douglas Gilbert [Sun, 9 Oct 2005 13:09:35 +0000 (09:09 -0400)]
[libata scsi] improve scsi error handling with ata_scsi_set_sense()
- change "xlat" and "fill" actors in libata-scsi so
they are responsible for SCSI status and sense data
when they return 1. This allows GOOD status or a
specialized error to be set.
- yield an error for mode sense requests for saved
values [sat-r06]
- remove static inlines for ata_bad_scsiop() and
ata_bad_cdb() which are no longer used
Signed-off-by: Douglas Gilbert <dougg@torque.net>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Douglas Gilbert [Sun, 9 Oct 2005 12:55:41 +0000 (08:55 -0400)]
[libata scsi] add ata_scsi_set_sense helper
- add extern ata_scsi_set_sense() to build SCSI
fixed sense data and corresponding SCSI status
Signed-off-by: Douglas Gilbert <dougg@torque.net>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Jeff Garzik [Sat, 8 Oct 2005 07:31:22 +0000 (03:31 -0400)]
Merge branch 'master'
Linus Torvalds [Fri, 7 Oct 2005 04:54:21 +0000 (21:54 -0700)]
Avoid 'names_cache' memory leak with CONFIG_AUDITSYSCALL
The nameidata "last.name" is always allocated with "__getname()", and
should always be free'd with "__putname()".
Using "putname()" without the underscores will leak memory, because the
allocation will have been hidden from the AUDITSYSCALL code.
Arguably the real bug is that the AUDITSYSCALL code is really broken,
but in the meantime this fixes the problem people see.
Reported by Robert Derr, patch by Rick Lindsley.
Acked-by: Al Viro <viro@ftp.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Linus Torvalds [Thu, 6 Oct 2005 22:37:09 +0000 (15:37 -0700)]
Merge branch 'release' of /linux/kernel/git/aegl/linux-2.6
Bryan Sutula [Wed, 5 Oct 2005 17:02:06 +0000 (11:02 -0600)]
[IA64] Avoid kernel hang during CMC interrupt storm
I've noticed a kernel hang during a storm of CMC interrupts, which was
tracked down to the continual execution of the interrupt handler.
There's code in the CMC handler that's supposed to disable CMC
interrupts and switch to polling mode when it sees a bunch of CMCs.
Because disabling CMCs across all CPUs isn't safe in interrupt context,
the disable is done with a schedule_work(). But with continual CMC
interrupts, the schedule_work() never gets executed.
The following patch immediately disables CMC interrupts for the current
CPU. This then allows (at least) one CPU to ignore CMC interrupts,
execute the schedule_work() code, and disable CMC interrupts on the rest
of the CPUs.
Acked-by: Keith Owens <kaos@sgi.com>
Signed-off-by: Bryan Sutula <Bryan.Sutula@hp.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Linus Torvalds [Thu, 6 Oct 2005 22:01:11 +0000 (15:01 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-ucb
Linus Torvalds [Thu, 6 Oct 2005 22:00:53 +0000 (15:00 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Thu, 6 Oct 2005 21:16:19 +0000 (14:16 -0700)]
Merge /pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Thu, 6 Oct 2005 21:16:07 +0000 (14:16 -0700)]
Merge /pub/scm/linux/kernel/git/davem/sparc-2.6
Russell King [Thu, 6 Oct 2005 12:09:42 +0000 (13:09 +0100)]
[MFD] Fix gcc4 build errors in ucb1x00-core.c
drivers/mfd/ucb1x00-core.c:555: error: static declaration of 'ucb1x00_class' follows non-static declaration
drivers/mfd/ucb1x00.h:109: error: previous declaration of 'ucb1x00_class' was here
Since ucb1x00_class isn't used by anything, remove the extern
declaration and the symbol export.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Jeff Garzik [Wed, 5 Oct 2005 22:39:23 +0000 (18:39 -0400)]
libata: minor cleanups
A few code shuffles, to make merging future code easier.
Add (DRIVER_SENSE << 24) to certain result codes, as noted by Douglas
Gilbert.
David S. Miller [Wed, 5 Oct 2005 22:12:00 +0000 (15:12 -0700)]
[SPARC64]: Fix initrd when net booting.
By allocating early memory for the firmware page tables, we
can write over the beginning of the initrd image.
So what we do now is:
1) Read in firmware translations table while still on the
firmware's trap table.
2) Switch to Linux trap table.
3) Init bootmem.
4) Build firmware page tables using __alloc_bootmem().
And this keeps the initrd from being clobbered.
Signed-off-by: David S. Miller <davem@davemloft.net>
Catalin Marinas [Wed, 5 Oct 2005 22:06:36 +0000 (23:06 +0100)]
[ARM] 2954/1: Allow D and I cache and branch prediction disabling for ARMv6
Patch from Catalin Marinas
There is no reason to not allow these config options. They are useful when
the hardware has problems.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Jeff Garzik [Wed, 5 Oct 2005 21:19:47 +0000 (17:19 -0400)]
[libata sata_mv] fix warning
shuffle ifdef location to fix the following warning:
drivers/scsi/sata_mv.c:471: warning: 'mv_dump_mem' defined but not used
Brett Russ [Wed, 5 Oct 2005 21:08:53 +0000 (17:08 -0400)]
[PATCH] libata: Marvell function headers
adds helpful function header comments.
Signed-off-by: Brett Russ <russb@emc.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Brett Russ [Wed, 5 Oct 2005 21:08:42 +0000 (17:08 -0400)]
[PATCH] libata: Marvell spinlock fixes and simplification
This should fix up lockups that people were seeing due to
improper spinlock placement. Also, the start/stop DMA routines put
guarded trust in the cached state of DMA.
Signed-off-by: Brett Russ <russb@emc.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Jeff Garzik [Wed, 5 Oct 2005 21:09:16 +0000 (17:09 -0400)]
libata: move atapi_request_sense() to libata-scsi module
No content changes, just moving code around.
Martin Habets [Wed, 5 Oct 2005 19:21:36 +0000 (12:21 -0700)]
[SPARC]: Remove some duplicated sparc32 config items
Remove some duplicated items due to the inclusion of the general
drivers/Kconfig file. These are now taken from drivers/char/Kconfig,
and can be turned off there as well (which is desirable sometimes).
Signed-off-by: Martin Habets <errandir_news@mph.eclipse.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ralf Baechle [Wed, 5 Oct 2005 19:16:04 +0000 (12:16 -0700)]
[AX.25]: Fix packet socket crash
Since changeset
98a82febb6340466824c3a453738d4fbd05db81a AX.25 is passing
received IP and ARP packets to the stack through netif_rx() but we don't
set the skb->mac.raw to right value which may result in a crash with
applications that use a packet socket.
Signed-off-by: Ralf Baechle DL5RB <ralf@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Herbert Xu [Wed, 5 Oct 2005 19:15:12 +0000 (12:15 -0700)]
[IPSEC]: Document that policy direction is derived from the index.
Here is a patch that adds a helper called xfrm_policy_id2dir to
document the fact that the policy direction can be and is derived
from the index.
This is based on a patch by YOSHIFUJI Hideaki and
210313105@suda.edu.cn.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
YOSHIFUJI Hideaki [Wed, 5 Oct 2005 19:11:41 +0000 (12:11 -0700)]
[IPV6]: Fix NS handing for proxy/anycast address
Timer set up by pneigh_enqueue() ended up calling ndisc_rcv()
via pndisc_redo(), which clears LOCALLY_ENQUEUED flag in
NEIGH_CB(skb) and NS was queued again.
Let's call ndisc_recv_ns() directly to avoid the loop.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stephen Hemminger [Wed, 5 Oct 2005 19:09:31 +0000 (12:09 -0700)]
[TCP]: BIC coding bug in Linux 2.6.13
Missing parenthesis in causes BIC to be slow in increasing congestion
window.
Spotted by Injong Rhee.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yan Zheng [Wed, 5 Oct 2005 19:08:13 +0000 (12:08 -0700)]
[MCAST] ipv6: Fix address size in grec_size
Signed-Off-By: Yan Zheng <yanzheng@21cn.com>
Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Acked-by: David L Stevens <dlstevens@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jeff Garzik [Wed, 5 Oct 2005 19:02:14 +0000 (15:02 -0400)]
libata: ATAPI command completion tweaks and notes
1) note urgent bug, that completes command twice
2) only fix up INQUIRY data if the SCSI version is zero (typically
indicates ATAPI MMC-ish device)
3) if there is a problem on the ATA bus, don't bother with REQUEST
SENSE, just directly handle the error based on Status/Error registers.
Dave Jones [Mon, 3 Oct 2005 19:02:20 +0000 (15:02 -0400)]
[PATCH] Fix drm 'debug' sysfs permissions
Just enables some extra printk's, but still.. Only the sysadmin should
be able to do that.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Benjamin Herrenschmidt [Wed, 5 Oct 2005 07:43:40 +0000 (17:43 +1000)]
[PATCH] ppc: Fix timekeeping with HZ=250 on some Mac models
Older Macs which uses the VIA chip timers to calibrate the timebase used
some code that wouldn't work if HZ wasn't divisible by 100...
This fixes it at least for 250. Not totally perfect but should be
enough for now (so it at least works with the default value which is now
250).
There is still a potential issue with the core using CLOCK_TICK_RATE to
maintain xtime and CLOCK_TICK_RATE value on ppc32 is pure crap, but that
is a different problem, this patch at least brings us back to our
previous situation.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Al Viro [Wed, 5 Oct 2005 07:36:02 +0000 (08:36 +0100)]
[PATCH] fix the breakage in sparc headers
If we switch extern inline to static inline, we'd better switch the
pre-declarations we use to say that these puppies have
__attribute_const__ on them.
Otherwise we get extern declaration followed by static inline one.
Which makes gcc unhappy, and for a good reason...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Garzik [Wed, 5 Oct 2005 06:58:32 +0000 (02:58 -0400)]
libata: add ata_ratelimit(), use it in AHCI driver irq handler
Randy Dunlap [Wed, 5 Oct 2005 05:45:35 +0000 (22:45 -0700)]
[XFRM]: fix sparse gfp nocast warnings
Fix implicit nocast warnings in xfrm code:
net/xfrm/xfrm_policy.c:232:47: warning: implicit cast to nocast type
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Randy Dunlap [Wed, 5 Oct 2005 05:45:14 +0000 (22:45 -0700)]
[TEXTSEARCH]: fix sparse gfp nocast warnings
Fix nocast sparse warnings:
include/linux/textsearch.h:165:57: warning: implicit cast to nocast type
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Randy Dunlap [Wed, 5 Oct 2005 05:44:45 +0000 (22:44 -0700)]
[RPC]: fix sparse gfp nocast warnings
Fix nocast sparse warnings:
net/rxrpc/call.c:2013:25: warning: implicit cast to nocast type
net/rxrpc/connection.c:538:46: warning: implicit cast to nocast type
net/sunrpc/sched.c:730:36: warning: implicit cast to nocast type
net/sunrpc/sched.c:734:56: warning: implicit cast to nocast type
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Randy Dunlap [Wed, 5 Oct 2005 05:43:04 +0000 (22:43 -0700)]
[AF_KEY]: fix sparse gfp nocast warnings
Fix implicit nocast warnings in net/key code:
net/key/af_key.c:195:27: warning: implicit cast to nocast type
net/key/af_key.c:1439:28: warning: implicit cast to nocast type
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Randy Dunlap [Wed, 5 Oct 2005 05:42:42 +0000 (22:42 -0700)]
[NETFILTER]: fix sparse gfp nocast warnings
Fix implicit nocast warnings in nfnetlink code:
net/netfilter/nfnetlink.c:204:43: warning: implicit cast to nocast type
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Randy Dunlap [Wed, 5 Oct 2005 05:42:15 +0000 (22:42 -0700)]
[IPVS]: fix sparse gfp nocast warnings
From: Randy Dunlap <rdunlap@xenotime.net>
Fix implicit nocast warnings in ip_vs code:
net/ipv4/ipvs/ip_vs_app.c:631:54: warning: implicit cast to nocast type
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Randy Dunlap [Wed, 5 Oct 2005 05:41:48 +0000 (22:41 -0700)]
[DECNET]: fix sparse gfp nocast warnings
Fix implicit nocast warnings in decnet code:
net/decnet/af_decnet.c:458:40: warning: implicit cast to nocast type
net/decnet/dn_nsp_out.c:125:35: warning: implicit cast to nocast type
net/decnet/dn_nsp_out.c:219:29: warning: implicit cast to nocast type
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Randy Dunlap [Wed, 5 Oct 2005 05:41:16 +0000 (22:41 -0700)]
[CONNECTOR]: fix sparse gfp nocast warnings
Fix implicit nocast warnings in connector code:
drivers/connector/connector.c:102:24: warning: implicit cast to nocast type
drivers/connector/connector.c:114:45: warning: implicit cast to nocast type
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Randy Dunlap [Wed, 5 Oct 2005 05:39:41 +0000 (22:39 -0700)]
[BONDING]: fix sparse gfp nocast warnings
Fix implicit nocast warnings in bonding code:
drivers/net/bonding/bond_main.c:1302:49: warning: implicit cast to nocast type
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Randy Dunlap [Wed, 5 Oct 2005 05:38:44 +0000 (22:38 -0700)]
[ATM]: fix sparse gfp nocast warnings
Fix implicit nocast warnings in atm code:
net/atm/atm_misc.c:35:44: warning: implicit cast to nocast type
drivers/atm/fore200e.c:183:33: warning: implicit cast to nocast type
Also use kzalloc() instead of kmalloc().
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Pavel Roskin [Wed, 5 Oct 2005 01:33:10 +0000 (21:33 -0400)]
[PATCH] orinoco: Information leakage due to incorrect padding
The orinoco driver can send uninitialized data exposing random pieces of
the system memory. This happens because data is not padded with zeroes
when its length needs to be increased.
Reported by Meder Kydyraliev <meder@o0o.nu>
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Linus Torvalds [Tue, 4 Oct 2005 23:55:43 +0000 (16:55 -0700)]
Merge branch 'for-linus' of /linux/kernel/git/roland/infiniband
Deepak Saxena [Tue, 4 Oct 2005 23:32:38 +0000 (16:32 -0700)]
[PATCH] Fix broken IXP4xx GPIO macro
Macro ended up backwards during one of cleanups. Found by Alessandro Zummo.
Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Horst H. von Brand [Tue, 4 Oct 2005 22:58:56 +0000 (15:58 -0700)]
[NETFILTER]: Fix Kconfig typo
Signed-off-by: Horst H. von Brand <vonbrand@inf.utfsm.cl>
Signed-off-by: David S. Miller <davem@davemloft.net>
Linus Torvalds [Tue, 4 Oct 2005 22:57:53 +0000 (15:57 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm
Andi Kleen [Tue, 4 Oct 2005 22:21:39 +0000 (00:21 +0200)]
[PATCH] x86_64: Drop global bit from early low mappings
Drop global bit from early low mappings
Suggested by Linus, originally also proposed by Suresh.
This fixes a race condition with early start of udev, originally
tracked down by Suresh B. Siddha. The problem was that switching
to the user space VM would not clear the global low mappings
for the beginning of memory, which lead to memory corruption.
Drop the global bits.
The kernel mapping stays global because it should stay constant.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Eric Dumazet [Tue, 4 Oct 2005 22:55:51 +0000 (15:55 -0700)]
[INET]: Shrink struct inet_ehash_bucket on 32 bits UP
No need to align struct inet_ehash_bucket on a 8 bytes boundary.
On 32 bits Uniprocessor, that's a waste of 4 bytes per struct (50 %)
On other platforms, the attribute is useless, natual alignement is already 8.
platform | Size before | Size after patch
-------------+-------------+------------------
32 bits, UP | 8 | 4
32 bits, SMP | 8 | 8
64 bits, UP | 8 | 8
64 bits, SMP | 16 | 16
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Tue, 4 Oct 2005 22:23:20 +0000 (15:23 -0700)]
[SPARC64]: Replace cheetah+ code patching with variables.
Instead of code patching to handle the page size fields in
the context registers, just use variables from which we get
the proper values.
Signed-off-by: David S. Miller <davem@davemloft.net>
Nicolas Pitre [Tue, 4 Oct 2005 22:17:53 +0000 (23:17 +0100)]
[ARM] 2952/1: fix a register clobber list
Patch from Nicolas Pitre
If gcc decides to assign lr to %0 we're screwed.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Nicolas Pitre [Tue, 4 Oct 2005 22:17:52 +0000 (23:17 +0100)]
[ARM] 2951/1: fix wrong comment
Patch from Nicolas Pitre
The cmpxchg emulation syscall needs write access.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Sascha Hauer [Tue, 4 Oct 2005 22:17:52 +0000 (23:17 +0100)]
[ARM] 2950/1: i.MX gpio setup function
Patch from Sascha Hauer
Current implementation of imx_gpio_mode does not allow to
configure all alternate routing possibilities of the i.MX. With
this patch every bit in the gpio setup registers has a
corresponding bit in the gpio_mode parameter, so every routing
should be possible now.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Sascha Hauer [Tue, 4 Oct 2005 22:17:51 +0000 (23:17 +0100)]
[ARM] 2949/1: Hynix h720x Run mode
Patch from Sascha Hauer
After coming out of idle mode the h720x goes into slow mode. Switch
it back to run mode.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Linus Torvalds [Tue, 4 Oct 2005 20:55:22 +0000 (13:55 -0700)]
Merge /pub/scm/linux/kernel/git/davem/net-2.6
Allan Graves [Tue, 4 Oct 2005 18:53:52 +0000 (14:53 -0400)]
[PATCH] uml: Fix sysrq-r support for skas mode
The old code had the IP and SP coming from the registers in the thread
struct, which are completely wrong since those are the userspace
registers. This fixes that by pulling the correct values from the
jmp_buf in which the kernel state of each thread is stored.
Signed-off-by: Allan Graves <allan.graves@oracle.com>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Dike [Tue, 4 Oct 2005 18:53:49 +0000 (14:53 -0400)]
[PATCH] UML - Fix Al's build tidying
Al's build tidying missed one bit from me - without this UML doesn't boot.
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Acked-by: Al Viro <viro@ftp.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Al Viro [Tue, 4 Oct 2005 16:48:44 +0000 (17:48 +0100)]
[PATCH] bfs iget() abuses
bfs_fill_super() walks the inode table to get the bitmap of free inodes
and collect stats. It has no business using iget() for that - it's a
lot of extra work, extra icache pollution and more complex code.
Switched to walking the damn thing directly.
Note: that also allows to kill ->i_dsk_ino in there - separate patch if
Tigran can confirm that this field can be zero only for deleted inodes
(i.e. something that could only be found during that scan and not by
normal lookups).
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Alexey Dobriyan [Tue, 4 Oct 2005 16:43:06 +0000 (17:43 +0100)]
[PATCH] bfs endianness annotations
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Al Viro [Tue, 4 Oct 2005 16:40:44 +0000 (17:40 +0100)]
[PATCH] bogus kfree() in ibmtr
On several failure exits in ibmtr we end up doing kfree() on dev->priv,
with dev allocated by alloc_trdev() and ->priv never reassigned.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Al Viro [Tue, 4 Oct 2005 16:36:04 +0000 (17:36 +0100)]
[PATCH] missing include in megaraid_sas
megaraid_sas depends on arch-specific indirect includes pulling
fs.h in; on alpha they do not.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Robert Olsson [Tue, 4 Oct 2005 20:01:58 +0000 (13:01 -0700)]
[IPV4]: fib_trie root-node expansion
The patch below introduces special thresholds to keep root node in the trie
large. This gives a flatter tree at the cost of a modest memory increase.
Overall it seems to be gain and this was also proposed by one the authors
of the paper in recent a seminar.
Main table after loading 123 k routes.
Aver depth: 3.30
Max depth: 9
Root-node size 12 bits
Total size: 4044 kB
With the patch:
Aver depth: 2.78
Max depth: 8
Root-node size 15 bits
Total size: 4150 kB
An increase of 8-10% was seen in forwading performance for an rDoS attack.
Signed-off-by: Robert Olsson <robert.olsson@its.uu.se>
Signed-off-by: David S. Miller <davem@davemloft.net>
YOSHIFUJI Hideaki [Tue, 4 Oct 2005 20:00:39 +0000 (13:00 -0700)]
[IPV6]: Fix infinite loop in udp_v6_get_port().
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jeff Garzik [Tue, 4 Oct 2005 18:24:04 +0000 (14:24 -0400)]
Merge branch 'scsi-scan'
Linus Torvalds [Tue, 4 Oct 2005 16:34:00 +0000 (09:34 -0700)]
Merge /pub/scm/linux/kernel/git/aia21/ntfs-2.6
Linus Torvalds [Tue, 4 Oct 2005 15:11:13 +0000 (08:11 -0700)]
Merge /pub/scm/linux/kernel/git/davem/sparc-2.6
Albert Lee [Tue, 4 Oct 2005 12:48:17 +0000 (08:48 -0400)]
[libata scsi] add CHS support to ata_scsi_start_stop_xlat()
Albert Lee [Tue, 4 Oct 2005 12:47:43 +0000 (08:47 -0400)]
[libata scsi] tidy up SCSI lba and xfer len calculations
move the redundant SCSI lba and transfer length calculation code from
ata_scsi_verify_xlat() and ata_scsi_rw_xlat() to common functions.
Albert Lee [Tue, 4 Oct 2005 12:46:51 +0000 (08:46 -0400)]
libata: minor whitespace, comment, debug message updates
Alan Cox [Tue, 4 Oct 2005 12:09:19 +0000 (08:09 -0400)]
libata: bitmask based pci init functions for one or two ports
This redoes the n_ports logic I proposed before as a bitmask.
ata_pci_init_native_mode is now used with a mask allowing for mixed mode
stuff later on. ata_pci_init_legacy_port is called with port number and
does one port now not two. Instead it is called twice by the ata init
logic which cleans both of them up.
There are stil limits in the original code left over
- IRQ/port mapping for legacy mode should be arch specific values
- You can have one legacy mode IDE adapter per PCI root bridge on some systems
- Doesn't handle mixed mode devices yet (but is now a lot closer to it)
Anton Altaparmakov [Tue, 4 Oct 2005 12:08:53 +0000 (13:08 +0100)]
NTFS: Fix a 64-bitness bug where a left-shift could overflow a 32-bit variable
which we now cast to 64-bit first (fs/ntfs/mft.c::map_mft_record_page().
Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
Anton Altaparmakov [Tue, 4 Oct 2005 12:06:00 +0000 (13:06 +0100)]
NTFS: Fix a stupid bug in __ntfs_bitmap_set_bits_in_run() which caused the
count to become negative and hence we had a wild memset() scribbling
all over the system's ram.
Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
Randy Dunlap [Tue, 4 Oct 2005 07:41:22 +0000 (00:41 -0700)]
[PATCH] sungem: fix gfp flags type
Fix nocast sparse warnings in sungen:
drivers/net/sungem.h:1040:45: warning: implicit cast to nocast type
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Randy Dunlap [Tue, 4 Oct 2005 04:24:36 +0000 (21:24 -0700)]
[PATCH] ns83820: fix gfp flags type
Fix implicit nocast warnings in ns83820 code, including __nocast:
drivers/net/ns83820.c:603:46: warning: implicit cast to nocast type
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Randy Dunlap [Tue, 4 Oct 2005 04:24:45 +0000 (21:24 -0700)]
[PATCH] ieee80211: fix gfp flags type
Fix implicit nocast warnings in ieee80211 code, including __nocast:
net/ieee80211/ieee80211_tx.c:215:9: warning: implicit cast to nocast type
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Ion Badulescu [Tue, 4 Oct 2005 02:31:36 +0000 (22:31 -0400)]
[netdrvr starfire] fix highmem and broken firmware issues
Unfortunately, [your patch] might address the crash but doesn't address
the real problem. It turns out that the problem is one of padding
(the firmware cksum engine works only on 32-bit chunks, yuck), so
the special casing for length == 1 wasn't sufficient anyway.
This patch addresses the issue, as well the other issue of i386 +
CONFIG_HIGHMEM being broken. It is pretty much the same workaround
that Adaptec themselves used in their Windows driver. I have yet to
check if it fixes the problem when the skb is non-linear, but this
patch _will_ solve the problem for 99% of the users out there (those
not using sendfile).
Signed-off-by: Ion Badulescu <ionut@badula.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Grant Coady [Fri, 9 Sep 2005 14:14:05 +0000 (00:14 +1000)]
[PATCH] net/Kconfig: convert pocket_adapter ISA to PARPORT
This patch changes pocket and parallel adaptors to depend on PARPORT
instead of ISA in order to get the option in newer SuperIO based systems.
Signed-off-by: Grant Coady <gcoady@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Wade Farnsworth [Tue, 4 Oct 2005 02:21:33 +0000 (22:21 -0400)]
[PATCH] emac: add support for platform-specific unsupported PHY features
This patch adds support to the ibm_emac driver for platform-specific
unsupported PHY features.
The patch attempts to determine the highest speed and duplex when
autonegotiation is unsupported.
Signed-off-by: Wade Farnsworth <wfarnsworth@mvista.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Philippe De Muyter [Thu, 22 Sep 2005 09:09:44 +0000 (11:09 +0200)]
[PATCH] tulip
DC21143 rev 48 10Mbit HDX fix
The patch below is necessary to allow my Digital DS21143 Tulip rev 48
ethernet interface to work in a 10Mbit Half Duplex network. Without
it, the driver keeps retrying other modes in an endless loop. It seems
like someone already had the same problem with a rev 65 board :)
Signed-off-by: Philippe De Muyter <phdm@macqel.be>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Jay Vosburgh [Mon, 26 Sep 2005 23:11:50 +0000 (16:11 -0700)]
[PATCH] fix bonding crash, remove old ABI support
David S. Miller <davem@davemloft.net> wrote:
>I think removing support for older ifenslave binaries is
>the least painful solution to this problem.
This patch removes backwards compatibility for old ifenslave
binaries (ifenslave prior to verison 1.0.0).
I did not similarly modify ifenslave itself; with sysfs on the
horizon, I don't see that as being worthwhile.
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Tejun Heo [Sun, 2 Oct 2005 02:54:29 +0000 (11:54 +0900)]
[PATCH] libata: add ATA exceptions chapter to doc
Hello, Jeff.
This patch adds ATA errors & exceptions chapter to
Documentation/DocBook/libata.tmpl. As suggested, the chapter is
placed before low level driver specific chapters. Contents are
unchanged from the last posting.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Brett Russ [Fri, 30 Sep 2005 05:36:00 +0000 (01:36 -0400)]
[PATCH] libata: Marvell SATA support (DMA mode) (resend: v0.22)
This is my libata compatible low level driver for the Marvell SATA
family. Currently it runs in DMA mode on a 6081 chip.
The 5xxx series parts are not yet DMA capable in this driver because
the registers have differences that haven't been accounted for yet.
Basically, I'm focused on the 6xxx series right now. I apologize for
those seeing problems on the 5xxx series, I've not had a chance to
look at those problems yet.
For those curious, the previous bug causing the SCSI timeout and
subsequent panics was caused by an improper clear of hc_irq_cause in
mv_host_intr().
This version is running well in my environment (6081 chips,
with/without SW raid1) and is showing equal or better performance
compared to the Marvell driver (mv_sata) in my initial tests (timed
dd's of reads/writes to/from memory/disk).
I still need to look at the causes of occasional problems such as this:
ata11: translating stat 0x35 err 0x00 to sense
ata11: status=0x35 { DeviceFault SeekComplete CorrectedError Error }
SCSI error : <10 0 0 0> return code = 0x8000002
Current sda: sense key Hardware Error
end_request: I/O error, dev sda, sector
3155010
and this, seen at init time:
ATA: abnormal status 0x80 on port 0xE093911C
but they aren't showstoppers.
Signed-off-by: Brett Russ <russb@emc.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Ursula Braun [Fri, 30 Sep 2005 08:17:24 +0000 (10:17 +0200)]
[PATCH] s390: qeth driver fixes
From: Peter Tiedemann <ptiedem@de.ibm.com>
From: Frank Pavlic <pavlic@de.ibm.com>
minor qeth fixes:
- free old skb in qeth_realloc_headroom after duplicating skb
- disable IPV6 support for Hipersockets devices
- call ccw_device_set_offline on every channel regardless
of the return value of the prior ccw_device_set_offline calls
- allocate qdio structures in DMA-area
- schedule recovery of appropriate card
when cable has been inserted again.
- add missing initialization of card->lock
- write sequence number in skb->cb for SNA protocol which
requires strictly serialized packets.
Signed-off-by: Frank Pavlic <pavlic@de.ibm.com>
diffstat:
qeth.h | 2 ++
qeth_main.c | 37 +++++++++++++++++--------------------
2 files changed, 19 insertions(+), 20 deletions(-)
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Komuro [Tue, 4 Oct 2005 02:03:28 +0000 (22:03 -0400)]
[netdrvr] fix smc91c92_cs multicast bug
The smc91c92_cs multicast does not work
if the count of multicast address is 1.
Signed-off-by: <komurojun-mbn@nifty.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Randy Dunlap [Mon, 3 Oct 2005 05:41:09 +0000 (22:41 -0700)]
[PATCH] ieee80211: fix gfp flags type
Fix implicit nocast warnings in ieee80211 code:
net/ieee80211/ieee80211_tx.c:215:9: warning: implicit cast to nocast type
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Randy Dunlap [Mon, 3 Oct 2005 05:42:11 +0000 (22:42 -0700)]
[PATCH] ns83820: fix gfp flags type
Fix implicit nocast warnings in ns83820 code:
drivers/net/ns83820.c:603:46: warning: implicit cast to nocast type
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Stephen Hemminger [Mon, 3 Oct 2005 19:03:13 +0000 (12:03 -0700)]
[PATCH] skge: set mac address oops with bonding
Skge driver was bringing link up/down when changing mac
address. This doesn't work in the bonding environment, and is
more effort than needed.
Fixes-bug: http://bugzilla.kernel.org/show_bug.cgi?id=5271
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Jeff Garzik [Tue, 4 Oct 2005 01:36:41 +0000 (21:36 -0400)]
[libata] improve device scan even more
Since our max_lun is unconditionally set to 1, we might as well
hardcode a LUN 0 probe, rather than a wildcard LUN scan.
The ide-scsi driver sets max_lun to a value greater than under
certain conditions:
if ((drive->id->last_lun & 0x7) != 7)
host->max_lun = (drive->id->last_lun & 0x7) + 1;
else
host->max_lun = 1;
last_lun is Word 126 of IDENTIFY PACKET DEVICE, marked as obsolete
and undocumented in non-ancient specs. We'll leave it out for now.
Should the need arise to support multi-LUN ATAPI devices, we'll
probably want to add the above code.
Finally, there have been reports of REPORT LUNS commands locking up
ATAPI drives. Eliminating the wildcard LUN scan could help reduce
the trouble from problematic drives.
David S. Miller [Tue, 4 Oct 2005 00:37:27 +0000 (17:37 -0700)]
[SUNSU]: Fix bogus locking in sunsu_change_mouse_baud()
The lock is not held when calling this function, so we
shouldn't drop then reacquire it.
Based upon a report from Jim MacBaine.
Signed-off-by: David S. Miller <davem@davemloft.net>
Adrian Bunk [Tue, 4 Oct 2005 00:37:02 +0000 (17:37 -0700)]
[SPARC]: "extern inline" doesn't make much sense.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jeff Garzik [Mon, 3 Oct 2005 23:46:45 +0000 (19:46 -0400)]
Merge branch 'master'
David S. Miller [Mon, 3 Oct 2005 23:25:23 +0000 (16:25 -0700)]
[TG3]: Update driver version and release date.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Mon, 3 Oct 2005 23:07:30 +0000 (16:07 -0700)]
[IPV4]: Update icmp sysctl docs and disable broadcast ECHO/TIMESTAMP by default
It's not a good idea to be smurf'able by default.
The few people who need this can turn it on.
Signed-off-by: David S. Miller <davem@davemloft.net>
Herbert Xu [Mon, 3 Oct 2005 21:36:32 +0000 (14:36 -0700)]
[IPV4]: Get rid of bogus __in_put_dev in pktgen
This patch gets rid of a bogus __in_dev_put() in pktgen.c. This was
spotted by Suzanne Wood.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Herbert Xu [Mon, 3 Oct 2005 21:35:55 +0000 (14:35 -0700)]
[IPV4]: Replace __in_dev_get with __in_dev_get_rcu/rtnl
The following patch renames __in_dev_get() to __in_dev_get_rtnl() and
introduces __in_dev_get_rcu() to cover the second case.
1) RCU with refcnt should use in_dev_get().
2) RCU without refcnt should use __in_dev_get_rcu().
3) All others must hold RTNL and use __in_dev_get_rtnl().
There is one exception in net/ipv4/route.c which is in fact a pre-existing
race condition. I've marked it as such so that we remember to fix it.
This patch is based on suggestions and prior work by Suzanne Wood and
Paul McKenney.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Mon, 3 Oct 2005 21:21:58 +0000 (14:21 -0700)]
[IPV6]: Fix leak added by udp connect dst caching fix.
Based upon a patch from Mitsuru KANDA <mk@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yan Zheng [Mon, 3 Oct 2005 21:19:15 +0000 (14:19 -0700)]
[IPV6]: Fix ipv6 fragment ID selection at slow path
Signed-Off-By: Yan Zheng <yanzheng@21cn.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Herbert Xu [Mon, 3 Oct 2005 21:18:10 +0000 (14:18 -0700)]
[IPV4]: Fix "Proxy ARP seems broken"
Meelis Roos <mroos@linux.ee> wrote:
> RK> My firewall setup relies on proxyarp working. However, with 2.6.14-rc3,
> RK> it appears to be completely broken. The firewall is 212.18.232.186,
>
> Same here with some kernel between 14-rc2 and 14-rc3 - no reposnse to
> ARP on a proxyarp gateway. Sorry, no exact revison and no more debugging
> yet since it'a a production gateway.
The breakage is caused by the change to use the CB area for flagging
whether a packet has been queued due to proxy_delay. This area gets
cleared every time arp_rcv gets called. Unfortunately packets delayed
due to proxy_delay also go through arp_rcv when they are reprocessed.
In fact, I can't think of a reason why delayed proxy packets should go
through netfilter again at all. So the easiest solution is to bypass
that and go straight to arp_process.
This is essentially what would've happened before netfilter support
was added to ARP.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Russell King [Mon, 3 Oct 2005 21:16:34 +0000 (14:16 -0700)]
[NET]: Fix "sysctl_net.c:36: error: 'core_table' undeclared here"
During the build for ARM machine type "fortunet", this error occurred:
CC net/sysctl_net.o
net/sysctl_net.c:36: error: 'core_table' undeclared here (not in a function)
It appears that the following configuration settings cause this error
due to a missing include:
CONFIG_SYSCTL=y
CONFIG_NET=y
# CONFIG_INET is not set
core_table appears to be declared in net/sock.h. if CONFIG_INET were
defined, net/sock.h would have been included via:
sysctl_net.c -> net/ip.h -> linux/ip.h -> net/sock.h
so include it directly.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet [Mon, 3 Oct 2005 21:13:38 +0000 (14:13 -0700)]
[INET]: speedup inet (tcp/dccp) lookups
Arnaldo and I agreed it could be applied now, because I have other
pending patches depending on this one (Thank you Arnaldo)
(The other important patch moves skc_refcnt in a separate cache line,
so that the SMP/NUMA performance doesnt suffer from cache line ping pongs)
1) First some performance data :
--------------------------------
tcp_v4_rcv() wastes a *lot* of time in __inet_lookup_established()
The most time critical code is :
sk_for_each(sk, node, &head->chain) {
if (INET_MATCH(sk, acookie, saddr, daddr, ports, dif))
goto hit; /* You sunk my battleship! */
}
The sk_for_each() does use prefetch() hints but only the begining of
"struct sock" is prefetched.
As INET_MATCH first comparison uses inet_sk(__sk)->daddr, wich is far
away from the begining of "struct sock", it has to bring into CPU
cache cold cache line. Each iteration has to use at least 2 cache
lines.
This can be problematic if some chains are very long.
2) The goal
-----------
The idea I had is to change things so that INET_MATCH() may return
FALSE in 99% of cases only using the data already in the CPU cache,
using one cache line per iteration.
3) Description of the patch
---------------------------
Adds a new 'unsigned int skc_hash' field in 'struct sock_common',
filling a 32 bits hole on 64 bits platform.
struct sock_common {
unsigned short skc_family;
volatile unsigned char skc_state;
unsigned char skc_reuse;
int skc_bound_dev_if;
struct hlist_node skc_node;
struct hlist_node skc_bind_node;
atomic_t skc_refcnt;
+ unsigned int skc_hash;
struct proto *skc_prot;
};
Store in this 32 bits field the full hash, not masked by (ehash_size -
1) Using this full hash as the first comparison done in INET_MATCH
permits us immediatly skip the element without touching a second cache
line in case of a miss.
Suppress the sk_hashent/tw_hashent fields since skc_hash (aliased to
sk_hash and tw_hash) already contains the slot number if we mask with
(ehash_size - 1)
File include/net/inet_hashtables.h
64 bits platforms :
#define INET_MATCH(__sk, __hash, __cookie, __saddr, __daddr, __ports, __dif)\
(((__sk)->sk_hash == (__hash))
((*((__u64 *)&(inet_sk(__sk)->daddr)))== (__cookie)) && \
((*((__u32 *)&(inet_sk(__sk)->dport))) == (__ports)) && \
(!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif))))
32bits platforms:
#define TCP_IPV4_MATCH(__sk, __hash, __cookie, __saddr, __daddr, __ports, __dif)\
(((__sk)->sk_hash == (__hash)) && \
(inet_sk(__sk)->daddr == (__saddr)) && \
(inet_sk(__sk)->rcv_saddr == (__daddr)) && \
(!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif))))
- Adds a prefetch(head->chain.first) in
__inet_lookup_established()/__tcp_v4_check_established() and
__inet6_lookup_established()/__tcp_v6_check_established() and
__dccp_v4_check_established() to bring into cache the first element of the
list, before the {read|write}_lock(&head->lock);
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Acked-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Michael Chan [Mon, 3 Oct 2005 21:02:39 +0000 (14:02 -0700)]
[TG3]: Refine AMD K8 write-reorder chipset test.
Test for VIA K8T800 north bridge instead of AMD K8 HyperTransport
bridge based on new information from Andi Kleen. The AMD
HyperTransport interface is not responsible for PCI transactions
and so the re-ordering is more likely done by the VIA north bridge.
This code is subject to change if we get more information from AMD
or VIA.
PCI Express devices are excluded from doing the read flush since all
chipsets in the write_reorder list are PCI chipsets.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Al Viro [Mon, 3 Oct 2005 21:01:37 +0000 (14:01 -0700)]
[CASSINI]: Convert to ethtool_ops
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Herbert Xu [Mon, 3 Oct 2005 20:57:23 +0000 (13:57 -0700)]
[NET]: Fix packet timestamping.
I've found the problem in general. It affects any 64-bit
architecture. The problem occurs when you change the system time.
Suppose that when you boot your system clock is forward by a day.
This gets recorded down in skb_tv_base. You then wind the clock back
by a day. From that point onwards the offset will be negative which
essentially overflows the 32-bit variables they're stored in.
In fact, why don't we just store the real time stamp in those 32-bit
variables? After all, we're not going to overflow for quite a while
yet.
When we do overflow, we'll need a better solution of course.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>