]> err.no Git - linux-2.6/log
linux-2.6
16 years agox86: EFI runtime code mapping enhancement
Huang, Ying [Wed, 13 Feb 2008 09:22:41 +0000 (17:22 +0800)]
x86: EFI runtime code mapping enhancement

This patch enhances EFI runtime code memory mapping as following:

- Move __supported_pte_mask & _PAGE_NX checking before invoking
  runtime_code_page_mkexec(). This makes it possible for compiler to
  eliminate runtime_code_page_mkexec() on machine without NX support.

- Use set_memory_x/nx in early_mapping_set_exec(). This eliminates the
  duplicated implementation.

This patch has been tested on Intel x86_64 platform with EFI64/32
firmware.

Signed-off-by: Huang Ying <ying.huang@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: EFI: fix use of unitialized variable and the cache logic
Thomas Gleixner [Tue, 12 Feb 2008 18:46:48 +0000 (19:46 +0100)]
x86: EFI: fix use of unitialized variable and the cache logic

Andi Kleen pointed out that the cache attribute logic is reverse in
efi_enter_virtual_mode(). This problem alone is harmless as we do not
(yet) do cache attribute conflict resolution. (This bug was not present
in the original EFI submission - I introduced it while fixing up rejects.)

While reviewing this code I noticed a second, worse problem: the use of
uninitialized md->virt_addr.

Fix both problems.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: CPA: fix gbpages support in try_preserve_large_page
Andi Kleen [Wed, 13 Feb 2008 15:20:35 +0000 (16:20 +0100)]
x86: CPA: fix gbpages support in try_preserve_large_page

[ mingo@elte.hu: while gbpages cannot be enabled on mainline currently,
  keep the code uptodate and this fix is easy enough. ]

Use correct page sizes and masks for GB pages in try_preserve_large_page()

This prevents a boot hang on a GB capable system with CONFIG_DIRECT_GBPAGES
enabled.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agoxen: unpin initial Xen pagetable once we're finished with it
Jeremy Fitzhardinge [Wed, 13 Feb 2008 15:20:35 +0000 (16:20 +0100)]
xen: unpin initial Xen pagetable once we're finished with it

Unpin the Xen-provided pagetable once we've finished with it, so it
doesn't cause stray references which cause later swapper_pg_dir
pagetable updates to fail.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Tested-by: Jody Belka <knew-linux@pimb.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86/early_ioremap: don't assume we're using swapper_pg_dir
Jeremy Fitzhardinge [Wed, 13 Feb 2008 15:20:35 +0000 (16:20 +0100)]
x86/early_ioremap: don't assume we're using swapper_pg_dir

At the early stages of boot, before the kernel pagetable has been
fully initialized, a Xen kernel will still be running off the
Xen-provided pagetables rather than swapper_pg_dir[].  Therefore,
readback cr3 to determine the base of the pagetable rather than
assuming swapper_pg_dir[].

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Tested-by: Jody Belka <knew-linux@pimb.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: fixup machine_ops reboot_{32|64}.c unification fallout
Jody Belka [Tue, 12 Feb 2008 23:37:48 +0000 (23:37 +0000)]
x86: fixup machine_ops reboot_{32|64}.c unification fallout

When reboot_32.c and reboot_64.c were unified (commit 4d022e35fd...),
the machine_ops code was broken, leading to xen pvops kernels failing
to properly halt/poweroff/reboot etc. This fixes that up.

Signed-off-by: Jody Belka <knew-linux@pimb.org>
Cc: Miguel Boton <mboton@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: fix sigcontext.h user export
Ingo Molnar [Wed, 13 Feb 2008 15:20:35 +0000 (16:20 +0100)]
x86: fix sigcontext.h user export

Jakub Jelinek reported that some user-space code that relies on
kernel headers has built dependency on the sigcontext->eip/rip
register names - which have been unified in commit:

  commit 742fa54a62be6a263df14a553bf832724471dfbe
  Author: H. Peter Anvin <hpa@zytor.com>
  Date:   Wed Jan 30 13:30:56 2008 +0100

      x86: use generic register names in struct sigcontext

so give the old layout to user-space. This is not particularly
pretty, but it's an ABI so there's no danger of the two definitions
getting out of sync.

Reported-by: Jakub Jelinek <jakub@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: rt-group: refure unrunnable tasks
Peter Zijlstra [Wed, 13 Feb 2008 14:45:40 +0000 (15:45 +0100)]
sched: rt-group: refure unrunnable tasks

Refuse to accept or create RT tasks in groups that can't run them.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: rt-group: clean up the ifdeffery
Peter Zijlstra [Wed, 13 Feb 2008 14:45:40 +0000 (15:45 +0100)]
sched: rt-group: clean up the ifdeffery

Clean up some of the excessive ifdeffery introduces in the last patch.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: rt-group: make rt groups scheduling configurable
Peter Zijlstra [Wed, 13 Feb 2008 14:45:40 +0000 (15:45 +0100)]
sched: rt-group: make rt groups scheduling configurable

Make the rt group scheduler compile time configurable.
Keep it experimental for now.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: rt-group: interface
Peter Zijlstra [Wed, 13 Feb 2008 14:45:39 +0000 (15:45 +0100)]
sched: rt-group: interface

Change the rt_ratio interface to rt_runtime_us, to match rt_period_us.
This avoids picking a granularity for the ratio.

Extend the /sys/kernel/uids/<uid>/ interface to allow setting
the group's rt_runtime.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: rt-group: deal with PI
Peter Zijlstra [Wed, 13 Feb 2008 14:45:39 +0000 (15:45 +0100)]
sched: rt-group: deal with PI

Steven mentioned the fun case where a lock holding task will be throttled.

Simple fix: allow groups that have boosted tasks to run anyway.

If a runnable task in a throttled group gets boosted the dequeue/enqueue
done by rt_mutex_setprio() is enough to unthrottle the group.

This is ofcourse not quite correct. Two possible ways forward are:
  - second prio array for boosted tasks
  - boost to a prio ceiling (this would also work for deadline scheduling)

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: fix incorrect irq lock usage in normalize_rt_tasks()
Peter Zijlstra [Wed, 13 Feb 2008 14:45:39 +0000 (15:45 +0100)]
sched: fix incorrect irq lock usage in normalize_rt_tasks()

lockdep spotted this bogus irq locking. normalize_rt_tasks() can be called
from hardirq context through sysrq-n

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: fair-group: separate tg->shares from task_group_lock
Peter Zijlstra [Wed, 13 Feb 2008 14:45:39 +0000 (15:45 +0100)]
sched: fair-group: separate tg->shares from task_group_lock

On Mon, 2008-02-11 at 15:09 +0300, Denis V. Lunev wrote:
> BUG: sleeping function called from invalid context
> at /home/den/src/linux-netns26/kernel/mutex.c:209
> in_atomic():1, irqs_disabled():0
> no locks held by swapper/0.
> Pid: 0, comm: swapper Not tainted 2.6.24 #304
>
> Call Trace:
>  <IRQ>  [<ffffffff80252d1e>] ? __debug_show_held_locks+0x15/0x27
>  [<ffffffff8022c2a8>] __might_sleep+0xc0/0xdf
>  [<ffffffff8049f1df>] mutex_lock_nested+0x28/0x2a9
>  [<ffffffff80231294>] sched_destroy_group+0x18/0xea
>  [<ffffffff8023e835>] sched_destroy_user+0xd/0xf
>  [<ffffffff8023e8c1>] free_uid+0x8a/0xab
>  [<ffffffff80233e24>] __put_task_struct+0x3f/0xd3
>  [<ffffffff80236708>] delayed_put_task_struct+0x23/0x25
>  [<ffffffff8026fda7>] __rcu_process_callbacks+0x8d/0x215
>  [<ffffffff8026ff52>] rcu_process_callbacks+0x23/0x44
>  [<ffffffff8023a2ae>] __do_softirq+0x79/0xf8
>  [<ffffffff8020f8c3>] ? profile_pc+0x2a/0x67
>  [<ffffffff8020d38c>] call_softirq+0x1c/0x30
>  [<ffffffff8020f689>] do_softirq+0x61/0x9c
>  [<ffffffff8023a233>] irq_exit+0x51/0x53
>  [<ffffffff8021bd1a>] smp_apic_timer_interrupt+0x77/0xad
>  [<ffffffff8020ce3b>] apic_timer_interrupt+0x6b/0x70
>  <EOI>  [<ffffffff8020b0dd>] ? default_idle+0x43/0x76
>  [<ffffffff8020b0db>] ? default_idle+0x41/0x76
>  [<ffffffff8020b09a>] ? default_idle+0x0/0x76
>  [<ffffffff8020b186>] ? cpu_idle+0x76/0x98

separate the tg->shares protection from the task_group lock.

Reported-by: Denis V. Lunev <den@openvz.org>
Tested-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agohrtimer: more hrtimer_init_sleeper() fallout.
Peter Zijlstra [Wed, 13 Feb 2008 14:45:36 +0000 (15:45 +0100)]
hrtimer: more hrtimer_init_sleeper() fallout.

Missed an instance...

  futex_lock_pi()
    hrtimer_init_sleeper()
    rt_mutex_timed_lock()
      rt_mutex_timed_fastlock()
        rt_mutex_slowlock()
          hrtimer_start()

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years ago[NET]: Improve cache line coherency of ingress qdisc
Neil Turton [Wed, 13 Feb 2008 07:13:48 +0000 (23:13 -0800)]
[NET]: Improve cache line coherency of ingress qdisc

Move the ingress qdisc members of struct net_device from the transmit
cache line to the receive cache line to avoid cache line ping-pong.
These members are only used on the receive path.

Signed-off-by: Neil Turton <nturton@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NET]: Fix race in dev_close(). (Bug 9750)
Matti Linnanvuori [Wed, 13 Feb 2008 07:10:11 +0000 (23:10 -0800)]
[NET]: Fix race in dev_close(). (Bug 9750)

There is a race in Linux kernel file net/core/dev.c, function dev_close.
The function calls function dev_deactivate, which calls function
dev_watchdog_down that deletes the watchdog timer. However, after that, a
driver can call netif_carrier_ok, which calls function
__netdev_watchdog_up that can add the watchdog timer again. Function
unregister_netdevice calls function dev_shutdown that traps the bug
!timer_pending(&dev->watchdog_timer). Moving dev_deactivate after
netif_running() has been cleared prevents function netif_carrier_on
from calling __netdev_watchdog_up and adding the watchdog timer again.

Signed-off-by: Matti Linnanvuori <mattilinnanvuori@yahoo.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPSEC]: Fix bogus usage of u64 on input sequence number
Herbert Xu [Wed, 13 Feb 2008 06:50:35 +0000 (22:50 -0800)]
[IPSEC]: Fix bogus usage of u64 on input sequence number

Al Viro spotted a bogus use of u64 on the input sequence number which
is big-endian.  This patch fixes it by giving the input sequence number
its own member in the xfrm_skb_cb structure.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[RTNETLINK]: Send a single notification on device state changes.
Laszlo Attila Toth [Wed, 13 Feb 2008 06:42:09 +0000 (22:42 -0800)]
[RTNETLINK]: Send a single notification on device state changes.

In do_setlink() a single notification is sent at the end of the
function if any modification occured. If the address has been changed,
another notification is sent.

Both of them is required because originally only the NETDEV_CHANGEADDR
notification was sent and although device state change implies address
change, some programs may expect the original notification. It remains
for compatibity.

If set_operstate() is called from do_setlink(), it doesn't send a
notification, only if it is called from rtnl_create_link() as earlier.

Signed-off-by: Laszlo Attila Toth <panther@balabit.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETLABLE]: Hide netlbl_unlabel_audit_addr6 under ifdef CONFIG_IPV6.
Pavel Emelyanov [Wed, 13 Feb 2008 06:38:06 +0000 (22:38 -0800)]
[NETLABLE]: Hide netlbl_unlabel_audit_addr6 under ifdef CONFIG_IPV6.

This one is called from under this config only, so move
it in the same place.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETLABEL]: Don't produce unused variables when IPv6 is off.
Pavel Emelyanov [Wed, 13 Feb 2008 06:37:19 +0000 (22:37 -0800)]
[NETLABEL]: Don't produce unused variables when IPv6 is off.

Some code declares variables on the stack, but uses them
under #ifdef CONFIG_IPV6, so thay become unused when ipv6
is off. Fortunately, they are used in a switch's case
branches, so the fix is rather simple.

Is it OK from coding style POV to add braces inside "cases",
or should I better avoid such style and rework the patch?

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETLABEL]: Compilation for CONFIG_AUDIT=n case.
Pavel Emelyanov [Wed, 13 Feb 2008 06:35:37 +0000 (22:35 -0800)]
[NETLABEL]: Compilation for CONFIG_AUDIT=n case.

The audit_log_start() will expand into an empty do { } while (0)
construction and the audit_ctx becomes unused.

The solution: push current->audit_context into audit_log_start()
directly, since it is not required in any other place in the
calling function.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[GENETLINK]: Relax dances with genl_lock.
Pavel Emelyanov [Wed, 13 Feb 2008 06:16:33 +0000 (22:16 -0800)]
[GENETLINK]: Relax dances with genl_lock.

The genl_unregister_family() calls the genl_unregister_mc_groups(),
which takes and releases the genl_lock and then locks and releases
this lock itself.

Relax this behavior, all the more so the genl_unregister_mc_groups()
is called from genl_unregister_family() only.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETLABEL]: Fix lookup logic of netlbl_domhsh_search_def.
Pavel Emelyanov [Wed, 13 Feb 2008 06:15:14 +0000 (22:15 -0800)]
[NETLABEL]: Fix lookup logic of netlbl_domhsh_search_def.

Currently, if the call to netlbl_domhsh_search succeeds the
return result will still be NULL.

Fix that, by returning the found entry (if any).

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Paul Moore <paul.moore@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV6]: remove unused method declaration (net/ndisc.h).
Rami Rosen [Wed, 13 Feb 2008 06:06:53 +0000 (22:06 -0800)]
[IPV6]: remove unused method declaration (net/ndisc.h).

This patch removes unused declaration of dflt_rt_lookup() method in
include/net/ndisc.h

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NET]: Fix comment for skb_pull_rcsum
Urs Thuermann [Wed, 13 Feb 2008 06:03:25 +0000 (22:03 -0800)]
[NET]: Fix comment for skb_pull_rcsum

Fix comment for skb_pull_rcsum

Signed-off-by: Urs Thuermann <urs@isnogud.escape.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV6]: Fix IPsec datagram fragmentation
Herbert Xu [Wed, 13 Feb 2008 02:07:27 +0000 (18:07 -0800)]
[IPV6]: Fix IPsec datagram fragmentation

This is a long-standing bug in the IPsec IPv6 code that breaks
when we emit a IPsec tunnel-mode datagram packet.  The problem
is that the code the emits the packet assumes the IPv6 stack
will fragment it later, but the IPv6 stack assumes that whoever
is emitting the packet is going to pre-fragment the packet.

In the long term we need to fix both sides, e.g., to get the
datagram code to pre-fragment as well as to get the IPv6 stack
to fragment locally generated tunnel-mode packet.

For now this patch does the second part which should make it
work for the IPsec host case.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NDISC]: Fix race in generic address resolution
David S. Miller [Tue, 12 Feb 2008 05:45:44 +0000 (21:45 -0800)]
[NDISC]: Fix race in generic address resolution

Frank Blaschka provided the bug report and the initial suggested fix
for this bug.  He also validated this version of this fix.

The problem is that the access to neigh->arp_queue is inconsistent, we
grab references when dropping the lock lock to call
neigh->ops->solicit() but this does not prevent other threads of
control from trying to send out that packet at the same time causing
corruptions because both code paths believe they have exclusive access
to the skb.

The best option seems to be to hold the write lock on neigh->lock
during the ->solicit() call.  I looked at all of the ndisc_ops
implementations and this seems workable.  The only case that needs
special care is the IPV4 ARP implementation of arp_solicit().  It
wants to take neigh->lock as a reader to protect the header entry in
neigh->ha during the emission of the soliciation.  We can simply
remove the read lock calls to take care of that since holding the lock
as a writer at the caller providers a superset of the protection
afforded by the existing read locking.

The rest of the ->solicit() implementations don't care whether the
neigh is locked or not.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agohci_ldisc: fix null pointer deref
David Newall [Tue, 12 Feb 2008 05:41:30 +0000 (21:41 -0800)]
hci_ldisc: fix null pointer deref

Arjan:

  With the help of kerneloops.org I've spotted a nice little interaction
  between the TTY layer and the bluetooth code, however the tty layer is not
  something I'm all too familiar with so I rather ask than brute-force fix the
  code incorrectly.

  The raw details are at:
  http://www.kerneloops.org/search.php?search=uart_flush_buffer

  What happens is that, on closing the bluetooth tty, the tty layer goes
  into the release_dev() function, which first does a bunch of stuff, then
  sets the file->private_data to NULL, does some more stuff and then calls the
  ldisc close function.  Which in this case, is hci_uart_tty_close().

  Now, hci_uart_tty_close() calls hci_uart_close() which clears some
  internal bit, and then calls hci_uart_flush()...  which calls back to the
  tty layers' uart_flush_buffer() function.  (in drivers/bluetooth/hci_tty.c
  around line 194) Which then WARN_ON()'s because that's not allowed/supposed
  to be called this late in the shutdown of the port....

  Should the bluetooth driver even call this flush function at all??

David:

  This seems to be what happens: Hci_uart_close() flushes using
  hci_uart_flush().  Subsequently, in hci_dev_do_close(), (one step in
  hci_unregister_dev()), hci_uart_flush() is called again.  The comment in
  uart_flush_buffer(), relating to the WARN_ON(), indicates you can't flush
  after the port is closed; which sounds reasonable.  I think hci_uart_close()
  should set hdev->flush to NULL before returning.  Hci_dev_do_close() does
  check for this.  The code path is rather involved and I'm not entirely clear
  of all steps, but I think that's what should be done.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[AX25] ax25_ds_timer: use mod_timer instead of add_timer
Jarek Poplawski [Tue, 12 Feb 2008 05:38:32 +0000 (21:38 -0800)]
[AX25] ax25_ds_timer: use mod_timer instead of add_timer

This patch changes current use of: init_timer(), add_timer()
and del_timer() to setup_timer() with mod_timer(), which
should be safer anyway.

Reported-by: Jann Traschewski <jann@gmx.de>
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[AX25] ax25_timer: use mod_timer instead of add_timer
Jarek Poplawski [Tue, 12 Feb 2008 05:36:39 +0000 (21:36 -0800)]
[AX25] ax25_timer: use mod_timer instead of add_timer

According to one of Jann's OOPS reports it looks like
BUG_ON(timer_pending(timer)) triggers during add_timer()
in ax25_start_t1timer(). This patch changes current use
of: init_timer(), add_timer() and del_timer() to
setup_timer() with mod_timer(), which should be safer
anyway.

Reported-by: Jann Traschewski <jann@gmx.de>
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[AX25] ax25_route: make ax25_route_lock BH safe
Jarek Poplawski [Tue, 12 Feb 2008 05:26:43 +0000 (21:26 -0800)]
[AX25] ax25_route: make ax25_route_lock BH safe

> =================================
> [ INFO: inconsistent lock state ]
> 2.6.24-dg8ngn-p02 #1
> ---------------------------------
> inconsistent {softirq-on-W} -> {in-softirq-R} usage.
> linuxnet/3046 [HC0[0]:SC1[2]:HE1:SE0] takes:
>  (ax25_route_lock){--.+}, at: [<f8a0cfb7>] ax25_get_route+0x18/0xb7 [ax25]
> {softirq-on-W} state was registered at:
...

This lockdep report shows that ax25_route_lock is taken for reading in
softirq context, and for writing in process context with BHs enabled.
So, to make this safe, all write_locks in ax25_route.c are changed to
_bh versions.

Reported-by: Jann Traschewski <jann@gmx.de>,
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[AX25] af_ax25: remove sock lock in ax25_info_show()
Jarek Poplawski [Tue, 12 Feb 2008 05:24:56 +0000 (21:24 -0800)]
[AX25] af_ax25: remove sock lock in ax25_info_show()

This lockdep warning:

> =======================================================
> [ INFO: possible circular locking dependency detected ]
> 2.6.24 #3
> -------------------------------------------------------
> swapper/0 is trying to acquire lock:
>  (ax25_list_lock){-+..}, at: [<f91dd3b1>] ax25_destroy_socket+0x171/0x1f0 [ax25]
>
> but task is already holding lock:
>  (slock-AF_AX25){-+..}, at: [<f91dbabc>] ax25_std_heartbeat_expiry+0x1c/0xe0 [ax25]
>
> which lock already depends on the new lock.
...

shows that ax25_list_lock and slock-AF_AX25 are taken in different
order: ax25_info_show() takes slock (bh_lock_sock(ax25->sk)) while
ax25_list_lock is held, so reversely to other functions. To fix this
the sock lock should be moved to ax25_info_start(), and there would
be still problem with breaking ax25_list_lock (it seems this "proper"
order isn't optimal yet). But, since it's only for reading proc info
it seems this is not necessary (e.g.  ax25_send_to_raw() does similar
reading without this lock too).

So, this patch removes sock lock to avoid deadlock possibility; there
is also used sock_i_ino() function, which reads sk_socket under proper
read lock. Additionally printf format of this i_ino is changed to %lu.

Reported-by: Bernard Pidoux F6BVP <f6bvp@free.fr>
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agofib_trie: /proc/net/route performance improvement
Stephen Hemminger [Tue, 12 Feb 2008 05:14:39 +0000 (21:14 -0800)]
fib_trie: /proc/net/route performance improvement

Use key/offset caching to change /proc/net/route (use by iputils route)
from O(n^2) to O(n). This improves performance from 30sec with 160,000
routes to 1sec.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agofib_trie: handle empty tree
Stephen Hemminger [Tue, 12 Feb 2008 05:12:49 +0000 (21:12 -0800)]
fib_trie: handle empty tree

This fixes possible problems when trie_firstleaf() returns NULL
to trie_leafindex().

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV4]: Remove IP_TOS setting privilege checks.
David S. Miller [Tue, 12 Feb 2008 01:50:30 +0000 (17:50 -0800)]
[IPV4]: Remove IP_TOS setting privilege checks.

Various RFCs have all sorts of things to say about the CS field of the
DSCP value.  In particular they try to make the distinction between
values that should be used by "user applications" and things like
routing daemons.

This seems to have influenced the CAP_NET_ADMIN check which exists for
IP_TOS socket option settings, but in fact it has an off-by-one error
so it wasn't allowing CS5 which is meant for "user applications" as
well.

Further adding to the inconsistency and brokenness here, IPV6 does not
validate the DSCP values specified for the IPV6_TCLASS socket option.

The real actual uses of these TOS values are system specific in the
final analysis, and these RFC recommendations are just that, "a
recommendation".  In fact the standards very purposefully use
"SHOULD" and "SHOULD NOT" when describing how these values can be
used.

In the final analysis the only clean way to provide consistency here
is to remove the CAP_NET_ADMIN check.  The alternatives just don't
work out:

1) If we add the CAP_NET_ADMIN check to ipv6, this can break existing
   setups.

2) If we just fix the off-by-one error in the class comparison in
   IPV4, certain DSCP values can be used in IPV6 but not IPV4 by
   default.  So people will just ask for a sysctl asking to
   override that.

I checked several other freely available kernel trees and they
do not make any privilege checks in this area like we do.  For
the BSD stacks, this goes back all the way to Stevens Volume 2
and beyond.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMerge branch 'upstream-davem' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
David S. Miller [Wed, 13 Feb 2008 01:51:26 +0000 (17:51 -0800)]
Merge branch 'upstream-davem' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6

16 years agoIB/cm: Fix infiniband_cm class kobject ref counting
Roland Dreier [Tue, 12 Feb 2008 22:38:27 +0000 (14:38 -0800)]
IB/cm: Fix infiniband_cm class kobject ref counting

Commit 9af57b7a ("IB/cm: Add basic performance counters") introduced a
bug in how the reference count for cm_class.subsys.kobj was handled:
the path that released a device did a kobject_put() on that kobject, but
there was no kobject_get() in the path the handles adding a device.  So
the reference count ended up too low, which leads to bad things.  Fix up
and simplify the reference counting to avoid this.

(Actually, I introduced the bug when fixing the patch up to match some
of Greg's kobject changes, but who's counting)

Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/cm: Remove debug printk()s that snuck upstream
Roland Dreier [Tue, 12 Feb 2008 22:38:27 +0000 (14:38 -0800)]
IB/cm: Remove debug printk()s that snuck upstream

Pesky little devils, sneaking around...

Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/mthca: Add missing sg_init_table() in mthca_map_user_db()
Roland Dreier [Tue, 12 Feb 2008 22:38:22 +0000 (14:38 -0800)]
IB/mthca: Add missing sg_init_table() in mthca_map_user_db()

Usually harmless, since the scatterlist is always hard-coded to a length
of 1, but it triggers a BUG() if CONFIG_DEBUG_SG=y, so we better fix it.
This fixes <http://bugzilla.kernel.org/show_bug.cgi?id=9934>.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agotimeconst.pl: correct reversal of USEC_TO_HZ and HZ_TO_USEC
H. Peter Anvin [Tue, 12 Feb 2008 21:52:37 +0000 (13:52 -0800)]
timeconst.pl: correct reversal of USEC_TO_HZ and HZ_TO_USEC

The USEC_TO_HZ and HZ_TO_USEC constant sets were mislabelled, with
seriously incorrect results.  This among other things manifested
itself as cpufreq not working when a tickless kernel was configured.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Tested-by: Carlos R. Mafra <crmafra@ift.unesp.br>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years ago[SCSI] sym53c416: fix module parameters
James Bottomley [Mon, 11 Feb 2008 22:18:55 +0000 (16:18 -0600)]
[SCSI] sym53c416: fix module parameters

It looks like there's been a bug in the module parameter setup forever.
The upshot doesn't really matter, because even if no parameters are ever
set, we just call sym53c416_setup() three times, but the zero values in
the arrays eventually cause nothing to happen.  Unfortunately gcc has
started to notice this now too:

drivers/scsi/sym53c416.c: In function 'sym53c416_detect':
drivers/scsi/sym53c416.c:624: warning: the address of 'sym53c416' will always evaluate as 'true'
drivers/scsi/sym53c416.c:630: warning: the address of 'sym53c416_1' will always evaluate as 'true'
drivers/scsi/sym53c416.c:636: warning: the address of 'sym53c416_2' will always evaluate as 'true'
drivers/scsi/sym53c416.c:642: warning: the address of 'sym53c416_3' will always evaluate as 'true'

So fix this longstanding bug to keep gcc quiet.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years agoWMI: initialize wmi_blocks.list even if ACPI is disabled
Linus Torvalds [Tue, 12 Feb 2008 04:52:01 +0000 (20:52 -0800)]
WMI: initialize wmi_blocks.list even if ACPI is disabled

Even if we don't want to register the WMI driver, we should initialize
the wmi_blocks list to be empty, since we don't want the wmi helper
functions to oops just because that basic list has not even been set up.

With this, "find_guid()" will happily return "not found" rather than
oopsing all over the place, and the callers will then just automatically
return false or AE_NOT_FOUND as appropriate.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agox86: vdso_install fix
Roland McGrath [Mon, 11 Feb 2008 22:38:51 +0000 (14:38 -0800)]
x86: vdso_install fix

The makefile magic for installing the 32-bit vdso images on disk had a
little error.  A single-line change would fix that bug, but this does a
little more to reduce the error-prone duplication of this bit of
makefile variable magic.

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomempolicy: silently restrict nodemask to allowed nodes
KOSAKI Motohiro [Tue, 12 Feb 2008 04:30:22 +0000 (13:30 +0900)]
mempolicy: silently restrict nodemask to allowed nodes

Kosaki Motohito noted that "numactl --interleave=all ..." failed in the
presence of memoryless nodes.  This patch attempts to fix that problem.

Some background:

numactl --interleave=all calls set_mempolicy(2) with a fully populated
[out to MAXNUMNODES] nodemask.  set_mempolicy() [in do_set_mempolicy()]
calls contextualize_policy() which requires that the nodemask be a
subset of the current task's mems_allowed; else EINVAL will be returned.

A task's mems_allowed will always be a subset of node_states[N_HIGH_MEMORY]
i.e., nodes with memory.  So, a fully populated nodemask will be
declared invalid if it includes memoryless nodes.

  NOTE:  the same thing will occur when running in a cpuset
         with restricted mem_allowed--for the same reason:
         node mask contains dis-allowed nodes.

mbind(2), on the other hand, just masks off any nodes in the nodemask
that are not included in the caller's mems_allowed.

In each case [mbind() and set_mempolicy()], mpol_check_policy() will
complain [again, resulting in EINVAL] if the nodemask contains any
memoryless nodes.  This is somewhat redundant as mpol_new() will remove
memoryless nodes for interleave policy, as will bind_zonelist()--called
by mpol_new() for BIND policy.

Proposed fix:

1) modify contextualize_policy logic to:
   a) remember whether the incoming node mask is empty.
   b) if not, restrict the nodemask to allowed nodes, as is
      currently done in-line for mbind().  This guarantees
      that the resulting mask includes only nodes with memory.

      NOTE:  this is a [benign, IMO] change in behavior for
             set_mempolicy().  Dis-allowed nodes will be
             silently ignored, rather than returning an error.

   c) fold this code into mpol_check_policy(), replace 2 calls to
      contextualize_policy() to call mpol_check_policy() directly
      and remove contextualize_policy().

2) In existing mpol_check_policy() logic, after "contextualization":
   a) MPOL_DEFAULT:  require that in coming mask "was_empty"
   b) MPOL_{BIND|INTERLEAVE}:  require that contextualized nodemask
      contains at least one node.
   c) add a case for MPOL_PREFERRED:  if in coming was not empty
      and resulting mask IS empty, user specified invalid nodes.
      Return EINVAL.
   c) remove the now redundant check for memoryless nodes

3) remove the now redundant masking of policy nodes for interleave
   policy from mpol_new().

4) Now that mpol_check_policy() contextualizes the nodemask, remove
   the in-line nodes_and() from sys_mbind().  I believe that this
   restores mbind() to the behavior before the memoryless-nodes
   patch series.  E.g., we'll no longer treat an invalid nodemask
   with MPOL_PREFERRED as local allocation.

[ Patch history:

  v1 -> v2:
   - Communicate whether or not incoming node mask was empty to
     mpol_check_policy() for better error checking.
   - As suggested by David Rientjes, remove the now unused
     cpuset_nodes_subset_current_mems_allowed() from cpuset.h

  v2 -> v3:
   - As suggested by Kosaki Motohito, fold the "contextualization"
     of policy nodemask into mpol_check_policy().  Looks a little
     cleaner. ]

Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Tested-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
Linus Torvalds [Tue, 12 Feb 2008 04:44:58 +0000 (20:44 -0800)]
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] Fix build for sim_defconfig

16 years agoBe more robust about bad arguments in get_user_pages()
Jonathan Corbet [Mon, 11 Feb 2008 23:17:33 +0000 (16:17 -0700)]
Be more robust about bad arguments in get_user_pages()

So I spent a while pounding my head against my monitor trying to figure
out the vmsplice() vulnerability - how could a failure to check for
*read* access turn into a root exploit? It turns out that it's a buffer
overflow problem which is made easy by the way get_user_pages() is
coded.

In particular, "len" is a signed int, and it is only checked at the
*end* of a do {} while() loop.  So, if it is passed in as zero, the loop
will execute once and decrement len to -1.  At that point, the loop will
proceed until the next invalid address is found; in the process, it will
likely overflow the pages array passed in to get_user_pages().

I think that, if get_user_pages() has been asked to grab zero pages,
that's what it should do.  Thus this patch; it is, among other things,
enough to block the (already fixed) root exploit and any others which
might be lurking in similar code.  I also think that the number of pages
should be unsigned, but changing the prototype of this function probably
requires some more careful review.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
Linus Torvalds [Tue, 12 Feb 2008 04:43:14 +0000 (20:43 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  mlx4_core: Fix build break (missing include)

16 years agoAdd Matt to MAINTAINERS as a SLAB allocator maintainer
Pekka Enberg [Mon, 11 Feb 2008 21:52:47 +0000 (23:52 +0200)]
Add Matt to MAINTAINERS as a SLAB allocator maintainer

Matt is already the maintainer of SLOB which is one of the "SLAB" allocators in
the kernel so add him to MAINTAINERS.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
Linus Torvalds [Tue, 12 Feb 2008 04:42:11 +0000 (20:42 -0800)]
Merge branch 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev

* 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  sata_mv: platform driver allocs dma without create
  pata_ninja32: setup changes
  pata_legacy: typo fix
  pata_amd: Note in the module description it handles Nvidia
  sata_mv: fix loop with last port
  libata: ignore deverr on SETXFER if mode is configured
  pata_via: fix SATA cable detection on cx700

16 years agoMake topology fallback macros reference their arguments.
Andi Kleen [Mon, 11 Feb 2008 19:03:17 +0000 (20:03 +0100)]
Make topology fallback macros reference their arguments.

This avoids warnings with unreferenced variables in the !NUMA case.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years ago[SCSI] lpfc 8.2.5 : Update lpfc driver version to 8.2.5
James Smart [Fri, 8 Feb 2008 23:50:36 +0000 (18:50 -0500)]
[SCSI] lpfc 8.2.5 : Update lpfc driver version to 8.2.5

Update lpfc driver version to 8.2.5

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] lpfc 8.2.5 : Fix buffer leaks
James Smart [Fri, 8 Feb 2008 23:50:25 +0000 (18:50 -0500)]
[SCSI] lpfc 8.2.5 : Fix buffer leaks

Fix buffer leaks:
- HBQ dma buffer leak at dma_pool_destroy when unloading driver
- Fix missing buffer free in slow ring buffer handling

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] lpfc 8.2.5 : Miscellaneous discovery Fixes
James Smart [Fri, 8 Feb 2008 23:50:14 +0000 (18:50 -0500)]
[SCSI] lpfc 8.2.5 : Miscellaneous discovery Fixes

Miscellaneous discovery fixes:
- Flush RSCN buffers on vports when reseting HBA.
- Fix incorrect FLOGI after vport reg failed
- Fix a potential fabric ELS race condition
- Fix handling of failed PLOGI command under high lip rates
- Fix FDISC handling
- Fix debug logging for npiv handling

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] lpfc 8.2.5 : Add MSI-X single message support
James Smart [Fri, 8 Feb 2008 23:49:51 +0000 (18:49 -0500)]
[SCSI] lpfc 8.2.5 : Add MSI-X single message support

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] lpfc 8.2.5 : Miscellaneous Fixes
James Smart [Fri, 8 Feb 2008 23:49:39 +0000 (18:49 -0500)]
[SCSI] lpfc 8.2.5 : Miscellaneous Fixes

Miscellaneous fixes:
- Fix ERRATT flag which was overlapping
- Allow RESTART mbx commands through when stopped.
- Accept incoming PLOGI when connected to an N_Port.
- Fix NPort to NPort pt2pt problems: ADISC and reg_vpi issues
- Fix vport unloading error that erroneously cleaned up RSCN buffers
- Fix memory leak during repeated unloads - in mbox handling
- Fix link bounce vs FLOGI race conditions

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] lpfc 8.2.5 : Correct ndlp referencing issues
James Smart [Fri, 8 Feb 2008 23:49:26 +0000 (18:49 -0500)]
[SCSI] lpfc 8.2.5 : Correct ndlp referencing issues

Correct ndlp referencing issues:
- Fix ndlp kref issues due to race conditions between threads
- Fix cancel els delay retry event which missed an ndlp reference count

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years agomlx4_core: Fix build break (missing include)
Olof Johansson [Mon, 11 Feb 2008 02:22:57 +0000 (20:22 -0600)]
mlx4_core: Fix build break (missing include)

Commit 313abe55 ("mlx4_core: For 64-bit systems, vmap() kernel queue
buffers") caused this to pop up on powerpc allyesconfig, looks like a
missing include file:

    drivers/net/mlx4/alloc.c: In function 'mlx4_buf_alloc':
    drivers/net/mlx4/alloc.c:162: error: implicit declaration of function 'vmap'
    drivers/net/mlx4/alloc.c:162: error: 'VM_MAP' undeclared (first use in this function)
    drivers/net/mlx4/alloc.c:162: error: (Each undeclared identifier is reported only once
    drivers/net/mlx4/alloc.c:162: error: for each function it appears in.)
    drivers/net/mlx4/alloc.c:162: warning: assignment makes pointer from integer without a cast
    drivers/net/mlx4/alloc.c: In function 'mlx4_buf_free':
    drivers/net/mlx4/alloc.c:187: error: implicit declaration of function 'vunmap'

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years ago[IA64] Fix build for sim_defconfig
Tony Luck [Mon, 11 Feb 2008 21:23:46 +0000 (13:23 -0800)]
[IA64] Fix build for sim_defconfig

Commit bdc807871d58285737d50dc6163d0feb72cb0dc2 broke the build
for this config because the sim_defconfig selects CONFIG_HZ=250
but include/asm-ia64/param.h has an ifdef for the simulator to
force HZ to 32.  So we ended up with a kernel/timeconst.h set
for HZ=250 ... which then failed the check for the right HZ
value and died with:

Drop the #ifdef magic from param.h and make force CONFIG_HZ=32
directly for the simulator.

Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years ago[SCSI] update SG_ALL to avoid causing chaining
James Bottomley [Sun, 10 Feb 2008 15:42:46 +0000 (09:42 -0600)]
[SCSI] update SG_ALL to avoid causing chaining

Since the sg chaining patches went in, our current value of 255 for
SG_ALL excites chaining on some drivers which cannot support it (and
would thus oops).  Redefine SG_ALL to mean no sg table size
preference, but use the single allocation (non chained) limit.  This
also helps for drivers that use it to size an internal table.

We'll do an opt in system later where truly chaining supporting
drivers can define their sg_tablesize to be anything up to
SCSI_MAX_SG_CHAIN_ELEMENTS.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] aic94xx: fix ABORT_TASK define conflict
Boaz Harrosh [Wed, 6 Feb 2008 13:38:33 +0000 (15:38 +0200)]
[SCSI] aic94xx: fix ABORT_TASK define conflict

include/scsi/scsi.h as a definition:
#define ABORT_TASK          0x0d

on the other hand drivers/scsi/aic94xx/aic94xx_sas.h has:
#define ABORT_TASK              0x03

rename the latter to SCB_ABORT_TASK

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years agosata_mv: platform driver allocs dma without create
Byron Bradley [Sun, 10 Feb 2008 21:17:30 +0000 (21:17 +0000)]
sata_mv: platform driver allocs dma without create

When the sata_mv driver is used as a platform driver,
mv_create_dma_pools() is never called so it fails when trying
to alloc in mv_pool_start().

Signed-off-by: Byron Bradley <byron.bbradley@gmail.com>
Acked-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agopata_ninja32: setup changes
Alan Cox [Fri, 8 Feb 2008 15:25:10 +0000 (15:25 +0000)]
pata_ninja32: setup changes

Forcibly set more of the configuration at init time. This seems to fix at
least one problem reported. We don't know what most of these bits do, but
we do know what windows stuffs there.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agopata_legacy: typo fix
Alan Cox [Fri, 8 Feb 2008 15:23:38 +0000 (15:23 +0000)]
pata_legacy: typo fix

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agopata_amd: Note in the module description it handles Nvidia
Alan Cox [Fri, 8 Feb 2008 15:22:39 +0000 (15:22 +0000)]
pata_amd: Note in the module description it handles Nvidia

This has confused a few people so fix it

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agosata_mv: fix loop with last port
Yinghai Lu [Thu, 7 Feb 2008 23:06:17 +0000 (15:06 -0800)]
sata_mv: fix loop with last port

commit f351b2d638c3cb0b95adde3549b7bfaf3f991dfa
        sata_mv: Support SoC controllers

cause panic:

scsi 4:0:0:0: Direct-Access     ATA      HITACHI HDS7225S V44O PQ: 0 ANSI: 5
sd 4:0:0:0: [sde] 488390625 512-byte hardware sectors (250056 MB)
sd 4:0:0:0: [sde] Write Protect is off
sd 4:0:0:0: [sde] Mode Sense: 00 3a 00 00
sd 4:0:0:0: [sde] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sd 4:0:0:0: [sde] 488390625 512-byte hardware sectors (250056 MB)
sd 4:0:0:0: [sde] Write Protect is off
sd 4:0:0:0: [sde] Mode Sense: 00 3a 00 00
sd 4:0:0:0: [sde] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
 sde:<1>BUG: unable to handle kernel NULL pointer dereference at 000000000000001a
IP: [<ffffffff806262c7>] mv_interrupt+0x21c/0x4cc
PGD 0
Oops: 0000 [1] SMP
CPU 3
Modules linked in:
Pid: 0, comm: swapper Not tainted 2.6.24-smp-08636-g0afc2ed-dirty #26
RIP: 0010:[<ffffffff806262c7>]  [<ffffffff806262c7>] mv_interrupt+0x21c/0x4cc
RSP: 0000:ffff8102050bbec8  EFLAGS: 00010297
RAX: 0000000000000008 RBX: 0000000000000000 RCX: 0000000000000003
RDX: 0000000000008000 RSI: 0000000000000286 RDI: ffff8102035180e0
RBP: 0000000000000001 R08: 0000000000000003 R09: ffff8102036613e0
R10: 0000000000000002 R11: ffffffff8061474c R12: ffff8102035bf828
R13: 0000000000000008 R14: ffff81020348ece8 R15: ffffc20002cb2000
FS:  0000000000000000(0000) GS:ffff810405025700(0000) knlGS:0000000000000000
CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
CR2: 000000000000001a CR3: 0000000000201000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process swapper (pid: 0, threadinfo ffff810405094000, task ffff8102050b28c0)
Stack:  000000010000000c 0002040000220400 0000001100000002 ffff81020348eda8
 0000000000000001 ffff8102035f2cc0 0000000000000000 0000000000000000
 0000000000000018 0000000000000000 0000000000000000 ffffffff80269ee8
Call Trace:
 <IRQ>  [<ffffffff80269ee8>] ? handle_IRQ_event+0x25/0x53
 [<ffffffff8026b393>] ? handle_fasteoi_irq+0x90/0xc8
 [<ffffffff802218e2>] ? do_IRQ+0xf1/0x15f
 [<ffffffff8021df24>] ? default_idle+0x0/0x55
 [<ffffffff8021f361>] ? ret_from_intr+0x0/0xa
 <EOI>  [<ffffffff8023010c>] ? lapic_next_event+0x0/0xa
 [<ffffffff8021df55>] ? default_idle+0x31/0x55
 [<ffffffff8021df50>] ? default_idle+0x2c/0x55
 [<ffffffff8021df24>] ? default_idle+0x0/0x55
 [<ffffffff8021e00b>] ? cpu_idle+0x92/0xb8

Code: 41 14 85 c0 89 44 24 14 0f 84 9d 02 00 00 f7 d0 01 d6 41 89 d5 89 41 14 8b 41 14 89 34 24 e9 7e 02 00 00 49 63 c5 49 8b 5c c6 48 <f6> 43 1a 80 4c 8b a3 20 37 00 00 0f 85 62 02 00 00 31 c9 41 83
RIP  [<ffffffff806262c7>] mv_interrupt+0x21c/0x4cc
 RSP <ffff8102050bbec8>
CR2: 000000000000001a
---[ end trace 2583b5f7a5350584 ]---
Kernel panic - not syncing: Aiee, killing interrupt handler!

last_port already include port0 base.
this patch change use last_port directly, and move pp assignment later.

Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agolibata: ignore deverr on SETXFER if mode is configured
Tejun Heo [Thu, 7 Feb 2008 01:34:08 +0000 (10:34 +0900)]
libata: ignore deverr on SETXFER if mode is configured

Some controllers (VIA CX700) raise device error on SETXFER even after
mode configuration succeeded.  Update ata_dev_set_mode() such that
device error is ignored if transfer mode is configured correctly.  To
implement this, device is revalidated even after device error on
SETXFER.

This fixes kernel bugzilla bug 8563.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agopata_via: fix SATA cable detection on cx700
Tejun Heo [Thu, 7 Feb 2008 01:18:53 +0000 (10:18 +0900)]
pata_via: fix SATA cable detection on cx700

The first port of cx700 is SATA.  Fix cable detection.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agox86: remove over noisy debug printk
Thomas Gleixner [Sun, 10 Feb 2008 22:57:36 +0000 (23:57 +0100)]
x86: remove over noisy debug printk

pageattr-test.c contains a noisy debug printk that people reported.
The condition under which it prints (randomly tapping into a mem_map[]
hole and not being able to c_p_a() there) is valid behavior and not
interesting to report.

Remove it.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years ago[SCSI] fas216: Use scsi_eh API for REQUEST_SENSE invocation
Boaz Harrosh [Mon, 10 Sep 2007 19:39:11 +0000 (22:39 +0300)]
[SCSI] fas216: Use scsi_eh API for REQUEST_SENSE invocation

Use new scsi_eh_prep/restor_cmnd() for synchronous REQUEST_SENSE
invocation.  This also converts the driver to the new accessor based
scatterlist implementation.

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Tested-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
Linus Torvalds [Mon, 11 Feb 2008 17:22:23 +0000 (09:22 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild

* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild:
  kbuild: fix make V=1

16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
Linus Torvalds [Mon, 11 Feb 2008 17:21:26 +0000 (09:21 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/selinux-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/selinux-2.6:
  selinux: support 64-bit capabilities

16 years agoPrevent IDE boot ops on NUMA system
Andi Kleen [Mon, 11 Feb 2008 00:35:20 +0000 (01:35 +0100)]
Prevent IDE boot ops on NUMA system

Without this patch a Opteron test system here oopses at boot with
current git.

Calling to_pci_dev() on a NULL pointer gives a negative value so the
following NULL pointer check never triggers and then an illegal address
is referenced.  Check the unadjusted original device pointer for NULL
instead.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'for-linus' of git://linux-nfs.org/~bfields/linux
Linus Torvalds [Mon, 11 Feb 2008 17:19:47 +0000 (09:19 -0800)]
Merge branch 'for-linus' of git://linux-nfs.org/~bfields/linux

* 'for-linus' of git://linux-nfs.org/~bfields/linux:
  SUNPRC: Fix printk format warning
  nfsd: clean up svc_reserve_auth()
  NLM: don't requeue block if it was invalidated while GRANT_MSG was in flight
  NLM: don't reattempt GRANT_MSG when there is already an RPC in flight
  NLM: have server-side RPC clients default to soft RPC tasks
  NLM: set RPC_CLNT_CREATE_NOPING for NLM RPC clients

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
Linus Torvalds [Mon, 11 Feb 2008 17:19:22 +0000 (09:19 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
  ide: remove stale comment from ide-lib.c
  ide: fix comment in init_irq()
  ide: ide_init_port() bugfix
  ide-disk: fix flush requests (take 2)
  ide: introduce CONFIG_BLK_DEV_IDEDMA_SFF option
  bast-ide: build fix
  ide-tape: remove never executed code
  ide: fix ide/legacy/gayle.c compilation
  ide-cd: replace ntohs with generic byteorder macro be16_to_cpu
  ide: remove stale version number
  pdc202xx_old: always enable burst mode
  palm_bk3710: use struct ide_port_info
  palm_bk3710: port initialization/probing bugfix
  palm_bk3710: fix ide_unregister() usage
  palm_bk3710: ide_register_hw() -> ide_device_add()
  ide: insert BUG_ON() into __ide_set_handler() (take 2)
  cs5520: remove stale comment
  ide: another possible ide panic fix for blk-end-request

16 years ago[SCSI] ses: fix memory leaks
Yinghai Lu [Mon, 11 Feb 2008 07:25:25 +0000 (23:25 -0800)]
[SCSI] ses: fix memory leaks

fix leaking with scomp leaking when failing. Also free page10 on
driver removal and remove one extra space.

Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years agokbuild: fix make V=1
Sam Ravnborg [Mon, 11 Feb 2008 13:26:26 +0000 (14:26 +0100)]
kbuild: fix make V=1

When make -s support were added to filechk to
combination created with make V=1 were not
covered.
Fix it by explicitly cover this case too.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Mike Frysinger <vapier@gentoo.org>
16 years ago[SCSI] aacraid: informational sysfs value corrections
Salyzyn, Mark [Fri, 8 Feb 2008 17:01:34 +0000 (09:01 -0800)]
[SCSI] aacraid: informational sysfs value corrections

Some sysfs problems reported. The serial number on late model
controllers was truncated. Non-DASD devices (tapes and CDROMs) were
showing up as JBOD in the level report on the physical channel.

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] mpt fusion: Request I/O resources only when required
Prakash, Sathya [Fri, 8 Feb 2008 16:35:35 +0000 (22:05 +0530)]
[SCSI] mpt fusion: Request I/O resources only when required

This patch modifies the I/O resource allocation behavior of FUSION
driver.  The current version of driver allocates the I/O resources
even if they are not required and this creates trouble in low resource
environments.  This driver now uses
pci_enable_device_mem/pci_enable_device functions to differentiate the
resource allocations.

Signed-off-by: Sathya Prakash <sathya.prakash@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] aacraid: ignore adapter reset check polarity
Salyzyn, Mark [Fri, 8 Feb 2008 16:36:23 +0000 (08:36 -0800)]
[SCSI] aacraid: ignore adapter reset check polarity

The Adapter's Ignore Reset flag and insmod parameter boolean polarity
is incorrect in the driver.

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] aacraid: add optional MSI support
Salyzyn, Mark [Fri, 8 Feb 2008 13:48:22 +0000 (05:48 -0800)]
[SCSI] aacraid: add optional MSI support

Added support for MSI utilizing the aacraid.msi=1 parameter. This
patch adds some localized or like-minded janitor fixes. Since the
default is disabled, there is no impact on the code paths unless the
customer wishes to experiment with the MSI performance.

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] mpt fusion: Avoid racing when mptsas and mptcl module are loaded in parallel
Prakash, Sathya [Fri, 8 Feb 2008 11:05:40 +0000 (16:35 +0530)]
[SCSI] mpt fusion: Avoid racing when mptsas and mptcl module are loaded in parallel

This patch sets the IOC pointer in drvrdata of pcidev before adding
the IOC into the list of IOCs. Without this patch the driver oops when
the mptsas and mptctl modules are loaded in parallel.

Signed-off-by: Sathya Prakash <sathya.prakash@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] MegaRAID driver management char device moved to misc
Thomas Horsten [Tue, 5 Feb 2008 07:53:18 +0000 (23:53 -0800)]
[SCSI] MegaRAID driver management char device moved to misc

The MegaRAID driver's common management module (megaraid_mm.c) creates a
char device used by the management tool "megarc" from LSI Logic (and
possibly other management tools).

In 2.6 with udev, this device doesn't get created because it is not
registered in sysfs.

I first fixed this by registering a class "megaraid_mm", but realized that
this should probably be moved to misc devices, instead of taking up a char
major.  This is because only 1 device is used, even if there are multiple
adapters - the minor is never used (the adapter info is in the ioctl block
sent to the driver, not detected based on the minor number as one might
think).  So it is a complete waste to have an entire major taken by this.

So it now uses a misc device which I named "megadev0" (the name that megarc
expects), and has a dynamic minor (previoulsy a dynamic major was used).

I have tested this on my own system with the megarc tool, and it works just
as fine as before (only now the device gets created correctly by udev).

Acked-by: "Patro, Sumant" <Sumant.Patro@lsi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] advansys: fix overrun_buf aligned bug
FUJITA Tomonori [Fri, 8 Feb 2008 00:50:08 +0000 (09:50 +0900)]
[SCSI] advansys: fix overrun_buf aligned bug

struct asc_dvc_var needs overrun buffer to be placed on an 8 byte
boundary. advansys defines struct asc_dvc_var:

struct asc_dvc_var {
...
uchar overrun_buf[ASC_OVERRUN_BSIZE] __aligned(8);

The problem is that struct asc_dvc_var is placed on
shost->hostdata. So if the hostdata is not on an 8 byte boundary, the
advansys crashes. The hostdata is placed on a sizeof(unsigned long)
boundary so the 8 byte boundary is not garanteed with x86_32.

With 2.6.23 and 2.6.24, the hostdata is on an 8 byte boundary by
chance, but with the current git, it's not.

This patch removes overrun_buf static array and use kzalloc.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years agonet/phy/fixed.c: fix a use-after-free
Adrian Bunk [Sat, 2 Feb 2008 21:15:02 +0000 (23:15 +0200)]
net/phy/fixed.c: fix a use-after-free

This patch fixes a use-after-free introduced by
commit a79d8e93d300adb84cccc38ac396cfb118c238ad and spotted by the
Coverity checker.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agodrivers/net/sis190: fix section mismatch warning in sis190_get_mac_addr
Sergio Luis [Sun, 10 Feb 2008 20:56:25 +0000 (17:56 -0300)]
drivers/net/sis190: fix section mismatch warning in sis190_get_mac_addr

Fix following warnings:
WARNING: drivers/net/sis190.o(.text+0x103): Section mismatch in reference from the function sis190_get_mac_addr() to the function .devinit.text:sis190_get_mac_addr_from_apc()
WARNING: drivers/net/sis190.o(.text+0x10e): Section mismatch in reference from the function sis190_get_mac_addr() to the function .devinit.text:sis190_get_mac_addr_from_eeprom()

Annotate sis190_get_mac_addr() with __devinit.

Signed-off-by: Sergio Luis <sergio@uece.br>
 sis190.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoUse proper abstractions in quirk_intel_irqbalance
Matthew Wilcox [Mon, 11 Feb 2008 04:18:15 +0000 (23:18 -0500)]
Use proper abstractions in quirk_intel_irqbalance

Since we may not have a pci_dev for the device we need to access, we can't
use pci_read_config_word.  But raw_pci_read is an internal implementation
detail; it's better to use the architected pci_bus_read_config_word
interface.  Using PCI_DEVFN instead of a mysterious constant helps
reassure everyone that we really do intend to access device 8.

[ Thanks to Grant Grundler for pointing out to me that this is exactly
  what the write immediately above this is doing -- enabling device 8 to
  respond to config space cycles.
- Matthew

  Grant also says:

"Can you also add a comment which points at the Intel
 documentation?

 The 'Intel E7320 Memory Controller Hub (MCH) Datasheet' at

  http://download.intel.com/design/chipsets/datashts/30300702.pdf

 Page 69 documents register F4h (DEVPRES1).

 And I just doubled checked that the 0xf4 register value is
 restored later in the quirk (obvious when you look at the code
 but not from the patch"

  so here it is.
 - Linus ]

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Acked-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoclaw/lcs/netiucv: check s390dbf level before sprints
Peter Tiedemann [Fri, 8 Feb 2008 12:09:05 +0000 (13:09 +0100)]
claw/lcs/netiucv: check s390dbf level before sprints

additional check of s390dbf level results in better performance
if the default low debugging level is active.

Signed-off-by: Peter Tiedemann <ptiedem@de.ibm.com>
Signed-off-by: Ursula Braun <braunu@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agolcs: avoid/reduce unused s390dbf debug areas.
Peter Tiedemann [Fri, 8 Feb 2008 12:09:04 +0000 (13:09 +0100)]
lcs: avoid/reduce unused s390dbf debug areas.

Since lcs makes use of 1 debug area only, the number of debug areas
is reduced, while the number of pages per area is increased.

Signed-off-by: Peter Tiedemann <ptiedem@de.ibm.com>
Signed-off-by: Ursula Braun <braunu@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agonetiucv: change name of nop function
Ursula Braun [Fri, 8 Feb 2008 12:09:03 +0000 (13:09 +0100)]
netiucv: change name of nop function

Dummy NOP actions for fsm-statemachines have to be defined
separately for every using module of fsm-statemachines.
Thus the generic name fsm_action_nop is replaced by
module specific name netiucv_action_nop.

Signed-off-by: Ursula Braun <braunu@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agonetiucv: Remember to set driver->owner.
Cornelia Huck [Fri, 8 Feb 2008 12:09:02 +0000 (13:09 +0100)]
netiucv: Remember to set driver->owner.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Ursula Braun <braunu@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoclaw: removal of volatile variables
Ursula Braun [Fri, 8 Feb 2008 12:09:01 +0000 (13:09 +0100)]
claw: removal of volatile variables

Volatile variables queme_switch and pk_delay are not used anyway.
They are just a left over from an unused timer based packing logic.

Signed-off-by: Ursula Braun <braunu@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoforcedeth: tx pause watermarks
Ayaz Abdulla [Tue, 5 Feb 2008 17:30:01 +0000 (12:30 -0500)]
forcedeth: tx pause watermarks

New chipsets introduced variant Rx FIFO sizes that need to be taken into
account when setting up the tx pause watermarks. This patch introduces
the new device feature flags based on a version and implements the new
watermarks.

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoforcedeth: tx collision fix
Ayaz Abdulla [Tue, 5 Feb 2008 17:29:49 +0000 (12:29 -0500)]
forcedeth: tx collision fix

This patch supports a new fix in hardware regarding tx collisions. In
the cases where we are in autoneg mode and the link partner is in forced
mode, we need to setup the tx deferral register differently in order to
reduce collisions on the wire.

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agocxgb3: Handle ARP completions that mark neighbors stale.
Steve Wise [Wed, 6 Feb 2008 18:05:19 +0000 (12:05 -0600)]
cxgb3: Handle ARP completions that mark neighbors stale.

When ARP completes due to a request rather than a reply the neighbor is
marked NUD_STALE instead of reachable (see arp_process()).  The handler
for the resulting netevent needs to check also for NUD_STALE.

Failure to use the arp entry can cause RDMA connection failures.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Acked-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoMerge branch 'r6040' of git://git.kernel.org/pub/scm/linux/kernel/git/romieu/netdev...
Jeff Garzik [Mon, 11 Feb 2008 16:07:34 +0000 (11:07 -0500)]
Merge branch 'r6040' of git://git.kernel.org/pub/scm/linux/kernel/git/romieu/netdev-2.6 into upstream-fixes

16 years agoDM9000: Show the MAC address source after printing MAC
Ben Dooks [Tue, 5 Feb 2008 00:02:23 +0000 (00:02 +0000)]
DM9000: Show the MAC address source after printing MAC

Show whether the MAC address was read from the EEPROM or
the onboard PAR registers.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoDM9000: Update retry count whilst identifying chip
Ben Dooks [Tue, 5 Feb 2008 00:02:22 +0000 (00:02 +0000)]
DM9000: Update retry count whilst identifying chip

Reading the ID register does not always return the correct ID
from the device, so we retry several times to see if we get
a correct value.

These failures seem to be excaserbated by the speed of the
access to the chip (possibly time between issuing the address
and then the data cycle).

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoDM9000: Add support for MII ioctl() calls
Ben Dooks [Tue, 5 Feb 2008 00:02:21 +0000 (00:02 +0000)]
DM9000: Add support for MII ioctl() calls

Add entry to handle the MII ioctl() calls via the
generic_mii_ioctl call.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoDM9000: Add platform flag for no attached EEPROM
Ben Dooks [Tue, 5 Feb 2008 00:02:20 +0000 (00:02 +0000)]
DM9000: Add platform flag for no attached EEPROM

Allow the platform data to specify to the DM9000 driver
that there is no posibility of an attached EEPROM on the
device, so default all reads to 0xff and ignore any
write operations.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>