pandora-kernel.git
15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
Linus Torvalds [Thu, 3 Jul 2008 01:57:33 +0000 (18:57 -0700)]
Merge git://git./linux/kernel/git/jejb/scsi-rc-fixes-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
  [SCSI] esp: tidy up target reference counting
  [SCSI] esp: Fix OOPS in esp_reset_cleanup().
  [SCSI] ses: Fix timeout

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm
Linus Torvalds [Thu, 3 Jul 2008 01:55:17 +0000 (18:55 -0700)]
Merge git://git./linux/kernel/git/agk/linux-2.6-dm

* git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm:
  dm crypt: use cond_resched

15 years agoMerge branch 'for-2.6.26' of git://neil.brown.name/md
Linus Torvalds [Thu, 3 Jul 2008 01:47:10 +0000 (18:47 -0700)]
Merge branch 'for-2.6.26' of git://neil.brown.name/md

* 'for-2.6.26' of git://neil.brown.name/md:
  Fix error paths if md_probe fails.
  Don't acknowlege that stripe-expand is complete until it really is.
  Ensure interrupted recovery completed properly (v1 metadata plus bitmap)

15 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
Linus Torvalds [Thu, 3 Jul 2008 01:45:29 +0000 (18:45 -0700)]
Merge branch 'merge' of git://git./linux/kernel/git/paulus/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  powerpc/mpc5200: Fix lite5200b suspend/resume
  powerpc/legacy_serial: Bail if reg-offset/shift properties are present
  powerpc/bootwrapper: update for initrd with simpleImage

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Thu, 3 Jul 2008 01:43:16 +0000 (18:43 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (55 commits)
  net: fib_rules: fix error code for unsupported families
  netdevice: Fix wrong string handle in kernel command line parsing
  net: Tyop of sk_filter() comment
  netlink: Unneeded local variable
  net-sched: fix filter destruction in atm/hfsc qdisc destruction
  net-sched: change tcf_destroy_chain() to clear start of filter list
  ipv4: fix sysctl documentation of time related values
  mac80211: don't accept WEP keys other than WEP40 and WEP104
  hostap: fix sparse warnings
  hostap: don't report useless WDS frames by default
  textsearch: fix Boyer-Moore text search bug
  netfilter: nf_conntrack_tcp: fixing to check the lower bound of valid ACK
  ipv6 route: Convert rt6_device_match() to use RT6_LOOKUP_F_xxx flags.
  netlabel: Fix a problem when dumping the default IPv6 static labels
  net/inet_lro: remove setting skb->ip_summed when not LRO-able
  inet fragments: fix race between inet_frag_find and inet_frag_secret_rebuild
  CONNECTOR: add a proc entry to list connectors
  netlink: Fix some doc comments in net/netlink/attr.c
  tcp: /proc/net/tcp rto,ato values not scaled properly (v2)
  include/linux/netdevice.h: don't export MAX_HEADER to userspace
  ...

15 years agoDRM/i915: only use tiled blits on 965+
Jesse Barnes [Tue, 1 Jul 2008 19:32:52 +0000 (12:32 -0700)]
DRM/i915: only use tiled blits on 965+

When scheduled swaps occur, we need to blit between front & back
buffers.  If the buffers are tiled, we need to set the appropriate
XY_SRC_COPY tile bit, but only on 965 chips, since it will cause
corruption on pre-965 (e.g. 945).

Bug reported by and fix tested by Tomas Janousek <tomi@nomi.cz>.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Acked-by: Dave Airlie <airlied@linux.ie>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agodrivers/input/ff-core.c needs <linux/sched.h>
Geert Uytterhoeven [Tue, 1 Jul 2008 11:55:25 +0000 (13:55 +0200)]
drivers/input/ff-core.c needs <linux/sched.h>

Commit 656acd2bbc4ce7f224de499ee255698701396c48 ("Input: fix locking in
force-feedback core") causes the following regression on m68k:

| linux/drivers/input/ff-core.c: In function 'input_ff_upload':
| linux/drivers/input/ff-core.c:172: error: dereferencing pointer to incomplete type
| linux/drivers/input/ff-core.c: In function 'erase_effect':
| linux/drivers/input/ff-core.c:197: error: dereferencing pointer to incomplete type
| linux/drivers/input/ff-core.c:204: error: dereferencing pointer to incomplete type
| make[4]: *** [drivers/input/ff-core.o] Error 1

As the incomplete type is `struct task_struct', including <linux/sched.h> fixes
it.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branch 'for-2.6.26' of git://git.secretlab.ca/git/linux-2.6-mpc52xx into merge
Paul Mackerras [Thu, 3 Jul 2008 00:05:59 +0000 (10:05 +1000)]
Merge branch 'for-2.6.26' of git://git.secretlab.ca/git/linux-2.6-mpc52xx into merge

15 years agodm crypt: use cond_resched
Milan Broz [Wed, 2 Jul 2008 08:34:28 +0000 (09:34 +0100)]
dm crypt: use cond_resched

Add cond_resched() to prevent monopolising CPU when processing large bios.

dm-crypt processes encryption of bios in sector units.  If the bio request
is big it can spend a long time in the encryption call.

Signed-off-by: Milan Broz <mbroz@redhat.com>
Tested-by: Yan Li <elliot.li.tech@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
15 years agonet: fib_rules: fix error code for unsupported families
Patrick McHardy [Wed, 2 Jul 2008 02:59:37 +0000 (19:59 -0700)]
net: fib_rules: fix error code for unsupported families

The errno code returned must be negative.

Fixes "RTNETLINK answers: Unknown error 18446744073709551519".

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetdevice: Fix wrong string handle in kernel command line parsing
Wang Chen [Wed, 2 Jul 2008 02:57:19 +0000 (19:57 -0700)]
netdevice: Fix wrong string handle in kernel command line parsing

v1->v2: Use strlcpy() to ensure s[i].name be null-termination.

1. In netdev_boot_setup_add(), a long name will leak.
   ex. : dev=21,0x1234,0x1234,0x2345,eth123456789verylongname.........
2. In netdev_boot_setup_check(), mismatch will happen if s[i].name
   is a substring of dev->name.
   ex. : dev=...eth1 dev=...eth11

[ With feedback from Ben Hutchings. ]

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: Tyop of sk_filter() comment
Wang Chen [Wed, 2 Jul 2008 02:55:40 +0000 (19:55 -0700)]
net: Tyop of sk_filter() comment

Parameter "needlock" no long exists.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetlink: Unneeded local variable
Wang Chen [Wed, 2 Jul 2008 02:55:09 +0000 (19:55 -0700)]
netlink: Unneeded local variable

We already have a variable, which has the same capability.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet-sched: fix filter destruction in atm/hfsc qdisc destruction
Patrick McHardy [Wed, 2 Jul 2008 02:53:09 +0000 (19:53 -0700)]
net-sched: fix filter destruction in atm/hfsc qdisc destruction

Filters need to be destroyed before beginning to destroy classes
since the destination class needs to still be alive to unbind the
filter.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet-sched: change tcf_destroy_chain() to clear start of filter list
Patrick McHardy [Wed, 2 Jul 2008 02:52:38 +0000 (19:52 -0700)]
net-sched: change tcf_destroy_chain() to clear start of filter list

Pass double tcf_proto pointers to tcf_destroy_chain() to make it
clear the start of the filter list for more consistency.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoipv4: fix sysctl documentation of time related values
Stephen Hemminger [Wed, 2 Jul 2008 00:22:48 +0000 (17:22 -0700)]
ipv4: fix sysctl documentation of time related values

These sysctl values are time related and all use the same routine
(proc_dointvec_jiffies) that internally converts from seconds to jiffies.
The code is fine, the documentation is just wrong.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agopowerpc/mpc5200: Fix lite5200b suspend/resume
Tim Yamin [Tue, 17 Jun 2008 08:33:14 +0000 (09:33 +0100)]
powerpc/mpc5200: Fix lite5200b suspend/resume

Suspend/resume ("echo mem > /sys/power/state") does not work with
vanilla kernels -- the system does not suspend correctly and just
hangs. This patch fixes this so suspend/resume works:

1) of_iomap does not map the whole 0xC000 of the MPC5200 immr so
saving registers does not work.
2) PCI registers need to be saved and restored.

Signed-off-by: Tim Yamin <plasm@roo.me.uk>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
15 years agopowerpc/legacy_serial: Bail if reg-offset/shift properties are present
John Linn [Tue, 1 Jul 2008 17:52:41 +0000 (10:52 -0700)]
powerpc/legacy_serial: Bail if reg-offset/shift properties are present

The legacy serial driver does not work with an 8250 type UART that is
described in the device tree with the reg-offset and reg-shift
properties.  This change makes legacy_serial ignore these devices.

Signed-off-by: John Linn <john.linn@xilinx.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
15 years agopowerpc/bootwrapper: update for initrd with simpleImage
John Linn [Tue, 1 Jul 2008 20:17:18 +0000 (14:17 -0600)]
powerpc/bootwrapper: update for initrd with simpleImage

This change to the makefile corrects the build of a simpleImage with initrd.

Signed-off-by: John Linn <john.linn@xilinx>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
15 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireles...
David S. Miller [Mon, 30 Jun 2008 20:18:53 +0000 (13:18 -0700)]
Merge branch 'master' of /linux/kernel/git/linville/wireless-2.6

15 years agomac80211: don't accept WEP keys other than WEP40 and WEP104
Emmanuel Grumbach [Fri, 27 Jun 2008 23:50:13 +0000 (02:50 +0300)]
mac80211: don't accept WEP keys other than WEP40 and WEP104

This patch makes mac80211 refuse a WEP key whose length is not WEP40 nor
WEP104.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agohostap: fix sparse warnings
Pavel Roskin [Fri, 27 Jun 2008 20:19:58 +0000 (16:19 -0400)]
hostap: fix sparse warnings

Rewrite AID calculation in handle_pspoll() to avoid truncating bits.
Make hostap_80211_header_parse() static, don't export it.  Avoid
shadowing variables.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agohostap: don't report useless WDS frames by default
Pavel Roskin [Fri, 27 Jun 2008 20:19:52 +0000 (16:19 -0400)]
hostap: don't report useless WDS frames by default

DEBUG_EXTRA is reported to the kernel log by default, but DEBUG_EXTRA2
is not.  Unrelated WDS frames pollute the log unnecessarily.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agotextsearch: fix Boyer-Moore text search bug
Joonwoo Park [Mon, 30 Jun 2008 19:42:23 +0000 (12:42 -0700)]
textsearch: fix Boyer-Moore text search bug

The current logic has a bug which cannot find matching pattern, if the
pattern is matched from the first character of target string.
for example:
pattern=abc, string=abcdefg
pattern=a,   string=abcdefg
Searching algorithm should return 0 for those things.

Signed-off-by: Joonwoo Park <joonwpark81@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetfilter: nf_conntrack_tcp: fixing to check the lower bound of valid ACK
Jozsef Kadlecsik [Mon, 30 Jun 2008 19:41:30 +0000 (12:41 -0700)]
netfilter: nf_conntrack_tcp: fixing to check the lower bound of valid ACK

Lost connections was reported by Thomas Bätzler (running 2.6.25 kernel) on
the netfilter mailing list (see the thread "Weird nat/conntrack Problem
with PASV FTP upload"). He provided tcpdump recordings which helped to
find a long lingering bug in conntrack.

In TCP connection tracking, checking the lower bound of valid ACK could
lead to mark valid packets as INVALID because:

 - We have got a "higher or equal" inequality, but the test checked
   the "higher" condition only; fixed.
 - If the packet contains a SACK option, it could occur that the ACK
   value was before the left edge of our (S)ACK "window": if a previous
   packet from the other party intersected the right edge of the window
   of the receiver, we could move forward the window parameters beyond
   accepting a valid ack. Therefore in this patch we check the rightmost
   SACK edge instead of the ACK value in the lower bound of valid (S)ACK
   test.

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Linus Torvalds [Mon, 30 Jun 2008 15:58:09 +0000 (08:58 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: fix locking in force-feedback core
  Input: add KEY_MEDIA_REPEAT definition

15 years agoMerge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Mon, 30 Jun 2008 15:57:43 +0000 (08:57 -0700)]
Merge branch 'core-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  debugobjects: fix lockdep warning

15 years agoMerge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Mon, 30 Jun 2008 15:57:19 +0000 (08:57 -0700)]
Merge branch 'sched-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  sched: fix cpu hotplug

15 years agoMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Mon, 30 Jun 2008 15:56:57 +0000 (08:56 -0700)]
Merge branch 'x86-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  ptrace GET/SET FPXREGS broken
  x86: fix cpu hotplug crash
  x86: section/warning fixes
  x86: shift bits the right way in native_read_tscp

15 years agoInput: fix locking in force-feedback core
Dmitry Torokhov [Thu, 26 Jun 2008 15:30:02 +0000 (11:30 -0400)]
Input: fix locking in force-feedback core

The newly added event_lock spinlock in the input core disallows sleeping
and therefore using mutexes in event handlers. Convert force-feedback
core to rely on event_lock instead of mutex to protect slots allocated
for fore-feedback effects. The original mutex is still used to serialize
uploading and erasing of effects.

Reported-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
15 years agoInput: add KEY_MEDIA_REPEAT definition
Bastien Nocera [Thu, 26 Jun 2008 13:13:48 +0000 (09:13 -0400)]
Input: add KEY_MEDIA_REPEAT definition

This patch adds the Repeat key to the input layer. The usage
in the HUT is 0xBC (listed under "15.7 Transport Controls").

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
15 years agoptrace GET/SET FPXREGS broken
TAKADA Yoshihito [Mon, 30 Jun 2008 04:44:45 +0000 (13:44 +0900)]
ptrace GET/SET FPXREGS broken

When I update kernel 2.6.25 from 2.6.24, gdb does not work.
On 2.6.25, ptrace(PTRACE_GETFPXREGS, ...) returns ENODEV.

But 2.6.24 kernel's ptrace() returns EIO.
It is issue of compatibility.

I attached test program as pt.c and patch for fix it.

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <signal.h>
#include <errno.h>
#include <sys/ptrace.h>
#include <sys/types.h>

struct user_fxsr_struct {
unsigned short cwd;
unsigned short swd;
unsigned short twd;
unsigned short fop;
long fip;
long fcs;
long foo;
long fos;
long mxcsr;
long reserved;
long st_space[32]; /* 8*16 bytes for each FP-reg = 128 bytes */
long xmm_space[32]; /* 8*16 bytes for each XMM-reg = 128 bytes */
long padding[56];
};

int main(void)
{
  pid_t pid;

  pid = fork();

  switch(pid){
  case -1:/*  error */
    break;
  case 0:/*  child */
    child();
    break;
  default:
    parent(pid);
    break;
  }
  return 0;
}

int child(void)
{
  ptrace(PTRACE_TRACEME);
  kill(getpid(), SIGSTOP);
  sleep(10);
  return 0;
}
int parent(pid_t pid)
{
  int ret;
  struct user_fxsr_struct fpxregs;

  ret = ptrace(PTRACE_GETFPXREGS, pid, 0, &fpxregs);
  if(ret < 0){
    printf("%d: %s.\n", errno, strerror(errno));
  }
  kill(pid, SIGCONT);
  wait(pid);
  return 0;
}

/* in the kerel, at kernel/i387.c get_fpxregs() */

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: fix cpu hotplug crash
Zhang, Yanmin [Tue, 24 Jun 2008 08:06:23 +0000 (16:06 +0800)]
x86: fix cpu hotplug crash

Vegard Nossum reported crashes during cpu hotplug tests:

  http://marc.info/?l=linux-kernel&m=121413950227884&w=4

In function _cpu_up, the panic happens when calling
__raw_notifier_call_chain at the second time. Kernel doesn't panic when
calling it at the first time. If just say because of nr_cpu_ids, that's
not right.

By checking the source code, I found that function do_boot_cpu is the culprit.
Consider below call chain:
 _cpu_up=>__cpu_up=>smp_ops.cpu_up=>native_cpu_up=>do_boot_cpu.

So do_boot_cpu is called in the end. In do_boot_cpu, if
boot_error==true, cpu_clear(cpu, cpu_possible_map) is executed. So later
on, when _cpu_up calls __raw_notifier_call_chain at the second time to
report CPU_UP_CANCELED, because this cpu is already cleared from
cpu_possible_map, get_cpu_sysdev returns NULL.

Many resources are related to cpu_possible_map, so it's better not to
change it.

Below patch against 2.6.26-rc7 fixes it by removing the bit clearing in
cpu_possible_map.

Signed-off-by: Zhang Yanmin <yanmin_zhang@linux.intel.com>
Tested-by: Vegard Nossum <vegard.nossum@gmail.com>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb
Linus Torvalds [Sun, 29 Jun 2008 19:22:55 +0000 (12:22 -0700)]
Merge git://git./linux/kernel/git/mchehab/v4l-dvb

* git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (42 commits)
  V4L/DVB (8108): Fix open/close race in saa7134
  V4L/DVB (8100): V4L/vivi: fix possible memory leak in vivi_fillbuff
  V4L/DVB (8097): xc5000: check device hardware state to determine if firmware download is needed
  V4L/DVB (8096): au8522: prevent false-positive lock status
  V4L/DVB (8092): videodev: simplify and fix standard enumeration
  V4L/DVB (8075): stv0299: Uncorrected block count and bit error rate fixed
  V4L/DVB (8074): av7110: OSD transfers should not be interrupted
  V4L/DVB (8073): av7110: Catch another type of ARM crash
  V4L/DVB (8071): tda10023: Fix possible kernel oops during initialisation
  V4L/DVB (8069): cx18: Fix S-Video and Compsite inputs for the Yuan MPC718 and enable card entry
  V4L/DVB (8068): cx18: Add I2C slave reset via GPIO upon initialization
  V4L/DVB (8067): cx18: Fix firmware load for case when digital capture happens first
  V4L/DVB (8066): cx18: Fix audio mux input definitions for HVR-1600 Line In 2 and FM radio
  V4L/DVB (8063): cx18: Fix unintended auto configurations in cx18-av-core
  V4L/DVB (8061): cx18: only select tuner / frontend modules if !DVB_FE_CUSTOMISE
  V4L/DVB (8048): saa7134: Fix entries for Avermedia A16d and Avermedia E506
  V4L/DVB (8044): au8522: tuning optimizations
  V4L/DVB (8043): au0828: add support for additional USB device id's
  V4L/DVB (8042): DVB-USB UMT-010 channel scan oops
  V4L/DVB (8040): soc-camera: remove soc_camera_host_class class
  ...

15 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux...
Linus Torvalds [Sun, 29 Jun 2008 19:22:30 +0000 (12:22 -0700)]
Merge branch 'release' of git://git./linux/kernel/git/lenb/linux-acpi-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
  dock: bay: Don't call acpi_walk_namespace() when ACPI is disabled.
  ACPI: don't walk tables if ACPI was disabled
  thermal: Create CONFIG_THERMAL_HWMON=n

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes
Linus Torvalds [Sun, 29 Jun 2008 19:21:02 +0000 (12:21 -0700)]
Merge git://git./linux/kernel/git/sam/kbuild-fixes

* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes:
  kbuild: fix a.out.h export to userspace with O= build.

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
Linus Torvalds [Sun, 29 Jun 2008 19:20:11 +0000 (12:20 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/ieee1394/linux1394-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
  firewire: fw-sbp2: fix parsing of logical unit directories

15 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux...
Linus Torvalds [Sun, 29 Jun 2008 19:19:02 +0000 (12:19 -0700)]
Merge branch 'for_linus' of git://git./linux/kernel/git/jack/linux-udf-2.6

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-udf-2.6:
  udf: Fix regression in UDF anchor block detection

15 years agoFix and clean top .gitignore
Eduard - Gabriel Munteanu [Thu, 26 Jun 2008 07:54:34 +0000 (10:54 +0300)]
Fix and clean top .gitignore

Removed vmlinux* rule because it matches too many useful files, replacing
it with rules matching filetype by filename (e.g. *.gz). Also unignored
.mailmap from the top directory. Added a comment telling the user how to
check for tracked files being ignored.

Signed-off-by: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney...
Linus Torvalds [Sun, 29 Jun 2008 19:16:07 +0000 (12:16 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/cooloney/blackfin-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6:
  Blackfin arch: fix up section mismatch warning
  Blackfin arch: fix bug - kernel boot fails when Spinlock and rw-lock debugging enabled

15 years agoMerge branch 'audit.b52' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit...
Linus Torvalds [Sun, 29 Jun 2008 19:15:10 +0000 (12:15 -0700)]
Merge branch 'audit.b52' of git://git./linux/kernel/git/viro/audit-current

* 'audit.b52' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current:
  [PATCH] remove useless argument type in audit_filter_user()
  [PATCH] audit: fix kernel-doc parameter notation
  [PATCH] kernel/audit.c: nlh->nlmsg_type is gotten more than once

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
Linus Torvalds [Sun, 29 Jun 2008 19:14:37 +0000 (12:14 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/viro/vfs-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
  [patch 2/3] vfs: dcache cleanups
  [patch 1/3] vfs: dcache sparse fixes
  [patch 3/3] vfs: make d_path() consistent across mount operations
  [patch 4/4] flock: remove unused fields from file_lock_operations
  [patch 3/4] vfs: fix ERR_PTR abuse in generic_readlink
  [patch 2/4] fs: make struct file arg to d_path const
  [patch 1/4] vfs: path_{get,put}() cleanups
  [patch for 2.6.26 4/4] vfs: utimensat(): fix write access check for futimens()
  [patch for 2.6.26 3/4] vfs: utimensat(): fix error checking for {UTIME_NOW,UTIME_OMIT} case
  [patch for 2.6.26 1/4] vfs: utimensat(): ignore tv_sec if tv_nsec == UTIME_OMIT or UTIME_NOW
  [patch for 2.6.26 2/4] vfs: utimensat(): be consistent with utime() for immutable and append-only files
  [PATCH] fix cgroup-inflicted breakage in block_dev.c

15 years agosched: fix cpu hotplug
Dmitry Adamushko [Sat, 28 Jun 2008 22:16:56 +0000 (00:16 +0200)]
sched: fix cpu hotplug

the CPU hotplug problems (crashes under high-volume unplug+replug
tests) seem to be related to migrate_dead_tasks().

Firstly I added traces to see all tasks being migrated with
migrate_live_tasks() and migrate_dead_tasks(). On my setup the problem
pops up (the one with "se == NULL" in the loop of
pick_next_task_fair()) shortly after the traces indicate that some has
been migrated with migrate_dead_tasks()). btw., I can reproduce it
much faster now with just a plain cpu down/up loop.

[disclaimer] Well, unless I'm really missing something important in
this late hour [/desclaimer] pick_next_task() is not something
appropriate for migrate_dead_tasks() :-)

the following change seems to eliminate the problem on my setup
(although, I kept it running only for a few minutes to get a few
messages indicating migrate_dead_tasks() does move tasks and the
system is still ok)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoipv6 route: Convert rt6_device_match() to use RT6_LOOKUP_F_xxx flags.
YOSHIFUJI Hideaki [Sat, 28 Jun 2008 03:14:54 +0000 (20:14 -0700)]
ipv6 route: Convert rt6_device_match() to use RT6_LOOKUP_F_xxx flags.

The commit 77d16f450ae0452d7d4b009f78debb1294fb435c ("[IPV6] ROUTE:
Unify RT6_F_xxx and RT6_SELECT_F_xxx flags") intended to pass various
routing lookup hints around RT6_LOOKUP_F_xxx flags, but conversion was
missing for rt6_device_match().

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetlabel: Fix a problem when dumping the default IPv6 static labels
Paul Moore [Sat, 28 Jun 2008 03:12:32 +0000 (20:12 -0700)]
netlabel: Fix a problem when dumping the default IPv6 static labels

There is a missing "!" in a conditional statement which is causing entries to
be skipped when dumping the default IPv6 static label entries.  This can be
demonstrated by running the following:

 # netlabelctl unlbl add default address:::1 \
                                 label:system_u:object_r:unlabeled_t:s0
 # netlabelctl -p unlbl list

... you will notice that the entry for the IPv6 localhost address is not
displayed but does exist (works correctly, causes collisions when attempting
to add duplicate entries, etc.).

Signed-off-by: Paul Moore <paul.moore@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet/inet_lro: remove setting skb->ip_summed when not LRO-able
Eli Cohen [Sat, 28 Jun 2008 03:09:00 +0000 (20:09 -0700)]
net/inet_lro: remove setting skb->ip_summed when not LRO-able

When an SKB cannot be chained to a session, the current code attempts
to "restore" its ip_summed field from lro_mgr->ip_summed. However,
lro_mgr->ip_summed does not hold the original value; in fact, we'd
better not touch skb->ip_summed since it is not modified by the code
in the path leading to a failure to chain it.  Also use a cleaer
comment to the describe the ip_summed field of struct net_lro_mgr.

Issue raised by Or Gerlitz <ogerlitz@voltaire.com>

Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoinet fragments: fix race between inet_frag_find and inet_frag_secret_rebuild
Pavel Emelyanov [Sat, 28 Jun 2008 03:06:08 +0000 (20:06 -0700)]
inet fragments: fix race between inet_frag_find and inet_frag_secret_rebuild

The problem is that while we work w/o the inet_frags.lock even
read-locked the secret rebuild timer may occur (on another CPU, since
BHs are still disabled in the inet_frag_find) and change the rnd seed
for ipv4/6 fragments.

It was caused by my patch fd9e63544cac30a34c951f0ec958038f0529e244
([INET]: Omit double hash calculations in xxx_frag_intern) late
in the 2.6.24 kernel, so this should probably be queued to -stable.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoCONNECTOR: add a proc entry to list connectors
Li Zefan [Sat, 28 Jun 2008 03:03:24 +0000 (20:03 -0700)]
CONNECTOR: add a proc entry to list connectors

I got a problem when I wanted to check if the kernel supports process
event connector, and It seems there's no way to do this check.

At best I can check if the kernel supports connector or not, by looking
into /proc/net/netlink, or maybe checking the return value of bind() to
see if it's ENOENT.

So it would be useful to add /proc/net/connector to list all supported
connectors:
 # cat /proc/net/connector
 Name            ID
 connector       4294967295:4294967295
 cn_proc         1:1
 w1              3:1

Changelog:
- fix memory leak: s/seq_release/single_release
- use spin_lock_bh instead of spin_lock_irqsave

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetlink: Fix some doc comments in net/netlink/attr.c
Julius Volz [Sat, 28 Jun 2008 03:02:14 +0000 (20:02 -0700)]
netlink: Fix some doc comments in net/netlink/attr.c

Fix some doc comments to match function and attribute names in
net/netlink/attr.c.

Signed-off-by: Julius Volz <juliusv@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotcp: /proc/net/tcp rto,ato values not scaled properly (v2)
Stephen Hemminger [Sat, 28 Jun 2008 03:00:19 +0000 (20:00 -0700)]
tcp: /proc/net/tcp rto,ato values not scaled properly (v2)

I found another case where we are sending information to userspace
in the wrong HZ scale.  This should have been fixed back in 2.5 :-(

This means an ABI change but as it stands there is no way for an application
like ss to get the right value.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoinclude/linux/netdevice.h: don't export MAX_HEADER to userspace
Adrian Bunk [Sat, 28 Jun 2008 02:54:54 +0000 (19:54 -0700)]
include/linux/netdevice.h: don't export MAX_HEADER to userspace

Due to the CONFIG_'s the value is anyway not correct in userspace.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agopkt_sched: Remove CONFIG_NET_SCH_RR
Adrian Bunk [Sat, 28 Jun 2008 02:54:05 +0000 (19:54 -0700)]
pkt_sched: Remove CONFIG_NET_SCH_RR

Commit d62733c8e437fdb58325617c4b3331769ba82d70
([SCHED]: Qdisc changes and sch_rr added for multiqueue)
added a NET_SCH_RR option that was unused since the code
went unconditionally into sch_prio.

Reported-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agopkt_sched: ERR_PTR() ususally encodes an negative errno, not positive.
WANG Cong [Sat, 28 Jun 2008 02:51:35 +0000 (19:51 -0700)]
pkt_sched: ERR_PTR() ususally encodes an negative errno, not positive.

Note, in the following patch, 'err' is initialized as:

int err = -ENOBUFS;

Signed-off-by: WANG Cong <wcong@critical-links.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetdevice: Fix typo of dev_unicast_add() comment
Wang Chen [Sat, 28 Jun 2008 02:35:16 +0000 (19:35 -0700)]
netdevice: Fix typo of dev_unicast_add() comment

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoaf_unix: fix 'poll for write'/connected DGRAM sockets
Rainer Weikusat [Sat, 28 Jun 2008 02:34:18 +0000 (19:34 -0700)]
af_unix: fix 'poll for write'/connected DGRAM sockets

For n:1 'datagram connections' (eg /dev/log), the unix_dgram_sendmsg
routine implements a form of receiver-imposed flow control by
comparing the length of the receive queue of the 'peer socket' with
the max_ack_backlog value stored in the corresponding sock structure,
either blocking the thread which caused the send-routine to be called
or returning EAGAIN. This routine is used by both SOCK_DGRAM and
SOCK_SEQPACKET sockets. The poll-implementation for these socket types
is datagram_poll from core/datagram.c. A socket is deemed to be
writeable by this routine when the memory presently consumed by
datagrams owned by it is less than the configured socket send buffer
size. This is always wrong for PF_UNIX non-stream sockets connected to
server sockets dealing with (potentially) multiple clients if the
abovementioned receive queue is currently considered to be full.
'poll' will then return, indicating that the socket is writeable, but
a subsequent write result in EAGAIN, effectively causing an (usual)
application to 'poll for writeability by repeated send request with
O_NONBLOCK set' until it has consumed its time quantum.

The change below uses a suitably modified variant of the datagram_poll
routines for both type of PF_UNIX sockets, which tests if the
recv-queue of the peer a socket is connected to is presently
considered to be 'full' as part of the 'is this socket
writeable'-checking code. The socket being polled is additionally
put onto the peer_wait wait queue associated with its peer, because the
unix_dgram_recvmsg routine does a wake up on this queue after a
datagram was received and the 'other wakeup call' is done implicitly
as part of skb destruction, meaning, a process blocked in poll
because of a full peer receive queue could otherwise sleep forever
if no datagram owned by its socket was already sitting on this queue.
Among this change is a small (inline) helper routine named
'unix_recvq_full', which consolidates the actual testing code (in three
different places) into a single location.

Signed-off-by: Rainer Weikusat <rweikusat@mssgmbh.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotcp: fix for splice receive when used with software LRO
Octavian Purdila [Sat, 28 Jun 2008 00:27:21 +0000 (17:27 -0700)]
tcp: fix for splice receive when used with software LRO

If an skb has nr_frags set to zero but its frag_list is not empty (as
it can happen if software LRO is enabled), and a previous
tcp_read_sock has consumed the linear part of the skb, then
__skb_splice_bits:

(a) incorrectly reports an error and

(b) forgets to update the offset to account for the linear part

Any of the two problems will cause the subsequent __skb_splice_bits
call (the one that handles the frag_list skbs) to either skip data,
or, if the unadjusted offset is greater then the size of the next skb
in the frag_list, make tcp_splice_read loop forever.

Signed-off-by: Octavian Purdila <opurdila@ixiacom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotcp: calculate tcp_mem based on low memory instead of all memory
Miquel van Smoorenburg [Sat, 28 Jun 2008 00:23:57 +0000 (17:23 -0700)]
tcp: calculate tcp_mem based on low memory instead of all memory

The tcp_mem array which contains limits on the total amount of memory
used by TCP sockets is calculated based on nr_all_pages.  On a 32 bits
x86 system, we should base this on the number of lowmem pages.

Signed-off-by: Miquel van Smoorenburg <miquels@cistron.nl>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agohamradio: remove unused variable
Andre Haupt [Sat, 28 Jun 2008 00:22:08 +0000 (17:22 -0700)]
hamradio: remove unused variable

Signed-off-by: Andre Haupt <andre@bitwigglers.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoFix error paths if md_probe fails.
Neil Brown [Fri, 27 Jun 2008 22:31:17 +0000 (08:31 +1000)]
Fix error paths if md_probe fails.

md_probe can fail (e.g. alloc_disk could fail) without
returning an error (as it alway returns NULL).
So when we call mddev_find immediately afterwards, we need
to check that md_probe actually succeeded.  This means checking
that mdev->gendisk is non-NULL.

cc: <stable@kernel.org>
Cc: Dave Jones <davej@redhat.com>
Signed-off-by: Neil Brown <neilb@suse.de>
15 years agoDon't acknowlege that stripe-expand is complete until it really is.
Neil Brown [Fri, 27 Jun 2008 22:31:14 +0000 (08:31 +1000)]
Don't acknowlege that stripe-expand is complete until it really is.

We shouldn't acknowledge that a stripe has been expanded (When
reshaping a raid5 by adding a device) until the moved data has
actually been written out.  However we are currently
acknowledging (by calling md_done_sync) when the POST_XOR
is complete and before the write.

So track in s.locked whether there are pending writes, and don't
call md_done_sync yet if there are.

Note: we all set R5_LOCKED on devices which are are about to
read from.  This probably isn't technically necessary, but is
usually done when writing a block, and justifies the use of
s.locked here.

This bug can lead to a crash if an array is stopped while an reshape
is in progress.

Cc: <stable@kernel.org>
Signed-off-by: Neil Brown <neilb@suse.de>
15 years agoEnsure interrupted recovery completed properly (v1 metadata plus bitmap)
Neil Brown [Fri, 27 Jun 2008 22:30:52 +0000 (08:30 +1000)]
Ensure interrupted recovery completed properly (v1 metadata plus bitmap)

If, while assembling an array, we find a device which is not fully
in-sync with the array, it is important to set the "fullsync" flags.
This is an exact analog to the setting of this flag in hot_add_disk
methods.

Currently, only v1.x metadata supports having devices in an array
which are not fully in-sync (it keep track of how in sync they are).
The 'fullsync' flag only makes a difference when a write-intent bitmap
is being used.  In this case it tells recovery to ignore the bitmap
and recovery all blocks.

This fix is already in place for raid1, but not raid5/6 or raid10.

So without this fix, a raid1 ir raid4/5/6 array with version 1.x
metadata and a write intent bitmaps, that is stopped in the middle
of a recovery, will appear to complete the recovery instantly
after it is reassembled, but the recovery will not be correct.

If you might have an array like that, issueing
   echo repair > /sys/block/mdXX/md/sync_action

will make sure recovery completes properly.

Cc: <stable@kernel.org>
Signed-off-by: Neil Brown <neilb@suse.de>
15 years agokbuild: fix a.out.h export to userspace with O= build.
David Woodhouse [Fri, 27 Jun 2008 13:39:42 +0000 (14:39 +0100)]
kbuild: fix a.out.h export to userspace with O= build.

We need to check for existence of the a.out.h header in the source tree,
not the object tree, if we want it to get the right answer with O=.

Signed-off-by: David Woodhouse <david.woodhouse@intel.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
15 years agofirewire: fw-sbp2: fix parsing of logical unit directories
Richard Sharpe [Wed, 25 Jun 2008 02:11:13 +0000 (19:11 -0700)]
firewire: fw-sbp2: fix parsing of logical unit directories

There is a small off-by-one bug in firewire-sbp2. This causes problems
when a device exports multiple LUN Directories. I found it when trying
to talk to a SONY DVD Jukebox.

Signed-off-by: Richard Sharpe <realrichardsharpe@gmail.com>
Acked-by: Kristian Høgsberg <krh@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (op. order, changelog)
15 years agomac80211: fix an oops in several failure paths in key allocation
Emmanuel Grumbach [Thu, 26 Jun 2008 09:13:46 +0000 (12:13 +0300)]
mac80211: fix an oops in several failure paths in key allocation

This patch fixes an oops in several failure paths in key allocation. This
Oops occurs when freeing a key that has not been linked yet, so the
key->sdata is not set.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoprism: islpci_eth.c endianness fix
Harvey Harrison [Wed, 25 Jun 2008 21:20:37 +0000 (14:20 -0700)]
prism: islpci_eth.c endianness fix

clock is already cpu-endian (see le32_to_cpu slightly before), so
le64_to_cpu doesn't make much sense.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: Fix lock dependency errror
Ivo van Doorn [Wed, 25 Jun 2008 19:27:00 +0000 (21:27 +0200)]
rt2x00: Fix lock dependency errror

This fixes a circular locking dependency in the workqueue handling.
The interface work task uses the mac80211 function
ieee80211_iterate_active_interfaces() which grabs the RTNL lock.

However when the interface is brough down, this happens under the RTNL
lock as well, this causes problems because mac80211 will flush the workqueue
during the ifdown event. This causes mac80211 to wait until the driver has
completed all work which can't finish because it is waiting on the RTNL lock.

This is fixed by moving rt2x00 workqueue tasks on a different workqueue,
this workqueue can be flushed when the ieee80211_hw structure is removed
by the driver (when the driver is unloaded) which does not happen under the
RTNL lock.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireles...
David S. Miller [Fri, 27 Jun 2008 11:26:58 +0000 (04:26 -0700)]
Merge branch 'master' of /linux/kernel/git/linville/wireless-2.6

15 years agoMerge branch 'core/debugobjects' into core/urgent
Ingo Molnar [Fri, 27 Jun 2008 08:36:21 +0000 (10:36 +0200)]
Merge branch 'core/debugobjects' into core/urgent

15 years agoHold RTNL while calling dev_close()
Ben Hutchings [Tue, 6 May 2008 18:41:48 +0000 (19:41 +0100)]
Hold RTNL while calling dev_close()

dev_close() must be called holding the RTNL.  Compile-tested only.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agoqla3xxx: Hold RTNL while calling dev_close()
Ben Hutchings [Tue, 6 May 2008 18:36:26 +0000 (19:36 +0100)]
qla3xxx: Hold RTNL while calling dev_close()

dev_close() must be called holding the RTNL.  Compile-tested only.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years ago[netdrvr] Fix IOMMU overflow checking in s2io.c
Andi Kleen [Wed, 18 Jun 2008 11:58:36 +0000 (13:58 +0200)]
[netdrvr] Fix IOMMU overflow checking in s2io.c

s2io has IOMMU overflow checking, but unfortunately it is wrong.

It didn't use the standard macros, which meant that it only worked
on POWER and SPARC because only those define DMA_ERROR_CODE. Convert it to
use the standard macros instead.

I also commented two more bugs in the IOMMU handling. It assumes
that 0 DMA addresses cannot happen, but that's not true in all IOMMU setups.
The information if a buffer has been already mapped needs to be stored
elsewhere.

Didn't fix those because it needs careful checking of the buffer handling
by the maintainers.

Cc: ram.vepa@neterion.com
Cc: santosh.rastapur@neterion.com
Cc: sivakumar.subramani@neterion.com
Cc: sreenivasa.honnur@neterion.com
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agoe1000: only enable TSO6 via ethtool when using correct hardware
Andy Gospodarek [Thu, 19 Jun 2008 21:19:02 +0000 (17:19 -0400)]
e1000: only enable TSO6 via ethtool when using correct hardware

When enabling TSO via ethool on e1000, it is possible to set
NETIF_F_TSO6 on hardware that does not support it.  Setting TSO via
ethtool now matches the settings used when the hardware is probed.

Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agoe100: Do pci_dma_sync after skb_alloc for proper operation on ixp4xx
Kevin Hao [Sat, 21 Jun 2008 10:20:35 +0000 (18:20 +0800)]
e100: Do pci_dma_sync after skb_alloc for proper operation on ixp4xx

The E100 device can't work on current kernel (2.6.26-rc6) and will cause
kernel corruption on intel ixdp4xx.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years ago[netdrvr] netxen: fix netxen_pci_tbl[] breakage
Al Viro [Mon, 23 Jun 2008 01:04:50 +0000 (02:04 +0100)]
[netdrvr] netxen: fix netxen_pci_tbl[] breakage

PCI_DEVICE_CLASS sets .device and .vendor to PCI_ANY_DEV,
which overrides the effect of preceding PCI_DEVICE() and makes
all elements of netxen_pci_tbl[] identical.  Introduced in the
commit dcd56fdbaeae1008044687b973c4a3e852e8a726.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years ago[netdrvr] 3c59x: remove irqs_disabled warning from local_bh_enable
Ingo Molnar [Mon, 23 Jun 2008 08:41:23 +0000 (10:41 +0200)]
[netdrvr] 3c59x: remove irqs_disabled warning from local_bh_enable

Original Author: Michael Buesch <mb@bu3sch.de>

net, vortex: fix lockup

Ingo Molnar reported:

-tip testing found that Johannes Berg's "softirq: remove irqs_disabled
warning from local_bh_enable" enhancement to lockdep triggers a new
warning on an old testbox that uses 3c59x vortex and netlogging:

----->
    calling  vortex_init+0x0/0xb0
    PCI: Found IRQ 10 for device 0000:00:0b.0
    PCI: Sharing IRQ 10 with 0000:00:0a.0
    PCI: Sharing IRQ 10 with 0000:00:0b.1
    3c59x: Donald Becker and others.
    0000:00:0b.0: 3Com PCI 3c556 Laptop Tornado at e0800400.
    PCI: Enabling bus mastering for device 0000:00:0b.0
    initcall vortex_init+0x0/0xb0 returned 0 after 47 msecs
...
    calling  init_netconsole+0x0/0x1b0
    netconsole: local port 4444
    netconsole: local IP 10.0.1.9
    netconsole: interface eth0
    netconsole: remote port 4444
    netconsole: remote IP 10.0.1.16
    netconsole: remote ethernet address 00:19:xx:xx:xx:xx
    netconsole: device eth0 not up yet, forcing it
    eth0:  setting half-duplex.
    eth0:  setting full-duplex.
------------[ cut here ]------------
    WARNING: at kernel/softirq.c:137 local_bh_enable_ip+0xd1/0xe0()
    Pid: 1, comm: swapper Not tainted 2.6.26-rc6-tip #2091
     [<c0125ecf>] warn_on_slowpath+0x4f/0x70
     [<c0126834>] ? release_console_sem+0x1b4/0x1d0
     [<c0126d00>] ? vprintk+0x2a0/0x450
     [<c012fde5>] ? __mod_timer+0xa5/0xc0
     [<c046f7fd>] ? mdio_sync+0x3d/0x50
     [<c0160ef6>] ? marker_probe_cb+0x46/0xa0
     [<c0126ed7>] ? printk+0x27/0x50
     [<c046f4c3>] ? vortex_set_duplex+0x43/0xc0
     [<c046f521>] ? vortex_set_duplex+0xa1/0xc0
     [<c0471b92>] ? vortex_timer+0xe2/0x3e0
     [<c012b361>] local_bh_enable_ip+0xd1/0xe0
     [<c08d9f9f>] _spin_unlock_bh+0x2f/0x40
     [<c0471b92>] vortex_timer+0xe2/0x3e0
     [<c014743b>] ? trace_hardirqs_on+0xb/0x10
     [<c0147358>] ? trace_hardirqs_on_caller+0x88/0x160
     [<c012f8b2>] run_timer_softirq+0x162/0x1c0
     [<c0471ab0>] ? vortex_timer+0x0/0x3e0
     [<c012b361>] local_bh_enable_ip+0xd1/0xe0
     [<c08d9f9f>] _spin_unlock_bh+0x2f/0x40
     [<c0471b92>] vortex_timer+0xe2/0x3e0
     [<c014743b>] ? trace_hardirqs_on+0xb/0x10
     [<c0147358>] ? trace_hardirqs_on_caller+0x88/0x160
     [<c012f8b2>] run_timer_softirq+0x162/0x1c0
     [<c0471ab0>] ? vortex_timer+0x0/0x3e0
     [<c0471ab0>] ? vortex_timer+0x0/0x3e0
     [<c012b60a>] __do_softirq+0x9a/0x160
     [<c012b570>] ? __do_softirq+0x0/0x160
     [<c0106775>] call_on_stack+0x15/0x30
     [<c012b4f5>] ? irq_exit+0x55/0x60
     [<c0106e85>] ? do_IRQ+0x85/0xd0
     [<c0147391>] ? trace_hardirqs_on_caller+0xc1/0x160
     [<c0104888>] ? common_interrupt+0x28/0x30
     [<c08d8ac8>] ? mutex_unlock+0x8/0x10
     [<c08d8180>] ? _cond_resched+0x10/0x30
     [<c07a3be7>] ? netpoll_setup+0x117/0x390
     [<c0cbfcfe>] ? init_netconsole+0x14e/0x1b0
     [<c013d539>] ? ktime_get+0x19/0x40
     [<c0c9bab2>] ? kernel_init+0x1b2/0x2c0
     [<c0cbfbb0>] ? init_netconsole+0x0/0x1b0
     [<c0396aa4>] ? trace_hardirqs_on_thunk+0xc/0x10
     [<c0103f12>] ? restore_nocheck_notrace+0x0/0xe
     [<c0c9b900>] ? kernel_init+0x0/0x2c0
     [<c0c9b900>] ? kernel_init+0x0/0x2c0
     [<c0104aa7>] ? kernel_thread_helper+0x7/0x10
     =======================
---[ end trace 37f9c502aff112e0 ]---
    console [netcon0] enabled
    netconsole: network logging started
    initcall init_netconsole+0x0/0x1b0 returned 0 after 2914 msecs

looking at the driver I think the bug is real and the fix actually
is trivial.

vp->lock is also taken in hardware IRQ context, so we _have_ to always
use irqsafe locking. As we run in a timer with IRQs disabled,
we can simply use spin_lock.

Cc: <stable@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agoipg: use NULL, not zero, for pointers
Pekka Enberg [Mon, 23 Jun 2008 11:34:50 +0000 (14:34 +0300)]
ipg: use NULL, not zero, for pointers

Fixes a sparse warning in a code block that's hidden under JUMBO_FRAME #ifdef.

Tested-by: Andrew Savchenko <Bircoph@list.ru>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agoipg: fix jumbo frame compilation
Pekka Enberg [Mon, 23 Jun 2008 11:34:29 +0000 (14:34 +0300)]
ipg: fix jumbo frame compilation

Make jumbo frame support compile again. It was broken by the cleanup series
before the merge because the code is hidden under JUMBO_FRAME #ifdef.

Tested-by: Andrew Savchenko <Bircoph@list.ru>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agodrivers/net/r6040.c: Eliminate double sizeof
Julia Lawall [Mon, 23 Jun 2008 21:12:31 +0000 (23:12 +0200)]
drivers/net/r6040.c: Eliminate double sizeof

Taking sizeof the result of sizeof is quite strange and does not seem to be
what is wanted here.

This was fixed using the following semantic patch.
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
expression E;
@@

- sizeof (
  sizeof (E)
- )
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agopcnet_cs, axnet_cs: clear bogus interrupt before request_irq
Komuro [Sat, 7 Jun 2008 12:37:56 +0000 (21:37 +0900)]
pcnet_cs, axnet_cs: clear bogus interrupt before request_irq

Signed-off-by: Komuro <komurojun-mbn@nifty.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agoe1000e: fix EEH recovery during reset on PPC
Jeff Kirsher [Wed, 25 Jun 2008 00:01:29 +0000 (17:01 -0700)]
e1000e: fix EEH recovery during reset on PPC

EEH is not recovering in a reasonable amount of time on PPC during
e1000e_down().

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agoigb: fix EEH recovery during reset on PPC
Jeff Kirsher [Wed, 25 Jun 2008 00:01:15 +0000 (17:01 -0700)]
igb: fix EEH recovery during reset on PPC

EEH is not recovering in a reasonable amount of time on PPC during
igb_down().

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agoixgbe: fix EEH recovery during reset on PPC
Paul Larson [Wed, 25 Jun 2008 00:00:56 +0000 (17:00 -0700)]
ixgbe: fix EEH recovery during reset on PPC

EEh is not recovering in a resonable amount of time on PPC during
ixgbe_down().

Signed-off-by: Paul Larson <pl@us.ibm.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agotc35815: Fix receiver hangup on Rx FIFO overflow
Atsushi Nemoto [Thu, 26 Jun 2008 08:14:15 +0000 (17:14 +0900)]
tc35815: Fix receiver hangup on Rx FIFO overflow

On Rx FIFO overflow error, the controller consume a buffer descriptor
but currently the driver does not give it back to the controller.
This results unrecoverable 'Buffer List Exhausted' condition.  This
patch fix this problem by moving a "fbl_count--" line to proper place.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agotc35815: Mark carrier-off before starting PHY
Atsushi Nemoto [Wed, 25 Jun 2008 02:41:01 +0000 (11:41 +0900)]
tc35815: Mark carrier-off before starting PHY

Call netif_carrier_off() before starting PHY device.  This is a
behavior before converting to generic PHY layer.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agos2io: fix documentation about intr_type
Michal Schmidt [Thu, 26 Jun 2008 14:06:19 +0000 (16:06 +0200)]
s2io: fix documentation about intr_type

The documentation for intr_type module parameter of the s2io driver is
not consistent with the code. The comments in drivers/net/s2io.c are
OK, but Documentation/networking/s2io.txt is wrong.

Pointed out by Andrew Hecox.

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
15 years agoV4L/DVB (8108): Fix open/close race in saa7134
Arjan van de Ven [Sun, 22 Jun 2008 20:03:02 +0000 (17:03 -0300)]
V4L/DVB (8108): Fix open/close race in saa7134

The saa7134 driver uses a (non-atomic) variable in an attempt to
only allow one opener of the device (how it deals with sending
the fd over unix sockets I don't know).

Unfortunately, the release function first decrements this variable,
and THEN goes on to disable more of the device. This allows for
a race where another opener of the device comes in after the decrement of
the variable, configures the hardware just to then see the hardware
be disabled by the rest of the release function.

This patch makes the release function use the same lock as the open
function to protect the hardware as well as the variable (which now
at least has some locking to protect it).

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
15 years agoV4L/DVB (8100): V4L/vivi: fix possible memory leak in vivi_fillbuff
Marcin Slusarz [Sun, 22 Jun 2008 12:11:40 +0000 (09:11 -0300)]
V4L/DVB (8100): V4L/vivi: fix possible memory leak in vivi_fillbuff

Move allocation after first check and fix memory leak.

Noticed-by: Daniel Marjamäki <danielm77@spray.se>
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
15 years agoV4L/DVB (8097): xc5000: check device hardware state to determine if firmware download...
Steven Toth [Sun, 22 Jun 2008 00:06:02 +0000 (21:06 -0300)]
V4L/DVB (8097): xc5000: check device hardware state to determine if firmware download is needed

This patch ensures that the xc5000 will have firmware loaded as needed if the
part is powered down or reset via gpio from the host. An example of this, in
some cases, could be after the system resumes from standby or hibernate modes.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
15 years agoV4L/DVB (8096): au8522: prevent false-positive lock status
Steven Toth [Sat, 21 Jun 2008 22:32:41 +0000 (19:32 -0300)]
V4L/DVB (8096): au8522: prevent false-positive lock status

This decreases scan time in Queens, New York from 28 minutes to 7 minutes,
with the exact same services found.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
15 years agoV4L/DVB (8092): videodev: simplify and fix standard enumeration
Hans Verkuil [Sat, 21 Jun 2008 16:23:27 +0000 (13:23 -0300)]
V4L/DVB (8092): videodev: simplify and fix standard enumeration

VIDIOC_ENUMSTD did not return all the PAL/SECAM/NTSC variants: it just returned
one single PAL/SECAM/NTSC standard without separate entries for the trickier
standards like NTSC-JP.

Changed the code so that it behaves better.

Also simplified the if/switch statements into a common standards lookup table.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
15 years agoV4L/DVB (8075): stv0299: Uncorrected block count and bit error rate fixed
Oliver Endriss [Fri, 20 Jun 2008 02:25:04 +0000 (23:25 -0300)]
V4L/DVB (8075): stv0299: Uncorrected block count and bit error rate fixed

Fix uncorrected block counter and bit error rate to follow DVB API spec:
- Unsupported controls return -ENOSYS.
- UNC must never be set to 0.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
15 years agoV4L/DVB (8074): av7110: OSD transfers should not be interrupted
Oliver Endriss [Fri, 20 Jun 2008 02:10:14 +0000 (23:10 -0300)]
V4L/DVB (8074): av7110: OSD transfers should not be interrupted

OSD transfers should not be interrupted.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
15 years agoV4L/DVB (8073): av7110: Catch another type of ARM crash
Oliver Endriss [Fri, 20 Jun 2008 02:04:27 +0000 (23:04 -0300)]
V4L/DVB (8073): av7110: Catch another type of ARM crash

Catch another type of ARM crash.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
15 years agoV4L/DVB (8071): tda10023: Fix possible kernel oops during initialisation
Oliver Endriss [Fri, 20 Jun 2008 01:45:55 +0000 (22:45 -0300)]
V4L/DVB (8071): tda10023: Fix possible kernel oops during initialisation

If the i2c write fails during initialisation, an oops happens
because state->frontend.dvb is still undefined. Fixed.

Thanks to Sigmund Augdal for reporting this bug,
and to Hartmut Birr for suggesting the fix.

Thanks-to: Sigmund Augdal <sigmund@snap.tv>
Thanks-to: Hartmut Birr <e9hack@gmail.com>

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
15 years agoV4L/DVB (8069): cx18: Fix S-Video and Compsite inputs for the Yuan MPC718 and enable...
Andy Walls [Sun, 22 Jun 2008 05:00:09 +0000 (02:00 -0300)]
V4L/DVB (8069): cx18: Fix S-Video and Compsite inputs for the Yuan MPC718 and enable card entry

cx18: Fix S-Video and Compsite input settings for the Yuan MPC718 per user
reports from Yuri Warczynski <Yuri.Warczynski@gmail.com> and
Brian Hope <brian@hopefamily.info> and enable the card entry.  The tuner reset
GPIO pin is likely incorrect as the tuner firmware cannot be reloaded without a
reboot.  It is likely the audio routing is done via GPIO which is not
implemented yet, as users report audio doesn't work for some inputs.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
15 years agoV4L/DVB (8068): cx18: Add I2C slave reset via GPIO upon initialization
Andy Walls [Sun, 22 Jun 2008 04:27:00 +0000 (01:27 -0300)]
V4L/DVB (8068): cx18: Add I2C slave reset via GPIO upon initialization

cx18: Add I2C slave reset via GPIO upon initialization.  One user,
Michael <msd4824@yahoo.com>, has reported this allows his HVR-1600 EEPROM to
be consistently recognized when using (long,) 100 msec delays.   The delays in
this commit are nominal (10 & 40 msec) and need testing/tuning on boards with
I2C problems to find the right values.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
15 years agoV4L/DVB (8067): cx18: Fix firmware load for case when digital capture happens first
Andy Walls [Sun, 22 Jun 2008 03:04:21 +0000 (00:04 -0300)]
V4L/DVB (8067): cx18: Fix firmware load for case when digital capture happens first

This is a fix for the case when a digital capture from dvr0 happens first after
modprobe, before access to any cx18 v4l2 device nodes.  The initial dvb feed
start has been changed to load the firmware if not already loaded.  Also fixed a
use counter to correct dvb feed accounting if starting the transport DMA fails.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
15 years agoV4L/DVB (8066): cx18: Fix audio mux input definitions for HVR-1600 Line In 2 and...
Andy Walls [Fri, 20 Jun 2008 02:17:05 +0000 (23:17 -0300)]
V4L/DVB (8066): cx18: Fix audio mux input definitions for HVR-1600 Line In 2 and FM radio

Fix the cx18-cards.c structures for the HVR-1600 to reflect that audio Line In 2
and FM radio audio go to AIN3 and AIN4 of the CS5345 mux respectively.  Verified
by physical inspection of an HVR-1600MCE, by listening to FM broadcasts with the
HVR-1600MCE, and by comparing with the card definition for a PVR-150 in ivtv.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
15 years agoV4L/DVB (8063): cx18: Fix unintended auto configurations in cx18-av-core
Andy Walls [Sat, 14 Jun 2008 06:58:08 +0000 (03:58 -0300)]
V4L/DVB (8063): cx18: Fix unintended auto configurations in cx18-av-core

Change the cx18-av-core code so that accesses to cx23418 av core that
cause auto-configuration will be adjusted to emulate the auto-configuration
behavior of the cx25843.  This fixes the VBI displayed as video at the top of
the frame for NTSC and probably other things.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
15 years agoV4L/DVB (8061): cx18: only select tuner / frontend modules if !DVB_FE_CUSTOMISE
Michael Krufky [Tue, 17 Jun 2008 20:37:51 +0000 (17:37 -0300)]
V4L/DVB (8061): cx18: only select tuner / frontend modules if !DVB_FE_CUSTOMISE

The automatic Kconfig selection for tuners and frontends should be
conditional, based on !DVB_FE_CUSTOMISE.

This patch corrects the selection for VIDEO_CX18 on
MEDIA_TUNER_MXL5005S and DVB_S5H1409

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>