]> git.karo-electronics.de Git - mv-sheeva.git/log
mv-sheeva.git
16 years agosched: remove the 'u64 now' parameter from dequeue_entity()
Ingo Molnar [Thu, 9 Aug 2007 09:16:48 +0000 (11:16 +0200)]
sched: remove the 'u64 now' parameter from dequeue_entity()

remove the 'u64 now' parameter from dequeue_entity().

( identity transformation that causes no change in functionality. )

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: remove the 'u64 now' parameter from enqueue_entity()
Ingo Molnar [Thu, 9 Aug 2007 09:16:48 +0000 (11:16 +0200)]
sched: remove the 'u64 now' parameter from enqueue_entity()

remove the 'u64 now' parameter from enqueue_entity().

( identity transformation that causes no change in functionality. )

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: remove the 'u64 now' parameter from enqueue_sleeper()
Ingo Molnar [Thu, 9 Aug 2007 09:16:48 +0000 (11:16 +0200)]
sched: remove the 'u64 now' parameter from enqueue_sleeper()

remove the 'u64 now' parameter from enqueue_sleeper().

( identity transformation that causes no change in functionality. )

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: remove the 'u64 now' parameter from __enqueue_sleeper()
Ingo Molnar [Thu, 9 Aug 2007 09:16:48 +0000 (11:16 +0200)]
sched: remove the 'u64 now' parameter from __enqueue_sleeper()

remove the 'u64 now' parameter from __enqueue_sleeper().

( identity transformation that causes no change in functionality. )

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: remove the 'u64 now' parameter from update_stats_curr_end()
Ingo Molnar [Thu, 9 Aug 2007 09:16:48 +0000 (11:16 +0200)]
sched: remove the 'u64 now' parameter from update_stats_curr_end()

remove the 'u64 now' parameter from update_stats_curr_end().

( identity transformation that causes no change in functionality. )

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: remove the 'u64 now' parameter from update_stats_dequeue()
Ingo Molnar [Thu, 9 Aug 2007 09:16:48 +0000 (11:16 +0200)]
sched: remove the 'u64 now' parameter from update_stats_dequeue()

remove the 'u64 now' parameter from update_stats_dequeue().

( identity transformation that causes no change in functionality. )

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: remove the 'u64 now' parameter from update_stats_curr_start()
Ingo Molnar [Thu, 9 Aug 2007 09:16:47 +0000 (11:16 +0200)]
sched: remove the 'u64 now' parameter from update_stats_curr_start()

remove the 'u64 now' parameter from update_stats_curr_start().

( identity transformation that causes no change in functionality. )

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: remove the 'u64 now' parameter from update_stats_wait_end()
Ingo Molnar [Thu, 9 Aug 2007 09:16:47 +0000 (11:16 +0200)]
sched: remove the 'u64 now' parameter from update_stats_wait_end()

remove the 'u64 now' parameter from update_stats_wait_end().

( identity transformation that causes no change in functionality. )

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: remove the 'u64 now' parameter from __update_stats_wait_end()
Ingo Molnar [Thu, 9 Aug 2007 09:16:47 +0000 (11:16 +0200)]
sched: remove the 'u64 now' parameter from __update_stats_wait_end()

remove the 'u64 now' parameter from __update_stats_wait_end().

( identity transformation that causes no change in functionality. )

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: remove the 'u64 now' parameter from update_stats_enqueue()
Ingo Molnar [Thu, 9 Aug 2007 09:16:47 +0000 (11:16 +0200)]
sched: remove the 'u64 now' parameter from update_stats_enqueue()

remove the 'u64 now' parameter from update_stats_enqueue().

( identity transformation that causes no change in functionality. )

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: remove the 'u64 now' parameter from update_stats_wait_start()
Ingo Molnar [Thu, 9 Aug 2007 09:16:47 +0000 (11:16 +0200)]
sched: remove the 'u64 now' parameter from update_stats_wait_start()

remove the 'u64 now' parameter from update_stats_wait_start().

( identity transformation that causes no change in functionality. )

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: remove the 'u64 now' parameter from update_curr()
Ingo Molnar [Thu, 9 Aug 2007 09:16:47 +0000 (11:16 +0200)]
sched: remove the 'u64 now' parameter from update_curr()

remove the 'u64 now' parameter from update_curr().

( identity transformation that causes no change in functionality. )

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: remove the 'u64 now' parameter from print_cfs_rq()
Ingo Molnar [Thu, 9 Aug 2007 09:16:47 +0000 (11:16 +0200)]
sched: remove the 'u64 now' parameter from print_cfs_rq()

remove the 'u64 now' parameter from print_cfs_rq().

( identity transformation that causes no change in functionality. )

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: remove 'now' use from assignments
Ingo Molnar [Thu, 9 Aug 2007 09:16:47 +0000 (11:16 +0200)]
sched: remove 'now' use from assignments

change all 'now' timestamp uses in assignments to rq->clock.

( this is an identity transformation that causes no functionality change:
  all such new rq->clock is necessarily preceded by an update_rq_clock()
  call. )

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: remove __rq_clock()
Ingo Molnar [Thu, 9 Aug 2007 09:16:47 +0000 (11:16 +0200)]
sched: remove __rq_clock()

remove the (now unused) __rq_clock() function.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: eliminate __rq_clock() use
Ingo Molnar [Thu, 9 Aug 2007 09:16:47 +0000 (11:16 +0200)]
sched: eliminate __rq_clock() use

eliminate __rq_clock() use by changing it to:

   __update_rq_clock(rq)
   now = rq->clock;

identity transformation - no change in behavior.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: remove rq_clock()
Ingo Molnar [Thu, 9 Aug 2007 09:16:47 +0000 (11:16 +0200)]
sched: remove rq_clock()

remove the now unused rq_clock() function.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: eliminate rq_clock() use
Ingo Molnar [Thu, 9 Aug 2007 09:16:47 +0000 (11:16 +0200)]
sched: eliminate rq_clock() use

eliminate rq_clock() use by changing it to:

   update_rq_clock(rq)
   now = rq->clock;

identity transformation - no change in behavior.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: add [__]update_rq_clock(rq)
Ingo Molnar [Thu, 9 Aug 2007 09:16:46 +0000 (11:16 +0200)]
sched: add [__]update_rq_clock(rq)

add the [__]update_rq_clock(rq) functions. (No change in functionality,
just reorganization to prepare for elimination of the heavy 64-bit
timestamp-passing in the scheduler.)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: fix bug in balance_tasks()
Peter Williams [Thu, 9 Aug 2007 09:16:46 +0000 (11:16 +0200)]
sched: fix bug in balance_tasks()

There are two problems with balance_tasks() and how it used:

1. The variables best_prio and best_prio_seen (inherited from the old
move_tasks()) were only required to handle problems caused by the
active/expired arrays, the order in which they were processed and the
possibility that the task with the highest priority could be on either.
  These issues are no longer present and the extra overhead associated
with their use is unnecessary (and possibly wrong).

2. In the absence of CONFIG_FAIR_GROUP_SCHED being set, the same
this_best_prio variable needs to be used by all scheduling classes or
there is a risk of moving too much load.  E.g. if the highest priority
task on this at the beginning is a fairly low priority task and the rt
class migrates a task (during its turn) then that moved task becomes the
new highest priority task on this_rq but when the sched_fair class
initializes its copy of this_best_prio it will get the priority of the
original highest priority task as, due to the run queue locks being
held, the reschedule triggered by pull_task() will not have taken place.
  This could result in inappropriate overriding of skip_for_load and
excessive load being moved.

The attached patch addresses these problems by deleting all reference to
best_prio and best_prio_seen and making this_best_prio a reference
parameter to the various functions involved.

load_balance_fair() has also been modified so that this_best_prio is
only reset (in the loop) if CONFIG_FAIR_GROUP_SCHED is set.  This should
preserve the effect of helping spread groups' higher priority tasks
around the available CPUs while improving system performance when
CONFIG_FAIR_GROUP_SCHED isn't set.

Signed-off-by: Peter Williams <pwil3058@bigpond.net.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: document nice levels
Ingo Molnar [Thu, 9 Aug 2007 09:16:46 +0000 (11:16 +0200)]
sched: document nice levels

Document the design thinking behind nice levels.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: remove binary sysctls from kernel.sched_domain
Alexey Dobriyan [Thu, 9 Aug 2007 09:16:46 +0000 (11:16 +0200)]
sched: remove binary sysctls from kernel.sched_domain

kernel.sched_domain hierarchy is under CTL_UNNUMBERED and thus
unreachable to sysctl(2). Generating .ctl_number's in such situation is
not useful.

Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: delta_exec accounting fix
Ingo Molnar [Thu, 9 Aug 2007 09:16:46 +0000 (11:16 +0200)]
sched: delta_exec accounting fix

small delta_exec accounting fix: increase delta_exec and increase
sum_exec_runtime even if the task is not on the runqueue anymore.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: clean up delta_mine
Ingo Molnar [Thu, 9 Aug 2007 09:16:46 +0000 (11:16 +0200)]
sched: clean up delta_mine

cleanup: delta_mine is an unsigned value.

no code impact:

   text    data     bss     dec     hex filename
   27823    2726      16   30565    7765 sched.o.before
   27823    2726      16   30565    7765 sched.o.after

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: schedule() speedup
Ingo Molnar [Thu, 9 Aug 2007 09:16:46 +0000 (11:16 +0200)]
sched: schedule() speedup

speed up schedule(): share the 'now' parameter that deactivate_task()
was calculating internally.

( this also fixes the small accounting window between the deactivate
  call and the pick_next_task() call. )

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: uninline rq_clock()
Ingo Molnar [Thu, 9 Aug 2007 09:16:46 +0000 (11:16 +0200)]
sched: uninline rq_clock()

uninline rq_clock() to save 263 bytes of code:

   text    data     bss     dec     hex filename
   39561    3642      24   43227    a8db sched.o.before
   39298    3642      24   42964    a7d4 sched.o.after

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: mark print_cfs_stats static
Josh Triplett [Thu, 9 Aug 2007 09:16:46 +0000 (11:16 +0200)]
sched: mark print_cfs_stats static

sched_fair.c defines print_cfs_stats, and sched_debug.c uses it, but sched.c
includes both sched_fair.c and sched_debug.c, so all the references to
print_cfs_stats occur in the same compilation unit.  Thus, mark
print_cfs_stats static.

Eliminates a sparse warning:
warning: symbol 'print_cfs_stats' was not declared. Should it be static?

Signed-off-by: Josh Triplett <josh@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: clean up sched_getaffinity()
Ulrich Drepper [Thu, 9 Aug 2007 09:16:46 +0000 (11:16 +0200)]
sched: clean up sched_getaffinity()

here's another tiny cleanup.  The generated code is not affected (gcc is
smart enough) but for people looking over the code it is just irritating
to have the extra conditional.

Signed-off-by: Ulrich Drepper <drepper@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: mention CONFIG_SCHED_DEBUG in documentation
Thomas Voegtle [Thu, 9 Aug 2007 09:16:46 +0000 (11:16 +0200)]
sched: mention CONFIG_SCHED_DEBUG in documentation

a little hint to switch on CONFIG_SCHED_DEBUG should be given.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: simplify move_tasks()
Peter Williams [Thu, 9 Aug 2007 09:16:46 +0000 (11:16 +0200)]
sched: simplify move_tasks()

The move_tasks() function is currently multiplexed with two distinct
capabilities:

1. attempt to move a specified amount of weighted load from one run
queue to another; and
2. attempt to move a specified number of tasks from one run queue to
another.

The first of these capabilities is used in two places, load_balance()
and load_balance_idle(), and in both of these cases the return value of
move_tasks() is used purely to decide if tasks/load were moved and no
notice of the actual number of tasks moved is taken.

The second capability is used in exactly one place,
active_load_balance(), to attempt to move exactly one task and, as
before, the return value is only used as an indicator of success or failure.

This multiplexing of sched_task() was introduced, by me, as part of the
smpnice patches and was motivated by the fact that the alternative, one
function to move specified load and one to move a single task, would
have led to two functions of roughly the same complexity as the old
move_tasks() (or the new balance_tasks()).  However, the new modular
design of the new CFS scheduler allows a simpler solution to be adopted
and this patch addresses that solution by:

1. adding a new function, move_one_task(), to be used by
active_load_balance(); and
2. making move_tasks() a single purpose function that tries to move a
specified weighted load and returns 1 for success and 0 for failure.

One of the consequences of these changes is that neither move_one_task()
or the new move_tasks() care how many tasks sched_class.load_balance()
moves and this enables its interface to be simplified by returning the
amount of load moved as its result and removing the load_moved pointer
from the argument list.  This helps simplify the new move_tasks() and
slightly reduces the amount of work done in each of
sched_class.load_balance()'s implementations.

Further simplification, e.g. changes to balance_tasks(), are possible
but (slightly) complicated by the special needs of load_balance_fair()
so I've left them to a later patch (if this one gets accepted).

NB Since move_tasks() gets called with two run queue locks held even
small reductions in overhead are worthwhile.

[ mingo@elte.hu ]

this change also reduces code size nicely:

   text    data     bss     dec     hex filename
   39216    3618      24   42858    a76a sched.o.before
   39173    3618      24   42815    a73f sched.o.after

Signed-off-by: Peter Williams <pwil3058@bigpond.net.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: reorder update_cpu_load(rq) with the ->task_tick() call
Ingo Molnar [Thu, 9 Aug 2007 09:16:45 +0000 (11:16 +0200)]
sched: reorder update_cpu_load(rq) with the ->task_tick() call

Peter Williams suggested to flip the order of update_cpu_load(rq) with
the ->task_tick() call. This is a NOP for the current scheduler (the
two functions are independent of each other), ->task_tick() might
create some state for update_cpu_load() in the future (or in PlugSched).

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: batch sleeper bonus
Ingo Molnar [Thu, 9 Aug 2007 09:16:45 +0000 (11:16 +0200)]
sched: batch sleeper bonus

batch up the sleeper bonus sum a bit more. Anything below
sched-granularity is too small to make a practical difference
anyway.

this optimization reduces the math in high-frequency scheduling
scenarios.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years ago[SPARC64]: Fix memory leak when cpu hotplugging.
David S. Miller [Thu, 9 Aug 2007 00:32:33 +0000 (17:32 -0700)]
[SPARC64]: Fix memory leak when cpu hotplugging.

Every time a cpu is added via hotplug, we allocate the per-cpu MONDO
queues but we never free them up.  Freeing isn't easy since the first
cpu gets this memory from bootmem.

Therefore, the simplest thing to do to fix this bug is to allocate the
queues for all possible cpus at boot time.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SPARC64]: Do not assume sun4v chips have load-twin/store-init support.
David S. Miller [Thu, 9 Aug 2007 00:11:39 +0000 (17:11 -0700)]
[SPARC64]: Do not assume sun4v chips have load-twin/store-init support.

Check the cpu type in the OBP device tree before committing to
using the optimized Niagara memcpy and memset implementation.

If we don't recognize the cpu type, use a completely generic
version.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agofix oops in __audit_signal_info()
Al Viro [Tue, 7 Aug 2007 23:01:46 +0000 (00:01 +0100)]
fix oops in __audit_signal_info()

The check for audit_signals is misplaced and the check for
audit_dummy_context() is missing; as the result, if we send a signal to
auditd from task with NULL ->audit_context while we have audit_signals
!= 0 we end up with an oops.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: James Morris <jmorris@namei.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years ago[SPARC64]: Fix hard-coding of cpu type output in /proc/cpuinfo on sun4v.
David S. Miller [Wed, 8 Aug 2007 02:09:29 +0000 (19:09 -0700)]
[SPARC64]: Fix hard-coding of cpu type output in /proc/cpuinfo on sun4v.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SPARC]: Centralize find_in_proplist() instead of duplicating N times.
David S. Miller [Wed, 8 Aug 2007 01:46:36 +0000 (18:46 -0700)]
[SPARC]: Centralize find_in_proplist() instead of duplicating N times.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[TCP]: H-TCP maxRTT estimation at startup
Stephen Hemminger [Wed, 8 Aug 2007 01:29:05 +0000 (18:29 -0700)]
[TCP]: H-TCP maxRTT estimation at startup

Small patch to H-TCP from Douglas Leith.

Fix estimation of maxRTT.  The original code ignores rtt measurements
during slow start (via the check tp->snd_ssthresh < 0xFFFF) yet this
is probably a good time to try to estimate max rtt as delayed acking
is disabled and slow start will only exit on a loss which presumably
corresponds to a maxrtt measurement.  Second, the original code (via
the check htcp_ccount(ca) > 3) ignores rtt data during what it
estimates to be the first 3 round-trip times.  This seems like an
unnecessary check now that the RCV timestamp are no longer used
for rtt estimation.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: nf_nat: add symbolic dependency on IPv4 conntrack
Patrick McHardy [Wed, 8 Aug 2007 01:12:01 +0000 (18:12 -0700)]
[NETFILTER]: nf_nat: add symbolic dependency on IPv4 conntrack

Loading nf_nat causes the conntrack core to be loaded, but we need IPv4 as
well.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: ctnetlink: return EEXIST instead of EINVAL for existing nat'ed conntracks
Pablo Neira Ayuso [Wed, 8 Aug 2007 01:11:26 +0000 (18:11 -0700)]
[NETFILTER]: ctnetlink: return EEXIST instead of EINVAL for existing nat'ed conntracks

ctnetlink must return EEXIST for existing nat'ed conntracks instead of
EINVAL. Only return EINVAL if we try to update a conntrack with NAT
handlings (that is not allowed).

Decadence:libnetfilter_conntrack/utils# ./conntrack_create_nat
TEST: create conntrack (0)(Success)
Decadence:libnetfilter_conntrack/utils# ./conntrack_create_nat
TEST: create conntrack (-1)(Invalid argument)

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETFILTER]: ipt_recent: avoid a possible NULL pointer deref in recent_seq_open()
Jesper Juhl [Wed, 8 Aug 2007 01:10:54 +0000 (18:10 -0700)]
[NETFILTER]: ipt_recent: avoid a possible NULL pointer deref in recent_seq_open()

If the call to seq_open() returns != 0 then the code calls
kfree(st) but then on the very next line proceeds to
dereference the pointer - not good.

Problem spotted by the Coverity checker.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMerge branch 'fixes-davem' of master.kernel.org:/pub/scm/linux/kernel/git/linville...
David S. Miller [Wed, 8 Aug 2007 01:07:35 +0000 (18:07 -0700)]
Merge branch 'fixes-davem' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireless-2.6

16 years ago[NET] net/core/utils: fix sparse warning
Johannes Berg [Wed, 8 Aug 2007 01:02:43 +0000 (18:02 -0700)]
[NET] net/core/utils: fix sparse warning

net_msg_warn is not defined because it is in net/sock.h which isn't
included.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NetLabel]: add missing rcu_dereference() calls in the LSM domain mapping hash table
Paul Moore [Wed, 8 Aug 2007 00:53:10 +0000 (17:53 -0700)]
[NetLabel]: add missing rcu_dereference() calls in the LSM domain mapping hash table
The LSM domain mapping head table pointer was not being referenced via the RCU
safe dereferencing function, rcu_dereference().  This patch adds those missing
calls to the NetLabel code.

This has been tested using recent linux-2.6 git kernels with no visible
regressions.

Signed-off-by: Paul Moore <paul.moore@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agodrivers/net/ibmveth.c: memset fix
Mariusz Kozlowski [Mon, 6 Aug 2007 21:44:03 +0000 (23:44 +0200)]
drivers/net/ibmveth.c: memset fix

> >>  Looks like memset() is zeroing wrong nr of bytes.
> >
> > Good catch, however, I think we can just remove this memset altogether
> > since the memory gets allocated via kzalloc.
>
> Correct, that memset() is superfluous.

Ok. Then this should do it.

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
 drivers/net/ibmveth.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agophy layer: fix phy_mii_ioctl for autonegotiation
Domen Puncer [Tue, 7 Aug 2007 10:12:41 +0000 (12:12 +0200)]
phy layer: fix phy_mii_ioctl for autonegotiation

Fix a thinko (?) in setting phydev->autoneg.

Signed-off-by: Domen Puncer <domen.puncer@telargo.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoehea: Eliminated some compiler warnings
Thomas Klein [Mon, 6 Aug 2007 11:55:44 +0000 (13:55 +0200)]
ehea: Eliminated some compiler warnings

Fixed wrongly casted pointers

Signed-off-by: Thomas Klein <tklein@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoehea: Simplify resource usage check
Thomas Klein [Mon, 6 Aug 2007 11:55:14 +0000 (13:55 +0200)]
ehea: Simplify resource usage check

Use shorter method to determine whether adapter has configured ports

Signed-off-by: Thomas Klein <tklein@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoehea: Fix workqueue handling
Thomas Klein [Mon, 6 Aug 2007 11:54:29 +0000 (13:54 +0200)]
ehea: Fix workqueue handling

Fix: Workqueue ehea_driver_wq was not destroyed

Signed-off-by: Thomas Klein <tklein@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoibmveth: Fix rx pool deactivate oops
Brian King [Fri, 3 Aug 2007 03:55:19 +0000 (13:55 +1000)]
ibmveth: Fix rx pool deactivate oops

This fixes the following oops which can occur when trying to deallocate
receive buffer pools using sysfs with the ibmveth driver.

NIP: d00000000024f954 LR: d00000000024fa58 CTR: c0000000000d7478
REGS: c00000000ffef9f0 TRAP: 0300   Not tainted  (2.6.22-ppc64)
MSR: 8000000000009032 <EE,ME,IR,DR>  CR: 24242442  XER: 00000010
DAR: 00000000000007f0, DSISR: 0000000042000000
TASK = c000000002f91360[2967] 'bash' THREAD: c00000001398c000 CPU: 2
GPR00: 0000000000000000 c00000000ffefc70 d000000000262d30 c00000001c4087a0
GPR04: 00000003000000fe 0000000000000000 000000000000000f c000000000579d80
GPR08: 0000000000365688 c00000001c408998 00000000000007f0 0000000000000000
GPR12: d000000000251e88 c000000000579d80 00000000200957ec 0000000000000000
GPR16: 00000000100b8808 00000000100feb30 0000000000000000 0000000010084828
GPR20: 0000000000000000 000000001014d4d0 0000000000000010 c00000000ffefeb0
GPR24: c00000001c408000 0000000000000000 c00000001c408000 00000000ffffb054
GPR28: 00000000000000fe 0000000000000003 d000000000262700 c00000001c4087a0
NIP [d00000000024f954] .ibmveth_remove_buffer_from_pool+0x38/0x108 [ibmveth]
LR [d00000000024fa58] .ibmveth_rxq_harvest_buffer+0x34/0x78 [ibmveth]
Call Trace:
[c00000000ffefc70] [c0000000000280a8] .dma_iommu_unmap_single+0x14/0x28 (unreliable)
[c00000000ffefd00] [d00000000024fa58] .ibmveth_rxq_harvest_buffer+0x34/0x78 [ibmveth]
[c00000000ffefd80] [d000000000250e40] .ibmveth_poll+0xd8/0x434 [ibmveth]
[c00000000ffefe40] [c00000000032da8c] .net_rx_action+0xdc/0x248
[c00000000ffefef0] [c000000000068b4c] .__do_softirq+0xa8/0x164
[c00000000ffeff90] [c00000000002789c] .call_do_softirq+0x14/0x24
[c00000001398f6f0] [c00000000000c04c] .do_softirq+0x68/0xac
[c00000001398f780] [c000000000068ca0] .irq_exit+0x54/0x6c
[c00000001398f800] [c00000000000c8e4] .do_IRQ+0x170/0x1ac
[c00000001398f890] [c000000000004790] hardware_interrupt_entry+0x18/0x1c
   Exception: 501 at .plpar_hcall_norets+0x24/0x94
    LR = .veth_pool_store+0x15c/0x298 [ibmveth]
[c00000001398fb80] [d000000000250b2c] .veth_pool_store+0x5c/0x298 [ibmveth] (unreliable)
[c00000001398fc30] [c000000000145530] .sysfs_write_file+0x140/0x1d8
[c00000001398fcf0] [c0000000000de89c] .vfs_write+0x120/0x208
[c00000001398fd90] [c0000000000df2c8] .sys_write+0x4c/0x8c
[c00000001398fe30] [c0000000000086ac] syscall_exit+0x0/0x40
Instruction dump:
fba1ffe8 fbe1fff8 789d0022 f8010010 f821ff71 789c0020 1d3d00a8 7b8a1f24
38000000 7c7f1b78 7d291a14 e9690128 <7c0a592ae8030000 e9690120 80a90100

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoMerge branch 'r8169-for-jeff-20070806' of git://electric-eye.fr.zoreil.com/home/romie...
Jeff Garzik [Tue, 7 Aug 2007 21:28:23 +0000 (17:28 -0400)]
Merge branch 'r8169-for-jeff-20070806' of git://electric-eye.fr.zoreil.com/home/romieu/linux-2.6 into upstream-fixes

16 years agoMerge branch 'fixes-jgarzik' of git://git.kernel.org/pub/scm/linux/kernel/git/linvill...
Jeff Garzik [Tue, 7 Aug 2007 21:25:02 +0000 (17:25 -0400)]
Merge branch 'fixes-jgarzik' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream-fixes

16 years agoMerge branch 'ucc_geth' of master.kernel.org:/pub/scm/linux/kernel/git/leo/fsl-soc...
Jeff Garzik [Tue, 7 Aug 2007 21:19:44 +0000 (17:19 -0400)]
Merge branch 'ucc_geth' of master.kernel.org:/pub/scm/linux/kernel/git/leo/fsl-soc into upstream-fixes

16 years agosis190 check for ISA bridge on SiS966
Neil Muller [Wed, 1 Aug 2007 15:52:04 +0000 (17:52 +0200)]
sis190 check for ISA bridge on SiS966

sis190 driver assumes to find ISA only on SiS965.
similar fix is in sis900 driver, see bug report
http://bugs.debian.org/435547

Signed-off-by: maximilian attems <max@stro.at>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoatl1: use spin_trylock_irqsave()
Ingo Molnar [Wed, 1 Aug 2007 00:07:02 +0000 (19:07 -0500)]
atl1: use spin_trylock_irqsave()

use the simpler spin_trylock_irqsave() API to get the adapter lock.

[ this is also a fix for -rt where adapter->lock is a sleeping lock. ]

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Jay Cliburn <jacliburn@bellsouth.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agonet: smc91x: Build fixes for general sh boards.
Paul Mundt [Wed, 1 Aug 2007 06:48:55 +0000 (15:48 +0900)]
net: smc91x: Build fixes for general sh boards.

SH boards in general only wire this up in 8 or 16-bit mode, and
as we never had the wrappers for 32-bit mode defined, SMC_CAN_USE_32BIT
caused build failure for the non-Solution Engine boards. This gets it
building again.

Also kill off the straggling set_irq_type() definition, this is left
over cruft that was missed when the rest of it switched to IRQ flags.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
--

 drivers/net/smc91x.h |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoSUNRPC: Replace flush_workqueue() with cancel_work_sync() and friends
Trond Myklebust [Tue, 7 Aug 2007 19:33:01 +0000 (15:33 -0400)]
SUNRPC: Replace flush_workqueue() with cancel_work_sync() and friends

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
16 years agoNFS: Replace flush_scheduled_work with cancel_work_sync() and friends
Trond Myklebust [Tue, 7 Aug 2007 19:28:33 +0000 (15:28 -0400)]
NFS: Replace flush_scheduled_work with cancel_work_sync() and friends

This will avoid deadlocks of the form:

stack backtrace:
 [<c0104fda>] show_trace_log_lvl+0x1a/0x30
 [<c0105c02>] show_trace+0x12/0x20
 [<c0105d15>] dump_stack+0x15/0x20
 [<c013ee42>] __lock_acquire+0xc22/0x1030
 [<c013f2b1>] lock_acquire+0x61/0x80
 [<c012edd9>] flush_workqueue+0x49/0x70
 [<c012ee0d>] flush_scheduled_work+0xd/0x10
 [<dcf55c0c>] nfs_release_automount_timer+0x2c/0x30 [nfs]
 [<dcf45d8e>] nfs_free_server+0x9e/0xd0 [nfs]
 [<dcf4e626>] nfs_kill_super+0x16/0x20 [nfs]
 [<c017b38d>] deactivate_super+0x7d/0xa0
 [<c018f94b>] mntput_no_expire+0x4b/0x80
 [<c018fd94>] expire_mount_list+0xe4/0x140
 [<c0191219>] mark_mounts_for_expiry+0x99/0xb0
 [<dcf55d1d>] nfs_expire_automounts+0xd/0x40 [nfs]
 [<c012e61b>] run_workqueue+0x12b/0x1e0
 [<c012f05b>] worker_thread+0x9b/0x100
 [<c0131c72>] kthread+0x42/0x70
 [<c0104c0f>] kernel_thread_helper+0x7/0x18
 =======================

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
16 years agoSUNRPC: Don't call gss_delete_sec_context() from an rcu context
Trond Myklebust [Mon, 6 Aug 2007 16:21:13 +0000 (12:21 -0400)]
SUNRPC: Don't call gss_delete_sec_context() from an rcu context

Doing so may not be safe...

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
16 years agoNFSv4: Don't call put_rpccred() from an rcu callback
Trond Myklebust [Mon, 6 Aug 2007 16:18:34 +0000 (12:18 -0400)]
NFSv4: Don't call put_rpccred() from an rcu callback

Doing so would require us to introduce bh-safe locks into put_rpccred().
This patch fixes the lockdep complaint reported by Marc Dietrich:

inconsistent {softirq-on-W} -> {in-softirq-W} usage.
swapper/0 [HC0[0]:SC1[1]:HE1:SE0] takes:
 (rpc_credcache_lock){-+..}, at: [<c01dc487>]
_atomic_dec_and_lock+0x17/0x60
{softirq-on-W} state was registered at:
  [<c013e870>] __lock_acquire+0x650/0x1030
  [<c013f2b1>] lock_acquire+0x61/0x80
  [<c02db9ac>] _spin_lock+0x2c/0x40
  [<c01dc487>] _atomic_dec_and_lock+0x17/0x60
  [<dced55fd>] put_rpccred+0x5d/0x100 [sunrpc]
  [<dced56c1>] rpcauth_unbindcred+0x21/0x60 [sunrpc]
  [<dced3fd4>] a0 [sunrpc]
  [<dcecefe0>] rpc_call_sync+0x30/0x40 [sunrpc]
  [<dcedc73b>] rpcb_register+0xdb/0x180 [sunrpc]
  [<dced65b3>] svc_register+0x93/0x160 [sunrpc]
  [<dced6ebe>] __svc_create+0x1ee/0x220 [sunrpc]
  [<dced7053>] svc_create+0x13/0x20 [sunrpc]
  [<dcf6d722>] nfs_callback_up+0x82/0x120 [nfs]
  [<dcf48f36>] nfs_get_client+0x176/0x390 [nfs]
  [<dcf49181>] nfs4_set_client+0x31/0x190 [nfs]
  [<dcf49983>] nfs4_create_server+0x63/0x3b0 [nfs]
  [<dcf52426>] nfs4_get_sb+0x346/0x5b0 [nfs]
  [<c017b444>] vfs_kern_mount+0x94/0x110
  [<c0190a62>] do_mount+0x1f2/0x7d0
  [<c01910a6>] sys_mount+0x66/0xa0
  [<c0104046>] syscall_call+0x7/0xb
  [<ffffffff>] 0xffffffff
irq event stamp: 5277830
hardirqs last  enabled at (5277830): [<c017530a>] kmem_cache_free+0x8a/0xc0
hardirqs last disabled at (5277829): [<c01752d2>] kmem_cache_free+0x52/0xc0
softirqs last  enabled at (5277798): [<c0124173>] __do_softirq+0xa3/0xc0
softirqs last disabled at (5277817): [<c01241d7>] do_softirq+0x47/0x50

other info that might help us debug this:
no locks held by swapper/0.

stack backtrace:
 [<c0104fda>] show_trace_log_lvl+0x1a/0x30
 [<c0105c02>] show_trace+0x12/0x20
 [<c0105d15>] dump_stack+0x15/0x20
 [<c013ccc3>] print_usage_bug+0x153/0x160
 [<c013d8b9>] mark_lock+0x449/0x620
 [<c013e824>] __lock_acquire+0x604/0x1030
 [<c013f2b1>] lock_acquire+0x61/0x80
 [<c02db9ac>] _spin_lock+0x2c/0x40
 [<c01dc487>] _atomic_dec_and_lock+0x17/0x60
 [<dced55fd>] put_rpccred+0x5d/0x100 [sunrpc]
 [<dcf6bf83>] nfs_free_delegation_callback+0x13/0x20 [nfs]
 [<c012f9ea>] __rcu_process_callbacks+0x6a/0x1c0
 [<c012fb52>] rcu_process_callbacks+0x12/0x30
 [<c0124218>] tasklet_action+0x38/0x80
 [<c0124125>] __do_softirq+0x55/0xc0
 [<c01241d7>] do_softirq+0x47/0x50
 [<c0124605>] irq_exit+0x35/0x40
 [<c0112463>] smp_apic_timer_interrupt+0x43/0x80
 [<c0104a77>] apic_timer_interrupt+0x33/0x38
 [<c02690df>] cpuidle_idle_call+0x6f/0x90
 [<c01023c3>] cpu_idle+0x43/0x70
 [<c02d8c27>] rest_init+0x47/0x50
 [<c03bcb6a>] start_kernel+0x22a/0x2b0
 [<00000000>] 0x0
 =======================

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
16 years agoNFS: Fix NFSv4 open stateid regressions
Trond Myklebust [Thu, 26 Jul 2007 21:47:34 +0000 (17:47 -0400)]
NFS: Fix NFSv4 open stateid regressions

Do not allow cached open for O_RDONLY or O_WRONLY unless the file has been
previously opened in these modes.

Also Fix the calculation of the mode in nfs4_close_prepare. We should only
issue an OPEN_DOWNGRADE if we're sure that we will still be holding the
correct open modes. This may not be the case if we've been doing delegated
opens.

Finally, there is no need to adjust the open mode bit flags in
nfs4_close_done(): that has already been done in nfs4_close_prepare().

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
16 years agoNFSv4: Fix a locking regression in nfs4_set_mode_locked()
Trond Myklebust [Fri, 27 Jul 2007 14:23:05 +0000 (10:23 -0400)]
NFSv4: Fix a locking regression in nfs4_set_mode_locked()

We don't really need to clear &state->inode_states inside
nfs4_set_mode_locked, and doing so without holding the inode->i_lock would
in any case be a bug...

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
16 years agoNFS: Fix put_nfs_open_context
Trond Myklebust [Thu, 26 Jul 2007 16:06:17 +0000 (12:06 -0400)]
NFS: Fix put_nfs_open_context

We need to grab the inode->i_lock atomically with the last reference put in
order to remove the open context that is being freed from the
nfsi->open_files list.

Fix by converting the kref to a standard atomic counter and then using
atomic_dec_and_lock()...

Thanks to Arnd Bergmann for pointing out the problem.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
16 years agoSUNRPC: Fix a race in rpciod_down()
Trond Myklebust [Thu, 19 Jul 2007 20:32:20 +0000 (16:32 -0400)]
SUNRPC: Fix a race in rpciod_down()

The commit 4ada539ed77c7a2bbcb75cafbbd7bd8d2b9bef7b lead to the unpleasant
possibility of an asynchronous rpc_task being required to call
rpciod_down() when it is complete. This again means that the rpciod
workqueue may get to call destroy_workqueue on itself -> hang...

Change rpciod_up/rpciod_down to just get/put the module, and then
create/destroy the workqueues on module load/unload.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
16 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Tue, 7 Aug 2007 01:31:43 +0000 (18:31 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] rpc: update defconfig
  [ARM] pata_icside: fix the FIXMEs
  [ARM] 4542/1: AT91: include atmel_lcdc.h in at91sam926{1,3}_devices.c
  [ARM] 4541/1: iop: defconfig updates
  [ARM] 4531/1: remove is_in_rom() protptype

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Linus Torvalds [Tue, 7 Aug 2007 01:25:06 +0000 (18:25 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  [CRYPTO] api: fix writting into unallocated memory in setkey_aligned

16 years agotake sched_debug.c out of nasal demon territory
Al Viro [Mon, 6 Aug 2007 03:26:59 +0000 (04:26 +0100)]
take sched_debug.c out of nasal demon territory

C99 6.10.3[11]: preprocessing directive within the argument list of
macro invocation => undefined behaviour.  Don't do that...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoEnable lguest drivers in Kconfig
Rusty Russell [Mon, 6 Aug 2007 00:48:18 +0000 (10:48 +1000)]
Enable lguest drivers in Kconfig

Lguest drivers need to default to "Y" otherwise they're never selected
for new builds.  (We don't bother prompting, because they're less than
4k combined, and implied by selecting lguest support).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoKVM: x86 emulator: fix debug reg mov instructions
Avi Kivity [Sun, 5 Aug 2007 07:16:11 +0000 (10:16 +0300)]
KVM: x86 emulator: fix debug reg mov instructions

More fallout from the writeback fixes: debug register transfer
instructions do their own writeback and thus need to disable the general
writeback mechanism.

This fixes oopses and some guest failures on AMD machines (the Intel
variant decodes the instruction in hardware and thus does not need
emulation).

Cc: Alistair John Strachan <alistair@devzero.co.uk>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Tue, 7 Aug 2007 00:52:56 +0000 (17:52 -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:
  [NETFILTER]: Add xt_statistic.h to the header list for usermode programs
  [BNX2]: Fix suspend/resume problem.
  [TG3]: Fix suspend/resume problem.

16 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Tue, 7 Aug 2007 00:52:42 +0000 (17:52 -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:
  [SPARC32]: Fix build.

16 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
Linus Torvalds [Tue, 7 Aug 2007 00:48:34 +0000 (17:48 -0700)]
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: (32 commits)
  [SCSI] aacraid: prevent panic on adapter resource failure
  [SCSI] aha152x: use data accessors and !use_sg cleanup
  [SCSI] aha152x: Fix check_condition code-path
  [SCSI] aha152x: Clean Reset path
  [SCSI] aha152x: preliminary fixes and some comments
  [SCSI] aha152x: use bounce buffer
  [SCSI] aha152x: fix debug mode symbol conflict
  [SCSI] sd: disentangle barriers in SCSI
  [SCSI] lpfc : scsi command accessor fix for 8.2.2
  [SCSI] qlogicpti: Some cosmetic changes
  [SCSI] lpfc 8.2.2 : Change version number to 8.2.2
  [SCSI] lpfc 8.2.2 : Style cleanups
  [SCSI] lpfc 8.2.2 : Miscellaneous Bug Fixes
  [SCSI] lpfc 8.2.2 : Miscellaneous management and logging mods
  [SCSI] lpfc 8.2.2 : Rework the lpfc_printf_log() macro
  [SCSI] lpfc 8.2.2 : Attribute and Parameter splits for vport and physical port
  [SCSI] lpfc 8.2.2 : Fix locking around HBA's port_list
  [SCSI] lpfc 8.2.2 : Error messages and debugfs updates
  [SCSI] initialize shost_data to zero
  [SCSI] mptsas: add SMP passthrough support via bsg
  ...

16 years agodrm/i915: Fix i965 secured batchbuffer usage
Dave Airlie [Mon, 6 Aug 2007 23:09:51 +0000 (09:09 +1000)]
drm/i915: Fix i965 secured batchbuffer usage

This 965G and above chipsets moved the batch buffer non-secure bits to
another place. This means that previous drm's allowed in-secure batchbuffers
to be submitted to the hardware from non-privileged users who are logged
into X and and have access to direct rendering.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agor8169: avoid needless NAPI poll scheduling
Francois Romieu [Wed, 1 Aug 2007 22:00:48 +0000 (00:00 +0200)]
r8169: avoid needless NAPI poll scheduling

Theory  : though needless, it should not have hurt.
Practice: it does not play nice with DEBUG_SHIRQ + LOCKDEP + UP
(see https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=242572).

The patch makes sense in itself but I should dig why it has an effect
on #242572 (assuming that NAPI do not change in a near future).

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
16 years agor8169: PHY power-on fix
Roger So [Tue, 31 Jul 2007 21:52:42 +0000 (23:52 +0200)]
r8169: PHY power-on fix

Fix extracted from Realtek's driver (8.002.00/20070713) for the PHY
attached to 8111/8168b chipsets.

The check against mac_version is just usual paranoia during the bugfix
period of the kernel cycle. -- FR

Tested on Asus M2A-VM motherboard by Roger So.
No regression on my Asrock 945G DVI either (built-in 8168 + 2x8169).

Signed-off-by: Roger So <roger.so@gmail.com>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
16 years ago[PATCH] mac80211: don't allow scanning in monitor mode
Daniel Drake [Fri, 27 Jul 2007 13:43:24 +0000 (15:43 +0200)]
[PATCH] mac80211: don't allow scanning in monitor mode

zd1211rw gets confused when the user asks for a scan when the device is
in monitor mode. This patch tightens up the SIWSCAN handler to deny the scan
under these conditions.

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: Jiri Benc <jbenc@suse.cz>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years ago[PATCH] mac80211: Fix sparse error for sta_last_seq_ctrl_read
Zhu Yi [Fri, 27 Jul 2007 13:43:23 +0000 (15:43 +0200)]
[PATCH] mac80211: Fix sparse error for sta_last_seq_ctrl_read

Fix sparse error for sta_last_seq_ctrl_read.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Jiri Benc <jbenc@suse.cz>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years ago[PATCH] mac80211: use do { } while (0) for multi-line macros
Zhu Yi [Fri, 27 Jul 2007 13:43:23 +0000 (15:43 +0200)]
[PATCH] mac80211: use do { } while (0) for multi-line macros

Use do { } while (0) for multi-line macros

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Jiri Benc <jbenc@suse.cz>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years ago[PATCH] mac80211: missing dev_put in ieee80211_master_start_xmit
Daniel Drake [Fri, 27 Jul 2007 13:43:21 +0000 (15:43 +0200)]
[PATCH] mac80211: missing dev_put in ieee80211_master_start_xmit

Fixes an unlikely reference leak condition.

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: Jiri Benc <jbenc@suse.cz>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years ago[PATCH] softmac: Fix deadlock of wx_set_essid with assoc work
Michael Buesch [Tue, 31 Jul 2007 18:41:04 +0000 (20:41 +0200)]
[PATCH] softmac: Fix deadlock of wx_set_essid with assoc work

The essid wireless extension does deadlock against the assoc mutex,
as we don't unlock the assoc mutex when flushing the workqueue, which
also holds the lock.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years ago[PATCH] zd1211rw: fix filter for PSPOLL frames
Ulrich Kunitz [Sat, 21 Jul 2007 21:42:02 +0000 (22:42 +0100)]
[PATCH] zd1211rw: fix filter for PSPOLL frames

While filling the control set the driver tests for a PSPOLL frame.
But it tested only the subtype of the packet. The full type needs
to be tested to identify those packets reliably.

[dsd@gentoo.org: backport to mainline]
Signed-off-by: Ulrich Kunitz <kune@deine-taler.de>
Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years ago[PATCH] rtl8187: ensure priv->hwaddr is always valid
Michael Wu [Mon, 16 Jul 2007 00:09:55 +0000 (17:09 -0700)]
[PATCH] rtl8187: ensure priv->hwaddr is always valid

conf->mac_addr is not guaranteed to be set. This ensures priv->hwaddr is
always set to a valid mac address. Thanks to Johannes Berg
<johannes@sipsolutions.net> for finding this problem.

Signed-off-by: Michael Wu <flamingice@sourmilk.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years ago[PATCH] remove duplicated ioctl entries in compat_ioctl.c
Masakazu Mokuno [Mon, 9 Jul 2007 10:54:39 +0000 (19:54 +0900)]
[PATCH] remove duplicated ioctl entries in compat_ioctl.c

This patch removes some duplicated wireless ioctl entries in the array
'struct ioctl_trans ioctl_start[]' of fs/compat_ioctl.c

These entries are registered twice like:

COMPATIBLE_IOCTL(SIOCGIWPRIV)

and

HANDLE_IOCTL(SIOCGIWPRIV, do_wireless_ioctl)

Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoRevert "[PATCH] bcm43xx: Fix deviation from specifications in set_baseband_attenuation"
John W. Linville [Mon, 6 Aug 2007 18:41:59 +0000 (14:41 -0400)]
Revert "[PATCH] bcm43xx: Fix deviation from specifications in set_baseband_attenuation"

This reverts commit 77548f58070894cf5970a110981e511ffe793369.

David Woodhouse wrote:

>This broke my shinybook. I seem to get absolutely _no_ outgoing packets,
>although I can receive OK.

Larry Finger wrote:

>Please revert this patch.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years ago[ARM] rpc: update defconfig
Russell King [Mon, 6 Aug 2007 15:48:49 +0000 (16:48 +0100)]
[ARM] rpc: update defconfig

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years ago[ARM] pata_icside: fix the FIXMEs
Russell King [Mon, 6 Aug 2007 15:10:54 +0000 (16:10 +0100)]
[ARM] pata_icside: fix the FIXMEs

Alan Cox suggested that the solution to the FIXMEs in pata_icside is
to use a private postreset method to detect the lack of devices on a
port, and in such a case, disable the interrupt for the port.

This patch implements such a method, and removes the hard coded
disable of port 0.  Tested as working.

Acked-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years ago[CRYPTO] api: fix writting into unallocated memory in setkey_aligned
Sebastian Siewior [Fri, 3 Aug 2007 12:33:47 +0000 (20:33 +0800)]
[CRYPTO] api: fix writting into unallocated memory in setkey_aligned

setkey_unaligned() commited in ca7c39385ce1a7b44894a4b225a4608624e90730
overwrites unallocated memory in the following memset() because
I used the wrong buffer length.

Signed-off-by: Sebastian Siewior <sebastian@breakpoint.cc>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
16 years ago[NETFILTER]: Add xt_statistic.h to the header list for usermode programs
Chuck Ebbert [Sun, 5 Aug 2007 04:18:16 +0000 (21:18 -0700)]
[NETFILTER]: Add xt_statistic.h to the header list for usermode programs

Add xt_statistic.h to the list of headers to install.

Apparently needed to build newer versions of iptables.

Signed-off-by: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SPARC32]: Fix build.
Mark Fortescue [Sun, 5 Aug 2007 04:17:18 +0000 (21:17 -0700)]
[SPARC32]: Fix build.

Correct incorrect removal of asm-generic/fcntl.h from asm-sparc/fcntl.h by
commit 6ba60d2195cd65d72eaf7ce3903a707c5bf20c7b.

Signed-off-by: Mark Fortescue <mark@mtfhpc.demon.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[ARM] 4542/1: AT91: include atmel_lcdc.h in at91sam926{1,3}_devices.c
Jan Altenberg [Fri, 3 Aug 2007 11:14:34 +0000 (12:14 +0100)]
[ARM] 4542/1: AT91: include atmel_lcdc.h in at91sam926{1,3}_devices.c

- Include atmel_lcdc.h in at91sam926{1,3}_devices.c

Signed-off-by: Jan Altenberg <jan.altenberg@linutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years ago[ARM] 4541/1: iop: defconfig updates
Dan Williams [Thu, 2 Aug 2007 16:08:51 +0000 (17:08 +0100)]
[ARM] 4541/1: iop: defconfig updates

With the availability of the iop-adma driver iop platforms can now use
their offload engines for md-raid5 (copy+xor) and net-dma (tcp receive
copy) offload.

Cc: Lennert Buytenhek <kernel@wantstofly.org>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years ago[ARM] 4531/1: remove is_in_rom() protptype
Greg Ungerer [Mon, 30 Jul 2007 01:07:39 +0000 (02:07 +0100)]
[ARM] 4531/1: remove is_in_rom() protptype

Remove unused is_in_rom() function prototype.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years ago[SCSI] aacraid: prevent panic on adapter resource failure
Salyzyn, Mark [Thu, 2 Aug 2007 19:38:59 +0000 (15:38 -0400)]
[SCSI] aacraid: prevent panic on adapter resource failure

If the driver fails to allocate the contiguous (DMAable) memory for
system reasons, we fail to load the instance, but then we try to free
the <nul> allocation in the cleanup code and we get a panic in
pci_free_consistent(). This is reported against an older kernel, hope
this is relevant for latest/greatest.

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] aha152x: use data accessors and !use_sg cleanup
Boaz Harrosh [Sun, 29 Jul 2007 19:29:02 +0000 (22:29 +0300)]
[SCSI] aha152x: use data accessors and !use_sg cleanup

And finally this is the regular !use_sg cleanup
and use of data accessors.

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] aha152x: Fix check_condition code-path
Boaz Harrosh [Sun, 29 Jul 2007 19:27:06 +0000 (22:27 +0300)]
[SCSI] aha152x: Fix check_condition code-path

check_condition code-path was similar but more
complicated to Reset. It went like this:

  1. extra space was allocated at aha152x_scdata for mirroring
    scsi_cmnd members.
  2. At aha152x_internal_queue() every not check_condition
    (REQUEST_SENSE) command was copied to above members in
    case of error.
  3. At busfree_run() in the DONE_CS phase if a Status of
    SAM_STAT_CHECK_CONDITION was detected. The command was
    re-queued Internally using aha152x_internal_queue(,,check_condition,)
    The old command members are over written with the
    REQUEST_SENSE info.
  4. At busfree_run() in the DONE_CS phase again. If it is a
    check_condition command, info was restored from mirror
    made at first call to aha152x_internal_queue() (see 2)
    and the command is completed.

What I did is:

  1. Allocate less space in aha152x_scdata only for the 16-byte
    original command. (which is actually not needed by scsi-ml
    anymore at this stage. But this is to much knowledge of scsi-ml)
  2. If Status == SAM_STAT_CHECK_CONDITION, then like before
     re-queue a REQUEST_SENSE command. But only now save original
     command members. (Less of them)
  3. In aha152x_internal_queue(), just like for Reset, use the
    check_condition hint to set differently the working members.
    execute the command.
  4. At busfree_run() in the DONE_CS phase again. restore needed
     members.

While at it. This patch fixes a BUG. Old code when sending
a REQUEST_SENSE for a failed command. Would than return with
cmd->resid == 0 which was the status of the REQUEST_SENSE.
The failing command resid was lost. And when would resid
be interesting if not on a failing command?

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] aha152x: Clean Reset path
Boaz Harrosh [Sun, 29 Jul 2007 19:24:09 +0000 (22:24 +0300)]
[SCSI] aha152x: Clean Reset path

What Reset code was doing:  Save command's important/dangerous
Info on stack. NULL those members from scsi_cmnd.
Issue a Reset. wait for it to finish than restore members
and return.

What I do is save or NULL nothing. But use the "resetting"
hint in aha152x_internal_queue() to NULL out working members
and leave struct scsi_cmnd alone.

The indent here looks funny but it will change/drop in last
patch and it is clear this way what changed.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] aha152x: preliminary fixes and some comments
Boaz Harrosh [Sun, 29 Jul 2007 19:22:04 +0000 (22:22 +0300)]
[SCSI] aha152x: preliminary fixes and some comments

  hunk by hunk:
  - CHECK_CONDITION is what happens to cmnd->status >> 1
    or after status_byte() macro. But here it is used
    directly on status which means 0x1 which is an undefined
    bit in the standard. And is a status that will never
    return from a target.

  - in busfree_run at the DONE_SC phase we have 3 distinct
    operation:
1-if(DONE_SC->SCp.phase & check_condition)
          The REQUEST_SENSE command return.
          - Restore original command
  - Than continue to operation 3.
2-if(DONE_SC->SCp.Status==SAM_STAT_CHECK_CONDITION)
          A regular command returned with a status.
  - Internally re-Q a REQUEST_SENSE.
  - Do not do operation 3.
3-
  - Complete the command and return it to scsi-ml
     So the 0x2 in both these operations (1,2) means the scsi
     check-condition status, hence SAM_STAT_CHECK_CONDITION

  - Here the code asks about !(DONE_SC->SCp.Status & not_issued)
    but "not_issued" is an enum belonging to the "phase" member
    and not to the Status returned from target. The reason this
    works is because not_issued==1 and Also CHECK_CONDITION==1
    (remember from hunk 1). So actually the code was asking
    !(DONE_SC->SCp.Status & CHECK_CONDITION). Which means
    "Has the status been read from target yet?"
    Staus is read at status_run(). "not_issued" is
    cleared in seldo_run() which is usually earlier than
    status_run().

  So this patch does nothing as far as assembly is concerned
  but it does let the reader understand what is going on.

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] aha152x: use bounce buffer
Boaz Harrosh [Sun, 29 Jul 2007 19:18:20 +0000 (22:18 +0300)]
[SCSI] aha152x: use bounce buffer

Cause highmem buffers to be bounced to low memory until this
driver supports highmem addresses.  Otherwise it just oopses
on NULL buffer addresses.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] aha152x: fix debug mode symbol conflict
Boaz Harrosh [Sun, 29 Jul 2007 19:16:14 +0000 (22:16 +0300)]
[SCSI] aha152x: fix debug mode symbol conflict

The symbol <debug_locks> conflicts with the rather global one in
include/linux/locks.h.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
16 years ago[SCSI] sd: disentangle barriers in SCSI
James Bottomley [Fri, 3 Aug 2007 21:41:11 +0000 (16:41 -0500)]
[SCSI] sd: disentangle barriers in SCSI

Our current implementation has a generic set of barrier functions that
go through the SCSI driver model.  Realistically, this is unnecessary,
because the only device that can use barriers (sd) can set the flush
functions up at probe or revalidate time.  This patch pulls the barrier
functions out of the mid layer and scsi driver model and relocates them
directly in sd.

Acked-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>