Commit Graph

63872 Commits

Author SHA1 Message Date
James Smart 66dbfbe6fd [SCSI] lpfc : scsi command accessor fix for 8.2.2
It was pointed out by Boaz Harrosh <bharrosh@panasas.com> that our
8.2.2 lpfc patches revert a change to using SCSI command accessor
functions.

This patch, to be applied on top of the 8.2.2. patches, updates the
driver for the accessor functions.

Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-08-03 11:30:09 -05:00
Satyam Sharma bec4947756 [MTD] Makefile fix for mtdsuper
We want drivers/mtd/{mtdcore, mtdsuper, mtdpart}.c to be built and linked
into the same mtd.ko module. Fix the Makefile to ensure this, and remove
duplicate MODULE_ declarations in mtdpart.c, as mtdcore.c already has them.

Signed-off-by: Satyam Sharma <satyam@infradead.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-08-03 12:42:40 +01:00
Michael Neuling 67439b76f2 [POWERPC] Fixes for the SLB shadow buffer code
On a machine with hardware 64kB pages and a kernel configured for a
64kB base page size, we need to change the vmalloc segment from 64kB
pages to 4kB pages if some driver creates a non-cacheable mapping in
the vmalloc area.  However, we never updated with SLB shadow buffer.
This fixes it.  Thanks to paulus for finding this.

Also added some write barriers to ensure the shadow buffer contents
are always consistent.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-08-03 19:36:01 +10:00
Segher Boessenkool 5628244059 [POWERPC] Fix a compile warning in powermac/feature.c
...by using the pci_get API instead of the deprecated old stuff.

Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-08-03 19:36:01 +10:00
Segher Boessenkool 3a77d291be [POWERPC] Fix a compile warning in pci_32.c
__must_check, so do so.

Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-08-03 19:36:01 +10:00
Michael Ellerman b9c3fdb0f0 [POWERPC] Fix parse_drconf_memory() for 64-bit start addresses
Some new machines use the "ibm,dynamic-reconfiguration-memory" property
to provide memory layout information, rather than via memory nodes.

There is a bug in the code to parse this property for start addresses
over 4GB; we store the start address in an unsigned int, which means
we throw away the high bits and add apparently duplicate regions.
This results in a BUG() in free_bootmem_core().  This fixes it by
using an unsigned long instead.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-08-03 19:36:00 +10:00
Kevin Corry 17aa3a82aa [POWERPC] Fix num_cpus calculation in smp_call_function_map()
In smp_call_function_map(), num_cpus is set to the number of online
CPUs minus one.  However, if the CPU mask does not include all CPUs
(except the one we're running on), the routine will hang in the first
while() loop until the 8 second timeout occurs.

The num_cpus should be set to the number of CPUs specified in the mask
passed into the routine, after we've made any modifications to the
mask.  With this change, we can also get rid of the call to
cpus_empty() and avoid adding another pass through the bitmask.

Signed-off-by: Kevin Corry <kevcorry@us.ibm.com>
Signed-off-by: Carl Love <carll@us.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-08-03 19:36:00 +10:00
Stephen Rothwell cba684f56d [POWERPC] ps3: Fix section mismatch in ps3/setup.c
WARNING: vmlinux.o(.text+0x605d4): Section mismatch: reference to
.init.text:.__alloc_bootmem (between '.prealloc' and '.ps3_power_save')

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-08-03 19:36:00 +10:00
Andre Detsch 683e3ab2b5 [POWERPC] spufs: Fix affinity after introduction of node_allowed() calls
This patch fixes affinity reference point placement, which was not being
done in some situations, after the introduction of node_allowed() calls.

The previously used parameter, 'ctx', is just the iterator of the
previous list_for_each_entry_reverse loop, and its value might be
invalid at the end of the loop. Also, the right context to seek
for information when defining the reference ctx location
_is_ the reference ctx.

Signed-off-by: Andre Detsch <adetsch@br.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-08-03 19:18:10 +10:00
Paul Mackerras 430404ed9c [POWERPC] Fix special PTE code for secondary hash bucket
The code for mapping special 4k pages on kernels using a 64kB base
page size was missing the code for doing the RPN (real page number)
manipulation when inserting the hardware PTE in the secondary hash
bucket.  It needs the same code as has already been added to the
code that inserts the HPTE in the primary hash bucket.  This adds it.

Spotted by Ben Herrenschmidt.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-08-03 19:16:11 +10:00
Jan Altenberg 7c5b016246 ucc_geth: remove get_perm_addr from ucc_geth_ethtool.c
This is needed because commit 313674afa8
inlines the generic function to the caller.

Signed-off-by: Jan Altenberg <jan.altenberg@linutronix.de>
Signed-off-by: Li Yang <leoli@freescale.com>
2007-08-03 16:08:15 +08:00
Domen Puncer ed7e63a51d ucc_geth: fix section mismatch
This fix section mismatch:
reference to .exit.text:uec_mdio_exit (between 'ucc_geth_init' and 'uec_mdio_init')

void __exit uec_mdio_exit(void) is called from
- static int __init ucc_geth_init(void)
- static void __exit ucc_geth_exit(void)

First one would make error path more than just an error.

Signed-off-by: Domen Puncer <domen.puncer@telargo.com>
Signed-off-by: Li Yang <leoli@freescale.com>
2007-08-03 16:07:58 +08:00
Paul Mackerras c0f7c6cb5d [POWERPC] Expand RPN field to 34 bits when using 64k pages
The real page number field in our PTEs when configured for 64kB pages
is currently 32 bits, which turns out to be not quite enough for the
resources that the eHCA driver wants to map.  This expands the RPN
field to include 2 adjacent, previously-unused bits.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2007-08-03 14:08:24 +10:00
Ilpo Järvinen 49ff4bb4cd [TCP]: DSACK signals data receival, be conservative
In case a DSACK is received, it's better to lower cwnd as it's
a sign of data receival.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-08-02 19:47:59 -07:00
Ilpo Järvinen 2e6052941a [TCP]: Also handle snd_una changes in tcp_cwnd_down
tcp_cwnd_down must check for it too as it should be conservative
in case of collapse stuff and also when receiver is trying to
lie (though that wouldn't be very successful/useful anyway).

Note:
- Separated also is_dupack and do_lost in fast_retransalert
	* Much cleaner look-and-feel now
	* This time it really fixes cumulative ACK with many new
	  SACK blocks recovery entry (I claimed this fixes with
	  last patch but it wasn't). TCP will now call
	  tcp_update_scoreboard regardless of is_dupack when
	  in recovery as long as there is enough fackets_out.
- Introduce FLAG_SND_UNA_ADVANCED
	* Some prior_snd_una arguments are unnecessary after it
- Added helper FLAG_ANY_PROGRESS to avoid long FLAG...|FLAG...
  constructs

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-08-02 19:46:58 -07:00
David S. Miller 3a97aeb5c1 Merge davem@master.kernel.org:/pub/scm/linux/kernel/git/vxy/lksctp-dev 2007-08-02 19:44:43 -07:00
Florian Westphal d788d8056f [TIPC]: Fix two minor sparse warnings.
fix two warnings generated by sparse:

link.c:2386 symbol 'msgcount' shadows an earlier one
node.c:244 symbol 'addr_string' shadows an earlier one

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-08-02 19:42:31 -07:00
Florian Westphal 248bbf3821 [TIPC]: Make function tipc_nameseq_subscribe static.
make needlessly global function tipc_nameseq_subscribe static.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-08-02 19:42:30 -07:00
Joy Latten 4a4b6271a8 [PF_KEY]: Fix ipsec not working in 2.6.23-rc1-git10
Although an ipsec SA was established, kernel couldn't seem to find it.

I think since we are now using "x->sel.family" instead of "family" in
the xfrm_selector_match() called in xfrm_state_find(), af_key needs to
set this field too, just as xfrm_user.

In af_key.c, x->sel.family only gets set when there's an
ext_hdrs[SADB_EXT_ADDRESS_PROXY-1] which I think is for tunnel.

I think pfkey needs to also set the x->sel.family field when it is 0.

Tested with below patch, and ipsec worked when using pfkey.

Signed-off-by: David S. Miller <davem@davemloft.net>
2007-08-02 19:42:29 -07:00
David S. Miller 3516ffb0fe [TCP]: Invoke tcp_sendmsg() directly, do not use inet_sendmsg().
As discovered by Evegniy Polyakov, if we try to sendmsg after
a connection reset, we can do incredibly stupid things.

The core issue is that inet_sendmsg() tries to autobind the
socket, but we should never do that for TCP.  Instead we should
just go straight into TCP's sendmsg() code which will do all
of the necessary state and pending socket error checks.

TCP's sendpage already directly vectors to tcp_sendpage(), so this
merely brings sendmsg() in line with that.

Signed-off-by: David S. Miller <davem@davemloft.net>
2007-08-02 19:42:28 -07:00
Mariusz Kozlowski 1bcabbdb0b [IPV4] route.c: mostly kmalloc + memset conversion to k[cz]alloc
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-08-02 19:42:27 -07:00
Mariusz Kozlowski 4487b2f657 [IPV4] raw.c: kmalloc + memset conversion to kzalloc
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-08-02 19:42:26 -07:00
Mariusz Kozlowski 8adc546552 [NETFILTER] nf_conntrack_l3proto_ipv4_compat.c: kmalloc + memset conversion to kzalloc
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-08-02 19:42:24 -07:00
Mariusz Kozlowski 9f0d1a004d [NETFILTER] nf_conntrack_expect.c: kmalloc + memset conversion to kzalloc
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-08-02 19:42:23 -07:00
Michal Piotrowski 2f0812350e [NET]: Removal of duplicated include net/wanrouter/wanmain.c
Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-08-02 19:42:22 -07:00
Magnus Damm cc6f33db30 sh: fix defconfigs for sh7751r boards
This patch fixes up the defconfig for various sh7751r based boards
by updating them to the single cpu subtype CONFIG_CPU_SUBTYPE_SH7751R.
The following sh4 boards are updated: hs7751rvoip, landisk, lboxre2,
systemh, titan.

The current defconfigs with two subtypes defined trigger a configuration
bug which result in kernel configurations with missing board support
code. We end up with kernels without board code and with generic machvec
only.

So we need this patch to make sure the board code gets compiled in.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-08-03 10:17:47 +09:00
Magnus Damm 5ca95c48f1 sh: fix cf support on r2d boards
This patch makes sure cf support is enabled on R2D-PLUS but disabled
on R2D-1. Without this fix R2D-1 boards hang on bootup.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-08-03 10:16:29 +09:00
Magnus Damm a3b3e23015 sh: update r2d defconfig
- Disable CONFIG_SH_DMA to avoid boot up freeze on R2D-1
- Disable CONFIG_SH_STANDARD_BIOS to support R2D-PLUS boot loaders

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-08-03 10:15:53 +09:00
David McCullough 49dd3ff3a5 sh: update snapgear defconfig.
Updated the snapgear defconfig to get a booting kernel.

Signed-off-by: David McCullough <david_mccullough@au.securecomputing.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-08-03 10:14:09 +09:00
Linus Torvalds 7a883eaf62 Merge git://git.infradead.org/~dwmw2/mtd-2.6.23
* git://git.infradead.org/~dwmw2/mtd-2.6.23:
  [MTD] [NAND] nand_base.c: fix type of eccpos pointer
  [MTD] [NAND] at91_nand rdy_pin fix
  [MTD] [NAND] fix race in nand_base.c
  [MTD] [NAND] Fix refactoring of EDB7312 hwcontrol function.
  [MTD] Fix potential leak in rfd_ftl_add_mtd
  [JFFS2] Print correct node offset when complaining about broken data CRC
  [JFFS2] Fix suspend failure with JFFS2 GC thread.
  [JFFS2] Deletion dirents should be REF_NORMAL, not REF_PRISTINE.
  [JFFS2] Prevent oops after 'node added in wrong place' debug check
2007-08-02 14:08:53 -07:00
Linus Torvalds 628506c8de Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-2.6-x86setup
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-2.6-x86setup:
  [x86 setup] Document grub < 0.93 as broken
  [x86 setup] EDD: add missing =m constraint
  [x86 setup] video setup: Fix VBE DDC reading
2007-08-02 14:07:57 -07:00
Ben Dooks 515495a1da [MTD] [NAND] nand_base.c: fix type of eccpos pointer
The nand_base.c driver implicitly casts the uint32_t
eccpos array to 'int *', which is not only not guaranteed
to be the same sign as the source, but is not guaranteed
to be the same size.

Fix by changing nand_base.c to use uint32_t
referencing the eccpos fields.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-08-02 21:47:01 +01:00
Ivan Kuten a4265f8d92 [MTD] [NAND] at91_nand rdy_pin fix
The patch below fixes nand driver for AT91 boards which do not have NAND
R/B signal connected to gpio (rdy_pin is not connected).

Signed-off-by: Ivan Kuten <ivan.kuten@promwad.com>
Acked-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-08-02 21:46:48 +01:00
Artem Bityutskiy 06a7643cd3 [MTD] [NAND] fix race in nand_base.c
When we mark block bad we have to get chip because this involves
writing to the page's OOB. We hit this bug in UBI - we observed
random obscure crashes when it marks block bad from the background
thread and there is some parallel task which utilizes flash.

This patch also adds a TODO note about BBT table protection which
it seems does not exist.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-08-02 21:46:21 +01:00
Roland Stigge 9d7b4b5562 [MTD] [NAND] Fix refactoring of EDB7312 hwcontrol function.
The patch ensures that the current code (kernel 2.6.22) uses the bits
like the code prior to the refactoring. The variable "bits" is employed
in a useful way now.

Signed-off-by: Roland Stigge <stigge@antcom.de>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-08-02 21:46:07 +01:00
Florin Malita 47af05dd4b [MTD] Fix potential leak in rfd_ftl_add_mtd
This fixes a leak in the !mtd->erasesize error path (Coverity 1765).

Signed-off-by: Florin Malita <fmalita@gmail.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-08-02 21:44:10 +01:00
David Woodhouse b8e3ec30c2 [JFFS2] Print correct node offset when complaining about broken data CRC
Debugging the hardware problems in OLPC trac #1905 would be a whole lot
easier if the correct node offsets were printed for the offending nodes.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-08-02 21:43:46 +01:00
David Woodhouse 7b687707d7 [JFFS2] Fix suspend failure with JFFS2 GC thread.
The try_to_freeze() call was in the wrong place; we need it in the
signal-pending loop now that a pending freeze also makes
signal_pending() return true.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-08-02 21:43:03 +01:00
David Woodhouse 71c2339775 [JFFS2] Deletion dirents should be REF_NORMAL, not REF_PRISTINE.
Otherwise they'll never actually get garbage-collected.
Noted by Jonathan Larmour.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-08-02 21:39:50 +01:00
Joakim Tjernlund 5bd5c03c31 [JFFS2] Prevent oops after 'node added in wrong place' debug check
jffs2_add_physical_node_ref() should never really return error -- it's
an internal debugging check which triggered. We really need to work out
why and stop it happening. But in the meantime, let's make the failure
mode a little less nasty.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2007-08-02 21:36:35 +01:00
Stefan Richter ae57988f68 firewire: fw-core: make two variables static
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-08-02 20:34:17 +02:00
Stefan Richter 4eaff7d630 firewire: fw-ohci: dma_free_coherent needs IRQs enabled
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-08-02 20:34:17 +02:00
Stefan Richter 25659f7183 firewire: fw-sbp2: set correct maximum payload (fixes CardBus adapters)
As far as I know, all CardBus FireWire 400 adapters have a maximum
payload of 1024 bytes which is less than the speed-dependent limit of
2048 bytes.  Fw-sbp2 has to take the host adapter's limit into account.

This apparently fixes Juju's incompatibility with my CardBus cards, a
NEC based card and a VIA based card.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Acked-by: Kristian Høgsberg <krh@redhat.com>
2007-08-02 20:34:16 +02:00
Stefan Richter e4f8cac5e0 ieee1394: sbp2: more correct Kconfig dependencies
Make the option SBP2_PHYS_DMA available on all architectures where it
compiles.  This includes x86-64 where I runtime-tested it successfully.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-08-02 20:34:16 +02:00
Stefan Richter a9c2f18800 ieee1394: revert "sbp2: enforce 32bit DMA mapping"
Revert commit 0555659d63 from 2.6.22-rc1.
The dma_set_mask call somehow failed on a PowerMac G5, PPC64:
http://lkml.org/lkml/2007/8/1/344

Should there ever occur a DMA mapping beyond the physical DMA range, a
proper SBP-2 firmware will report transport errors.  So let's leave it
at that.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Tested-by: Olaf Hering <olh@suse.de>
2007-08-02 20:34:16 +02:00
Linus Torvalds 370504cf7c Merge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched
* git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched:
  [PATCH] sched: reduce task_struct size
  [PATCH] sched: reduce debug code
  [PATCH] sched: use schedstat_set() API
  [PATCH] sched: add schedstat_set() API
  [PATCH] sched: move load-calculation functions
  [PATCH] sched: ->task_new cleanup
  [PATCH] sched: uninline inc/dec_nr_running()
  [PATCH] sched: uninline calc_delta_mine()
  [PATCH] sched: calc_delta_mine(): use fixed limit
  [PATCH] sched: tidy up left over smpnice code
  [PATCH] sched: remove cache_hot_time
2007-08-02 11:15:27 -07:00
Linus Torvalds 160d6aaf60 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/selinux-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/selinux-2.6:
  Net/Security: fix memory leaks from security_secid_to_secctx()
  SELinux: remove redundant pointer checks before calling kfree()
  SELinux: restore proper NetLabel caching behavior
2007-08-02 11:14:54 -07:00
H. Peter Anvin c3887cd725 [x86 setup] Document grub < 0.93 as broken
Grub older than 0.93 are broken when the kernel setup is bigger than
8K.  This was fixed in 2002, and 0.93 was the first grub version which
fixed this bug.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2007-08-02 13:50:43 -04:00
H. Peter Anvin 463c9a9f7d [x86 setup] EDD: add missing =m constraint
Add a missing =m constraint to the EDD-probing code, that could have
caused improper dead-code elimination.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2007-08-02 13:45:49 -04:00
Paul Moore e6e0871cce Net/Security: fix memory leaks from security_secid_to_secctx()
The security_secid_to_secctx() function returns memory that must be freed
by a call to security_release_secctx() which was not always happening.  This
patch fixes two of these problems (all that I could find in the kernel source
at present).

Signed-off-by: Paul Moore <paul.moore@hp.com>
Acked-by:  Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: James Morris <jmorris@namei.org>
2007-08-02 11:52:26 -04:00