]> bbs.cooldavid.org Git - net-next-2.6.git/log
net-next-2.6.git
17 years agoit821x: RAID mode fixes
Bartlomiej Zolnierkiewicz [Fri, 8 Jun 2007 13:14:29 +0000 (15:14 +0200)]
it821x: RAID mode fixes

The DMA support for RAID mode broke after:

commit 71ef51cc1756d1c56b57c70e7cc27a3559c81ee6
Author: Jens Axboe <axboe@suse.de>
Date: Â  Fri Jul 28 09:02:17 2006 +0200

  Â  [PATCH] it821x: fix ide dma setup bug

  Â  Only enable dma for a valid speed setting.

  Â  Signed-off-by: Jens Axboe <axboe@suse.de>

commit 0a8348d08677ad77ee353f96eb8745c693a05a13
Author: Jens Axboe <axboe@suse.de>
Date: Â  Fri Jul 28 08:58:26 2006 +0200

  Â  [PATCH] ide: if the id fields looks screwy, disable DMA

  Â  It's the safer choice. Originally due to a bug in itx821x, but a
  Â  generally sound thing to do.

  Â  Signed-off-by: Jens Axboe <axboe@suse.de>

However it worked by pure luck before Jens' fixes: bogus ide_dma_enable()
usage in it821x driver combined with loosy check in ide_dma_verbose() allowed
the hardware to operate in DMA mode.  When these problems were fixed the DMA
support broke...

The source root for the regression turned out to be that the it821x.c code
was clearing too much of id->field_valid.  The IDE core code was using the
original value of id->field_valid to do the tuning but later DMA got disabled
in ide_dma_verbose() because of the incorrect id->field_valid fixup.  Fix it.

While at it:

* Do fixup() after probing the drives but before tuning them (which is also
  OK w.r.t. ide_undecoded_slave() fixup).  This change fixes device IDENTIFY
  data to be consistent before/after the tuning and allows us to remove extra
  re-tuning of drives from it821x_fixups().

* Fake MWDMA0 enabled/supported bits in IDENTIFY data if the device has
  DMA capable bit set (this is just to tell the IDE core that DMA is
  supported since it821x firmware takes care of DMA mode programming).

* Don't touch timing registers and don't program transfer modes on devices
  et all when in RAID mode - depend solely on firmware to do the tuning
  (as suggested by Alan Cox and done in libata pata_it821x driver).

Thanks for testing the patch goes out to Thomas Kuther.

Cc: Thomas Kuther <gimpel@sonnenkinder.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Jens Axboe <axboe@suse.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoserverworks: fix CSB6 tuning logic
Bartlomiej Zolnierkiewicz [Fri, 8 Jun 2007 13:14:28 +0000 (15:14 +0200)]
serverworks: fix CSB6 tuning logic

Problem noticed by Joe Zbiciak, see

http://kerneltrap.org/node/8252

for details.

On CSB6 the driver is using BIOS settings and not programming DMA/PIO timings
itself.  However the logic was completely broken and resulted in wrong timings
being silently allowed (instead of being corrected by the driver).

This bug would explain some data corruption/timeout issues with Serverworks
MegaIDE in RAID mode that Alan Cox has fixed recently with:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=2074a106f52b6371885afbd714e929d60d0e3f64

For 2.6.23 we may be better off with completely switching the driver to always
programming timings (libata pata_serverworks.c driver is doing things this way
and there were no problems reported so far) but for 2.6.22 lets fix the bug
in the simplest and the least intrusive way.

Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoserverworks: remove crappy code
Bartlomiej Zolnierkiewicz [Fri, 8 Jun 2007 13:14:27 +0000 (15:14 +0200)]
serverworks: remove crappy code

Remove crappy code noticed by Linus, see

http://lkml.org/lkml/2007/5/23/476

for details.

While at it simplify logic a bit.

There should be no functionality changes caused by this patch.

Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoV4L/DVB (5751): Ivtv: fix ia64 printk format warnings.
Hans Verkuil [Thu, 7 Jun 2007 12:04:03 +0000 (09:04 -0300)]
V4L/DVB (5751): Ivtv: fix ia64 printk format warnings.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5761): Fix broken b2c2 dependency on non x86 architectures
Mauro Carvalho Chehab [Thu, 7 Jun 2007 12:42:20 +0000 (09:42 -0300)]
V4L/DVB (5761): Fix broken b2c2 dependency on non x86 architectures

This patch moves flexcop-dma (currently used only by flexcop-pci) to
b2c2-flexcop-pci module, that is dependent on CONFIG_PCI, fixing the bug
as reported by Geert Uytterhoeven <geert@linux-m68k.org>:

drivers/media/dvb/b2c2/flexcop-dma.c uses the PCI DMA API, but
DVB_B2C2_FLEXCOP doesn't depend on PCI, causing the following problem on
PCI-less systems:

| linux/drivers/media/dvb/b2c2/flexcop-dma.c:20: warning: implicit declaration of function 'pci_alloc_consistent'
| linux/drivers/media/dvb/b2c2/flexcop-dma.c:20: warning: implicit declaration of function 'pci_alloc_consistent'

Apparently this is the flexcop DMA core, which is used by both
DVB_B2C2_FLEXCOP_PCI and DVB_B2C2_FLEXCOP_USB.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5673): Fix audio stuttering for saa711x/ivtv when in radio mode.
Hans Verkuil [Thu, 17 May 2007 11:08:45 +0000 (08:08 -0300)]
V4L/DVB (5673): Fix audio stuttering for saa711x/ivtv when in radio mode.

Signed-off-by: Jose Alberto Reguero <jareguero@telefonica.net>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5736): Add V4L2_FBUF_CAP/FLAG_LOCAL/GLOBAL_INV_ALPHA
Hans Verkuil [Mon, 4 Jun 2007 07:55:36 +0000 (04:55 -0300)]
V4L/DVB (5736): Add V4L2_FBUF_CAP/FLAG_LOCAL/GLOBAL_INV_ALPHA

Michael Schimek requested the addition of inverted alpha framebuffer
caps/flags to support such hardware.
'Normal' alpha uses this formula to mix the framebuffer and video:
output = fb pixel * fb alpha + video pixel * (1 - fb alpha)
and the 'inverted' alpha uses this formula:
output = fb pixel * (1 - fb alpha) + video pixel * fb alpha

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5732): Add ivtv CROPCAP support and fix ivtv S_CROP for video output.
Hans Verkuil [Tue, 29 May 2007 16:03:27 +0000 (13:03 -0300)]
V4L/DVB (5732): Add ivtv CROPCAP support and fix ivtv S_CROP for video output.

The VIDIOC_CROPCAP ioctl was missing in ivtv.
The handling of output video cropping was wrong. This has now been fixed.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5730): Remove unused V4L2_CAP_VIDEO_OUTPUT_POS
Hans Verkuil [Tue, 29 May 2007 11:18:37 +0000 (08:18 -0300)]
V4L/DVB (5730): Remove unused V4L2_CAP_VIDEO_OUTPUT_POS

V4L2_CAP_VIDEO_OUTPUT_POS was initially introduced for 2.6.22 but never
actually used: remove it before the final 2.6.22 is made.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5720): Usbvision: fix urb allocation and submits
Thierry Merle [Sun, 27 May 2007 20:21:17 +0000 (17:21 -0300)]
V4L/DVB (5720): Usbvision: fix urb allocation and submits

- fixed the urb allocation part that was not taking into account the current alternate setting
  this fixes usb_submit_urb returning -90 errno in isocIrq.
- fixed usb_submit_urb returning -1 errno in isocIrq (need to ignore usb urb with status==-ENOENT)
Acked-by: Dwaine P. Garden <dwainegarden@rogers.com>
Signed-off-by: Thierry Merle <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5716): Tda10086,tda826x: fix tuning, STR/SNR values
Oliver Endriss [Mon, 28 May 2007 21:06:27 +0000 (18:06 -0300)]
V4L/DVB (5716): Tda10086,tda826x: fix tuning, STR/SNR values

Several people reported unreliable reception with the current driver.
Furthermore, STR and SNR values seem to be inverted.
This fix is based on a patch posted by Hartmut Hackman.
Thanks to Helmut Auer for testing and helping to optimize the patch.
tda826x:
- set baseband cut-off to 19 MHz
tda10086:
- change the parameters of the carrier recovery loop
- toggle register 0x02 between 0x35 (tuning) and 0x00 (locked)
- invert STR and SNR values

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5675): Move big PIO accesses from the interrupt handler to a workhandler
Hans Verkuil [Sat, 19 May 2007 17:07:16 +0000 (14:07 -0300)]
V4L/DVB (5675): Move big PIO accesses from the interrupt handler to a workhandler

Sliced VBI transfers use PIO instead of DMA. This was done inside the
interrupt handler, but since PIO accesses are very slow this meant that
a lot of time was spent inside the interrupt handler. All PIO copies are
now moved to a workqueue. This should fix various issues with missing time
ticks and remote key hits.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5699): Cinergyt2: fix file release handler
Andrew Morton [Sat, 26 May 2007 10:54:21 +0000 (07:54 -0300)]
V4L/DVB (5699): Cinergyt2: fix file release handler

If this mutex_lock_interruptible() does fail due to signal_pending() then the
state of the driver will get trashed in interesting ways, because userspace
cannot and will not retry the close().

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5700): Saa7111: fix picture settings cache bug
Russell King [Sat, 26 May 2007 10:55:32 +0000 (07:55 -0300)]
V4L/DVB (5700): Saa7111: fix picture settings cache bug

If the SAA7111 device is powered down, and requires re-initialisation when
the V4L device is opened (as on the NetWinder), the SAA7111 driver gets
completely confused about the current settings.

The problem is centred around the way the driver keeps _two_ cached copies
of the current settings - one of the struct video_picture settings, and one
of the registers.

When the decoder is re-initailised, the cached register settings are
overwritten, as are the values in the hardware registers.  However, the
cached video_picture settings are not.

Resolve this by removing the useless and buggy second level of caching for
video_picture.  Instead, provide a function which updates register values
if and only if the value we are going to write to the register has changed.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5702): Fix Kconfig items to avoid linkedition errors
Mauro Carvalho Chehab [Sat, 26 May 2007 13:45:28 +0000 (10:45 -0300)]
V4L/DVB (5702): Fix Kconfig items to avoid linkedition errors

The recent changes on Kconfig broke compilation when VIDEO_DEV is compiled
as module. On some cases, drivers like VIDEO_BUF are compiled with 'y' option
instead of 'm':

...

Thanks to: Toralf Forster <toralf.foerster@gmx.de> for pointing this issue.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agosplice: __generic_file_splice_read: fix read/truncate race
Jens Axboe [Thu, 7 Jun 2007 07:39:42 +0000 (09:39 +0200)]
splice: __generic_file_splice_read: fix read/truncate race

Original patch and description from Neil Brown <neilb@suse.de>,
merged and adapted to splice branch by me. Neils text follows:

__generic_file_splice_read() currently samples the i_size at the start
and doesn't do so again unless it needs to call ->readpage to load
a page.  After ->readpage it has to re-sample i_size as a truncate
may have caused that page to be filled with zeros, and the read()
call should not see these.

However there are other activities that might cause ->readpage to be
called on a page between the time that __generic_file_splice_read()
samples i_size and when it finds that it has an uptodate page. These
include at least read-ahead and possibly another thread performing a
read

So we must sample i_size *after* it has an uptodate page.  Thus the
current sampling at the start and after a read can be replaced with a
sampling before page addition into spd.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agosplice: __generic_file_splice_read: fix i_size_read() length checks
Hugh Dickins [Thu, 7 Jun 2007 07:36:00 +0000 (09:36 +0200)]
splice: __generic_file_splice_read: fix i_size_read() length checks

__generic_file_splice_read's partial page check, at eof after readpage,
not only got its calculations wrong, but also reused the loff variable:
causing data corruption when splicing from a non-0 offset in the file's
last page (revealed by ext2 -b 1024 testing on a loop of a tmpfs file).

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agosplice: move balance_dirty_pages_ratelimited() outside of splice actor
Jens Axboe [Tue, 5 Jun 2007 09:05:11 +0000 (11:05 +0200)]
splice: move balance_dirty_pages_ratelimited() outside of splice actor

I've seen inode related deadlocks, so move this call outside of the
actor itself, which may hold the inode lock.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agopipe: move pipe_inode_info structure decleration up before it's used
Jens Axboe [Mon, 4 Jun 2007 13:03:12 +0000 (15:03 +0200)]
pipe: move pipe_inode_info structure decleration up before it's used

There's really no reason it's below the first use of the pointer
type, and it'll fail compilation for the network addition (for good
reason). So move it up a bit.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agosplice: remove do_splice_direct() symbol export
Jens Axboe [Fri, 8 Jun 2007 06:33:41 +0000 (08:33 +0200)]
splice: remove do_splice_direct() symbol export

It's only supposed to be used by do_sendfile(), which is never
modular. So kill the export.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agosplice: move inode size check into generic_file_splice_read()
Jens Axboe [Fri, 1 Jun 2007 12:54:11 +0000 (14:54 +0200)]
splice: move inode size check into generic_file_splice_read()

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoIB/mlx4: Make sure RQ allocation is always valid
Roland Dreier [Fri, 8 Jun 2007 06:24:39 +0000 (23:24 -0700)]
IB/mlx4: Make sure RQ allocation is always valid

QPs attached to an SRQ must never have their own RQ, and QPs not
attached to SRQs must have an RQ with at least 1 entry.  Enforce all
of this in set_rq_size().

Based on a patch by Eli Cohen <eli@mellanox.co.il>.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years agoRDMA/cma: Fix initialization of next_port
Sean Hefty [Tue, 5 Jun 2007 16:57:31 +0000 (09:57 -0700)]
RDMA/cma: Fix initialization of next_port

next_port should be between sysctl_local_port_range[0] and [1].
However, it is initially set to a random value with get_random_bytes().
If the value is negative when treated as a signed integer, next_port
can end up outside the expected range because of the result of the %
operator being negative.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years agoIB/mlx4: Fix zeroing of rnr_retry value in ib_modify_qp()
Jack Morgenstein [Wed, 6 Jun 2007 16:35:04 +0000 (19:35 +0300)]
IB/mlx4: Fix zeroing of rnr_retry value in ib_modify_qp()

The code in __mlx4_ib_modify_qp() overwrites context->params1 after
the RNR retry parameter is ORed in, which results in the RNR retry
parameter always being set to 0.  Fix this by moving where we OR in
the value to later in the function, after the initial assignment of
context->params1.

Found by the Mellanox firmware group.

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years agomlx4_core: Don't set MTT address in dMPT entries with PA set
Jack Morgenstein [Fri, 8 Jun 2007 06:24:38 +0000 (23:24 -0700)]
mlx4_core: Don't set MTT address in dMPT entries with PA set

If a dMPT entry has the PA flag (direct physical address) set, then
the (unused) MTT base address field has to be set to 0.

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years agomlx4_core: Check firmware command interface revision
Roland Dreier [Fri, 8 Jun 2007 06:24:36 +0000 (23:24 -0700)]
mlx4_core: Check firmware command interface revision

HCA firmware with incompatible changes to the FW commmand interface is
coming soon.  Add a check of the interface revision during
initialization and bail out if the firmware advertises a revision that
the driver doesn't know about.  This will avoid strange failures later
if the driver goes on using the wrong interface revision.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years ago[SPARC64]: Handle PCI bridges without 'ranges' property.
David S. Miller [Fri, 8 Jun 2007 04:59:44 +0000 (21:59 -0700)]
[SPARC64]: Handle PCI bridges without 'ranges' property.

This fixes the IDE controller not showing up on Netra-T1
systems.

Just like Simba bridges, some PCI bridges can lack the
'ranges' OBP property.  So we handle this similarly to
the existing Simba code:

1) In of_device register address resolving, we push the
   translation to the parent.

2) In PCI device scanning, we interrogate the PCI config
   space registers of the PCI bus device in order to resolve
   the resources, just like the generic Linux PCI probing
   code does.

With much help and testing from Fabio, who also reported
the initial problem.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Fabio Massimo Di Nitto <fabbione@ubuntu.com>
17 years ago[SPARC64]: Include <linux/rwsem.h> instead of <asm/rwsem.h>.
Robert P. J. Day [Fri, 8 Jun 2007 03:24:50 +0000 (20:24 -0700)]
[SPARC64]: Include <linux/rwsem.h> instead of <asm/rwsem.h>.

To be consistent with other architectures, include the generic version
of rwsem.h.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoRAMFS NOMMU: missed POSIX UID/GID inode attribute checking
Bryan Wu [Tue, 5 Jun 2007 03:02:01 +0000 (11:02 +0800)]
RAMFS NOMMU: missed POSIX UID/GID inode attribute checking

This bug was caught by LTP testcase fchmod06 on Blackfin platform.

In the manpage of fchmod, "EPERM: The effective UID does not match the
owner of the file, and the process is not privileged (Linux: it does not
have the CAP_FOWNER capability)."

But the ramfs nommu code missed the inode_change_ok POSIX UID/GID
verification. This patch fixed this.

Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMerge git://git.linux-xtensa.org/kernel/xtensa-feed
Linus Torvalds [Fri, 8 Jun 2007 00:10:19 +0000 (17:10 -0700)]
Merge git://git.linux-xtensa.org/kernel/xtensa-feed

* git://git.linux-xtensa.org/kernel/xtensa-feed:
  Xtensa: use asm-generic/fcntl.h
  [XTENSA] Remove non-rt signal handling
  [XTENSA] Move common sections into bss sections
  [XTENSA] clean-up header files
  [XTENSA] Use generic 64-bit division
  [XTENSA] Remove multi-exported symbols from xtensa_ksyms.c
  [XTENSA] fix sources using deprecated assembler directive
  [XTENSA] Spelling fixes in arch/xtensa
  [XTENSA] fix bit operations in bitops.h

17 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Fri, 8 Jun 2007 00:09:01 +0000 (17:09 -0700)]
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6

* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC64]: Fix SBUS IRQ regression caused by PCI-E driver.
  [SPARC64]: Fix 2 bugs in PCI Sabre bus scanning.

17 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Fri, 8 Jun 2007 00:08:06 +0000 (17:08 -0700)]
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (24 commits)
  xfrm: Add security check before flushing SAD/SPD
  [NET_SCHED]: Fix filter double free
  [NET]: Avoid duplicate netlink notification when changing link state
  [UDP]: Revert 2-pass hashing changes.
  [AF_UNIX]: Fix stream recvmsg() race.
  [NETFILTER]: nf_conntrack_amanda: fix textsearch_prepare() error check
  [NETFILTER]: ip_tables: fix compat related crash
  [NETFILTER]: nf_conntrack: fix helper module unload races
  [RTNETLINK]: ifindex 0 does not exist
  [NETLINK]: Mark netlink policies const
  [TCP] tcp_probe: Attach printf attribute properly to printl().
  [TCP]: Use LIMIT_NETDEBUG in tcp_retransmit_timer().
  [NET]: Merge dst_discard_in and dst_discard_out.
  [RFKILL]: Make rfkill->name const
  [IPV4]: Restore old behaviour of default config values
  [IPV4]: Add default config support after inetdev_init
  [IPV4]: Convert IPv4 devconf to an array
  [IPV4]: Only panic if inetdev_init fails for loopback
  [TCP]: Honour sk_bound_dev_if in tcp_v4_send_ack
  [BNX2]: Update version and reldate.
  ...

17 years agoenable interrupts in user path of page fault.
Steven Rostedt [Thu, 7 Jun 2007 03:34:04 +0000 (23:34 -0400)]
enable interrupts in user path of page fault.

This is a minor fix, but what is currently there is essentially wrong.
In do_page_fault, if the faulting address from user code happens to be
in kernel address space (int *p = (int*)-1; p = 0xbed;)  then the
do_page_fault handler will jump over the local_irq_enable with the

  goto bad_area_nosemaphore;

But the first line there sees this is user code and goes through the
process of sending a signal to send SIGSEGV to the user task. This whole
time interrupts are disabled and the task can not be preempted by a
higher priority task.

This patch always enables interrupts in the user path of the
bad_area_nosemaphore.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Fri, 8 Jun 2007 00:02:29 +0000 (17:02 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] pxa: fix pxa27x keyboard driver
  [ARM] Fix 4417/1: Serial: Fix AMBA drivers locking
  [ARM] 4421/1: AT91: Value of _KEY fields.
  [ARM] Solve buggy smp_processor_id() usage
  [ARM] 4422/1: Fix default value handling in gpio_direction_output (PXA)
  [ARM] 4419/1: AT91: SAM9 USB clocks check for suspending
  [ARM] 4418/1: AT91: Number of programmable clocks differs
  [ARM] 4392/2: Do not corrupt the SP register in compressed/head.S

17 years agoMerge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
Linus Torvalds [Fri, 8 Jun 2007 00:00:37 +0000 (17:00 -0700)]
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  [MIPS] Fix warning by moving do_default_vi into CONFIG_CPU_MIPSR2_SRS
  [MIPS] Fix some minor typoes in arch/mips/Kconfig.
  [MIPS] Remove prototype for deleted function qemu_handle_int
  [MIPS] Fix some system calls with long long arguments
  [MIPS] Make dma_map_sg handle sg elements which are longer than one page
  [MIPS] Drop __ARCH_WANT_SYS_FADVISE64
  [MIPS] Fix VGA corruption on RM300C
  [MIPS] RM300: Fix MMIO problems by marking the PCI INT ACK region busy
  [MIPS] EMMA2RH: remove dead KGDB code
  [MIPS] Remove duplicate fpu enable hazard code.
  [MIPS] Atlas, Malta, SEAD: Remove scroll from interrupt handler.

17 years agofrv: build fix
Peter Zijlstra [Wed, 6 Jun 2007 09:39:40 +0000 (11:39 +0200)]
frv: build fix

In file included from /usr/src/linux-2.6-2/net/ipv4/ip_input.c:118:

  include2/asm/system.h:245: error: parse error before "__cmpxchg_32"
  include2/asm/system.h:245: error: parse error before '*' token
  include2/asm/system.h:245: warning: type defaults to `int' in declaration of `__cmpxchg_32'
  include2/asm/system.h:245: warning: function declaration isn't a prototype
  include2/asm/system.h:245: warning: data definition has no type or storage class

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[SPARC64]: Fix SBUS IRQ regression caused by PCI-E driver.
David S. Miller [Thu, 7 Jun 2007 23:58:22 +0000 (16:58 -0700)]
[SPARC64]: Fix SBUS IRQ regression caused by PCI-E driver.

We used to access the 64-bit IRQ IMAP and ICLR registers of bus
controllers 4-bytes in and as a 32-bit register word, since only the
low 32-bits were relevant.  This seemed like a good idea at the time.

But the PCI-E controller requires full 8-byte 64-bit access to
these registers, so we switched over to accessing them fully.

SBUS was not adjusted properly, which broke interrupts completely.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[SPARC64]: Fix 2 bugs in PCI Sabre bus scanning.
David S. Miller [Wed, 6 Jun 2007 21:03:08 +0000 (14:03 -0700)]
[SPARC64]: Fix 2 bugs in PCI Sabre bus scanning.

If we are on hummingbird, bus runs at 66MHZ.

pbm->pci_bus should be setup with the result of pci_scan_one_pbm()
or else we deref NULL pointers in the error interrupt handlers.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoxfrm: Add security check before flushing SAD/SPD
Joy Latten [Mon, 4 Jun 2007 23:05:57 +0000 (19:05 -0400)]
xfrm: Add security check before flushing SAD/SPD

Currently we check for permission before deleting entries from SAD and
SPD, (see security_xfrm_policy_delete() security_xfrm_state_delete())
However we are not checking for authorization when flushing the SPD and
the SAD completely. It was perhaps missed in the original security hooks
patch.

This patch adds a security check when flushing entries from the SAD and
SPD.  It runs the entire database and checks each entry for a denial.
If the process attempting the flush is unable to remove all of the
entries a denial is logged the the flush function returns an error
without removing anything.

This is particularly useful when a process may need to create or delete
its own xfrm entries used for things like labeled networking but that
same process should not be able to delete other entries or flush the
entire database.

Signed-off-by: Joy Latten<latten@austin.ibm.com>
Signed-off-by: Eric Paris <eparis@parisplace.org>
Signed-off-by: James Morris <jmorris@namei.org>
17 years ago[NET_SCHED]: Fix filter double free
Patrick McHardy [Tue, 5 Jun 2007 23:06:59 +0000 (16:06 -0700)]
[NET_SCHED]: Fix filter double free

cbq and atm destroy their filters twice when destroying inner classes
during qdisc destruction.

Reported-and-tested-by: Strobl Anton <a.strobl@aws-it.at>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NET]: Avoid duplicate netlink notification when changing link state
Thomas Graf [Tue, 5 Jun 2007 23:03:03 +0000 (16:03 -0700)]
[NET]: Avoid duplicate netlink notification when changing link state

When changing the link state from userspace not affecting any other
flags. Two duplicate notification are being sent, once as action
in the NETDEV_UP/NETDEV_DOWN notification chain and a second time
when comparing old and new device flags after the change has been
completed. Although harmless, the duplicates should be avoided.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[UDP]: Revert 2-pass hashing changes.
David S. Miller [Tue, 5 Jun 2007 22:18:43 +0000 (15:18 -0700)]
[UDP]: Revert 2-pass hashing changes.

This reverts changesets:

6aaf47fa48d3c44280810b1b470261d340e4ed87
b7b5f487ab39bc10ed0694af35651a03d9cb97ff
de34ed91c4ffa4727964a832c46e624dd1495cf5
fc038410b4b1643766f8033f4940bcdb1dace633

There are still some correctness issues recently
discovered which do not have a known fix that doesn't
involve doing a full hash table scan on port bind.

So revert for now.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[AF_UNIX]: Fix stream recvmsg() race.
Miklos Szeredi [Tue, 5 Jun 2007 20:10:29 +0000 (13:10 -0700)]
[AF_UNIX]: Fix stream recvmsg() race.

A recv() on an AF_UNIX, SOCK_STREAM socket can race with a
send()+close() on the peer, causing recv() to return zero, even though
the sent data should be received.

This happens if the send() and the close() is performed between
skb_dequeue() and checking sk->sk_shutdown in unix_stream_recvmsg():

process A  skb_dequeue() returns NULL, there's no data in the socket queue
process B  new data is inserted onto the queue by unix_stream_sendmsg()
process B  sk->sk_shutdown is set to SHUTDOWN_MASK by unix_release_sock()
process A  sk->sk_shutdown is checked, unix_release_sock() returns zero

I'm surprised nobody noticed this, it's not hard to trigger.  Maybe
it's just (un)luck with the timing.

It's possible to work around this bug in userspace, by retrying the
recv() once in case of a zero return value.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NETFILTER]: nf_conntrack_amanda: fix textsearch_prepare() error check
Akinobu Mita [Tue, 5 Jun 2007 19:56:53 +0000 (12:56 -0700)]
[NETFILTER]: nf_conntrack_amanda: fix textsearch_prepare() error check

The return value from textsearch_prepare() needs to be checked
by IS_ERR(). Because it returns error code as a pointer.

Cc: "Brian J. Murrell" <netfilter@interlinx.bc.ca>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NETFILTER]: ip_tables: fix compat related crash
Dmitry Mishin [Tue, 5 Jun 2007 19:56:09 +0000 (12:56 -0700)]
[NETFILTER]: ip_tables: fix compat related crash

check_compat_entry_size_and_hooks iterates over the matches and calls
compat_check_calc_match, which loads the match and calculates the
compat offsets, but unlike the non-compat version, doesn't call
->checkentry yet. On error however it calls cleanup_matches, which in
turn calls ->destroy, which can result in crashes if the destroy
function (validly) expects to only get called after the checkentry
function.

Add a compat_release_match function that only drops the module reference
on error and rename compat_check_calc_match to compat_find_calc_match to
reflect the fact that it doesn't call the checkentry function.

Reported by Jan Engelhardt <jengelh@linux01.gwdg.de>

Signed-off-by: Dmitry Mishin <dim@openvz.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NETFILTER]: nf_conntrack: fix helper module unload races
Patrick McHarrdy [Tue, 5 Jun 2007 19:55:27 +0000 (12:55 -0700)]
[NETFILTER]: nf_conntrack: fix helper module unload races

When a helper module is unloaded all conntracks refering to it have their
helper pointer NULLed out, leading to lots of races. In most places this
can be fixed by proper use of RCU (they do already check for != NULL,
but in a racy way), additionally nf_conntrack_expect_related needs to
bail out when no helper is present.

Also remove two paranoid BUG_ONs in nf_conntrack_proto_gre that are racy
and not worth fixing.

Signed-off-by: Patrick McHarrdy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[RTNETLINK]: ifindex 0 does not exist
Patrick McHardy [Tue, 5 Jun 2007 19:40:01 +0000 (12:40 -0700)]
[RTNETLINK]: ifindex 0 does not exist

ifindex == 0 does not exist and implies we should do a lookup by name if
one was given.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NETLINK]: Mark netlink policies const
Patrick McHardy [Tue, 5 Jun 2007 19:38:30 +0000 (12:38 -0700)]
[NETLINK]: Mark netlink policies const

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[TCP] tcp_probe: Attach printf attribute properly to printl().
David S. Miller [Tue, 5 Jun 2007 07:19:24 +0000 (00:19 -0700)]
[TCP] tcp_probe: Attach printf attribute properly to printl().

GCC doesn't like the way Stephen initially did it:

net/ipv4/tcp_probe.c:83: warning: empty declaration

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[TCP]: Use LIMIT_NETDEBUG in tcp_retransmit_timer().
Eric Dumazet [Tue, 5 Jun 2007 07:16:12 +0000 (00:16 -0700)]
[TCP]: Use LIMIT_NETDEBUG in tcp_retransmit_timer().

LIMIT_NETDEBUG allows the admin to disable some warning messages (echo 0
 >/proc/sys/net/core/warnings).

The "TCP: Treason uncloaked!" message can use this facility.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NET]: Merge dst_discard_in and dst_discard_out.
Denis Cheng [Tue, 5 Jun 2007 07:06:57 +0000 (00:06 -0700)]
[NET]: Merge dst_discard_in and dst_discard_out.

Signed-off-by: Denis Cheng <crquan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[RFKILL]: Make rfkill->name const
Ivo van Doorn [Tue, 5 Jun 2007 07:04:46 +0000 (00:04 -0700)]
[RFKILL]: Make rfkill->name const

The rfkill name can be made const safely,
this makes the compiler happy when drivers make
it point to some const string used elsewhere.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[IPV4]: Restore old behaviour of default config values
Herbert Xu [Tue, 5 Jun 2007 06:36:06 +0000 (23:36 -0700)]
[IPV4]: Restore old behaviour of default config values

Previously inet devices were only constructed when addresses are added
(or rarely in ipmr).  Therefore the default config values they get are
the ones at the time of these operations.

Now that we're creating inet devices earlier, this changes the
behaviour of default config values in an incompatible way (see bug
#8519).

This patch creates a compromise by setting the default values at the
same point as before but only for those that have not been explicitly
set by the user since the inet device's creation.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[IPV4]: Add default config support after inetdev_init
Herbert Xu [Tue, 5 Jun 2007 06:35:37 +0000 (23:35 -0700)]
[IPV4]: Add default config support after inetdev_init

Previously once inetdev_init has been called on a device any changes
made to ipv4_devconf_dflt would have no effect on that device's
configuration.

This creates a problem since we have moved the point where
inetdev_init is called from when an address is added to where the
device is registered.

This patch is the first half of a set that tries to mimic the old
behaviour while still calling inetdev_init.

It propagates any changes to ipv4_devconf_dflt to those devices that
have not had the corresponding attribute set.

The next patch will forcibly set all values at the point where
inetdev_init was previously called.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[IPV4]: Convert IPv4 devconf to an array
Herbert Xu [Tue, 5 Jun 2007 06:34:44 +0000 (23:34 -0700)]
[IPV4]: Convert IPv4 devconf to an array

This patch converts the ipv4_devconf config members (everything except
sysctl) to an array.  This allows easier manipulation which will be
needed later on to provide better management of default config values.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[IPV4]: Only panic if inetdev_init fails for loopback
Herbert Xu [Tue, 5 Jun 2007 06:34:08 +0000 (23:34 -0700)]
[IPV4]: Only panic if inetdev_init fails for loopback

When I made the inetdev_init call work on all devices I incorrectly
left in the panic call as well.  It is obviously undesirable to
panic on an allocation failure for a normal network device.  This
patch moves the panic call under the loopback if clause.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[TCP]: Honour sk_bound_dev_if in tcp_v4_send_ack
Patrick McHardy [Tue, 5 Jun 2007 04:32:46 +0000 (21:32 -0700)]
[TCP]: Honour sk_bound_dev_if in tcp_v4_send_ack

A time_wait socket inherits sk_bound_dev_if from the original socket,
but it is not used when sending ACK packets using ip_send_reply.

Fix by passing the oif to ip_send_reply in struct ip_reply_arg and
use it for output routing.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[BNX2]: Update version and reldate.
Michael Chan [Tue, 5 Jun 2007 04:24:42 +0000 (21:24 -0700)]
[BNX2]: Update version and reldate.

Update to version 1.5.11.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Acked-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[BNX2]: Fix occasional counter corruption on 5708.
Michael Chan [Tue, 5 Jun 2007 04:24:07 +0000 (21:24 -0700)]
[BNX2]: Fix occasional counter corruption on 5708.

The statistics block DMA on 5708 can be messed up occasionally on the
average of about once per hour.  If the user is reading the counters
within one second after the corruption, the counters will be all
messed up.  One second later, the counters will be ok again until the
next corruption occurs.

The workaround is to disable the periodic statistics DMA.  Instead,
we manually trigger the DMA once a second in bnx2_timer().  This
manual trigger of the DMA avoids the problem.

As a consequence, we can only allow 0 or 1 second settings for
ethtool -C statistics block.

Thanks to Jean-Daniel Pauget <jd@disjunkt.com> and
CaT <cat@zip.com.au> for reporting this rare problem.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Acked-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[BNX2]: Enable DMA on 5709.
Michael Chan [Tue, 5 Jun 2007 04:23:06 +0000 (21:23 -0700)]
[BNX2]: Enable DMA on 5709.

Add missing code to enable DMA on 5709 A1.  The bit is a no-op on A0
and therefore can be set on all 5709 chips.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Acked-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[BNX2]: Add missing wait in bnx2_init_5709_context().
Michael Chan [Tue, 5 Jun 2007 04:22:24 +0000 (21:22 -0700)]
[BNX2]: Add missing wait in bnx2_init_5709_context().

For correctness, we need to wait for the MEM_INIT bit to be cleared
in the BNX2_CTX_COMMAND register before proceeding.

[Added return -EBUSY when the MEM_INIT bit doesn't clear, suggested
by Jeff Garzik.]

Signed-off-by: Michael Chan <mchan@broadcom.com>
Acked-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[BNX2]: Fix netdev watchdog on 5708.
Michael Chan [Tue, 5 Jun 2007 04:17:10 +0000 (21:17 -0700)]
[BNX2]: Fix netdev watchdog on 5708.

There's a bug in the driver that only initializes half of the context
memory on the 5708.  Surprisingly, this works most of the time except
for some occasional netdev watchdogs when sending a lot of 64-byte
packets.  The fix is to add the missing code to initialize the 2nd
halves of all context memory.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Acked-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoIB/mthca, mlx4_core: Fix typo in comment
Roland Dreier [Mon, 4 Jun 2007 02:47:10 +0000 (19:47 -0700)]
IB/mthca, mlx4_core: Fix typo in comment

s/signifant/significant/

Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years agomlx4_core: Free catastrophic error MSI-X interrupt with correct dev_id
Roland Dreier [Sat, 2 Jun 2007 14:16:02 +0000 (07:16 -0700)]
mlx4_core: Free catastrophic error MSI-X interrupt with correct dev_id

We need to pass the same dev_id to free_irq() and request_irq().  When
using MSI-X, the MLX4_EQ_CATAS interrupt uses a different dev_id from
the other interrupts.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years agomlx4_core: Initialize ctx_list and ctx_lock earlier
Roland Dreier [Thu, 7 Jun 2007 18:51:58 +0000 (11:51 -0700)]
mlx4_core: Initialize ctx_list and ctx_lock earlier

We may call mlx4_dispatch_event() before mlx4_register_device() is
called for a device, because for example a catastrophic error happens
immediately after we enable interrupts.  Therefore priv->ctx_list and
priv->ctx_lock need to be initialized earlier.

This bug was actually exposed by the MSI-X bug that returned IRQ numbers
to drivers in reverse order, so that the first FW command
interrupt looked to mlx4 like a catastrophic error.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years agomlx4_core: Fix CQ context layout
Eli Cohen [Wed, 30 May 2007 10:14:31 +0000 (13:14 +0300)]
mlx4_core: Fix CQ context layout

The reserved6 field should be 64 bits, not just 16 bits.  Without
this, the structure does not match the hardware layout on 32-bit
architectures: the db_rec_addr field ends up at offset 52 instead of
offset 56.  The bug slipped by because the alignment of __be64 members
ends up putting it in the right place on x86-64.

Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6
Linus Torvalds [Thu, 7 Jun 2007 16:36:55 +0000 (09:36 -0700)]
Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6:
  sh: Fix se73180 platform device registration.
  sh: ioremap() through PMB needs asm/mmu.h.
  sh: voyagergx: Fix build warnings.
  sh: Fix SH4-202 clock fwk set_rate() mismatch.
  sh: microdev: Fix compile warnings.
  sh: Fix in_nmi symbol build error.

17 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Thu, 7 Jun 2007 16:35:54 +0000 (09:35 -0700)]
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6

* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [VIDEO] sunxvr500fb: Fix pseudo_palette array size
  [VIDEO] sunxvr2500fb: Fix pseudo_palette array size
  [VIDEO] ffb: The pseudo_palette is only 16 elements long
  [VIDEO]: Fix section mismatch warning in promcon.
  [ATA]: Back out bogus (SPARC64 && !PCI) Kconfig depends.
  [SPARC64]: Fill in gaps in non-PCI dma_*() NOP implementation.
  [SPARC64]: Fix {mc,smt}_capable().
  [SPARC64]: Make core and sibling groups equal on UltraSPARC-IV.
  [SPARC64]: Proper multi-core scheduling support.
  [SPARC64]: Provide mmu statistics via sysfs.
  [SPARC64]: Fix service channel hypervisor function names.
  [SPARC64]: Export basic cpu properties via sysfs.
  [SPARC64]: Move topology init code into new file, sysfs.c

17 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
Linus Torvalds [Thu, 7 Jun 2007 15:54:55 +0000 (08:54 -0700)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc

* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  [POWERPC] Fix building of COFF zImages
  [POWERPC] spufs: Fix error handling in spufs_fill_dir()
  [POWERPC] Add table of contents to booting-without-of.txt
  [POWERPC] spufs: Don't yield nosched context
  [POWERPC] Fix typo in booting-without-of-txt section numbering
  [POWERPC] scc_sio: Fix link failure
  [POWERPC] cbe_cpufreq: Limit frequency via cpufreq notifier chain
  [POWERPC] Fix pci_setup_phb_io_dynamic for pci_iomap
  [POWERPC] spufs scheduler: Fix wakeup races
  [POWERPC] spufs: Synchronize pte invalidation vs ps close
  [POWERPC] spufs: Free mm if spufs_fill_dir() failed
  [POWERPC] spufs: Fix gang destroy leaks
  [POWERPC] spufs: Hook up spufs_release_mem
  [POWERPC] spufs: Refuse to load the module when not running on cell
  [POWERPC] pasemi: Fix iommu + 64K PAGE_SIZE bug

17 years agoRestrict clearing TIF_SIGPENDING
Roland McGrath [Wed, 6 Jun 2007 10:59:00 +0000 (03:59 -0700)]
Restrict clearing TIF_SIGPENDING

This patch should get a few birds.  It prevents sigaction calls from
clearing TIF_SIGPENDING in other threads, which could leak -ERESTART*.
And It fixes ptrace_stop not to clear it, which done at the syscall exit
stop could leak -ERESTART*.  It probably removes the harm from signalfd,
at least assuming it never calls dequeue_signal on kernel threads that
might have used block_all_signals.

Signed-off-by: Roland McGrath <roland@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agocheckpatch.pl: should be executable
Andy Whitcroft [Thu, 7 Jun 2007 15:16:40 +0000 (16:16 +0100)]
checkpatch.pl: should be executable

scripts/checkpatch.pl should be executable, make it so.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Acked-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Joel Schopp <jschopp@austin.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[POWERPC] Fix building of COFF zImages
Paul Mackerras [Thu, 7 Jun 2007 12:21:31 +0000 (22:21 +1000)]
[POWERPC] Fix building of COFF zImages

The COFF zImage (for booting oldworld powermacs) wasn't being built
correctly because the procedure descriptor in crt0.S for the zImage
entry point wasn't declared as .globl, and therefore wasn't getting
pulled in from wrapper.a by the linker.  This adds the necessary
.globl statement.

Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years agommc: don't call switch on old cards
Pierre Ossman [Thu, 31 May 2007 20:25:11 +0000 (22:25 +0200)]
mmc: don't call switch on old cards

Make sure we don't call the switch function on cards too old to
support it. They should just ignore it, but some have been reported
to lock up instead.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agommc: fix broken if clause
Pierre Ossman [Wed, 6 Jun 2007 18:23:25 +0000 (20:23 +0200)]
mmc: fix broken if clause

Fix a broken if clause which was causing SD cards to go into
4-bit mode even if the host did not support it.

(Reported by David Brownell and Marc Pignat)

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agoau1xmmc: Replace C code with call to ARRAY_SIZE() macro.
Robert P. J. Day [Wed, 6 Jun 2007 18:19:34 +0000 (20:19 +0200)]
au1xmmc: Replace C code with call to ARRAY_SIZE() macro.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agommc-atmel: remove linux/mmc/protocol.h dependencies
Marc Pignat [Wed, 6 Jun 2007 18:27:59 +0000 (20:27 +0200)]
mmc-atmel: remove linux/mmc/protocol.h dependencies

Fix compilation error by removing command decoding from at91_mci.c driver.
Decoding commands in the host driver is the wrong way.

Signed-off-by: Marc Pignat <marc.pignat@hevs.ch>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years ago[POWERPC] spufs: Fix error handling in spufs_fill_dir()
Sebastian Siewior [Wed, 6 Jun 2007 04:03:58 +0000 (14:03 +1000)]
[POWERPC] spufs: Fix error handling in spufs_fill_dir()

The error path in spufs_fill_dir() is broken. If d_alloc_name() or
spufs_new_file() fails, spufs_prune_dir() is getting called. At this time
dir->inode is not set and a NULL pointer is dereferenced by mutex_lock().
This bugfix replaces spufs_prune_dir() with a shorter version that does
not touch dir->inode but simply removes all children.

Signed-off-by: Sebastian Siewior <bigeasy@linux.vnet.ibm.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Add table of contents to booting-without-of.txt
Stuart Yoder [Tue, 5 Jun 2007 18:29:14 +0000 (04:29 +1000)]
[POWERPC] Add table of contents to booting-without-of.txt

Add table of contents.

Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] spufs: Don't yield nosched context
Christoph Hellwig [Tue, 5 Jun 2007 01:25:59 +0000 (11:25 +1000)]
[POWERPC] spufs: Don't yield nosched context

Nosched context sould never be scheduled out, thus we must not
deactivate them in spu_yield ever.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Fix typo in booting-without-of-txt section numbering
Stuart Yoder [Mon, 4 Jun 2007 21:16:15 +0000 (07:16 +1000)]
[POWERPC] Fix typo in booting-without-of-txt section numbering

Fix typo in section numbering.

Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] scc_sio: Fix link failure
Christoph Hellwig [Mon, 4 Jun 2007 18:14:41 +0000 (04:14 +1000)]
[POWERPC] scc_sio: Fix link failure

scc_sio.o should only be built if the txx9 serial driver is actually
built into the kernel.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
--
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] cbe_cpufreq: Limit frequency via cpufreq notifier chain
Thomas Renninger [Mon, 4 Jun 2007 18:14:40 +0000 (04:14 +1000)]
[POWERPC] cbe_cpufreq: Limit frequency via cpufreq notifier chain

... and get rid of cpufreq_set_policy call that caused a build
failure due interfering commits.

Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Christian Krafft <krafft@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Fix pci_setup_phb_io_dynamic for pci_iomap
Arnd Bergmann [Mon, 4 Jun 2007 18:14:39 +0000 (04:14 +1000)]
[POWERPC] Fix pci_setup_phb_io_dynamic for pci_iomap

We had a problem on a system with only dynamically allocated
PCI buses (using of_pci_phb_driver) in combination with libata.
This setup ended up having no "primary" phb, which means
that pci_io_base never got initialized and all IO port
numbers are 64 bit numbers, which is larger than the
PIO_MASK limit.

Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] spufs scheduler: Fix wakeup races
Christoph Hellwig [Mon, 4 Jun 2007 13:26:51 +0000 (23:26 +1000)]
[POWERPC] spufs scheduler: Fix wakeup races

Fix the race between checking for contexts on the runqueue and actually
waking them in spu_deactive and spu_yield.

The guts of spu_reschedule are split into a new helper called
grab_runnable_context which shows if there is a runnable thread below
a specified priority and if yes removes if from the runqueue and uses
it.  This function is used by the new __spu_deactivate hepler shared
by preemption and spu_yield to grab a new context before deactivating
a specified priority and if yes removes if from the runqueue and uses
it.  This function is used by the new __spu_deactivate hepler shared
by preemption and spu_yield to grab a new context before deactivating
the old one.

Signed-off-by: Christoph Hellwig <hch@lst.de>
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>
17 years ago[POWERPC] spufs: Synchronize pte invalidation vs ps close
Christoph Hellwig [Mon, 4 Jun 2007 13:26:51 +0000 (23:26 +1000)]
[POWERPC] spufs: Synchronize pte invalidation vs ps close

Make sure the mapping_lock also protects access to the various address_space
pointers used for tearing down the ptes on a spu context switch.

Because unmap_mapping_range can sleep we need to turn mapping_lock from
a spinlock into a sleeping mutex.

Signed-off-by: Christoph Hellwig <hch@lst.de>
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>
17 years ago[POWERPC] spufs: Free mm if spufs_fill_dir() failed
Sebastian Siewior [Mon, 4 Jun 2007 13:26:51 +0000 (23:26 +1000)]
[POWERPC] spufs: Free mm if spufs_fill_dir() failed

In case spufs_fill_dir() fails only put_spu_context()
gets called for cleanup and the acquired mm_struct never gets freed.

Signed-off-by: Sebastian Siewior <bigeasy@linux.vnet.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>
17 years ago[POWERPC] spufs: Fix gang destroy leaks
Jeremy Kerr [Mon, 4 Jun 2007 13:26:51 +0000 (23:26 +1000)]
[POWERPC] spufs: Fix gang destroy leaks

Previously, closing a SPE gang that still has contexts would trigger
a WARN_ON, and leak the allocated gang.

This change fixes the problem by using the gang's reference counts to
destroy the gang instead. The gangs will persist until their last
reference (be it context or open file handle) is gone.

Also, avoid using statements with side-effects in a WARN_ON().

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] spufs: Hook up spufs_release_mem
Christoph Hellwig [Mon, 4 Jun 2007 13:26:51 +0000 (23:26 +1000)]
[POWERPC] spufs: Hook up spufs_release_mem

Currently spufs_mem_release and the mem file doesn't have any release
method hooked up, leading to leaks everytime is used.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] spufs: Refuse to load the module when not running on cell
Arnd Bergmann [Mon, 4 Jun 2007 13:26:51 +0000 (23:26 +1000)]
[POWERPC] spufs: Refuse to load the module when not running on cell

As noticed by David Woodhouse, it's currently possible to mount
spufs on any machine, which means that it actually will get
mounted by fedora.
This refuses to load the module on platforms that have no
support for SPUs.

Cc: David Woodhouse <dwmw2@infradead.org>
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>
17 years ago[POWERPC] pasemi: Fix iommu + 64K PAGE_SIZE bug
Olof Johansson [Mon, 4 Jun 2007 00:49:05 +0000 (10:49 +1000)]
[POWERPC] pasemi: Fix iommu + 64K PAGE_SIZE bug

The powerpc iommu code was refactored by Linas back in the 2.6.20 time
frame to map 4K pages from the generic code, but I had forgotten to go
back and fix my platform driver before submitting it.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years agoocfs2: Fix invalid assertion during write on 64k pages
Mark Fasheh [Wed, 6 Jun 2007 23:15:24 +0000 (16:15 -0700)]
ocfs2: Fix invalid assertion during write on 64k pages

The write path code intends to bug if a math error (or unhandled case)
results in a write outside of the current cluster boundaries. The actual
BUG_ON() statements however are incorrect, leading to a crash on kernels
with 64k page size. Fix those by checking against the right variables.

Also, move the assertions higher up within the functions so that they trip
*before* the code starts to mark buffers.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
17 years agoocfs2: Fix masklog breakage
Tiger Yang [Mon, 4 Jun 2007 02:31:08 +0000 (10:31 +0800)]
ocfs2: Fix masklog breakage

Some of the sysfs changes inadvertantly broke the simple runtime debug log
filtering employed in ocfs2. Fix this by properly exporting the masklog
category filter names.

Signed-off-by: Tiger Yang <tiger.yang@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
17 years ago[AGPGART] intel_agp: Add support for G33, Q33 and Q35 chipsets
Wang Zhenyu [Wed, 6 Jun 2007 03:16:25 +0000 (11:16 +0800)]
[AGPGART] intel_agp: Add support for G33, Q33 and Q35 chipsets

This patch adds pci ids for G33, Q33 and Q35 chips, and update with new
GTT size and stolen mem size detect method on these chips.

Signed-off-by: Wang Zhenyu <zhenyu.z.wang@intel.com>
Signed-off-by: Dave Jones <davej@redhat.com>
17 years ago[AGPGART] intel_agp: add support for 945GME
Wang Zhenyu [Thu, 31 May 2007 03:51:12 +0000 (11:51 +0800)]
[AGPGART] intel_agp: add support for 945GME

Add pci id info for 945GME.

Signed-off-by: Wang Zhenyu <zhenyu.z.wang@intel.com>
Signed-off-by: Dave Jones <davej@redhat.com>
17 years ago[AGPGART] intel_agp: add support for 965GME/GLE
Wang Zhenyu [Thu, 31 May 2007 03:34:06 +0000 (11:34 +0800)]
[AGPGART] intel_agp: add support for 965GME/GLE

Add pci id info for 965GME/GLE support.

Signed-off-by: Wang Zhenyu <zhenyu.z.wang@intel.com>
Signed-off-by: Dave Jones <davej@redhat.com>
17 years ago[AGPGART] intel_agp: use table for device probe
Wang Zhenyu [Wed, 30 May 2007 01:45:58 +0000 (09:45 +0800)]
[AGPGART] intel_agp: use table for device probe

Fixed issues noted by Christoph Hellwig, and I changed device table
scan a bit to allow the case that some models of graphics chips may
have same host bridge type. This type of chip will be added in the future.

This patch cleans up device probe function. Eric Anholt was the original author.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Wang Zhenyu <zhenyu.z.wang@intel.com>
Signed-off-by: Dave Jones <davej@redhat.com>
17 years ago[AGPGART] intel_agp: cleanup intel private data
Wang Zhenyu [Wed, 30 May 2007 01:40:46 +0000 (09:40 +0800)]
[AGPGART] intel_agp: cleanup intel private data

Remove volatile type declare for IO mem variables.

A single private gart data is used by all drivers, this
makes it clean. Eric Anholt wrote the original patch.

Signed-off-by: Wang Zhenyu <zhenyu.z.wang@intel.com>
Signed-off-by: Dave Jones <davej@redhat.com>
17 years ago[MIPS] Fix warning by moving do_default_vi into CONFIG_CPU_MIPSR2_SRS
Atsushi Nemoto [Mon, 21 May 2007 14:45:38 +0000 (23:45 +0900)]
[MIPS] Fix warning by moving do_default_vi into CONFIG_CPU_MIPSR2_SRS

This fixes the warning:

arch/mips/kernel/traps.c:931: warning: 'do_default_vi' defined but not used

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Fix some minor typoes in arch/mips/Kconfig.
Robert P. J. Day [Sun, 20 May 2007 16:11:07 +0000 (12:11 -0400)]
[MIPS] Fix some minor typoes in arch/mips/Kconfig.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Remove prototype for deleted function qemu_handle_int
Ralf Baechle [Sun, 20 May 2007 20:29:01 +0000 (22:29 +0200)]
[MIPS] Remove prototype for deleted function qemu_handle_int

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>