pandora-kernel.git
15 years agofbdev: c2p - Extract common c2p core to c2p_core.h
Geert Uytterhoeven [Sun, 4 Jan 2009 10:58:20 +0000 (11:58 +0100)]
fbdev: c2p - Extract common c2p core to c2p_core.h

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
15 years agofbdev: c2p - Cleanups
Geert Uytterhoeven [Sun, 4 Jan 2009 10:43:00 +0000 (11:43 +0100)]
fbdev: c2p - Cleanups

  - Improve comments and naming
  - Convert macros to static inline functions
  - Remove superfluous `break' after `return'
  - Make sure we get a build-time error (undefined reference to
    'c2p_unsupported') in case of future misuse
  - Replace `unsigned long' by `u32' in comp(), as that's what all callers use
  - Use {get,put}_unaligned_be32() in store_planar{,_masked}()
  - Use void * for arbitrary pointers
  - Use a union to represent pixels/words, to avoid casts

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
15 years agofbdev: c2p - Correct indentation
Geert Uytterhoeven [Sun, 4 Jan 2009 10:42:16 +0000 (11:42 +0100)]
fbdev: c2p - Correct indentation

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
15 years agofbdev: atafb - Fix 16 bpp console
Geert Uytterhoeven [Tue, 18 Nov 2008 20:13:01 +0000 (21:13 +0100)]
fbdev: atafb - Fix 16 bpp console

  - 16 bpp must use the cfb_*() ops
  - 16 bpp needs to set up info->pseudo_palette[] (was fbcon_cfb16_cmap[] in
    2.4.x)
  - Kill commented out 2.4.x fbcon remnants

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
15 years agofbdev: atafb - Fix line length handling
Geert Uytterhoeven [Tue, 18 Nov 2008 20:13:01 +0000 (21:13 +0100)]
fbdev: atafb - Fix line length handling

  - Make sure par->next_line is always set (this was done for Falcon only),
    as all the text console drawing operations need a valid par->next_line,
  - Make sure fix->line_length is always set, as some userspace applications
    need it because they don't have fallback code for the case where it's zero.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
15 years agoRevert "cpumask: use work_on_cpu in acpi-cpufreq.c for drv_read and drv_write"
Ingo Molnar [Mon, 12 Jan 2009 09:49:53 +0000 (10:49 +0100)]
Revert "cpumask: use work_on_cpu in acpi-cpufreq.c for drv_read and drv_write"

This reverts commit 7503bfbae89eba07b46441a5d1594647f6b8ab7d.

Dieter Ries reported bootup soft-hangs and bisected it back to
this commit, and reverting this commit gave him a working system.

The commit introduces work_on_cpu() use into the cpufreq code,
but that is subtly problematic from a lock hierarchy POV: the
hotplug-cpu lock is an highlevel lock that is taken before
lowlevel locks, and in this codepath we are called with the
policy lock taken.

Dieter did not have lockdep enabled so we dont have a nice stack
trace proof for this, but using work_on_cpu() in such a lowlevel
place certainly looks wrong, so we revert the patch.

work_on_cpu() needs to be reworked to be more generally usable.

Reported-by: Dieter Ries <clip2@gmx.de>
Tested-by: Dieter Ries <clip2@gmx.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: fix apic.c build error on latest git
Jaswinder Singh Rajput [Sun, 11 Jan 2009 15:04:47 +0000 (20:34 +0530)]
x86: fix apic.c build error on latest git

Fix this by reintroducing asm/smp.h include in apic.c - later on
I will fix this by removing non-smp data from smp.h

Also fix the __inquire_remote_apic() prototype/inline.

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: fix mpparse.c build error on latest git
Jaswinder Singh Rajput [Sun, 11 Jan 2009 13:08:55 +0000 (18:38 +0530)]
x86: fix mpparse.c build error on latest git

Fix this by reintroducing asm/smp.h include in mpparse.c - later on
I will fix this by removing non-smp data from smp.h.

Reported-by: Petr Titera <P.Titera@century.cz>
Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: avoid theoretical vmalloc fault loop
Andi Kleen [Fri, 9 Jan 2009 20:17:43 +0000 (12:17 -0800)]
x86: avoid theoretical vmalloc fault loop

Ajith Kumar noticed:

 I was going through the vmalloc fault handling for x86_64 and am unclear
 about the following lines in the vmalloc_fault() function.

 pgd = pgd_offset(current->mm ?: &init_mm, address);
 pgd_ref = pgd_offset_k(address);

 Here the intention is to get the pgd corresponding to the current process
 and sync it up with the pgd in init_mm(obtained from pgd_offset_k).
 However, for kernel threads current->mm is NULL and hence pgd =
 pgd_offset(init_mm, address) = pgd_ref which means the fault handler
 returns without setting the pgd entry in the MM structure in the context
 of which the kernel thread has faulted.  This could lead to never-ending
 faults and busy looping of kernel threads like pdflush.  So, shouldn't the
 pgd = pgd_offset(current->mm ?: &init_mm, address); be pgd =
 pgd_offset(current->active_mm ?: &init_mm, address);

We can use active_mm unconditionally because it should be always set.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoMerge branch 'topic/usb-caiaq' into for-linus
Takashi Iwai [Mon, 12 Jan 2009 13:06:01 +0000 (14:06 +0100)]
Merge branch 'topic/usb-caiaq' into for-linus

15 years agoMerge branch 'topic/hda' into for-linus
Takashi Iwai [Mon, 12 Jan 2009 13:05:55 +0000 (14:05 +0100)]
Merge branch 'topic/hda' into for-linus

15 years agoMerge branch 'topic/asoc' into for-linus
Takashi Iwai [Mon, 12 Jan 2009 13:05:50 +0000 (14:05 +0100)]
Merge branch 'topic/asoc' into for-linus

15 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux...
Karsten Keil [Mon, 12 Jan 2009 12:16:17 +0000 (13:16 +0100)]
Merge branch 'master' of git://git./linux/kernel/git/torvalds/linux-2.6 into for_2.6.29

15 years agoALSA: hda - Use own workqueue
Takashi Iwai [Mon, 12 Jan 2009 09:09:24 +0000 (10:09 +0100)]
ALSA: hda - Use own workqueue

snd-hda-intel driver used schedule_work() fot the delayed DMA pointer
updates, but this has several potential problems:
- it may block other eventsd works longer
- it may deadlock when probing fails and flush_scheduled_work() is
  called during probe callback (as probe callback itself could be
  invoked from eventd)

This patch adds an own workq for each driver instance to solve these
problems.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - add support for Intel DX58SO board
Wu Fengguang [Mon, 12 Jan 2009 01:18:58 +0000 (09:18 +0800)]
ALSA: hda - add support for Intel DX58SO board

The Intel DX58SO board works fine with model ALC883_3ST_6ch_INTEL.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agopowerpc: Fix cpufreq drivers after cpufreq core changes
Benjamin Herrenschmidt [Mon, 12 Jan 2009 00:22:01 +0000 (11:22 +1100)]
powerpc: Fix cpufreq drivers after cpufreq core changes

This updates the cpufreq drivers in arch/powerpc so they build again
after the core cpufreq changes that broke them in commit
in835481d9bcd65720b473db6b38746a74a3964218.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoFix small typo
Karsten Keil [Sun, 11 Jan 2009 17:36:30 +0000 (18:36 +0100)]
Fix small typo

Remove additional ;

Signed-off-by: Karsten Keil <kkeil@suse.de>
15 years agomisdn: indentation and braces disagree - add braces
Ilpo Järvinen [Fri, 9 Jan 2009 20:22:52 +0000 (12:22 -0800)]
misdn: indentation and braces disagree - add braces

This is not buggy due to plain luck as there is only one entry currently
in the element_attributes.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Karsten Keil <kkeil@suse.de>
15 years agomisdn: one handmade ARRAY_SIZE converted
Ilpo Järvinen [Fri, 9 Jan 2009 20:22:51 +0000 (12:22 -0800)]
misdn: one handmade ARRAY_SIZE converted

Defined as:

static struct device_attribute element_attributes[] = {

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Karsten Keil <kkeil@suse.de>
15 years agodrivers/isdn/hardware/mISDN: move a dereference below a NULL test
Julia Lawall [Fri, 9 Jan 2009 20:22:53 +0000 (12:22 -0800)]
drivers/isdn/hardware/mISDN: move a dereference below a NULL test

In each case, if the NULL test is necessary, then the dereference should be
moved below the NULL test.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
type T;
expression E;
identifier i,fld;
statement S;
@@

- T i = E->fld;
+ T i;
  ... when != E
      when != i
  if (E == NULL) S
+ i = E->fld;
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Karsten Keil <kkeil@suse.de>
15 years agoindentation & braces disagree - add braces
Ilpo Järvinen [Fri, 9 Jan 2009 20:22:50 +0000 (12:22 -0800)]
indentation & braces disagree - add braces

Nothing is broken because of this - currently.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
15 years agoMake parameter debug writable
Karsten Keil [Sun, 11 Jan 2009 16:58:13 +0000 (17:58 +0100)]
Make parameter debug writable

Overseen in the last patch series.

Signed-off-by: Karsten Keil <kkeil@suse.de>
15 years agoBUGFIX: used NULL pointer at ioctl(sk,IMGETDEVINFO,&devinfo) when devinfo.id not...
Martin Bachem [Sun, 26 Oct 2008 12:30:09 +0000 (13:30 +0100)]
BUGFIX: used NULL pointer at ioctl(sk,IMGETDEVINFO,&devinfo) when devinfo.id not registered

daxtar example # modprobe hfcsusb
daxtar example # modprobe mISDN_l1loop
daxtar example # ./misdnportinfo
Found 3 devices
        id:             0
        Dprotocols:     00000006
        Bprotocols:     0000000e
        protocol:       0
        nrbchan:        2
        name:           HFC-S_USB.1
        id:             1
        Dprotocols:     00000006
        Bprotocols:     0000000e
        protocol:       0
        nrbchan:        2
        name:           mISDN_l1loop.1
        id:             2
        Dprotocols:     00000006
        Bprotocols:     0000000e
        protocol:       0
        nrbchan:        2
        name:           mISDN_l1loop.2
daxtar example # rmmod hfcsusb
daxtar example # ./misdnportinfo
Found 2 devices
*Segmentation* *fault*

dmesg:

[ 9914.939718] BUG: unable to handle kernel NULL pointer dereference at 000000d4
[ 9914.939721] IP: [<f8f9f2dd>] :mISDN_core:get_mdevice+0x19/0x22
[ 9914.939729] *pde = 00000000
[ 9914.939732] Oops: 0000 [#14] PREEMPT SMP
[ 9914.939734] Modules linked in: mISDN_l1loop mISDN_core vmnet vmblock vmci vmmon coretemp w83627ehf hwmon_vid rfcomm l2cap blue
tooth usbhid snd_usb_audio snd_usb_lib snd_rawmidi snd_hwdep fuse nvidia(P) uhci_hcd i2c_i801 ehci_hcd snd_hda_intel atl1 usbcore i2c_core parport_seria
l [last unloaded: hfcsusb]
[ 9914.939751] Pid: 29618, comm: misdnportinfo Tainted: P      D   (2.6.27.3 #5)
[ 9914.939753] EIP: 0060:[<f8f9f2dd>] EFLAGS: 00210246 CPU: 0
[ 9914.939758] EIP is at get_mdevice+0x19/0x22 [mISDN_core]
[ 9914.939760] EAX: 00000000 EBX: f8fa791c ECX: f6afaa58 EDX: f7960cf4
[ 9914.939762] ESI: 80044944 EDI: bfc2e62c EBP: bfc2e62c ESP: f5adbef4
[ 9914.939763]  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
[ 9914.939765] Process misdnportinfo (pid: 29618, ti=f5ada000 task=f6bec430 task.ti=f5ada000)
[ 9914.939767] Stack: f8f9f4e0 00000000 f8f9f867 bfc2e62c 0000000a c02461e8 00200246 c042dde8
[ 9914.939771]        00000003 c042dde4 00000000 00000001 00200082 c0114775 00000000 00000000
[ 9914.939775]        00000003 f7088010 00200282 f8fa791c 80044944 bfc2e62c bfc2e62c c02f6615
[ 9914.939780] Call Trace:
[ 9914.939782]  [<f8f9f4e0>] _get_mdevice+0x0/0x18 [mISDN_core]
[ 9914.939789]  [<f8f9f867>] base_sock_ioctl+0x7a/0x129 [mISDN_core]
[ 9914.939789]  [<c02461e8>] opost+0x171/0x182
[ 9914.939789]  [<c0114775>] __wake_up+0x29/0x39
[ 9914.939789]  [<c02f6615>] sock_ioctl+0x1b5/0x1d9
[ 9914.939789]  [<c02f6460>] sock_ioctl+0x0/0x1d9
[ 9914.939789]  [<c016794c>] vfs_ioctl+0x1c/0x5d
[ 9914.939789]  [<c0167bcb>] do_vfs_ioctl+0x23e/0x24e
[ 9914.939789]  [<c0167c07>] sys_ioctl+0x2c/0x45
[ 9914.939789]  [<c0102cbd>] sysenter_do_call+0x12/0x21
[ 9914.939789]  [<c0350000>] pci_fixup_i450gx+0x4e/0x56
[ 9914.939789]  =======================
[ 9914.939789] Code: 00 68 02 f0 f9 f8 e8 ae b4 2c c7 8b 44 24 04 5a 59 c3 83 ec 04 31 d2 89 04 24 89 e1 b8 ac df fa f8 68 e0 f4
f9 f8 e8 4a b5 2c c7 <8b> 80 d4 00 00 00 5a 59 c3 53 89 cb 8d 90 9c 00 00 00 89 c8 e8
[ 9914.939789] EIP: [<f8f9f2dd>] get_mdevice+0x19/0x22 [mISDN_core] SS:ESP 0068:f5adbef4
[ 9914.939858] ---[ end trace 50e18a715b019424 ]---

Signed-off-by: Martin Bachem <m.bachem@gmx.de>
Signed-off-by: Karsten Keil <kkeil@suse.de>
15 years agosparc64: Fix cpumask related build failure
David Miller [Sun, 11 Jan 2009 12:06:40 +0000 (04:06 -0800)]
sparc64: Fix cpumask related build failure

cpumask_of_pcibus() was missing - this triggers on NUMA builds.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agokernel/sched.c: add missing forward declaration for 'double_rq_lock'
Steven Noonan [Sun, 11 Jan 2009 09:04:22 +0000 (01:04 -0800)]
kernel/sched.c: add missing forward declaration for 'double_rq_lock'

Impact: build fix on certain configs

Added 'double_rq_lock' forward declaration, allowing double_rq_lock
to be used in _double_lock_balance().

Signed-off-by: Steven Noonan <steven@uplinklabs.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoMerge commit 'v2.6.29-rc1' into sched/urgent
Ingo Molnar [Sun, 11 Jan 2009 12:03:08 +0000 (13:03 +0100)]
Merge commit 'v2.6.29-rc1' into sched/urgent

15 years agoMIPS: Only write c0_framemask on CPUs which have this register.
Ralf Baechle [Tue, 6 Jan 2009 23:07:20 +0000 (23:07 +0000)]
MIPS: Only write c0_framemask on CPUs which have this register.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Alchemy: new userspace suspend interface for development boards.
Manuel Lauss [Sun, 21 Dec 2008 08:26:27 +0000 (09:26 +0100)]
MIPS: Alchemy: new userspace suspend interface for development boards.

Replace the current sysctl-based suspend interface with a new sysfs-
based one which also uses the Linux-2.6 suspend model.

To configure wakeup sources, a subtree for the demoboards is created
under /sys/power/db1x:

sys/
`-- power
    `-- db1x
        |-- gpio0
        |-- gpio1
        |-- gpio2
        |-- gpio3
        |-- gpio4
        |-- gpio5
        |-- gpio6
        |-- gpio7
        |-- timer
        |-- timer_timeout
        |-- wakemsk
        `-- wakesrc

The nodes 'gpio[0-7]' and 'timer' configure the GPIO0..7 and M2
bits of the SYS_WAKEMSK (wakeup source enable) register.  Writing '1'
enables a wakesource, 0 disables it.

The 'timer_timeout' node holds the timeout in seconds after which the
TOYMATCH2 event should wake the system.

The 'wakesrc' node holds the SYS_WAKESRC register after wakeup (in hex),
the 'wakemsk' node can be used to get/set the wakeup mask directly.

For example, to have the timer wake the system after 10 seconds of sleep,
the following must be done in userspace:

echo 10 > /sys/power/db1x/timer_timeout
echo 1 > /sys/power/db1x/timer
echo mem > /sys/power/sleep

This patch also removes the homebrew CPU frequency switching code.  I don't
understand how it could have ever worked reliably; it does not communicate
the clock changes to peripheral devices other than uarts.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
 create mode 100644 arch/mips/alchemy/devboards/pm.c

15 years agoMIPS: Alchemy: dbdma suspend/resume support.
Manuel Lauss [Sun, 21 Dec 2008 08:26:26 +0000 (09:26 +0100)]
MIPS: Alchemy: dbdma suspend/resume support.

Implement suspend/resume for DBDMA controller and its channels.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Alchemy: Fix up PM code on Au1550/Au1200
Manuel Lauss [Sun, 21 Dec 2008 08:26:25 +0000 (09:26 +0100)]
MIPS: Alchemy: Fix up PM code on Au1550/Au1200

Au1550/Au1200 have a different memory controller which requires additi-
onal code to properly put memory to sleep (code taken from AMD/RMI's
Linux-2.6.11 source package).

Also fix up the remaining pm-related paths to compile on Au1200/Au1550
platforms.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Alchemy: move calc_clock function.
Manuel Lauss [Sun, 21 Dec 2008 08:26:24 +0000 (09:26 +0100)]
MIPS: Alchemy: move calc_clock function.

Now that nothing in time.c depends on calc_clock, it can
be moved to clocks.c where it belongs.
While at it, give it a better non-generic name and call it
as soon as possible in plat_mem_init.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Alchemy: RTC counter clocksource / clockevent support.
Manuel Lauss [Sun, 21 Dec 2008 08:26:23 +0000 (09:26 +0100)]
MIPS: Alchemy: RTC counter clocksource / clockevent support.

Add support for the 32 kHz counter1 (RTC) as clocksource / clockevent
device.  As a nice side effect, this also enables use of the 'wait'
instruction for runtime idle power savings.

If the counters aren't enabled/working properly, fall back on the
cp0 counter clock code.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: make cp0 counter clocksource/event usable as fallback.
Manuel Lauss [Sun, 21 Dec 2008 08:26:22 +0000 (09:26 +0100)]
MIPS: make cp0 counter clocksource/event usable as fallback.

The current mips clock build infrastructure lets a system only use
either the MIPS cp0 counter or a SoC specific timer as a clocksource /
clockevent device.

This patch renames the core cp0 counter clocksource / clockevent functions
from mips_* to r4k_* and updates the wrappers in asm-mips/time.h to
call these renamed functions instead.

Chips which can detect whether it is safe to use a chip-specific timer
can now fall back on the cp0 counter if necessary and possible
(e.g. Alchemy with a follow-on patch).

Existing behaviour is not changed in any way.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Alchemy: remove cpu_table.
Manuel Lauss [Sun, 21 Dec 2008 08:26:21 +0000 (09:26 +0100)]
MIPS: Alchemy: remove cpu_table.

Remove the cpu_table:
- move detection of whether c0_config[OD] is read-only and should be set
  to fix various chip errata to au1000 headers.
- move detection of write-only sys_cpupll to au1000 headers.
- remove the BCLK switching code:  Activation of this features should be
  left to the boards using the chips since it also affects external devices
  tied to BCLK, and only the board designers know whether it is safe to
  enable.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
 delete mode 100644 arch/mips/alchemy/common/cputable.c

15 years agoMIPS: Alchemy: remove get/set_au1x00_lcd_clock().
Manuel Lauss [Sun, 21 Dec 2008 08:26:20 +0000 (09:26 +0100)]
MIPS: Alchemy: remove get/set_au1x00_lcd_clock().

There are no in-tree users, so remove them.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Print irq handler description
Manuel Lauss [Sun, 21 Dec 2008 08:26:19 +0000 (09:26 +0100)]
MIPS: Print irq handler description

Add the name set by set_irq_chip_and_handler_name() to the output of
/proc/interrupts, like so:

db1200 ~ # cat /proc/interrupts
           CPU0
  8:         52     Alchemy-IC0-hilevel   serial
 10:        171     Alchemy-IC0-hilevel   au1xxx-mmc
 11:         47     Alchemy-IC0-hilevel   Au1xxx dbdma
 18:          1     Alchemy-IC0-hilevel   au1550-spi
 29:    1250997     Alchemy-IC0-riseedge  timer
 37:        211     Alchemy-IC0-hilevel   ehci_hcd:usb1, ohci_hcd:usb2
 38:          0     Alchemy-IC0-hilevel   lcd
 72:       2623     DB1200 CPLD-level     ide0
 73:        257     DB1200 CPLD-level     eth0
 84:          1     DB1200 CPLD-level     sd_insert
 85:          0     DB1200 CPLD-level     sd_eject

ERR:          0

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Alchemy: pb1200: update CPLD cascade irq handler.
Manuel Lauss [Sun, 21 Dec 2008 08:26:18 +0000 (09:26 +0100)]
MIPS: Alchemy: pb1200: update CPLD cascade irq handler.

Tested on Db1200.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Alchemy: update core interrupt code.
Manuel Lauss [Sun, 21 Dec 2008 08:26:17 +0000 (09:26 +0100)]
MIPS: Alchemy: update core interrupt code.

This patch attempts to modernize core Alchemy interrupt handling code.

- add irq_chips for irq controllers instead of irq type,
- add a set_type() hook to change irq trigger type during runtime,
- add a set_wake() hook to control GPIO0..7 based wakeup,
- use linux' IRQF_TRIGGER_ constants instead of homebrew ones,
- enable GENERIC_HARDIRQS_NO__DO_IRQ.
- simplify plat_irq_dispatch
- merge au1xxx_irqmap into irq.c file, the only place where its
  contents are referenced.
- board_init_irq() is now mandatory for every board; use it to register
  the remaining (gpio-based) interrupt sources; update all boards
  accordingly.

Run-tested on Db1200 and other Au1200 based platforms.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
 delete mode 100644 arch/mips/alchemy/common/au1xxx_irqmap.c

15 years agoMIPS: Alchemy: move commandline mangling out of common code
Manuel Lauss [Sun, 21 Dec 2008 08:26:16 +0000 (09:26 +0100)]
MIPS: Alchemy: move commandline mangling out of common code

Not every alchemy-based board might want these options forced on it,
and most of this stuff seems to be intended for devboard code anyway.
Remove commandline mangling code out of common chip code and instead
add relevant sections to all in-tree boards to not change existing
behaviour.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Alchemy: devboards: consolidate files
Manuel Lauss [Sun, 21 Dec 2008 08:26:15 +0000 (09:26 +0100)]
MIPS: Alchemy: devboards: consolidate files

Share some code and merge small files:
- Extract the prom init code from all devboard files (they only differ in
  memory configuration).
- Merge the irq configuration into board setup code.
- Merge smaller files into board setup code.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
 delete mode 100644 arch/mips/alchemy/devboards/db1x00/init.c
 delete mode 100644 arch/mips/alchemy/devboards/pb1000/init.c
 delete mode 100644 arch/mips/alchemy/devboards/pb1000/irqmap.c
 delete mode 100644 arch/mips/alchemy/devboards/pb1100/init.c
 delete mode 100644 arch/mips/alchemy/devboards/pb1100/irqmap.c
 delete mode 100644 arch/mips/alchemy/devboards/pb1200/init.c
 delete mode 100644 arch/mips/alchemy/devboards/pb1500/init.c
 delete mode 100644 arch/mips/alchemy/devboards/pb1500/irqmap.c
 delete mode 100644 arch/mips/alchemy/devboards/pb1550/init.c
 delete mode 100644 arch/mips/alchemy/devboards/pb1550/irqmap.c
 create mode 100644 arch/mips/alchemy/devboards/prom.c

15 years agoMIPS: Alchemy: Move development board code to common subdirectory
Manuel Lauss [Sun, 21 Dec 2008 08:26:14 +0000 (09:26 +0100)]
MIPS: Alchemy: Move development board code to common subdirectory

This should ease sharing of common devboard code.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Add Cavium OCTEON to arch/mips/Kconfig
David Daney [Thu, 11 Dec 2008 23:33:38 +0000 (15:33 -0800)]
MIPS: Add Cavium OCTEON to arch/mips/Kconfig

Signed-off-by: Tomaso Paoletti <tpaoletti@caviumnetworks.com>
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Add defconfig for Cavium OCTEON.
David Daney [Thu, 11 Dec 2008 23:33:37 +0000 (15:33 -0800)]
MIPS: Add defconfig for Cavium OCTEON.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Tomaso Paoletti <tpaoletti@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Adjust the dma-common.c platform hooks.
David Daney [Thu, 11 Dec 2008 23:33:36 +0000 (15:33 -0800)]
MIPS: Adjust the dma-common.c platform hooks.

We add a dev parameter to plat_unmap_dma_mem(), and hooks for
plat_dma_supported() and plat_extra_sync_for_device() which should be
nop changes for all existing targets.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Add Cavium OCTEON slot into proper tlb category.
David Daney [Thu, 11 Dec 2008 23:33:35 +0000 (15:33 -0800)]
MIPS: Add Cavium OCTEON slot into proper tlb category.

Expand the case statement for build_tlb_write_entry so that it does
the right thing on Cavium CPU variants.

Signed-off-by: Tomaso Paoletti <tpaoletti@caviumnetworks.com>
Signed-off-by: Paul Gortmaker <Paul.Gortmaker@windriver.com>
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Compute branch returns for Cavium OCTEON specific branch instructions.
David Daney [Thu, 11 Dec 2008 23:33:34 +0000 (15:33 -0800)]
MIPS:  Compute branch returns for Cavium OCTEON specific branch instructions.

For Cavium OCTEON, compute the return epc value for OCTEON specific
branch instructions.

Signed-off-by: Tomaso Paoletti <tpaoletti@caviumnetworks.com>
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Cavium OCTEON multiplier state preservation.
David Daney [Thu, 11 Dec 2008 23:33:33 +0000 (15:33 -0800)]
MIPS: Cavium OCTEON multiplier state preservation.

For OCTEON, implement a save and restore of the multiplier state
across context switches.

Signed-off-by: Tomaso Paoletti <tpaoletti@caviumnetworks.com>
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Add SMP_ICACHE_FLUSH for the Cavium CPU family.
David Daney [Thu, 11 Dec 2008 23:33:32 +0000 (15:33 -0800)]
MIPS: Add SMP_ICACHE_FLUSH for the Cavium CPU family.

Signed-off-by: Tomaso Paoletti <tpaoletti@caviumnetworks.com>
Signed-off-by: Paul Gortmaker <Paul.Gortmaker@windriver.com>
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Add Cavium OCTEON specific registers to ptrace.h and asm-offsets.c
David Daney [Thu, 11 Dec 2008 23:33:31 +0000 (15:33 -0800)]
MIPS: Add Cavium OCTEON specific registers to ptrace.h and asm-offsets.c

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Tomaso Paoletti <tpaoletti@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Add Cavium OCTEON cop2/cvmseg state entries to processor.h.
David Daney [Thu, 11 Dec 2008 23:33:30 +0000 (15:33 -0800)]
MIPS: Add Cavium OCTEON cop2/cvmseg state entries to processor.h.

Add in the cop2 and cvmseg state info to the known proc reg
data for Cavium so that it can be tracked, saved, restored.

Signed-off-by: Tomaso Paoletti <tpaoletti@caviumnetworks.com>
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Modify core io.h macros to account for the Octeon Errata Core-301.
David Daney [Thu, 11 Dec 2008 23:33:29 +0000 (15:33 -0800)]
MIPS: Modify core io.h macros to account for the Octeon Errata Core-301.

Signed-off-by: Tomaso Paoletti <tpaoletti@caviumnetworks.com>
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Hook up Cavium OCTEON in arch/mips.
David Daney [Thu, 11 Dec 2008 23:33:28 +0000 (15:33 -0800)]
MIPS: Hook up Cavium OCTEON in arch/mips.

Take all the OCTEON specific files that were added, and hook them into
the build system for the arch/mips.  For versions of GCC that lack
OCTEON support, override gas target architecture.

Signed-off-by: Tomaso Paoletti <tpaoletti@caviumnetworks.com>
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Hook Cavium OCTEON cache init into cache.c
David Daney [Thu, 11 Dec 2008 23:33:27 +0000 (15:33 -0800)]
MIPS: Hook Cavium OCTEON cache init into cache.c

Follow precedent of other boards, and hook-up the CPU specific cache
init.

Signed-off-by: Tomaso Paoletti <tpaoletti@caviumnetworks.com>
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Add Cavium OCTEON processor constants and CPU probe.
David Daney [Thu, 11 Dec 2008 23:33:26 +0000 (15:33 -0800)]
MIPS: Add Cavium OCTEON processor constants and CPU probe.

Add OCTEON constants to asm/cpu.h and asm/module.h.

Add probe function for Cavium OCTEON CPUs and hook it up.

Signed-off-by: Tomaso Paoletti <tpaoletti@caviumnetworks.com>
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Override assembler target architecture for octeon.
David Daney [Thu, 11 Dec 2008 23:33:25 +0000 (15:33 -0800)]
MIPS: Override assembler target architecture for octeon.

Gas from binutils 2.19 fails to compile some cop1 instructions with
-march=octeon.  Since the cop1 instructions are present in mips1, use
that arch instead.  This will be fixed in binutils 2.20.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Add Cavium OCTEON specific register definitions to mipsregs.h
David Daney [Thu, 11 Dec 2008 23:33:24 +0000 (15:33 -0800)]
MIPS: Add Cavium OCTEON specific register definitions to mipsregs.h

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: For Cavium OCTEON set hwrena and lazily restore CP2 state.
David Daney [Thu, 11 Dec 2008 23:33:23 +0000 (15:33 -0800)]
MIPS: For Cavium OCTEON set hwrena and lazily restore CP2 state.

If on Cavium, be aware of cop2 and hwrena during do_cpu().

Signed-off-by: Tomaso Paoletti <tpaoletti@caviumnetworks.com>
Signed-off-by: Paul Gortmaker <Paul.Gortmaker@windriver.com>
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: For Cavium OCTEON handle hazards as per the R10000 handling.
David Daney [Thu, 11 Dec 2008 23:33:22 +0000 (15:33 -0800)]
MIPS: For Cavium OCTEON handle hazards as per the R10000 handling.

For Cavium CPU, we treat the same as R10000, in that all hazards
are dealt with in hardware.

Signed-off-by: Tomaso Paoletti <tpaoletti@caviumnetworks.com>
Signed-off-by: Paul Gortmaker <Paul.Gortmaker@windriver.com>
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Add Cavium OCTEON processor support files to arch/mips/cavium-octeon.
David Daney [Fri, 9 Jan 2009 00:46:40 +0000 (16:46 -0800)]
MIPS: Add Cavium OCTEON processor support files to arch/mips/cavium-octeon.

These are the rest of the new files needed to add OCTEON processor
support to the Linux kernel.  Other than Makefile and Kconfig which
should be obvious, we have:

csrc-octeon.c   -- Clock source driver for OCTEON.
dma-octeon.c    -- Helper functions for mapping DMA memory.
flash_setup.c   -- Register on-board flash with the MTD subsystem.
octeon-irq.c    -- OCTEON interrupt controller managment.
octeon-memcpy.S -- Optimized memcpy() implementation.
serial.c        -- Register 8250 platform driver and early console.
setup.c         -- Early architecture initialization.
smp.c           -- OCTEON SMP support.
octeon_switch.S -- Scheduler context switch for OCTEON.
c-octeon.c      -- OCTEON cache controller support.
cex-oct.S       -- OCTEON cache exception handler.

asm/mach-cavium-octeon/*.h -- Architecture include files.

Signed-off-by: Tomaso Paoletti <tpaoletti@caviumnetworks.com>
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
 create mode 100644 arch/mips/cavium-octeon/Kconfig
 create mode 100644 arch/mips/cavium-octeon/Makefile
 create mode 100644 arch/mips/cavium-octeon/csrc-octeon.c
 create mode 100644 arch/mips/cavium-octeon/dma-octeon.c
 create mode 100644 arch/mips/cavium-octeon/flash_setup.c
 create mode 100644 arch/mips/cavium-octeon/octeon-irq.c
 create mode 100644 arch/mips/cavium-octeon/octeon-memcpy.S
 create mode 100644 arch/mips/cavium-octeon/serial.c
 create mode 100644 arch/mips/cavium-octeon/setup.c
 create mode 100644 arch/mips/cavium-octeon/smp.c
 create mode 100644 arch/mips/include/asm/mach-cavium-octeon/cpu-feature-overrides.h
 create mode 100644 arch/mips/include/asm/mach-cavium-octeon/dma-coherence.h
 create mode 100644 arch/mips/include/asm/mach-cavium-octeon/irq.h
 create mode 100644 arch/mips/include/asm/mach-cavium-octeon/kernel-entry-init.h
 create mode 100644 arch/mips/include/asm/mach-cavium-octeon/war.h
 create mode 100644 arch/mips/include/asm/octeon/octeon.h
 create mode 100644 arch/mips/kernel/octeon_switch.S
 create mode 100644 arch/mips/mm/c-octeon.c
 create mode 100644 arch/mips/mm/cex-oct.S

15 years agoMIPS: Add Cavium OCTEON processor support files to arch/mips/cavium-octeon/executive...
David Daney [Tue, 23 Dec 2008 23:22:14 +0000 (15:22 -0800)]
MIPS: Add Cavium OCTEON processor support files to arch/mips/cavium-octeon/executive and asm/octeon.

These files are used to coordinate resource sharing between all of
the programs running on the OCTEON SOC.  The OCTEON processor has many
CPU cores (current parts have up to 16, but more are possible).  It
also has a variety of on-chip hardware blocks for things like network
acceleration, encryption and RAID.

One typical configuration is to run Linux on several of the CPU cores,
and other dedicated applications on the other cores.

Resource allocation between the various programs running on the system
(Linux kernel and other dedicated applications) needs to be
coordinated.  The code we use to do this we call the 'executive'.  All
of this resource allocation and sharing code is gathered together in
the executive directory.

Included in the patch set are the following files:

cvmx-bootmem.c and cvmx-sysinfo.c -- Coordinate memory allocation.
All memory used by the Linux kernel is obtained here at boot time.

cvmx-l2c.c -- Coordinates operations on the shared level 2 cache.

octeon-model.c  -- Probes chip capabilities and version.

The corresponding headers are in asm/octeon.

Signed-off-by: Tomaso Paoletti <tpaoletti@caviumnetworks.com>
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
 create mode 100644 arch/mips/cavium-octeon/executive/Makefile
 create mode 100644 arch/mips/cavium-octeon/executive/cvmx-bootmem.c
 create mode 100644 arch/mips/cavium-octeon/executive/cvmx-l2c.c
 create mode 100644 arch/mips/cavium-octeon/executive/cvmx-sysinfo.c
 create mode 100644 arch/mips/cavium-octeon/executive/octeon-model.c
 create mode 100644 arch/mips/include/asm/octeon/cvmx-asm.h
 create mode 100644 arch/mips/include/asm/octeon/cvmx-bootinfo.h
 create mode 100644 arch/mips/include/asm/octeon/cvmx-bootmem.h
 create mode 100644 arch/mips/include/asm/octeon/cvmx-l2c.h
 create mode 100644 arch/mips/include/asm/octeon/cvmx-packet.h
 create mode 100644 arch/mips/include/asm/octeon/cvmx-spinlock.h
 create mode 100644 arch/mips/include/asm/octeon/cvmx-sysinfo.h
 create mode 100644 arch/mips/include/asm/octeon/cvmx.h
 create mode 100644 arch/mips/include/asm/octeon/octeon-feature.h
 create mode 100644 arch/mips/include/asm/octeon/octeon-model.h

15 years agoMIPS: Add Cavium OCTEON processor CSR definitions
David Daney [Thu, 11 Dec 2008 23:33:19 +0000 (15:33 -0800)]
MIPS: Add Cavium OCTEON processor CSR definitions

Here we define the addresses and bit-fields of the Configuration and
Status Registers (CSRs) for some of the hardware functional units on
the OCTEON SOC.

Definitions are needed for:

CIU  -- Central Interrupt Unit.
GPIO -- General Purpose Input Output.
IOB  -- Input / Output {Busing,Bridge}.
IPD  -- Input Packet Data unit.
L2C  -- Level-2 Cache controller.
L2D  -- Level-2 Data cache.
L2T  -- Level-2 cache Tag.
LED  -- Light Emitting Diode controller.
MIO  -- Miscellaneous Input / Output.
POW  -- Packet Order / Work unit.

Signed-off-by: Tomaso Paoletti <tpaoletti@caviumnetworks.com>
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Alchemy: Change strict_strtol to strict_strtoul
Julia Lawall [Tue, 25 Nov 2008 13:12:32 +0000 (14:12 +0100)]
MIPS: Alchemy: Change strict_strtol to strict_strtoul

Since memsize is unsigned, it would seem better to use strict_strtoul that
strict_strtol.

A simplified version of the semantic patch that makes this change is as
follows: (http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@s2@
long e;
position p;
@@

strict_strtol@p(...,&e)

@@
position p != s2.p;
type T;
T e;
@@

- strict_strtol@p
+ strict_strtoul
  (...,&e)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: 64-bit: Use generic 32-bit ptrace compat code.
Anirban Sinha [Thu, 13 Nov 2008 19:50:12 +0000 (11:50 -0800)]
MIPS: 64-bit: Use generic 32-bit ptrace compat code.

Signed-off-by: Anirban Sinha <asinha@zeugmasystems.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoucc_geth: use correct UCCE macros
Timur Tabi [Sun, 11 Jan 2009 08:25:21 +0000 (00:25 -0800)]
ucc_geth: use correct UCCE macros

The UCC Event Register (UCCE) already has unambigous macro definitions in qe.h,
so we should not be defining our own in the UCC Ethernet driver.

Removed unused local variable 'dev' from ucc_geth_poll(), which fixes
a warning caused by commit 908a7a16b852ffd618a9127be8d62432182d81b4
("net: Remove unused netdev arg from some NAPI interfaces.").

Replaced in_be/out_be pairs with setbits32 or clrbits32, where applicable.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet_dma: acquire/release dma channels on ifup/ifdown
Dan Williams [Sun, 11 Jan 2009 08:20:39 +0000 (00:20 -0800)]
net_dma: acquire/release dma channels on ifup/ifdown

The recent dmaengine rework removed the capability to remove dma device
driver modules while net_dma is active.  Rather than notify
dmaengine-clients that channels are trying to be removed, we now rely on
clients to notify dmaengine when they no longer have a need for
channels.  Teach net_dma to release channels by taking dmaengine
references at netdevice open and dropping references at netdevice close.

Acked-by: Maciej Sosnowski <maciej.sosnowski@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agocxgb3: Keep LRO off if disabled when interface is down
Roland Dreier [Sun, 11 Jan 2009 08:19:36 +0000 (00:19 -0800)]
cxgb3: Keep LRO off if disabled when interface is down

I have a system with a Chelsio adapter (driven by cxgb3) whose ports are
part of a Linux bridge.  Recently I updated the kernel and discovered
that things stopped working because cxgb3 was doing LRO on packets that
were passed into the bridge code for forwarding.  (Incidentally, this
problem manifested itself in a strange way that made debugging a bit
interesting -- for some reason, the skb_warn_if_lro() check in bridge
didn't trigger and these LROed packets were forwarded out a forcedeth
interface, and caused the forcedeth transmit path to get stuck)

This is because cxgb3 has no way of keeping state for the LRO flag until
the interface is brought up, so if the bridging code disables LRO while
the interface is down, then cxgb3_up() will just reenable LRO, and on my
Debian system at least, the init scripts add interfaces to a bridge
before bringing the interfaces up.

Fix this by keeping track of each interface's LRO state in cxgb3 so that
when bridge disables LRO, it stays disabled in cxgb3_up() when the
interface is brought up.  I did this by changing the rx_csum_offload
flag into a pair of bit flags; the effect of this on the rx_eth() fast
path is miniscule enough that it should be fine (eg on x86, a cmpb
instruction becomes a testb instruction).

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosfc: SFT9001: Fix condition for LNPGA power-off
Ben Hutchings [Sun, 11 Jan 2009 08:18:13 +0000 (00:18 -0800)]
sfc: SFT9001: Fix condition for LNPGA power-off

Only the SFX7101 requires software power control.  This was
incorrectly being applied to the SFT9001 rev A as well.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodccp ccid-3: Fix RFC reference
Gerrit Renker [Sun, 11 Jan 2009 08:17:22 +0000 (00:17 -0800)]
dccp ccid-3: Fix RFC reference

Thanks to Wei and Arnaldo for pointing out the correct
new reference for CCID-3.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosmsc911x: register irq with device name, not driver name
Steve Glendinning [Sun, 11 Jan 2009 08:14:52 +0000 (00:14 -0800)]
smsc911x: register irq with device name, not driver name

This change lets "cat /proc/interrupts" show the name of the ethernet
device (e.g. eth0) rather than the driver name (smsc911x).

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosmsc911x: fix smsc911x_reg_read compiler warning
Steve Glendinning [Sun, 11 Jan 2009 08:14:27 +0000 (00:14 -0800)]
smsc911x: fix smsc911x_reg_read compiler warning

if this code path is ever hit, the platform_data struct isn't properly
configured with a bus width flag so the device won't work (hence the
BUG()).

This patch adds a dummy return statement to eliminate this compiler
warning:

drivers/net/smsc911x.c: In function 'smsc911x_reg_read':
drivers/net/smsc911x.c:148: warning: control reaches end of non-void function

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoforcedeth: napi schedule lock fix
Ayaz Abdulla [Sun, 11 Jan 2009 08:09:04 +0000 (00:09 -0800)]
forcedeth: napi schedule lock fix

This patch fixes a potential race condition between scheduling napi and
completing napi poll. The call to netif_rx_schedule should be under
protection of the lock (as is the completion), otherwise, interrupts
could be masked off.

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: fix section mismatch warnings in dccp/ccids/lib/tfrc.c
Leonardo Potenza [Sat, 10 Jan 2009 07:06:28 +0000 (23:06 -0800)]
net: fix section mismatch warnings in dccp/ccids/lib/tfrc.c

Removed the __exit annotation of tfrc_lib_exit(), in order to suppress the following section mismatch messages:

WARNING: net/dccp/dccp.o(.text+0xd9): Section mismatch in reference from the function ccid_cleanup_builtins() to the function .exit.text:tfrc_lib_exit()
The function ccid_cleanup_builtins() references a function in an exit section.
Often the function tfrc_lib_exit() has valid usage outside the exit section
and the fix is to remove the __exit annotation of tfrc_lib_exit.

WARNING: net/dccp/dccp.o(.init.text+0x48): Section mismatch in reference from the function ccid_initialize_builtins() to the function .exit.text:tfrc_lib_exit()
The function __init ccid_initialize_builtins() references
a function __exit tfrc_lib_exit().
This is often seen when error handling in the init function
uses functionality in the exit path.
The fix is often to remove the __exit annotation of
tfrc_lib_exit() so it may be used outside an exit section.

Signed-off-by: Leonardo Potenza <lpotenza@inwind.it>
Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Acked-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoforcedeth: remove mgmt unit for mcp79 chipset
Ayaz Abdulla [Sat, 10 Jan 2009 06:40:06 +0000 (22:40 -0800)]
forcedeth: remove mgmt unit for mcp79 chipset

This patch removes the feature flag for mgmt unit as it is not used for
this chipset.

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoqlge: Remove dynamic alloc of rx ring control blocks.
Ron Mercer [Fri, 9 Jan 2009 11:31:53 +0000 (11:31 +0000)]
qlge: Remove dynamic alloc of rx ring control blocks.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoqlge: Fix schedule while atomic issue.
Ron Mercer [Fri, 9 Jan 2009 11:31:52 +0000 (11:31 +0000)]
qlge: Fix schedule while atomic issue.

There is no need to sleep while waiting for the hardware
semaphore to become available.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoqlge: Remove support for device ID 8000.
Ron Mercer [Fri, 9 Jan 2009 11:31:51 +0000 (11:31 +0000)]
qlge: Remove support for device ID 8000.

Support for dev id 8000 is pushed out until 2.6.30.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoqlge: Get rid of split addresses in hardware control blocks.
Ron Mercer [Fri, 9 Jan 2009 11:31:50 +0000 (11:31 +0000)]
qlge: Get rid of split addresses in hardware control blocks.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoqlge: Get rid of volatile usage for shadow register.
Ron Mercer [Fri, 9 Jan 2009 11:31:49 +0000 (11:31 +0000)]
qlge: Get rid of volatile usage for shadow register.

Putting back ql_read_sh_reg() function and using rmb() instead of
volatile.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoforcedeth: version bump and copyright
Ayaz Abdulla [Fri, 9 Jan 2009 11:03:54 +0000 (11:03 +0000)]
forcedeth: version bump and copyright

This patch bumps up the version number and adds current year to copyright.

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoforcedeth: xmit lock fix
Ayaz Abdulla [Fri, 9 Jan 2009 11:03:44 +0000 (11:03 +0000)]
forcedeth: xmit lock fix

This patch fixes a potential race condition between xmit thread and xmit
completion thread. The calculation of empty tx descriptors is not
performed under the lock. This could cause it to set the stop flag while
the completion thread finishes all tx's. This will result in the tx
queue in stopped state and no one to wake it up.

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetdev: missing validate_address hooks
Stephen Hemminger [Fri, 9 Jan 2009 10:45:37 +0000 (10:45 +0000)]
netdev: missing validate_address hooks

Some devices were converted incorrectly and are missing the validate
address hooks.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetdev: add missing set_mac_address hook
Stephen Hemminger [Fri, 9 Jan 2009 11:13:14 +0000 (11:13 +0000)]
netdev: add missing set_mac_address hook

Many drivers lost the ability to set ethernet address accidently
during the net_device_ops conversion.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetdev: gianfar: add MII ioctl handler
Clifford Wolf [Fri, 9 Jan 2009 10:23:11 +0000 (10:23 +0000)]
netdev: gianfar: add MII ioctl handler

This is the same kind of wrapper that can also be found in many
other network device drivers.

Tested with a freescale MPC8349E host CPU:
Toggled the interface LEDs on a DP83865 PHY.

Signed-off-by: Clifford Wolf <clifford@clifford.at>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/net/wireless/libertas: move a dereference below a NULL test
Julia Lawall [Fri, 9 Jan 2009 10:23:10 +0000 (10:23 +0000)]
drivers/net/wireless/libertas: move a dereference below a NULL test

In each case, if the NULL test is necessary, then the dereference should be
moved below the NULL test.  I have also taken advantage of the availability
of the value of priv->dev in the subsequent calls to netif_stop_queue and
netif_carrier_off.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
type T;
expression E;
identifier i,fld;
statement S;
@@

- T i = E->fld;
+ T i;
  ... when != E
      when != i
  if (E == NULL) S
+ i = E->fld;
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/net/hamradio/6pack.c: move a dereference below a NULL test
Julia Lawall [Fri, 9 Jan 2009 10:23:09 +0000 (10:23 +0000)]
drivers/net/hamradio/6pack.c: move a dereference below a NULL test

In each case, if the NULL test is necessary, then the dereference should be
moved below the NULL test.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
type T;
expression E;
identifier i,fld;
statement S;
@@

- T i = E->fld;
+ T i;
  ... when != E
      when != i
  if (E == NULL) S
+ i = E->fld;
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrivers/isdn/hardware/mISDN: move a dereference below a NULL test
Julia Lawall [Fri, 9 Jan 2009 10:22:53 +0000 (10:22 +0000)]
drivers/isdn/hardware/mISDN: move a dereference below a NULL test

In each case, if the NULL test is necessary, then the dereference should be
moved below the NULL test.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
type T;
expression E;
identifier i,fld;
statement S;
@@

- T i = E->fld;
+ T i;
  ... when != E
      when != i
  if (E == NULL) S
+ i = E->fld;
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet/bridge/netfilter: move a dereference below a NULL test
Julia Lawall [Fri, 9 Jan 2009 10:22:22 +0000 (10:22 +0000)]
net/bridge/netfilter: move a dereference below a NULL test

In each case, if the NULL test is necessary, then the dereference should be
moved below the NULL test.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
type T;
expression E;
identifier i,fld;
statement S;
@@

- T i = E->fld;
+ T i;
  ... when != E
      when != i
  if (E == NULL) S
+ i = E->fld;
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet/tipc/bcast.h: use ARRAY_SIZE
Julia Lawall [Fri, 9 Jan 2009 10:22:21 +0000 (10:22 +0000)]
net/tipc/bcast.h: use ARRAY_SIZE

ARRAY_SIZE is more concise to use when the size of an array is divided by
the size of its type or the size of its first element.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@i@
@@

#include <linux/kernel.h>

@depends on i using "paren.iso"@
type T;
T[] E;
@@

- (sizeof(E)/sizeof(T))
+ ARRAY_SIZE(E)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agowimax: fix typo in kernel-doc for debugfs_dentry in struct wimax_dev
Inaky Perez-Gonzalez [Fri, 9 Jan 2009 07:34:00 +0000 (07:34 +0000)]
wimax: fix typo in kernel-doc for debugfs_dentry in struct wimax_dev

The kernel-doc was referring to member @debufs_dentry instead of
@debugfs_dentry.

Reported by Randy Dunlap http://marc.info/?l=linux-netdev&m=123147942302885&w=2

As well, escape the colon in the field's text description, as it is
causing the generated text to be erraticly broken up (with paragraphs
moved down). Could not find a reason why it is happening so, even when
other field descriptions use colons and work as expected.

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years ago3c59x: Use device_set_wakeup_enable
Steffen Klassert [Fri, 9 Jan 2009 03:53:17 +0000 (03:53 +0000)]
3c59x: Use device_set_wakeup_enable

Since dev->power.should_wakeup bit is used by the PCI core to
decide whether the device should wake up the system from sleep
states, set this bit by calling device_set_wakeup_enable().

This restores proper WOL for the 3c59x driver.

Reported-and-tested-by: Graeme Wilford <gwilford@gmail.com>
Reported-by: Gunnar Degnbol <degnbol@danbbs.dk>
Signed-off-by: Steffen Klassert <klassert@mathematik.tu-chemnitz.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoqeth: fix usage of netdev_ops
Frank Blaschka [Fri, 9 Jan 2009 03:44:00 +0000 (03:44 +0000)]
qeth: fix usage of netdev_ops

Have separate netdev_ops for OSA and HiperSocket/TR.

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoqlge: Naming interrupt vectors
Jesper Dangaard Brouer [Fri, 9 Jan 2009 03:14:47 +0000 (03:14 +0000)]
qlge: Naming interrupt vectors

Name interrupt vectors according to the new naming standard, by Robert
Olsson and DaveM.

The qlge driver were very close to the new standard, thus the change
is kind of trivial.

Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk>
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agob44: fix misalignment and wasted space in rx handling
Felix Fietkau [Fri, 9 Jan 2009 02:39:57 +0000 (02:39 +0000)]
b44: fix misalignment and wasted space in rx handling

Broadcom 4400 puts a header of configurable size (apparently needs
to be at least 28 bytes) in front of received packets. When handling
this, the previous code accidentally added the offset 30 *twice* for
the software and once for the hardware, thereby cancelling out the
IP alignment effect of the 30 byte padding and wasting an additional
30 bytes of memory per packet.

This patch fixes this problem and improves routing throughput by
about 30% on MIPS, where unaligned access is expensive.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoipcomp: Remove spurious truesize increase
Herbert Xu [Thu, 8 Jan 2009 21:27:06 +0000 (21:27 +0000)]
ipcomp: Remove spurious truesize increase

When I made ipcomp use frags, I forgot to take out the original
truesize update that was added for pskb_expand_head.  As we no
longer expand the head of skb, that update should have been removed.

This bug is not related to the truesize warnings since we only
made it bigger than what it should've been.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoe1000e: Add process name to WARN message when detecting Mutex contention
David Graham [Thu, 8 Jan 2009 16:03:29 +0000 (16:03 +0000)]
e1000e: Add process name to WARN message when detecting Mutex contention

Adds process name of the current mutex holder to the WARN message output
when the e1000e driver attempts to acquire the nvm_mutex and finds that
it is already being held. With this patch the WARN message indicates
both the process name of the current mutex holder and the process name of
the attempted acquisition, which together will help to identify the
contending codepaths.

Signed-off-by: David Graham <david.graham@intel.com>
Acked-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agor6040: bump release to 0.21
Florian Fainelli [Thu, 8 Jan 2009 15:04:57 +0000 (15:04 +0000)]
r6040: bump release to 0.21

Bump version to 0.21 and release date to 09Jan2009.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agor6040: no longer mark r6040 as being experimental
Florian Fainelli [Thu, 8 Jan 2009 15:04:50 +0000 (15:04 +0000)]
r6040: no longer mark r6040 as being experimental

We do not depend on EXPERIMENTAL and the driver is
not experimental, so remove this warning.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agor6040: generate random ethernet MAC address when not initialized
Florian Fainelli [Thu, 8 Jan 2009 15:04:45 +0000 (15:04 +0000)]
r6040: generate random ethernet MAC address when not initialized

This patch makes the ethernet driver assign a random ethernet
MAC address when the bootloader does not set it.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agor6040: fix ifconfig down and freeing of tx/rx descriptors
Florian Fainelli [Sat, 10 Jan 2009 07:19:26 +0000 (23:19 -0800)]
r6040: fix ifconfig down and freeing of tx/rx descriptors

This patch fixes warnings and such traces that appear when doing
an ifconfig down on the interface:

WARNING: at arch/x86/kernel/pci-dma.c:376 dma_free_coherent+0x40/0x7d()
Modules linked in:

Signed-off-by: Joe Chou <joe.chou@rdc.com.tw>
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoirda: fix incomplete conversation to internal stats
Alexander Beregalov [Fri, 9 Jan 2009 00:42:08 +0000 (16:42 -0800)]
irda: fix incomplete conversation to internal stats

Fix for commit af0490810c (irda: convert to internal stats)

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>