Netdev List
 help / color / mirror / Atom feed
* Re: [Bugme-new] [Bug 15541] New: POLLIN bit is set when there is OOB data only
From: Andrew Morton @ 2010-03-19 22:55 UTC (permalink / raw)
  To: Alexandra.Kossovsky; +Cc: bugzilla-daemon, bugme-daemon, netdev
In-Reply-To: <bug-15541-10286@http.bugzilla.kernel.org/>


(switched to email.  Please respond via emailed reply-to-all, not via the
bugzilla web interface).

On Mon, 15 Mar 2010 16:19:43 GMT
bugzilla-daemon@bugzilla.kernel.org wrote:

> http://bugzilla.kernel.org/show_bug.cgi?id=15541
> 
>            Summary: POLLIN bit is set when there is OOB data only
>            Product: Networking
>            Version: 2.5
>     Kernel Version: 2.6.28, 2.6.32, 2.6.33
>           Platform: All
>         OS/Version: Linux
>               Tree: Mainline
>             Status: NEW
>           Severity: normal
>           Priority: P1
>          Component: IPV4
>         AssignedTo: shemminger@linux-foundation.org
>         ReportedBy: Alexandra.Kossovsky@oktetlabs.ru
>                 CC: davem@davemloft.net
>         Regression: Yes
> 
> 
> Starting from 2.6.28, Linux kernel has incorrect behaviour when poll() is
> called on TCP socket with out-of-band byte received.
> 
> When TCP socket has OOB byte available (and no normal data), old Linux,
> Solaris, FreeBSD and other systems return POLLPRI bit without POLLRD.  Starting
> from 2.6.28, Linux returns POLLRD | POLLPRI | POLLRDNORM.
> 
> The broken commt is
> http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.28.y.git;a=commitdiff;h=c7004482e8dcb7c3c72666395cfa98a216a4fb70
> .
> Following 1-line patch fixes the problem:
> --- a/net/ipv4/tcp.c 2010-03-15 19:13:45.000000000 +0300
> +++ b/net/ipv4/tcp.c      2010-03-15 19:13:21.000000000 +0300
> @@ -428,7 +428,7 @@
>                 if (tp->urg_seq == tp->copied_seq &&
>                     !sock_flag(sk, SOCK_URGINLINE) &&
>                     tp->urg_data)
> -                       target--;
> +                       target++;
> 
>                 /* Potential race condition. If read of tp below will
>                  * escape above sk->sk_state, we can be illegally awaken
> 

Thanks.

(Please don't send patches via bugzilla - it causes lots of problems with
our usual patch management and review processes.

Please send this patch via email as per Documentation/SubmittingPatches. 
Suitable recipients may be found via scripts/get_maintainer.pl)



^ permalink raw reply

* Re: [PATCH] Cosmetic:Partially remove deprecated __initcall() and change to
From: Randy Dunlap @ 2010-03-19 22:56 UTC (permalink / raw)
  To: Justin P. Mattock
  Cc: trivial, linux-arm-kernel, linux-audit, uclinux-dist-devel,
	linux-cris-kernel, linux-ia64, linux-mips, linux-parisc,
	linux-s390, selinux, sparclinux, x86, netdev, linux-kernel
In-Reply-To: <1269028291-9103-1-git-send-email-justinmattock@gmail.com>

On 03/19/10 12:51, Justin P. Mattock wrote:
> After doing some things on a small issue,
> I noticed through web surfing, that there were patches
> submitted pertaining that __initcall is deprecated,
> and device_initcall should be used.

Where was this discussion?  Do you have any pointers to it?

I don't see any mention of __initcall being deprecated in
Linus' mainline git tree, or in linux-next, or in mmotm.
Where are those patches?


> So as a change of subject(since what I was looking at
> was frustrating me),I decided to grep the whole tree
> and make the change(partially).
> 
> Currently I'm running this patch on my system, kernel compiles
> without any errors or warnings.(thought there would be a speed increase
> but didn't see much(if any)).

No, __initcall(x) is just a shorthand version of typing
device_initcall(x).  They do the same thing.

> Biggest problem I have though is testing this on other hardware types
> (I only have a macbook,and an iMac).
> So please if you have the access to other arch/hardware types please
> test.
> 
> Now what I mean by partially is the __initcall function is still
> there, so(if any) userspace apps/libs depend on this it's there
> so they dont break and/or any other subsystem, that needs time
> to make the changes.

The only thing that might be affected is building out-of-tree drivers,
but those are easy to fix.

> Note:
> the remaining files that still have __initcall in them are:
> (according to grep)
> 
> arch/um/include/shared/init.h
> include/linux/init.h
> scripts/checkpatch.pl
> 
> either I or somebody else, can change this(although a bit
> concerned about breaking things).
> 
> Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
> ---
>  Documentation/DocBook/kernel-hacking.tmpl    |    4 ++--
>  Documentation/cpu-freq/cpu-drivers.txt       |    2 +-
>  Documentation/kbuild/makefiles.txt           |    2 +-
>  arch/arm/mach-at91/leds.c                    |    2 +-
>  arch/arm/mach-clps711x/p720t.c               |    2 +-
>  arch/arm/mach-ebsa110/leds.c                 |    2 +-
>  arch/arm/mach-footbridge/cats-hw.c           |    2 +-
>  arch/arm/mach-footbridge/ebsa285-leds.c      |    2 +-
>  arch/arm/mach-footbridge/netwinder-hw.c      |    2 +-
>  arch/arm/mach-footbridge/netwinder-leds.c    |    2 +-
>  arch/arm/mach-ks8695/leds.c                  |    2 +-
>  arch/arm/mach-omap1/leds.c                   |    2 +-
>  arch/arm/mach-omap1/pm.c                     |    2 +-
>  arch/arm/mach-orion5x/db88f5281-setup.c      |    2 +-
>  arch/arm/mach-orion5x/rd88f5182-setup.c      |    2 +-
>  arch/arm/mach-pxa/generic.c                  |    2 +-
>  arch/arm/mach-pxa/pxa25x.c                   |    2 +-
>  arch/arm/mach-shark/leds.c                   |    2 +-
>  arch/blackfin/kernel/bfin_gpio.c             |    2 +-
>  arch/blackfin/mach-common/pm.c               |    2 +-
>  arch/cris/arch-v10/kernel/debugport.c        |    2 +-
>  arch/cris/arch-v10/kernel/fasttimer.c        |    2 +-
>  arch/cris/arch-v10/mm/init.c                 |    2 +-
>  arch/cris/arch-v32/kernel/fasttimer.c        |    2 +-
>  arch/cris/arch-v32/kernel/pinmux.c           |    2 +-
>  arch/cris/arch-v32/kernel/signal.c           |    2 +-
>  arch/cris/arch-v32/mach-a3/io.c              |    2 +-
>  arch/cris/arch-v32/mach-a3/pinmux.c          |    2 +-
>  arch/cris/arch-v32/mach-fs/io.c              |    2 +-
>  arch/cris/arch-v32/mach-fs/pinmux.c          |    2 +-
>  arch/cris/kernel/profile.c                   |    2 +-
>  arch/cris/kernel/time.c                      |    2 +-
>  arch/cris/kernel/traps.c                     |    2 +-
>  arch/frv/kernel/gdb-stub.c                   |    2 +-
>  arch/frv/kernel/pm-mb93093.c                 |    2 +-
>  arch/frv/kernel/pm.c                         |    2 +-
>  arch/frv/kernel/sysctl.c                     |    2 +-
>  arch/h8300/kernel/gpio.c                     |    2 +-
>  arch/ia64/hp/sim/simeth.c                    |    2 +-
>  arch/ia64/hp/sim/simserial.c                 |    2 +-
>  arch/ia64/kernel/audit.c                     |    2 +-
>  arch/ia64/kernel/crash.c                     |    2 +-
>  arch/ia64/kernel/cyclone.c                   |    2 +-
>  arch/ia64/kernel/perfmon.c                   |    2 +-
>  arch/ia64/kernel/setup.c                     |    2 +-
>  arch/ia64/kernel/uncached.c                  |    2 +-
>  arch/ia64/kernel/unwind.c                    |    2 +-
>  arch/ia64/mm/init.c                          |    2 +-
>  arch/mips/Makefile                           |    2 +-
>  arch/mips/kernel/unaligned.c                 |    2 +-
>  arch/mips/lasat/sysctl.c                     |    2 +-
>  arch/mips/math-emu/cp1emu.c                  |    2 +-
>  arch/mips/nxp/pnx8550/common/proc.c          |    2 +-
>  arch/mips/sibyte/sb1250/bus_watcher.c        |    2 +-
>  arch/mn10300/kernel/gdb-stub.c               |    2 +-
>  arch/mn10300/kernel/mn10300-serial.c         |    2 +-
>  arch/mn10300/kernel/profile.c                |    2 +-
>  arch/parisc/kernel/pci-dma.c                 |    2 +-
>  arch/parisc/kernel/pdc_chassis.c             |    2 +-
>  arch/powerpc/kernel/audit.c                  |    2 +-
>  arch/powerpc/kernel/idle.c                   |    2 +-
>  arch/powerpc/kernel/irq.c                    |    2 +-
>  arch/powerpc/kernel/proc_powerpc.c           |    2 +-
>  arch/powerpc/kernel/prom.c                   |    4 ++--
>  arch/powerpc/kernel/rtas-proc.c              |    2 +-
>  arch/powerpc/kernel/rtasd.c                  |    2 +-
>  arch/powerpc/kernel/sysfs.c                  |    2 +-
>  arch/powerpc/kernel/tau_6xx.c                |    2 +-
>  arch/powerpc/kernel/vio.c                    |    2 +-
>  arch/powerpc/platforms/iseries/lpevents.c    |    2 +-
>  arch/powerpc/platforms/iseries/mf.c          |    2 +-
>  arch/powerpc/platforms/iseries/proc.c        |    2 +-
>  arch/powerpc/platforms/iseries/viopath.c     |    2 +-
>  arch/powerpc/platforms/pseries/eeh.c         |    2 +-
>  arch/powerpc/platforms/pseries/hvCall_inst.c |    2 +-
>  arch/powerpc/platforms/pseries/power.c       |    2 +-
>  arch/powerpc/platforms/pseries/ras.c         |    2 +-
>  arch/powerpc/platforms/pseries/reconfig.c    |    2 +-
>  arch/powerpc/xmon/xmon.c                     |    2 +-
>  arch/s390/appldata/appldata_base.c           |    2 +-
>  arch/s390/kernel/audit.c                     |    2 +-
>  arch/s390/kernel/compat_exec_domain.c        |    2 +-
>  arch/s390/kernel/ipl.c                       |    2 +-
>  arch/s390/kernel/topology.c                  |    2 +-
>  arch/sh/boards/board-edosk7760.c             |    2 +-
>  arch/sh/boards/board-sh7785lcr.c             |    2 +-
>  arch/sh/boards/mach-cayman/setup.c           |    2 +-
>  arch/sh/boards/mach-landisk/setup.c          |    2 +-
>  arch/sh/boards/mach-r2d/setup.c              |    2 +-
>  arch/sh/boards/mach-sdk7786/setup.c          |    2 +-
>  arch/sh/boards/mach-se/7206/setup.c          |    2 +-
>  arch/sh/boards/mach-se/7751/setup.c          |    2 +-
>  arch/sh/boards/mach-sh03/setup.c             |    2 +-
>  arch/sh/kernel/traps_64.c                    |    2 +-
>  arch/sparc/kernel/apc.c                      |    2 +-
>  arch/sparc/kernel/audit.c                    |    2 +-
>  arch/sparc/kernel/mdesc.c                    |    2 +-
>  arch/sparc/kernel/pmc.c                      |    2 +-
>  arch/um/drivers/mconsole_kern.c              |    8 ++++----
>  arch/um/drivers/net_kern.c                   |    2 +-
>  arch/um/drivers/stderr_console.c             |    2 +-
>  arch/um/drivers/ubd_kern.c                   |    4 ++--
>  arch/um/kernel/exitcode.c                    |    2 +-
>  arch/um/kernel/physmem.c                     |    2 +-
>  arch/um/os-Linux/aio.c                       |    4 ++--
>  arch/um/os-Linux/skas/mem.c                  |    2 +-
>  arch/um/os-Linux/skas/process.c              |    2 +-
>  arch/um/os-Linux/umid.c                      |    2 +-
>  arch/um/sys-i386/tls.c                       |    2 +-
>  arch/x86/kernel/audit_64.c                   |    2 +-
>  arch/x86/kernel/tlb_uv.c                     |    4 ++--
>  arch/x86/kernel/vsyscall_64.c                |    4 ++--
>  arch/x86/mm/dump_pagetables.c                |    2 +-
>  arch/x86/vdso/vdso32-setup.c                 |    4 ++--
>  arch/x86/vdso/vma.c                          |    2 +-
>  arch/xtensa/platforms/iss/console.c          |    2 +-
>  drivers/net/arm/am79c961a.c                  |    2 +-
>  drivers/net/hamradio/baycom_epp.c            |    1 +
>  drivers/net/hamradio/baycom_par.c            |    1 +
>  drivers/net/hamradio/baycom_ser_fdx.c        |    1 +
>  drivers/net/hamradio/baycom_ser_hdx.c        |    1 +
>  drivers/s390/char/sclp_cmd.c                 |    2 +-
>  drivers/s390/char/sclp_config.c              |    2 +-
>  drivers/s390/char/sclp_cpi_sys.c             |    2 +-
>  drivers/s390/char/sclp_vt220.c               |    2 +-
>  drivers/s390/cio/blacklist.c                 |    2 +-
>  drivers/staging/rtl8192u/ieee80211/api.c     |    2 +-
>  fs/aio.c                                     |    2 +-
>  fs/compat_ioctl.c                            |    2 +-
>  ipc/ipc_sysctl.c                             |    2 +-
>  ipc/mqueue.c                                 |    2 +-
>  ipc/util.c                                   |    2 +-
>  kernel/audit.c                               |    2 +-
>  kernel/audit_tree.c                          |    2 +-
>  kernel/dma.c                                 |    2 +-
>  kernel/futex.c                               |    2 +-
>  kernel/lockdep_proc.c                        |    2 +-
>  kernel/pid_namespace.c                       |    2 +-
>  kernel/posix-cpu-timers.c                    |    2 +-
>  kernel/posix-timers.c                        |    2 +-
>  kernel/resource.c                            |    2 +-
>  kernel/sched_debug.c                         |    2 +-
>  kernel/time/timer_list.c                     |    2 +-
>  kernel/time/timer_stats.c                    |    2 +-
>  kernel/tracepoint.c                          |    2 +-
>  kernel/utsname_sysctl.c                      |    2 +-
>  lib/audit.c                                  |    2 +-
>  lib/debugobjects.c                           |    2 +-
>  mm/bounce.c                                  |    2 +-
>  mm/memory.c                                  |    2 +-
>  mm/mm_init.c                                 |    2 +-
>  mm/slab.c                                    |    2 +-
>  mm/slub.c                                    |    2 +-
>  mm/swapfile.c                                |    2 +-
>  net/ipv4/syncookies.c                        |    2 +-
>  net/ipv4/sysctl_net_ipv4.c                   |    2 +-
>  security/keys/proc.c                         |    2 +-
>  security/selinux/hooks.c                     |    2 +-
>  security/selinux/netif.c                     |    2 +-
>  security/selinux/netlink.c                   |    2 +-
>  security/selinux/netnode.c                   |    2 +-
>  security/selinux/netport.c                   |    2 +-
>  security/selinux/selinuxfs.c                 |    2 +-
>  security/selinux/ss/services.c               |    2 +-
>  security/smack/smackfs.c                     |    2 +-
>  sound/last.c                                 |    2 +-
>  166 files changed, 176 insertions(+), 172 deletions(-)


-- 
~Randy

^ permalink raw reply

* Re: Add PGM protocol support to the IP stack
From: H. Peter Anvin @ 2010-03-19 22:26 UTC (permalink / raw)
  To: David Miller; +Cc: andi, cl, netdev, linux-kernel
In-Reply-To: <20100319.145336.226782717.davem@davemloft.net>

On 03/19/2010 02:53 PM, David Miller wrote:
> But I also don't consider what openpbm has to do right now to
> be all that much of a restriction.  You need privileges to
> add the protocol to the kernel, you need privileges to run
> the userspace variant, there is no real difference.

The real difference is if multiplex is needed between multiple
unprivileged users.

	-hpa

^ permalink raw reply

* Unable to create more than 1 guest virtio-net device using vhost-net backend
From: Sridhar Samudrala @ 2010-03-19 22:19 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: netdev, kvm@vger.kernel.org

When creating a guest with 2 virtio-net interfaces, i am running
into a issue causing the 2nd i/f falling back to userpace virtio
even when vhost is enabled.

After some debugging, it turned out that KVM_IOEVENTFD ioctl() 
call in qemu is failing with ENOSPC.
This is because of the NR_IOBUS_DEVS(6) limit in kvm_io_bus_register_dev()
routine in the host kernel.

I think we need to increase this limit if we want to support multiple
network interfaces using vhost-net.
Is there an alternate solution?

Thanks
Sridhar



^ permalink raw reply

* Re: Add PGM protocol support to the IP stack
From: David Miller @ 2010-03-19 21:53 UTC (permalink / raw)
  To: andi; +Cc: cl, netdev, linux-kernel
In-Reply-To: <87tysccjrn.fsf@basil.nowhere.org>

From: Andi Kleen <andi@firstfloor.org>
Date: Fri, 19 Mar 2010 18:18:36 +0100

> Christoph Lameter <cl@linux-foundation.org> writes:
>>
>> I know about the openpgm implementation. Openpbm does this at the user
>> level and requires linking to a library. It is essentially a communication
>> protocol done in user space. It has privilege issues because it has to
>> create PGM packets via a raw socket.
> 
> That seems like a poor reason alone to put something into the kernel
> Perhaps you rather need some way to have unpriviledged raw sockets?
> 
> The classical way to do this is to start suid root, only open
> the socket and then drop privileges.

I completely agree.

We should be able to make a way for unprivileged users to
use RAW sockets in some limited capacity, for cases like this.

But I also don't consider what openpbm has to do right now to
be all that much of a restriction.  You need privileges to
add the protocol to the kernel, you need privileges to run
the userspace variant, there is no real difference.

^ permalink raw reply

* Re: [PATCH 2/3] can: add support for Janz VMOD-ICAN3 Intelligent CAN module
From: Ira W. Snyder @ 2010-03-19 21:52 UTC (permalink / raw)
  To: Wolfgang Grandegger; +Cc: linux-kernel, socketcan-core, netdev, sameo
In-Reply-To: <4BA3DAF1.4090206@grandegger.com>

On Fri, Mar 19, 2010 at 09:13:37PM +0100, Wolfgang Grandegger wrote:
> Ira W. Snyder wrote:
> > On Fri, Mar 19, 2010 at 04:45:09PM +0100, Wolfgang Grandegger wrote:
> >> Ira W. Snyder wrote:
> >>> On Fri, Mar 19, 2010 at 10:01:14AM +0100, Wolfgang Grandegger wrote:
> >>>> Hi Ira,
> >>>>
> >>>> we already discussed this patch on the SocketCAN mailing list and there
> >>>> are just a few minor issues and the request to add support for the new
> >>>> "berr-reporting" option, if feasible. See:
> >>>>
> >>>>   commit 52c793f24054f5dc30d228e37e0e19cc8313f086
> >>>>   Author: Wolfgang Grandegger <wg@grandegger.com>
> >>>>   Date:   Mon Feb 22 22:21:17 2010 +0000
> >>>>
> >>>>     can: netlink support for bus-error reporting and counters
> >>>>     
> >>>>     This patch makes the bus-error reporting configurable and allows to
> >>>>     retrieve the CAN TX and RX bus error counters via netlink interface.
> >>>>     I have added support for the SJA1000. The TX and RX bus error counters
> >>>>     are also copied to the data fields 6..7 of error messages when state
> >>>>     changes are reported.
> >>>>
> >>>> Should not be a big deal.
> >>>>
> >>> I think this patch came along since my last post of the driver. I must
> >>> have missed it. I'll try and add support.
> >> No problem, it's really new. Just just need to enable BEI depending on
> >> CAN_CTRLMODE_BERR_REPORTING.
> >>
> > 
> > I have one final question about this.
> > 
> > The documentation for the firmware isn't very specific here. I believe
> > that in order to get any kind of error messages, I need the bus error
> > feature turned on. What is the expected behavior of an SJA1000 with the
> > BEI (bus error interrupt) turned off? Will you still get warning
> > messages for ERROR_ACTIVE -> ERROR_PASSIVE state transitions?
> 
> Yes. State transitions are enabled with EI and EPI.
> 

I cannot set the registers directly, but I think I got it right. See
below.

> > I'm not sure how I would go about testing this feature, either. Ideas?
> 
> Send messages without cable connected and watch the error messages with
> "candump any,0:0,#ffffffff". With "ip ... berr-reporting on" you should
> see additional bus-errors.
> 

Ok, I tried this. On one controller, I turned on bus-error reporting. On
the other, I turn off bus-error reporting. I then tried sending lots of
messages with the cable unplugged. Here is what happened:

bus-error reporting on:
Lots of CAN_ERR_BUSERR messages are flooded in candump. There is also a
CAN_ERR_CRTL_TX_WARNING message, when there are too many TX errors.

bus-error reporting off:
There was only one message reported before the controller went into
ERROR-WARNING state. It was the same CAN_ERR_CRTL_TX_WARNING message as
above. There was no flooding of CAN_ERR_BUSERR messages.

Does this seem right? It seems pretty good to me.

> > I also noticed that I can enable "self test mode" and "listen only mode"
> > using the same firmware command. It appears that there are netlink
> > messages for this as well. Should I try and support these, too? I don't
> > really have any use for them (yet). I assume "self test mode" is
> > equivalent to "loopback mode" in the netlink messages.
> 
> List-only is straight forward while "self test mode" is not exactly like
> "loopback mode", IIRC. Feel free to send a follow-up patch when you have
> time for a thorough implementation and testing. It's also on my to-do
> list for the SJA1000.
> 

Ok, then I'll put this off for a while. Feel free to pester me about it
when there is a working implementation in the SJA1000 driver for me to
borrow from. :)

Thanks for all the help.
Ira

^ permalink raw reply

* Re: [Bugme-new] [Bug 15530] New: ipip6 MTU cannot be set lower than 1280
From: Andrew Morton @ 2010-03-19 21:19 UTC (permalink / raw)
  To: netdev; +Cc: bugzilla-daemon, bugme-daemon, berni
In-Reply-To: <bug-15530-10286@http.bugzilla.kernel.org/>


(switched to email.  Please respond via emailed reply-to-all, not via the
bugzilla web interface).

On Sat, 13 Mar 2010 14:38:54 GMT
bugzilla-daemon@bugzilla.kernel.org wrote:

> http://bugzilla.kernel.org/show_bug.cgi?id=15530
> 
>            Summary: ipip6 MTU cannot be set lower than 1280
>            Product: Networking
>            Version: 2.5
>     Kernel Version: 2.6.32
>           Platform: All
>         OS/Version: Linux
>               Tree: Mainline
>             Status: NEW
>           Severity: low
>           Priority: P1
>          Component: IPV6
>         AssignedTo: yoshfuji@linux-ipv6.org
>         ReportedBy: berni@birkenwald.de
>         Regression: No
> 
> 
> The (inner) MTU of a ipip6 (IPv4-in-IPv6) tunnel cannot be set below 1280,
> which is the minimum MTU in IPv6. However, there should be no IPv6 on the
> tunnel interface at all (ipip6 cannot transport it), so the IPv6 rules should
> not apply.
> 
> root@pest:~# ip -6 tunnel add test1 mode ipip6 remote 2001:xxxx::26 local
> 2001:xxx::1:1
> root@pest:~# ip link set test1 mtu 1280
> root@pest:~# ip link set test1 mtu 1279
> RTNETLINK answers: Invalid argument
> 
> This prevents the tunnel from work on paths that only support a (outer) IPv6
> MTU of 1280, since the tunnel adds an additional overhead of 40 bytes.
> 
> Setting net.ipv6.conf.<if>.disable_ipv6=1 and/or removing the IPv6 link-local
> address on the tunnel interface does not help.
> 


^ permalink raw reply

* Re: recent e100 fixes cause kernel panic?
From: Ed Ravin @ 2010-03-19 20:46 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: e1000-devel@lists.sourceforge.net, netdev@vger.kernel.org,
	Stephen Hemminger, Jesse Brandeburg, roger.oksanen
In-Reply-To: <20100319131639.733c53bf@nehalam>

On Fri, Mar 19, 2010 at 01:16:39PM -0700, Stephen Hemminger wrote:
> On Fri, 19 Mar 2010 12:42:20 -0700
> Jesse Brandeburg <jesse.brandeburg@intel.com> wrote:
> 
> > Added netdev, the place to talk about in-kernel driver problems.
> > 
> > On Thu, 2010-03-11 at 22:39 -0700, Stephen Hemminger wrote:
> > > ----- "Ed Ravin" <eravin@panix.com> wrote:
> > > 
> > > > I'm using the Vyatta "kenwood" Linux distribution, which is currently
> > > > at 2.6.31-1.  I upgraded to their latest version, and began seeing
> > > > kernel
> > > > panics shortly after starting to use ssh/scp on the network connected
> > > > to
> > > > an e100 NIC.  I was able to reproduce the problem immediately after
> > > > booting up - sometimes it even crashed during the boot.
> > > > 
> > > > One of the crash logs is attached.
> > 
> > Ed, thanks for the report, looks like these patches introduced a new
> > problem.  e100 hardware has a tricky data structure that seems to cause
> > some problems for (particularly arm) some cpu architectures.
> > 
> > > > 
> > > > Since the problem seemed to be related to e100.c, I reverted the two
> > > > commits to e100.c that had taken place since I last built the kernel
> > > > for this box:
> > > > 
> > > >   Author: Roger Oksanen <roger.oksanen@cs.helsinki.fi>
> > > >   Date:   Fri Dec 18 20:18:21 2009 -0800
> > > >   e100: Fix broken cbs accounting due to missing memset.
> > > > 
> > > >   Author: Roger Oksanen <roger.oksanen@cs.helsinki.fi>
> > > >   Date:   Sun Nov 29 17:17:29 2009 -0800
> > > >   e100: Use pci pool to work around GFP_ATOMIC order 5 memory
> > > > allocation failu
> > > > 
> > > > I rebuilt the kernel and it's not panicking anymore.
> > 
> > so you just reverted both, and its good news things are working again,
> > but can you try one or the other and let us know if things still break
> > for you?
> > 
> > > The Vyatta kernel for 2.6.31 is based on the 2.6.31.10 + unionfs.
> > > These two patches came from the 2.6.31.10 -stable update.
> > 
> > This is the only report of this issue I have heard so far, so something
> > must be a little unique to your system or workload such that the driver
> > works mostly.
> > 
> > I'm looking more closely into the panic trace now, maybe I can figure it
> > out from there.
> > 
> 
> Davem found one thing, the memset wasn't initializing the whole maximum possible
> tx ring.

I think that was it.  Good catch!

I was running "ethtool -G rx 4096 tx 512" at startup on all the interfaces
in the system.  That was meant for the e1000 / e1000e NICs, but it ended
up also getting run on the e100 in my elderly test box.  This appears to be
the equivalent of setting the e100 rings to their maximum sizes of 256 for
both rx and tx.

I haven't had the chance yet to try the patch.

But I did reboot back to the buggy kernel and ran:

   ethtool -G rx 128 tx 128 eth1

I then copied a 150 MB file via scp back and forth, no problems.  Usually
I'd get the panic as soon as I started heavy data transfer, sometimes
sooner.

I then ran 'ethtool -G rx 256 tx 256 eth1" and started the scp again -
instant panic.  Trace below.

------------------
# ethtool -G eth1 rx 256 tx 256
# [  239.331360] BUG: unable to handle kernel NULL pointer
dereference at (null)
[  239.335284] IP: [<(null)>] (null)
[  239.335284] *pde = 00000000 
[  239.335284] Thread overran stack, or stack corrupted
[  239.335284] Oops: 0000 [#1] SMP 
[  239.335284] last sysfs file: /sys/class/i2c-adapter/i2c-0/name
[  239.335284] Modules linked in: ip_gre xt_comment iptable_nat
iptable_filter ip6table_filter ip6table_raw ip6_tables xt_NOTRACK
iptable_raw ip_tables x_tables nf_nat_pptp nf_conntrack_pptp
nf_conntrack_proto_gre nf_nat_h323 nf_conntrack_h323 nf_nat_sip
nf_conntrack_sip nf_nat_proto_gre nf_nat_tftp nf_nat_ftp nf_nat
nf_conntrack_ipv4 nf_defrag_ipv4 nf_conntrack_tftp nf_conntrack_ftp
nf_conntrack ipv6 pcspkr parport_pc parport button processor i2c_viapro
i2c_core via_agp shpchp pci_hotplug agpgart evdev vfat fat ext2 battery
ohci_hcd ehci_hcd squashfs loop unionfs ext3 jbd mbcache raid6_pq async_xor
async_memcpy async_tx xor md_mod sg sr_mod sd_mod cdrom crc_t10dif
usb_storage pata_via pata_acpi ata_generic pata_pdc202xx_old uhci_hcd
libata usbcore e100 mii nls_base e1000 scsi_mod thermal fan thermal_sys
[last unloaded: raid10]
[  239.335284] 
[  239.335284] Pid: 0, comm: swapper Tainted: G        W
(2.6.31-1-586-vyatta #1) System Name
[  239.335284] EIP: 0060:[<00000000>] EFLAGS: 00010016 CPU: 0
[  239.335284] EIP is at 0x0
[  239.335284] EAX: ef441c20 EBX: ef441c20 ECX: 00000001 EDX: 00000001
[  239.335284] ESI: fffffff4 EDI: 00000001 EBP: 00000000 ESP: c12d1dd4
[  239.335284]  DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
[  239.335284] Process swapper (pid: 0, ti=c12d0000 task=c12febc0
task.ti=c12d0000)
[  239.335284] Stack:
[  239.335284]  c101c590 000000c1 00000001 efe04eb4 00000282 efe04eb0
000000c1 00000001
[  239.335284] <0> c101e86c 00000001 000000c1 00000001 efe04eb0 f66d0940
f66d0940 f66d0940
[  239.335284] <0> c1199d84 000000c1 f66d32e0 00000000 c11d646e 036ac000
f66d32e0 f66ac000
[  239.335284] Call Trace:
[  239.335284]  [<c101c590>] ? __wake_up_common+0x34/0x59
[  239.335284]  [<c101e86c>] ? __wake_up_sync_key+0x33/0x49
[  239.335284]  [<c1199d84>] ? sock_def_readable+0x34/0x5e
[  239.335284]  [<c11d646e>] ? tcp_child_process+0x46/0x83
[  239.335284]  [<c11d5191>] ? tcp_v4_do_rcv+0x240/0x2a1
[  239.335284]  [<c11d5592>] ? tcp_v4_rcv+0x3a0/0x594
[  239.335284]  [<c11be22e>] ? ip_local_deliver_finish+0xca/0x14e
[  239.335284]  [<c11bdeb5>] ? ip_rcv_finish+0x295/0x2a9
[  239.335284]  [<c11a3168>] ? netif_receive_skb+0x3cb/0x3e6
[  239.335284]  [<f7cefafb>] ? e100_poll+0x184/0x29d [e100]
[  239.335284]  [<c11a36b9>] ? net_rx_action+0x91/0x173
[  239.335284]  [<c102e431>] ? __do_softirq+0xa5/0x147
[  239.335284]  [<c102e4f6>] ? do_softirq+0x23/0x27
[  239.335284]  [<c102e5d3>] ? irq_exit+0x26/0x53
[  239.335284]  [<c10043fd>] ? do_IRQ+0x78/0x89
[  239.335284]  [<c1002fe9>] ? common_interrupt+0x29/0x30
[  239.335284]  [<c10085ae>] ? default_idle+0x3e/0x5c
[  239.335284]  [<c1001c5c>] ? cpu_idle+0x41/0x5d
[  239.335284]  [<c132e744>] ? start_kernel+0x29c/0x29f
[  239.335284] Code:  Bad EIP value.
[  239.335284] EIP: [<00000000>] 0x0 SS:ESP 0068:c12d1dd4
[  239.335284] CR2: 0000000000000000
[  239.335284] ---[ end trace 4eaa2a86a8e2da24 ]---
[  239.335284] Kernel panic - not syncing: Fatal exception in interrupt
[  239.335284] Pid: 0, comm: swapper Tainted: G      D W
2.6.31-1-586-vyatta #1
[  239.335284] Call Trace:
[  239.335284]  [<c120bee2>] ? panic+0x38/0xd1
[  239.335284]  [<c100581c>] ? oops_end+0x6c/0x76
[  239.335284]  [<c1017f6a>] ? no_context+0x105/0x10e
[  239.335284]  [<c101809b>] ? __bad_area_nosemaphore+0x128/0x133
[  239.335284]  [<c11a3bb8>] ? dev_hard_start_xmit+0x205/0x298
[  239.335284]  [<c11bc136>] ? ip_route_output_flow+0x72/0x1ad
[  239.335284]  [<c11df3e1>] ? inet_sk_rebuild_header+0x18/0x387
[  239.335284]  [<c10180b0>] ? bad_area_nosemaphore+0xa/0xc
[  239.335284]  [<c120dac6>] ? error_code+0x66/0x70
[  239.335284]  [<c10181ce>] ? do_page_fault+0x0/0x270
[  239.335284]  [<c101c590>] ? __wake_up_common+0x34/0x59
[  239.335284]  [<c101e86c>] ? __wake_up_sync_key+0x33/0x49
[  239.335284]  [<c1199d84>] ? sock_def_readable+0x34/0x5e
[  239.335284]  [<c11d646e>] ? tcp_child_process+0x46/0x83
[  239.335284]  [<c11d5191>] ? tcp_v4_do_rcv+0x240/0x2a1
[  239.335284]  [<c11d5592>] ? tcp_v4_rcv+0x3a0/0x594
[  239.335284]  [<c11be22e>] ? ip_local_deliver_finish+0xca/0x14e
[  239.335284]  [<c11bdeb5>] ? ip_rcv_finish+0x295/0x2a9
[  239.335284]  [<c11a3168>] ? netif_receive_skb+0x3cb/0x3e6
[  239.335284]  [<f7cefafb>] ? e100_poll+0x184/0x29d [e100]
[  239.335284]  [<c11a36b9>] ? net_rx_action+0x91/0x173
[  239.335284]  [<c102e431>] ? __do_softirq+0xa5/0x147
[  239.335284]  [<c102e4f6>] ? do_softirq+0x23/0x27
[  239.335284]  [<c102e5d3>] ? irq_exit+0x26/0x53
[  239.335284]  [<c10043fd>] ? do_IRQ+0x78/0x89
[  239.335284]  [<c1002fe9>] ? common_interrupt+0x29/0x30
[  239.335284]  [<c10085ae>] ? default_idle+0x3e/0x5c
[  239.335284]  [<c1001c5c>] ? cpu_idle+0x41/0x5d
[  239.335284]  [<c132e744>] ? start_kernel+0x29c/0x29f
[  239.335284] Rebooting in 60 seconds..

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit http://communities.intel.com/community/wired

^ permalink raw reply

* pull request: wireless-next-2.6 2010-03-19
From: John W. Linville @ 2010-03-19 20:45 UTC (permalink / raw)
  To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
  Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA,
	netdev-u79uwXL29TY76Z2rM5mHXA

Dave,

Here is the first big dump of wireless bit for the 2.6.35 cycle...

Included are the usual driver updates, etc.  In particular, the Intel
and Nokia guys have been busy as usual. :-)

Please let me know if there are problems!

Thanks,

John

---

The following changes since commit 1c01fe14a87332cc88266fbd6e598319322eb96f:
  Jiri Pirko (1):
        net: forbid underlaying devices to change its type

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6.git master

Abhijeet Kolekar (1):
      iwl3945: check ucode load error code

Alban Browaeys (2):
      rt2x00: txdone implementation supporting hw encryption.
      rt2x00: Fix TX status reporting for rt2800pci.

Andres Salomon (1):
      mac80211: give warning if building w/out rate ctrl algorithm

Andrew Blaich (1):
      ath5k: fixing retries in ath5k_hw_setup_4word_tx_desc

Benoit Papillault (1):
      ath5k: Fix TX/RX padding for all frames

Bruno Randolf (11):
      mac80211: fix rates setup on IBSS merge
      ath5k: add antenna statistics and debugfs file for antenna settings
      ath5k: preserve antenna settings
      ath5k: remove double opmode definition
      ath5k: remove ah_magic
      ath5k: remove ah_mac_revision
      ath5k: remove ah_gpio_npins
      ath5k: add debugfs file frameerrors
      ath5k: IQ calibration for AR5211 is slightly different
      ath5k: Minor EEPROM documentation updates
      mac80211: (really) fix rates setup on IBSS merge

Christian Lamparter (1):
      p54: Enable HW_REPORTS_TX_ACK_STATUS

Felix Fietkau (4):
      minstrel: simplify and fix debugfs code
      minstrel: make the rate control ops reusable from another rc implementation
      ath9k: fix rate control tx status handling for A-MPDU
      mac80211: optimize tx status processing

Grazvydas Ignotas (3):
      wl1251: make local symbols static
      wl1251: fix ELP_CTRL register accesses when using SDIO
      wl1251: reduce eeprom read wait time

Helmut Schaa (2):
      mac80211: Improve software scan timing
      rt2x00: fix warning when building rt2800pci with just soc support

Johannes Berg (20):
      mac80211: deprecate RX status noise
      mac80211: use different MAC addresses for virtual interfaces
      iwlagn: move ICT code into separate file
      iwlwifi: move 3945 specific data into union
      iwlwifi: move ICT data to agn part of union
      iwlagn: remove write-only variables
      iwlwifi: remove superfluous channel check
      iwlwifi: remove dead code from iwl_mac_reset_tsf
      iwlwifi: remove frame dropping
      iwlwifi: remove never-changing priv->rates_mask variable
      iwlwifi: remove priv->active_rate_basic
      iwlwifi: remove IBSS channel sanity check
      iwlwifi: remove sanity check
      iwlwifi: clear up AC/FIFO debug output
      iwlwifi: move 3945 clip groups to 3945 data
      iwlwifi: remove alive start adhoc restart
      iwlwifi: remove STATUS_MODE_PENDING
      iwlagn: move sysfs flags and filter_flags files to debugfs
      iwlwifi: change WEP key protection to use mutex
      iwlwifi: clean up queue/fifo handling

John W. Linville (4):
      ath5k: remove some dead functions
      ath5k: remove dead source in ath5k_combine_linear_pcdac_curves
      ath5k: remove unused beacon timer code
      Revert "mac80211: fix rates setup on IBSS merge"

Jussi Kivilinna (4):
      rndis_wlan: copy only useful data from rndis_command respond
      rndis_wlan: remove unused variables from priv structure
      rndis_wlan: get max_num_pmkids from device
      rndis_wlan: Implement cfg80211 PMKSA API

Juuso Oikarinen (12):
      wl1271: Improvements to the TX path
      wl1271: Fix ad-hoc mode neighborhood detection
      wl1271: Fix queue stopping/waking for TX path
      wl1271: Remove annoying PSM entry/exit kernel traces
      wl1271: Aggregate RX acknowledgements to FW
      wl1271: Don't mask interrupts while handling interrupt
      wl1271: Implement looped IRQ handling
      wl1271: Update TX packet life time handling with higher resolution time
      wl1271: Clean up firmware block allocation calculation
      wl1271: Clean up TX security sequence number handling
      wl1271: Disable host TX rate control
      wl1271: Remove tx-power level workaround

Kalle Valo (1):
      wl1271: don't get received frames from hardware in PLT mode

Larry Finger (1):
      ssb: Export ssb_chipco_gpio_control - needed by N PHY code

Matthieu CASTET (2):
      airo : fix printing status info
      airo : Print of firmware version

Pavel Roskin (6):
      ath5k: remove stale function declarations, make some functions static
      ath5k: remove useless "extern" from function declarations
      ath5k: move ath5k_hw_register_timeout() into reset.c
      ath9k: never read from the AR_IMR_S2 register
      orinoco: disable support for prism chipset by default
      ipw2x00: replace "ieee80211" with "libipw" where appropriate

Rafał Miłecki (10):
      b43: N-PHY: add some registers and structs definitions
      b43: N-PHY: initialize super switch
      b43: N-PHY: turn radio on/off (rfkill)
      b43: N-PHY: update writing channel-specific radio registers
      b43: N-PHY: update post init of 2055 radio
      b43: N-PHY: switch to chanspec struct
      b43: N-PHY: adjust gain table
      b43: N-PHY: isloate 2055 radio setup
      b43: N-PHY: implement chanspec setup
      b43: N-PHY: switch to chanspec ops

Reinette Chatre (1):
      iwlwifi: remove needlessly exported symbols

Stewart Malik (1):
      DRIVER: Libertas: Fixed coding style in rx.c

Teemu Paasikivi (10):
      wl1271: Moved module basics to wl1271_spi.c
      wl1271: Added functions to enable/disable interrupt handling
      wl1271: Implemented abstraction of IO functions.
      wl1271: Inlined IO functions
      wl1271: Removed wl1271_spi.h and made some functions static
      wl1271: Divided driver to two separate modules
      wl1271: Initial SDIO implementation
      wl1271: Changed access to fw status register to use raw read
      wl1271: Fixed unloading of the wl1271_sdio module
      wl1271: Changed wl1271_sdio to be selectable only on ARM

Wey-Yi Guy (4):
      iwlwifi: remove un-necessary parameters
      iwlwifi: remove duplicate function
      iwlwifi: remove unnecessary parameter in scan function
      iwlwifi: add internal short scan support for 3945

Zhu Yi (7):
      iwmc3200wifi: refuse to associate on unallowed channels
      iwmc3200wifi: remove "_safe" for some list_for_each_entry usage
      iwmc3200wifi: add ftrace event tracing support
      iwmc3200wifi: protect rx_tickets and rx_packets[] lists
      iwmc3200wifi: increase concatenated buffer
      iwmc3200wifi: mark some pmksa functions static
      iwmc3200wifi: typo fix and code cleanup

florian-sVu6HhrpSfRAfugRpC6u6w@public.gmane.org (3):
      Document the rfkill sysfs ABI
      enhance sysfs rfkill interface
      rename new rfkill sysfs knobs

 Documentation/ABI/obsolete/sysfs-class-rfkill |   29 ++
 Documentation/ABI/stable/sysfs-class-rfkill   |   67 ++++
 Documentation/feature-removal-schedule.txt    |   18 +
 Documentation/rfkill.txt                      |   44 +--
 drivers/net/wireless/airo.c                   |   37 ++-
 drivers/net/wireless/ath/ath5k/ath5k.h        |  257 +++++---------
 drivers/net/wireless/ath/ath5k/attach.c       |    5 +-
 drivers/net/wireless/ath/ath5k/base.c         |  150 +++++++--
 drivers/net/wireless/ath/ath5k/base.h         |   20 +
 drivers/net/wireless/ath/ath5k/caps.c         |    3 -
 drivers/net/wireless/ath/ath5k/debug.c        |  212 +++++++++++
 drivers/net/wireless/ath/ath5k/debug.h        |    2 +
 drivers/net/wireless/ath/ath5k/desc.c         |   18 +-
 drivers/net/wireless/ath/ath5k/eeprom.c       |    4 +-
 drivers/net/wireless/ath/ath5k/eeprom.h       |   88 ++++--
 drivers/net/wireless/ath/ath5k/pcu.c          |  306 +----------------
 drivers/net/wireless/ath/ath5k/phy.c          |   43 +--
 drivers/net/wireless/ath/ath5k/qcu.c          |   17 -
 drivers/net/wireless/ath/ath5k/reg.h          |    2 +-
 drivers/net/wireless/ath/ath5k/reset.c        |   38 ++-
 drivers/net/wireless/ath/ath9k/hw.c           |   16 +-
 drivers/net/wireless/ath/ath9k/hw.h           |    1 +
 drivers/net/wireless/ath/ath9k/mac.c          |    6 +-
 drivers/net/wireless/ath/ath9k/rc.c           |    8 +-
 drivers/net/wireless/ath/ath9k/rc.h           |    1 -
 drivers/net/wireless/ath/ath9k/xmit.c         |    4 +-
 drivers/net/wireless/b43/b43.h                |    1 +
 drivers/net/wireless/b43/phy_n.c              |  463 +++++++++++++++++++------
 drivers/net/wireless/b43/phy_n.h              |   21 +-
 drivers/net/wireless/b43/tables_nphy.h        |    9 +
 drivers/net/wireless/ipw2x00/ipw2100.c        |   10 +-
 drivers/net/wireless/ipw2x00/ipw2200.c        |   18 +-
 drivers/net/wireless/ipw2x00/libipw.h         |   14 +-
 drivers/net/wireless/ipw2x00/libipw_module.c  |   13 +-
 drivers/net/wireless/iwlwifi/Makefile         |    2 +-
 drivers/net/wireless/iwlwifi/iwl-1000.c       |    1 +
 drivers/net/wireless/iwlwifi/iwl-3945-hw.h    |    2 +
 drivers/net/wireless/iwlwifi/iwl-3945-rs.c    |    6 +-
 drivers/net/wireless/iwlwifi/iwl-3945.c       |   42 ++-
 drivers/net/wireless/iwlwifi/iwl-4965.c       |   20 +-
 drivers/net/wireless/iwlwifi/iwl-5000.c       |   40 +-
 drivers/net/wireless/iwlwifi/iwl-6000.c       |    1 +
 drivers/net/wireless/iwlwifi/iwl-agn-ict.c    |  305 ++++++++++++++++
 drivers/net/wireless/iwlwifi/iwl-agn-rs.c     |   13 +-
 drivers/net/wireless/iwlwifi/iwl-agn-rs.h     |    1 -
 drivers/net/wireless/iwlwifi/iwl-agn.c        |  110 +------
 drivers/net/wireless/iwlwifi/iwl-agn.h        |   74 ++++
 drivers/net/wireless/iwlwifi/iwl-core.c       |  418 ++--------------------
 drivers/net/wireless/iwlwifi/iwl-core.h       |    8 -
 drivers/net/wireless/iwlwifi/iwl-debugfs.c    |   82 ++---
 drivers/net/wireless/iwlwifi/iwl-dev.h        |   90 +++---
 drivers/net/wireless/iwlwifi/iwl-helpers.h    |    3 +
 drivers/net/wireless/iwlwifi/iwl-prph.h       |   14 +-
 drivers/net/wireless/iwlwifi/iwl-rx.c         |   24 --
 drivers/net/wireless/iwlwifi/iwl-scan.c       |    9 +-
 drivers/net/wireless/iwlwifi/iwl-sta.c        |   18 +-
 drivers/net/wireless/iwlwifi/iwl-tx.c         |  115 ++++---
 drivers/net/wireless/iwlwifi/iwl3945-base.c   |   78 ++---
 drivers/net/wireless/iwmc3200wifi/Kconfig     |    9 +-
 drivers/net/wireless/iwmc3200wifi/Makefile    |    3 +
 drivers/net/wireless/iwmc3200wifi/cfg80211.c  |   17 +-
 drivers/net/wireless/iwmc3200wifi/commands.c  |   14 +-
 drivers/net/wireless/iwmc3200wifi/commands.h  |    1 +
 drivers/net/wireless/iwmc3200wifi/debugfs.c   |   13 +-
 drivers/net/wireless/iwmc3200wifi/hal.c       |   15 +-
 drivers/net/wireless/iwmc3200wifi/hal.h       |    5 +-
 drivers/net/wireless/iwmc3200wifi/iwm.h       |    3 +
 drivers/net/wireless/iwmc3200wifi/main.c      |    9 +-
 drivers/net/wireless/iwmc3200wifi/rx.c        |   76 +++--
 drivers/net/wireless/iwmc3200wifi/trace.c     |    3 +
 drivers/net/wireless/iwmc3200wifi/trace.h     |  283 +++++++++++++++
 drivers/net/wireless/iwmc3200wifi/tx.c        |    8 +-
 drivers/net/wireless/iwmc3200wifi/umac.h      |    2 +-
 drivers/net/wireless/libertas/rx.c            |   50 ++--
 drivers/net/wireless/orinoco/Kconfig          |   13 +-
 drivers/net/wireless/orinoco/hw.c             |    7 +
 drivers/net/wireless/orinoco/orinoco_cs.c     |   79 +++--
 drivers/net/wireless/p54/main.c               |    1 +
 drivers/net/wireless/rndis_wlan.c             |  364 ++++++++++++++++++-
 drivers/net/wireless/rt2x00/rt2800pci.c       |   93 +++---
 drivers/net/wireless/wl12xx/Kconfig           |   24 ++
 drivers/net/wireless/wl12xx/Makefile          |    6 +-
 drivers/net/wireless/wl12xx/wl1251.h          |    2 +
 drivers/net/wireless/wl12xx/wl1251_boot.c     |    3 +-
 drivers/net/wireless/wl12xx/wl1251_io.h       |   20 +
 drivers/net/wireless/wl12xx/wl1251_main.c     |    4 +-
 drivers/net/wireless/wl12xx/wl1251_ps.c       |    8 +-
 drivers/net/wireless/wl12xx/wl1251_sdio.c     |   52 ++-
 drivers/net/wireless/wl12xx/wl1271.h          |   33 ++-
 drivers/net/wireless/wl12xx/wl1271_acx.c      |    8 +-
 drivers/net/wireless/wl12xx/wl1271_boot.c     |    3 +-
 drivers/net/wireless/wl12xx/wl1271_cmd.c      |    8 +-
 drivers/net/wireless/wl12xx/wl1271_cmd.h      |    2 +-
 drivers/net/wireless/wl12xx/wl1271_event.c    |    1 -
 drivers/net/wireless/wl12xx/wl1271_io.c       |   87 ++----
 drivers/net/wireless/wl12xx/wl1271_io.h       |  122 ++++++-
 drivers/net/wireless/wl12xx/wl1271_main.c     |  336 +++++--------------
 drivers/net/wireless/wl12xx/wl1271_ps.c       |    1 -
 drivers/net/wireless/wl12xx/wl1271_rx.c       |   11 +-
 drivers/net/wireless/wl12xx/wl1271_sdio.c     |  307 ++++++++++++++++
 drivers/net/wireless/wl12xx/wl1271_spi.c      |  267 ++++++++++++++-
 drivers/net/wireless/wl12xx/wl1271_spi.h      |   96 -----
 drivers/net/wireless/wl12xx/wl1271_testmode.c |    1 -
 drivers/net/wireless/wl12xx/wl1271_tx.c       |   94 +++---
 drivers/net/wireless/wl12xx/wl1271_tx.h       |    4 +-
 drivers/ssb/driver_chipcommon.c               |    1 +
 include/net/mac80211.h                        |    4 +-
 net/mac80211/Kconfig                          |    9 +
 net/mac80211/debugfs_sta.c                    |    2 -
 net/mac80211/ibss.c                           |   16 +-
 net/mac80211/ieee80211_i.h                    |    1 +
 net/mac80211/iface.c                          |  116 ++++++-
 net/mac80211/rc80211_minstrel.c               |    2 +-
 net/mac80211/rc80211_minstrel.h               |   11 +
 net/mac80211/rc80211_minstrel_debugfs.c       |   41 +--
 net/mac80211/rx.c                             |    9 -
 net/mac80211/scan.c                           |   71 ++++-
 net/mac80211/sta_info.h                       |    2 -
 net/mac80211/status.c                         |   14 +-
 net/rfkill/core.c                             |   53 +++-
 120 files changed, 3964 insertions(+), 2377 deletions(-)
 create mode 100644 Documentation/ABI/obsolete/sysfs-class-rfkill
 create mode 100644 Documentation/ABI/stable/sysfs-class-rfkill
 create mode 100644 drivers/net/wireless/iwlwifi/iwl-agn-ict.c
 create mode 100644 drivers/net/wireless/iwlwifi/iwl-agn.h
 create mode 100644 drivers/net/wireless/iwmc3200wifi/trace.c
 create mode 100644 drivers/net/wireless/iwmc3200wifi/trace.h
 create mode 100644 drivers/net/wireless/wl12xx/wl1271_sdio.c
 delete mode 100644 drivers/net/wireless/wl12xx/wl1271_spi.h

Omnibus patch available here:

http://www.kernel.org/pub/linux/kernel/people/linville/wireless-next-2.6-2010-03-19.patch.bz2 

-- 
John W. Linville		Someday the world will need a hero, and you
linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org			might be all we have.  Be ready.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* Re: [E1000-devel] recent e100 fixes cause kernel panic?
From: Stephen Hemminger @ 2010-03-19 20:16 UTC (permalink / raw)
  To: Jesse Brandeburg
  Cc: Ed Ravin, roger.oksanen, e1000-devel@lists.sourceforge.net,
	Stephen Hemminger, netdev@vger.kernel.org
In-Reply-To: <1269027740.3029.33.camel@jbrandeb-mobl3.amr.corp.intel.com>

On Fri, 19 Mar 2010 12:42:20 -0700
Jesse Brandeburg <jesse.brandeburg@intel.com> wrote:

> Added netdev, the place to talk about in-kernel driver problems.
> 
> On Thu, 2010-03-11 at 22:39 -0700, Stephen Hemminger wrote:
> > ----- "Ed Ravin" <eravin@panix.com> wrote:
> > 
> > > I'm using the Vyatta "kenwood" Linux distribution, which is currently
> > > at 2.6.31-1.  I upgraded to their latest version, and began seeing
> > > kernel
> > > panics shortly after starting to use ssh/scp on the network connected
> > > to
> > > an e100 NIC.  I was able to reproduce the problem immediately after
> > > booting up - sometimes it even crashed during the boot.
> > > 
> > > One of the crash logs is attached.
> 
> Ed, thanks for the report, looks like these patches introduced a new
> problem.  e100 hardware has a tricky data structure that seems to cause
> some problems for (particularly arm) some cpu architectures.
> 
> > > 
> > > Since the problem seemed to be related to e100.c, I reverted the two
> > > commits to e100.c that had taken place since I last built the kernel
> > > for this box:
> > > 
> > >   Author: Roger Oksanen <roger.oksanen@cs.helsinki.fi>
> > >   Date:   Fri Dec 18 20:18:21 2009 -0800
> > >   e100: Fix broken cbs accounting due to missing memset.
> > > 
> > >   Author: Roger Oksanen <roger.oksanen@cs.helsinki.fi>
> > >   Date:   Sun Nov 29 17:17:29 2009 -0800
> > >   e100: Use pci pool to work around GFP_ATOMIC order 5 memory
> > > allocation failu
> > > 
> > > I rebuilt the kernel and it's not panicking anymore.
> 
> so you just reverted both, and its good news things are working again,
> but can you try one or the other and let us know if things still break
> for you?
> 
> > The Vyatta kernel for 2.6.31 is based on the 2.6.31.10 + unionfs.
> > These two patches came from the 2.6.31.10 -stable update.
> 
> This is the only report of this issue I have heard so far, so something
> must be a little unique to your system or workload such that the driver
> works mostly.
> 
> I'm looking more closely into the panic trace now, maybe I can figure it
> out from there.
> 

Davem found one thing, the memset wasn't initializing the whole maximum possible
tx ring.

-- 

^ permalink raw reply

* Re: [PATCH 2/3] can: add support for Janz VMOD-ICAN3 Intelligent CAN module
From: Wolfgang Grandegger @ 2010-03-19 20:13 UTC (permalink / raw)
  To: Ira W. Snyder
  Cc: socketcan-core-0fE9KPoRgkgATYTw5x5z8w,
	netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, sameo-VuQAYsv1563Yd54FQh9/CA
In-Reply-To: <20100319200325.GE13672-lulEs6mt1IksTUYHLfqkUA@public.gmane.org>

Ira W. Snyder wrote:
> On Fri, Mar 19, 2010 at 04:45:09PM +0100, Wolfgang Grandegger wrote:
>> Ira W. Snyder wrote:
>>> On Fri, Mar 19, 2010 at 10:01:14AM +0100, Wolfgang Grandegger wrote:
>>>> Hi Ira,
>>>>
>>>> we already discussed this patch on the SocketCAN mailing list and there
>>>> are just a few minor issues and the request to add support for the new
>>>> "berr-reporting" option, if feasible. See:
>>>>
>>>>   commit 52c793f24054f5dc30d228e37e0e19cc8313f086
>>>>   Author: Wolfgang Grandegger <wg-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org>
>>>>   Date:   Mon Feb 22 22:21:17 2010 +0000
>>>>
>>>>     can: netlink support for bus-error reporting and counters
>>>>     
>>>>     This patch makes the bus-error reporting configurable and allows to
>>>>     retrieve the CAN TX and RX bus error counters via netlink interface.
>>>>     I have added support for the SJA1000. The TX and RX bus error counters
>>>>     are also copied to the data fields 6..7 of error messages when state
>>>>     changes are reported.
>>>>
>>>> Should not be a big deal.
>>>>
>>> I think this patch came along since my last post of the driver. I must
>>> have missed it. I'll try and add support.
>> No problem, it's really new. Just just need to enable BEI depending on
>> CAN_CTRLMODE_BERR_REPORTING.
>>
> 
> I have one final question about this.
> 
> The documentation for the firmware isn't very specific here. I believe
> that in order to get any kind of error messages, I need the bus error
> feature turned on. What is the expected behavior of an SJA1000 with the
> BEI (bus error interrupt) turned off? Will you still get warning
> messages for ERROR_ACTIVE -> ERROR_PASSIVE state transitions?

Yes. State transitions are enabled with EI and EPI.

> I'm not sure how I would go about testing this feature, either. Ideas?

Send messages without cable connected and watch the error messages with
"candump any,0:0,#ffffffff". With "ip ... berr-reporting on" you should
see additional bus-errors.

> I also noticed that I can enable "self test mode" and "listen only mode"
> using the same firmware command. It appears that there are netlink
> messages for this as well. Should I try and support these, too? I don't
> really have any use for them (yet). I assume "self test mode" is
> equivalent to "loopback mode" in the netlink messages.

List-only is straight forward while "self test mode" is not exactly like
"loopback mode", IIRC. Feel free to send a follow-up patch when you have
time for a thorough implementation and testing. It's also on my to-do
list for the SJA1000.

Wolfgang.

> 
> Thanks,
> Ira
> 
> 

^ permalink raw reply

* Re: [PATCH 2/3] can: add support for Janz VMOD-ICAN3 Intelligent CAN module
From: Ira W. Snyder @ 2010-03-19 20:03 UTC (permalink / raw)
  To: Wolfgang Grandegger; +Cc: linux-kernel, socketcan-core, netdev, sameo
In-Reply-To: <4BA39C05.8050800@grandegger.com>

On Fri, Mar 19, 2010 at 04:45:09PM +0100, Wolfgang Grandegger wrote:
> Ira W. Snyder wrote:
> > On Fri, Mar 19, 2010 at 10:01:14AM +0100, Wolfgang Grandegger wrote:
> >> Hi Ira,
> >>
> >> we already discussed this patch on the SocketCAN mailing list and there
> >> are just a few minor issues and the request to add support for the new
> >> "berr-reporting" option, if feasible. See:
> >>
> >>   commit 52c793f24054f5dc30d228e37e0e19cc8313f086
> >>   Author: Wolfgang Grandegger <wg@grandegger.com>
> >>   Date:   Mon Feb 22 22:21:17 2010 +0000
> >>
> >>     can: netlink support for bus-error reporting and counters
> >>     
> >>     This patch makes the bus-error reporting configurable and allows to
> >>     retrieve the CAN TX and RX bus error counters via netlink interface.
> >>     I have added support for the SJA1000. The TX and RX bus error counters
> >>     are also copied to the data fields 6..7 of error messages when state
> >>     changes are reported.
> >>
> >> Should not be a big deal.
> >>
> > 
> > I think this patch came along since my last post of the driver. I must
> > have missed it. I'll try and add support.
> 
> No problem, it's really new. Just just need to enable BEI depending on
> CAN_CTRLMODE_BERR_REPORTING.
> 

I have one final question about this.

The documentation for the firmware isn't very specific here. I believe
that in order to get any kind of error messages, I need the bus error
feature turned on. What is the expected behavior of an SJA1000 with the
BEI (bus error interrupt) turned off? Will you still get warning
messages for ERROR_ACTIVE -> ERROR_PASSIVE state transitions?

I'm not sure how I would go about testing this feature, either. Ideas?

I also noticed that I can enable "self test mode" and "listen only mode"
using the same firmware command. It appears that there are netlink
messages for this as well. Should I try and support these, too? I don't
really have any use for them (yet). I assume "self test mode" is
equivalent to "loopback mode" in the netlink messages.

Thanks,
Ira

^ permalink raw reply

* [PATCH] Cosmetic:Partially remove deprecated __initcall() and change to
From: Justin P. Mattock @ 2010-03-19 19:51 UTC (permalink / raw)
  To: trivial
  Cc: linux-arm-kernel, linux-audit, uclinux-dist-devel,
	linux-cris-kernel, linux-ia64, linux-mips, linux-parisc,
	linux-s390, selinux, sparclinux, x86, netdev, linux-kernel,
	Justin P. Mattock

After doing some things on a small issue,
I noticed through web surfing, that there were patches
submitted pertaining that __initcall is deprecated,
and device_initcall should be used.

So as a change of subject(since what I was looking at
was frustrating me),I decided to grep the whole tree
and make the change(partially).

Currently I'm running this patch on my system, kernel compiles
without any errors or warnings.(thought there would be a speed increase
but didn't see much(if any)).
Biggest problem I have though is testing this on other hardware types
(I only have a macbook,and an iMac).
So please if you have the access to other arch/hardware types please
test.

Now what I mean by partially is the __initcall function is still
there, so(if any) userspace apps/libs depend on this it's there
so they dont break and/or any other subsystem, that needs time
to make the changes.

Note:
the remaining files that still have __initcall in them are:
(according to grep)

arch/um/include/shared/init.h
include/linux/init.h
scripts/checkpatch.pl

either I or somebody else, can change this(although a bit
concerned about breaking things).

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
---
 Documentation/DocBook/kernel-hacking.tmpl    |    4 ++--
 Documentation/cpu-freq/cpu-drivers.txt       |    2 +-
 Documentation/kbuild/makefiles.txt           |    2 +-
 arch/arm/mach-at91/leds.c                    |    2 +-
 arch/arm/mach-clps711x/p720t.c               |    2 +-
 arch/arm/mach-ebsa110/leds.c                 |    2 +-
 arch/arm/mach-footbridge/cats-hw.c           |    2 +-
 arch/arm/mach-footbridge/ebsa285-leds.c      |    2 +-
 arch/arm/mach-footbridge/netwinder-hw.c      |    2 +-
 arch/arm/mach-footbridge/netwinder-leds.c    |    2 +-
 arch/arm/mach-ks8695/leds.c                  |    2 +-
 arch/arm/mach-omap1/leds.c                   |    2 +-
 arch/arm/mach-omap1/pm.c                     |    2 +-
 arch/arm/mach-orion5x/db88f5281-setup.c      |    2 +-
 arch/arm/mach-orion5x/rd88f5182-setup.c      |    2 +-
 arch/arm/mach-pxa/generic.c                  |    2 +-
 arch/arm/mach-pxa/pxa25x.c                   |    2 +-
 arch/arm/mach-shark/leds.c                   |    2 +-
 arch/blackfin/kernel/bfin_gpio.c             |    2 +-
 arch/blackfin/mach-common/pm.c               |    2 +-
 arch/cris/arch-v10/kernel/debugport.c        |    2 +-
 arch/cris/arch-v10/kernel/fasttimer.c        |    2 +-
 arch/cris/arch-v10/mm/init.c                 |    2 +-
 arch/cris/arch-v32/kernel/fasttimer.c        |    2 +-
 arch/cris/arch-v32/kernel/pinmux.c           |    2 +-
 arch/cris/arch-v32/kernel/signal.c           |    2 +-
 arch/cris/arch-v32/mach-a3/io.c              |    2 +-
 arch/cris/arch-v32/mach-a3/pinmux.c          |    2 +-
 arch/cris/arch-v32/mach-fs/io.c              |    2 +-
 arch/cris/arch-v32/mach-fs/pinmux.c          |    2 +-
 arch/cris/kernel/profile.c                   |    2 +-
 arch/cris/kernel/time.c                      |    2 +-
 arch/cris/kernel/traps.c                     |    2 +-
 arch/frv/kernel/gdb-stub.c                   |    2 +-
 arch/frv/kernel/pm-mb93093.c                 |    2 +-
 arch/frv/kernel/pm.c                         |    2 +-
 arch/frv/kernel/sysctl.c                     |    2 +-
 arch/h8300/kernel/gpio.c                     |    2 +-
 arch/ia64/hp/sim/simeth.c                    |    2 +-
 arch/ia64/hp/sim/simserial.c                 |    2 +-
 arch/ia64/kernel/audit.c                     |    2 +-
 arch/ia64/kernel/crash.c                     |    2 +-
 arch/ia64/kernel/cyclone.c                   |    2 +-
 arch/ia64/kernel/perfmon.c                   |    2 +-
 arch/ia64/kernel/setup.c                     |    2 +-
 arch/ia64/kernel/uncached.c                  |    2 +-
 arch/ia64/kernel/unwind.c                    |    2 +-
 arch/ia64/mm/init.c                          |    2 +-
 arch/mips/Makefile                           |    2 +-
 arch/mips/kernel/unaligned.c                 |    2 +-
 arch/mips/lasat/sysctl.c                     |    2 +-
 arch/mips/math-emu/cp1emu.c                  |    2 +-
 arch/mips/nxp/pnx8550/common/proc.c          |    2 +-
 arch/mips/sibyte/sb1250/bus_watcher.c        |    2 +-
 arch/mn10300/kernel/gdb-stub.c               |    2 +-
 arch/mn10300/kernel/mn10300-serial.c         |    2 +-
 arch/mn10300/kernel/profile.c                |    2 +-
 arch/parisc/kernel/pci-dma.c                 |    2 +-
 arch/parisc/kernel/pdc_chassis.c             |    2 +-
 arch/powerpc/kernel/audit.c                  |    2 +-
 arch/powerpc/kernel/idle.c                   |    2 +-
 arch/powerpc/kernel/irq.c                    |    2 +-
 arch/powerpc/kernel/proc_powerpc.c           |    2 +-
 arch/powerpc/kernel/prom.c                   |    4 ++--
 arch/powerpc/kernel/rtas-proc.c              |    2 +-
 arch/powerpc/kernel/rtasd.c                  |    2 +-
 arch/powerpc/kernel/sysfs.c                  |    2 +-
 arch/powerpc/kernel/tau_6xx.c                |    2 +-
 arch/powerpc/kernel/vio.c                    |    2 +-
 arch/powerpc/platforms/iseries/lpevents.c    |    2 +-
 arch/powerpc/platforms/iseries/mf.c          |    2 +-
 arch/powerpc/platforms/iseries/proc.c        |    2 +-
 arch/powerpc/platforms/iseries/viopath.c     |    2 +-
 arch/powerpc/platforms/pseries/eeh.c         |    2 +-
 arch/powerpc/platforms/pseries/hvCall_inst.c |    2 +-
 arch/powerpc/platforms/pseries/power.c       |    2 +-
 arch/powerpc/platforms/pseries/ras.c         |    2 +-
 arch/powerpc/platforms/pseries/reconfig.c    |    2 +-
 arch/powerpc/xmon/xmon.c                     |    2 +-
 arch/s390/appldata/appldata_base.c           |    2 +-
 arch/s390/kernel/audit.c                     |    2 +-
 arch/s390/kernel/compat_exec_domain.c        |    2 +-
 arch/s390/kernel/ipl.c                       |    2 +-
 arch/s390/kernel/topology.c                  |    2 +-
 arch/sh/boards/board-edosk7760.c             |    2 +-
 arch/sh/boards/board-sh7785lcr.c             |    2 +-
 arch/sh/boards/mach-cayman/setup.c           |    2 +-
 arch/sh/boards/mach-landisk/setup.c          |    2 +-
 arch/sh/boards/mach-r2d/setup.c              |    2 +-
 arch/sh/boards/mach-sdk7786/setup.c          |    2 +-
 arch/sh/boards/mach-se/7206/setup.c          |    2 +-
 arch/sh/boards/mach-se/7751/setup.c          |    2 +-
 arch/sh/boards/mach-sh03/setup.c             |    2 +-
 arch/sh/kernel/traps_64.c                    |    2 +-
 arch/sparc/kernel/apc.c                      |    2 +-
 arch/sparc/kernel/audit.c                    |    2 +-
 arch/sparc/kernel/mdesc.c                    |    2 +-
 arch/sparc/kernel/pmc.c                      |    2 +-
 arch/um/drivers/mconsole_kern.c              |    8 ++++----
 arch/um/drivers/net_kern.c                   |    2 +-
 arch/um/drivers/stderr_console.c             |    2 +-
 arch/um/drivers/ubd_kern.c                   |    4 ++--
 arch/um/kernel/exitcode.c                    |    2 +-
 arch/um/kernel/physmem.c                     |    2 +-
 arch/um/os-Linux/aio.c                       |    4 ++--
 arch/um/os-Linux/skas/mem.c                  |    2 +-
 arch/um/os-Linux/skas/process.c              |    2 +-
 arch/um/os-Linux/umid.c                      |    2 +-
 arch/um/sys-i386/tls.c                       |    2 +-
 arch/x86/kernel/audit_64.c                   |    2 +-
 arch/x86/kernel/tlb_uv.c                     |    4 ++--
 arch/x86/kernel/vsyscall_64.c                |    4 ++--
 arch/x86/mm/dump_pagetables.c                |    2 +-
 arch/x86/vdso/vdso32-setup.c                 |    4 ++--
 arch/x86/vdso/vma.c                          |    2 +-
 arch/xtensa/platforms/iss/console.c          |    2 +-
 drivers/net/arm/am79c961a.c                  |    2 +-
 drivers/net/hamradio/baycom_epp.c            |    1 +
 drivers/net/hamradio/baycom_par.c            |    1 +
 drivers/net/hamradio/baycom_ser_fdx.c        |    1 +
 drivers/net/hamradio/baycom_ser_hdx.c        |    1 +
 drivers/s390/char/sclp_cmd.c                 |    2 +-
 drivers/s390/char/sclp_config.c              |    2 +-
 drivers/s390/char/sclp_cpi_sys.c             |    2 +-
 drivers/s390/char/sclp_vt220.c               |    2 +-
 drivers/s390/cio/blacklist.c                 |    2 +-
 drivers/staging/rtl8192u/ieee80211/api.c     |    2 +-
 fs/aio.c                                     |    2 +-
 fs/compat_ioctl.c                            |    2 +-
 ipc/ipc_sysctl.c                             |    2 +-
 ipc/mqueue.c                                 |    2 +-
 ipc/util.c                                   |    2 +-
 kernel/audit.c                               |    2 +-
 kernel/audit_tree.c                          |    2 +-
 kernel/dma.c                                 |    2 +-
 kernel/futex.c                               |    2 +-
 kernel/lockdep_proc.c                        |    2 +-
 kernel/pid_namespace.c                       |    2 +-
 kernel/posix-cpu-timers.c                    |    2 +-
 kernel/posix-timers.c                        |    2 +-
 kernel/resource.c                            |    2 +-
 kernel/sched_debug.c                         |    2 +-
 kernel/time/timer_list.c                     |    2 +-
 kernel/time/timer_stats.c                    |    2 +-
 kernel/tracepoint.c                          |    2 +-
 kernel/utsname_sysctl.c                      |    2 +-
 lib/audit.c                                  |    2 +-
 lib/debugobjects.c                           |    2 +-
 mm/bounce.c                                  |    2 +-
 mm/memory.c                                  |    2 +-
 mm/mm_init.c                                 |    2 +-
 mm/slab.c                                    |    2 +-
 mm/slub.c                                    |    2 +-
 mm/swapfile.c                                |    2 +-
 net/ipv4/syncookies.c                        |    2 +-
 net/ipv4/sysctl_net_ipv4.c                   |    2 +-
 security/keys/proc.c                         |    2 +-
 security/selinux/hooks.c                     |    2 +-
 security/selinux/netif.c                     |    2 +-
 security/selinux/netlink.c                   |    2 +-
 security/selinux/netnode.c                   |    2 +-
 security/selinux/netport.c                   |    2 +-
 security/selinux/selinuxfs.c                 |    2 +-
 security/selinux/ss/services.c               |    2 +-
 security/smack/smackfs.c                     |    2 +-
 sound/last.c                                 |    2 +-
 166 files changed, 176 insertions(+), 172 deletions(-)

diff --git a/Documentation/DocBook/kernel-hacking.tmpl b/Documentation/DocBook/kernel-hacking.tmpl
index 7b3f493..a682709 100644
--- a/Documentation/DocBook/kernel-hacking.tmpl
+++ b/Documentation/DocBook/kernel-hacking.tmpl
@@ -734,7 +734,7 @@ printk(KERN_INFO "my ip: %pI4\n", &amp;ipaddress);
   </sect1>
 
   <sect1 id="routines-init-again">
-   <title><function>__initcall()</function>/<function>module_init()</function>
+   <title><function>device_initcall()</function>/<function>module_init()</function>
     <filename class="headerfile">include/linux/init.h</filename></title>
    <para>
     Many parts of the kernel are well served as a module
@@ -750,7 +750,7 @@ printk(KERN_INFO "my ip: %pI4\n", &amp;ipaddress);
     function is to be called at module insertion time (if the file is
     compiled as a module), or at boot time: if the file is not
     compiled as a module the <function>module_init()</function> macro
-    becomes equivalent to <function>__initcall()</function>, which
+    becomes equivalent to <function>device_initcall()</function>, which
     through linker magic ensures that the function is called on boot.
    </para>
 
diff --git a/Documentation/cpu-freq/cpu-drivers.txt b/Documentation/cpu-freq/cpu-drivers.txt
index 6c30e93..12bb6e4 100644
--- a/Documentation/cpu-freq/cpu-drivers.txt
+++ b/Documentation/cpu-freq/cpu-drivers.txt
@@ -41,7 +41,7 @@ on what is necessary:
 1.1 Initialization
 ------------------
 
-First of all, in an __initcall level 7 (module_init()) or later
+First of all, in an device_initcall level 7 (module_init()) or later
 function check whether this kernel runs on the right CPU and the right
 chipset. If so, register a struct cpufreq_driver with the CPUfreq core
 using cpufreq_register_driver()
diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt
index 71c602d..645ea71 100644
--- a/Documentation/kbuild/makefiles.txt
+++ b/Documentation/kbuild/makefiles.txt
@@ -159,7 +159,7 @@ more details, with real examples.
 	built-in.o and succeeding instances will be ignored.
 
 	Link order is significant, because certain functions
-	(module_init() / __initcall) will be called during boot in the
+	(module_init() / device_initcall) will be called during boot in the
 	order they appear. So keep in mind that changing the link
 	order may e.g. change the order in which your SCSI
 	controllers are detected, and thus your disks are renumbered.
diff --git a/arch/arm/mach-at91/leds.c b/arch/arm/mach-at91/leds.c
index 0415a83..08e342d 100644
--- a/arch/arm/mach-at91/leds.c
+++ b/arch/arm/mach-at91/leds.c
@@ -179,7 +179,7 @@ static int __init leds_init(void)
 	return 0;
 }
 
-__initcall(leds_init);
+device_initcall(leds_init);
 
 
 void __init at91_init_leds(u8 cpu_led, u8 timer_led)
diff --git a/arch/arm/mach-clps711x/p720t.c b/arch/arm/mach-clps711x/p720t.c
index 0d94a30..1047b23 100644
--- a/arch/arm/mach-clps711x/p720t.c
+++ b/arch/arm/mach-clps711x/p720t.c
@@ -121,5 +121,5 @@ static int p720t_hw_init(void)
 	return 0;
 }
 
-__initcall(p720t_hw_init);
+device_initcall(p720t_hw_init);
 
diff --git a/arch/arm/mach-ebsa110/leds.c b/arch/arm/mach-ebsa110/leds.c
index 6a6ea57..8b57907 100644
--- a/arch/arm/mach-ebsa110/leds.c
+++ b/arch/arm/mach-ebsa110/leds.c
@@ -48,4 +48,4 @@ static int __init leds_init(void)
 	return 0;
 }
 
-__initcall(leds_init);
+device_initcall(leds_init);
diff --git a/arch/arm/mach-footbridge/cats-hw.c b/arch/arm/mach-footbridge/cats-hw.c
index 1b996b2..1b616e5 100644
--- a/arch/arm/mach-footbridge/cats-hw.c
+++ b/arch/arm/mach-footbridge/cats-hw.c
@@ -69,7 +69,7 @@ static int __init cats_hw_init(void)
 	return 0;
 }
 
-__initcall(cats_hw_init);
+device_initcall(cats_hw_init);
 
 /*
  * CATS uses soft-reboot by default, since
diff --git a/arch/arm/mach-footbridge/ebsa285-leds.c b/arch/arm/mach-footbridge/ebsa285-leds.c
index 4e10090..f162fb2 100644
--- a/arch/arm/mach-footbridge/ebsa285-leds.c
+++ b/arch/arm/mach-footbridge/ebsa285-leds.c
@@ -136,4 +136,4 @@ static int __init leds_init(void)
 	return 0;
 }
 
-__initcall(leds_init);
+device_initcall(leds_init);
diff --git a/arch/arm/mach-footbridge/netwinder-hw.c b/arch/arm/mach-footbridge/netwinder-hw.c
index ac7ffa6..090b4cf 100644
--- a/arch/arm/mach-footbridge/netwinder-hw.c
+++ b/arch/arm/mach-footbridge/netwinder-hw.c
@@ -623,7 +623,7 @@ static int __init nw_hw_init(void)
 	return 0;
 }
 
-__initcall(nw_hw_init);
+device_initcall(nw_hw_init);
 
 /*
  * Older NeTTroms either do not provide a parameters
diff --git a/arch/arm/mach-footbridge/netwinder-leds.c b/arch/arm/mach-footbridge/netwinder-leds.c
index 00269fe..f504682 100644
--- a/arch/arm/mach-footbridge/netwinder-leds.c
+++ b/arch/arm/mach-footbridge/netwinder-leds.c
@@ -136,4 +136,4 @@ static int __init leds_init(void)
 	return 0;
 }
 
-__initcall(leds_init);
+device_initcall(leds_init);
diff --git a/arch/arm/mach-ks8695/leds.c b/arch/arm/mach-ks8695/leds.c
index 184ef74..97c3828 100644
--- a/arch/arm/mach-ks8695/leds.c
+++ b/arch/arm/mach-ks8695/leds.c
@@ -90,4 +90,4 @@ static int __init leds_init(void)
 	return 0;
 }
 
-__initcall(leds_init);
+device_initcall(leds_init);
diff --git a/arch/arm/mach-omap1/leds.c b/arch/arm/mach-omap1/leds.c
index 277f356..bd447fa 100644
--- a/arch/arm/mach-omap1/leds.c
+++ b/arch/arm/mach-omap1/leds.c
@@ -63,4 +63,4 @@ omap_leds_init(void)
 	return 0;
 }
 
-__initcall(omap_leds_init);
+device_initcall(omap_leds_init);
diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c
index b1d3f9f..fda5f60 100644
--- a/arch/arm/mach-omap1/pm.c
+++ b/arch/arm/mach-omap1/pm.c
@@ -724,4 +724,4 @@ static int __init omap_pm_init(void)
 
 	return 0;
 }
-__initcall(omap_pm_init);
+device_initcall(omap_pm_init);
diff --git a/arch/arm/mach-orion5x/db88f5281-setup.c b/arch/arm/mach-orion5x/db88f5281-setup.c
index d318bea..0c76893 100644
--- a/arch/arm/mach-orion5x/db88f5281-setup.c
+++ b/arch/arm/mach-orion5x/db88f5281-setup.c
@@ -197,7 +197,7 @@ static int __init db88f5281_7seg_init(void)
 	return 0;
 }
 
-__initcall(db88f5281_7seg_init);
+device_initcall(db88f5281_7seg_init);
 
 /*****************************************************************************
  * PCI
diff --git a/arch/arm/mach-orion5x/rd88f5182-setup.c b/arch/arm/mach-orion5x/rd88f5182-setup.c
index a04f9e4..43e9a49 100644
--- a/arch/arm/mach-orion5x/rd88f5182-setup.c
+++ b/arch/arm/mach-orion5x/rd88f5182-setup.c
@@ -130,7 +130,7 @@ static int __init rd88f5182_dbgled_init(void)
 	return 0;
 }
 
-__initcall(rd88f5182_dbgled_init);
+device_initcall(rd88f5182_dbgled_init);
 
 #endif
 
diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c
index 3126a35..1d44a9a 100644
--- a/arch/arm/mach-pxa/generic.c
+++ b/arch/arm/mach-pxa/generic.c
@@ -12,7 +12,7 @@
  * published by the Free Software Foundation.
  *
  * Since this file should be linked before any other machine specific file,
- * the __initcall() here will be executed first.  This serves as default
+ * the device_initcall() here will be executed first.  This serves as default
  * initialization stuff for PXA machines which can be overridden later if
  * need be.
  */
diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c
index 0b9ad30..b0df545 100644
--- a/arch/arm/mach-pxa/pxa25x.c
+++ b/arch/arm/mach-pxa/pxa25x.c
@@ -12,7 +12,7 @@
  * published by the Free Software Foundation.
  *
  * Since this file should be linked before any other machine specific file,
- * the __initcall() here will be executed first.  This serves as default
+ * the device_initcall() here will be executed first.  This serves as default
  * initialization stuff for PXA machines which can be overridden later if
  * need be.
  */
diff --git a/arch/arm/mach-shark/leds.c b/arch/arm/mach-shark/leds.c
index c9e32de..511693a 100644
--- a/arch/arm/mach-shark/leds.c
+++ b/arch/arm/mach-shark/leds.c
@@ -163,4 +163,4 @@ static int __init leds_init(void)
 	return 0;
 }
 
-__initcall(leds_init);
+device_initcall(leds_init);
diff --git a/arch/blackfin/kernel/bfin_gpio.c b/arch/blackfin/kernel/bfin_gpio.c
index a174596..bc5ba54 100644
--- a/arch/blackfin/kernel/bfin_gpio.c
+++ b/arch/blackfin/kernel/bfin_gpio.c
@@ -1285,7 +1285,7 @@ static __init int gpio_register_proc(void)
 		proc_gpio->read_proc = gpio_proc_read;
 	return proc_gpio != NULL;
 }
-__initcall(gpio_register_proc);
+device_initcall(gpio_register_proc);
 #endif
 
 #ifdef CONFIG_GPIOLIB
diff --git a/arch/blackfin/mach-common/pm.c b/arch/blackfin/mach-common/pm.c
index 8837be4..dc36d3a 100644
--- a/arch/blackfin/mach-common/pm.c
+++ b/arch/blackfin/mach-common/pm.c
@@ -266,4 +266,4 @@ static int __init bfin_pm_init(void)
 	return 0;
 }
 
-__initcall(bfin_pm_init);
+device_initcall(bfin_pm_init);
diff --git a/arch/cris/arch-v10/kernel/debugport.c b/arch/cris/arch-v10/kernel/debugport.c
index 99851ba..0348977 100644
--- a/arch/cris/arch-v10/kernel/debugport.c
+++ b/arch/cris/arch-v10/kernel/debugport.c
@@ -564,4 +564,4 @@ init_etrax_debug(void)
 #endif
 	return 0;
 }
-__initcall(init_etrax_debug);
+device_initcall(init_etrax_debug);
diff --git a/arch/cris/arch-v10/kernel/fasttimer.c b/arch/cris/arch-v10/kernel/fasttimer.c
index 5ff08a8..b991462 100644
--- a/arch/cris/arch-v10/kernel/fasttimer.c
+++ b/arch/cris/arch-v10/kernel/fasttimer.c
@@ -879,4 +879,4 @@ int fast_timer_init(void)
   }
 	return 0;
 }
-__initcall(fast_timer_init);
+device_initcall(fast_timer_init);
diff --git a/arch/cris/arch-v10/mm/init.c b/arch/cris/arch-v10/mm/init.c
index baa746c..908d829 100644
--- a/arch/cris/arch-v10/mm/init.c
+++ b/arch/cris/arch-v10/mm/init.c
@@ -217,7 +217,7 @@ __init init_ioremap(void)
 	return 0;
 }
 
-__initcall(init_ioremap);
+device_initcall(init_ioremap);
 
 /* Helper function for the two below */
 
diff --git a/arch/cris/arch-v32/kernel/fasttimer.c b/arch/cris/arch-v32/kernel/fasttimer.c
index 111caa1..221bcea 100644
--- a/arch/cris/arch-v32/kernel/fasttimer.c
+++ b/arch/cris/arch-v32/kernel/fasttimer.c
@@ -833,4 +833,4 @@ int fast_timer_init(void)
   }
 	return 0;
 }
-__initcall(fast_timer_init);
+device_initcall(fast_timer_init);
diff --git a/arch/cris/arch-v32/kernel/pinmux.c b/arch/cris/arch-v32/kernel/pinmux.c
index f6f3637..c2dfcd3 100644
--- a/arch/cris/arch-v32/kernel/pinmux.c
+++ b/arch/cris/arch-v32/kernel/pinmux.c
@@ -226,4 +226,4 @@ crisv32_pinmux_dump(void)
 	}
 }
 
-__initcall(crisv32_pinmux_init);
+device_initcall(crisv32_pinmux_init);
diff --git a/arch/cris/arch-v32/kernel/signal.c b/arch/cris/arch-v32/kernel/signal.c
index 372d0ca..d1e1b4e 100644
--- a/arch/cris/arch-v32/kernel/signal.c
+++ b/arch/cris/arch-v32/kernel/signal.c
@@ -672,4 +672,4 @@ cris_init_signal(void)
 	return 0;
 }
 
-__initcall(cris_init_signal);
+device_initcall(cris_init_signal);
diff --git a/arch/cris/arch-v32/mach-a3/io.c b/arch/cris/arch-v32/mach-a3/io.c
index 090ceb9..ea40a9b 100644
--- a/arch/cris/arch-v32/mach-a3/io.c
+++ b/arch/cris/arch-v32/mach-a3/io.c
@@ -95,7 +95,7 @@ static int __init crisv32_io_init(void)
 	return ret;
 }
 
-__initcall(crisv32_io_init);
+device_initcall(crisv32_io_init);
 
 int crisv32_io_get(struct crisv32_iopin *iopin,
 	unsigned int port, unsigned int pin)
diff --git a/arch/cris/arch-v32/mach-a3/pinmux.c b/arch/cris/arch-v32/mach-a3/pinmux.c
index 18648ef..14bbc78 100644
--- a/arch/cris/arch-v32/mach-a3/pinmux.c
+++ b/arch/cris/arch-v32/mach-a3/pinmux.c
@@ -383,4 +383,4 @@ crisv32_pinmux_dump(void)
 	}
 }
 
-__initcall(crisv32_pinmux_init);
+device_initcall(crisv32_pinmux_init);
diff --git a/arch/cris/arch-v32/mach-fs/io.c b/arch/cris/arch-v32/mach-fs/io.c
index a695866..fce8438 100644
--- a/arch/cris/arch-v32/mach-fs/io.c
+++ b/arch/cris/arch-v32/mach-fs/io.c
@@ -128,7 +128,7 @@ static int __init crisv32_io_init(void)
 	return ret;
 }
 
-__initcall(crisv32_io_init);
+device_initcall(crisv32_io_init);
 
 int crisv32_io_get(struct crisv32_iopin *iopin,
 		   unsigned int port, unsigned int pin)
diff --git a/arch/cris/arch-v32/mach-fs/pinmux.c b/arch/cris/arch-v32/mach-fs/pinmux.c
index 38f29ee..751f991 100644
--- a/arch/cris/arch-v32/mach-fs/pinmux.c
+++ b/arch/cris/arch-v32/mach-fs/pinmux.c
@@ -306,4 +306,4 @@ void crisv32_pinmux_dump(void)
 	}
 }
 
-__initcall(crisv32_pinmux_init);
+device_initcall(crisv32_pinmux_init);
diff --git a/arch/cris/kernel/profile.c b/arch/cris/kernel/profile.c
index 9aa5711..2472f3f 100644
--- a/arch/cris/kernel/profile.c
+++ b/arch/cris/kernel/profile.c
@@ -82,4 +82,4 @@ __init init_cris_profile(void)
 	return 0;
 }
 
-__initcall(init_cris_profile);
+device_initcall(init_cris_profile);
diff --git a/arch/cris/kernel/time.c b/arch/cris/kernel/time.c
index a05dd31..7554e96 100644
--- a/arch/cris/kernel/time.c
+++ b/arch/cris/kernel/time.c
@@ -160,4 +160,4 @@ __init init_udelay(void)
 	return 0;
 }
 
-__initcall(init_udelay);
+device_initcall(init_udelay);
diff --git a/arch/cris/kernel/traps.c b/arch/cris/kernel/traps.c
index 541efbf..8f77b68 100644
--- a/arch/cris/kernel/traps.c
+++ b/arch/cris/kernel/traps.c
@@ -177,7 +177,7 @@ oops_nmi_register(void)
 	return 0;
 }
 
-__initcall(oops_nmi_register);
+device_initcall(oops_nmi_register);
 
 #endif
 
diff --git a/arch/frv/kernel/gdb-stub.c b/arch/frv/kernel/gdb-stub.c
index 7ca8a6b..71d564c 100644
--- a/arch/frv/kernel/gdb-stub.c
+++ b/arch/frv/kernel/gdb-stub.c
@@ -2017,7 +2017,7 @@ static int __init gdbstub_postinit(void)
 	return 0;
 } /* end gdbstub_postinit() */
 
-__initcall(gdbstub_postinit);
+device_initcall(gdbstub_postinit);
 #endif
 
 /*****************************************************************************/
diff --git a/arch/frv/kernel/pm-mb93093.c b/arch/frv/kernel/pm-mb93093.c
index eaa7b58..3caa348 100644
--- a/arch/frv/kernel/pm-mb93093.c
+++ b/arch/frv/kernel/pm-mb93093.c
@@ -61,5 +61,5 @@ static int __init mb93093_pm_init(void)
 	return 0;
 }
 
-__initcall(mb93093_pm_init);
+device_initcall(mb93093_pm_init);
 
diff --git a/arch/frv/kernel/pm.c b/arch/frv/kernel/pm.c
index 5fa3889..b1aad48 100644
--- a/arch/frv/kernel/pm.c
+++ b/arch/frv/kernel/pm.c
@@ -348,6 +348,6 @@ static int __init pm_init(void)
 	return 0;
 }
 
-__initcall(pm_init);
+device_initcall(pm_init);
 
 #endif
diff --git a/arch/frv/kernel/sysctl.c b/arch/frv/kernel/sysctl.c
index 035516c..3280f8b 100644
--- a/arch/frv/kernel/sysctl.c
+++ b/arch/frv/kernel/sysctl.c
@@ -217,4 +217,4 @@ static int __init frv_sysctl_init(void)
 	return 0;
 }
 
-__initcall(frv_sysctl_init);
+device_initcall(frv_sysctl_init);
diff --git a/arch/h8300/kernel/gpio.c b/arch/h8300/kernel/gpio.c
index 6a25dd5..6ea7dd9 100644
--- a/arch/h8300/kernel/gpio.c
+++ b/arch/h8300/kernel/gpio.c
@@ -164,7 +164,7 @@ static __init int register_proc(void)
 	return proc_gpio != NULL;
 }
 
-__initcall(register_proc);
+device_initcall(register_proc);
 #endif
 
 void __init h8300_gpio_init(void)
diff --git a/arch/ia64/hp/sim/simeth.c b/arch/ia64/hp/sim/simeth.c
index 7e81966..e669908 100644
--- a/arch/ia64/hp/sim/simeth.c
+++ b/arch/ia64/hp/sim/simeth.c
@@ -524,4 +524,4 @@ set_multicast_list(struct net_device *dev)
 	printk(KERN_WARNING "%s: set_multicast_list called\n", dev->name);
 }
 
-__initcall(simeth_probe);
+device_initcall(simeth_probe);
diff --git a/arch/ia64/hp/sim/simserial.c b/arch/ia64/hp/sim/simserial.c
index 2bef526..470c0a1 100644
--- a/arch/ia64/hp/sim/simserial.c
+++ b/arch/ia64/hp/sim/simserial.c
@@ -980,5 +980,5 @@ simrs_init (void)
 }
 
 #ifndef MODULE
-__initcall(simrs_init);
+device_initcall(simrs_init);
 #endif
diff --git a/arch/ia64/kernel/audit.c b/arch/ia64/kernel/audit.c
index 96a9d18..c7d79ba 100644
--- a/arch/ia64/kernel/audit.c
+++ b/arch/ia64/kernel/audit.c
@@ -57,4 +57,4 @@ static int __init audit_classes_init(void)
 	return 0;
 }
 
-__initcall(audit_classes_init);
+device_initcall(audit_classes_init);
diff --git a/arch/ia64/kernel/crash.c b/arch/ia64/kernel/crash.c
index b942f40..07218af 100644
--- a/arch/ia64/kernel/crash.c
+++ b/arch/ia64/kernel/crash.c
@@ -282,5 +282,5 @@ machine_crash_setup(void)
 	return 0;
 }
 
-__initcall(machine_crash_setup);
+device_initcall(machine_crash_setup);
 
diff --git a/arch/ia64/kernel/cyclone.c b/arch/ia64/kernel/cyclone.c
index 71e3586..66fb97e 100644
--- a/arch/ia64/kernel/cyclone.c
+++ b/arch/ia64/kernel/cyclone.c
@@ -125,4 +125,4 @@ int __init init_cyclone_clock(void)
 	return 0;
 }
 
-__initcall(init_cyclone_clock);
+device_initcall(init_cyclone_clock);
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c
index 703062c..cb7199a 100644
--- a/arch/ia64/kernel/perfmon.c
+++ b/arch/ia64/kernel/perfmon.c
@@ -6700,7 +6700,7 @@ pfm_init(void)
 	return 0;
 }
 
-__initcall(pfm_init);
+device_initcall(pfm_init);
 
 /*
  * this function is called before pfm_init()
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c
index 41ae6a5..8322a01 100644
--- a/arch/ia64/kernel/setup.c
+++ b/arch/ia64/kernel/setup.c
@@ -243,7 +243,7 @@ static int __init register_memory(void)
 	return 0;
 }
 
-__initcall(register_memory);
+device_initcall(register_memory);
 
 
 #ifdef CONFIG_KEXEC
diff --git a/arch/ia64/kernel/uncached.c b/arch/ia64/kernel/uncached.c
index a595823..4a9812f 100644
--- a/arch/ia64/kernel/uncached.c
+++ b/arch/ia64/kernel/uncached.c
@@ -279,4 +279,4 @@ static int __init uncached_init(void)
 	return 0;
 }
 
-__initcall(uncached_init);
+device_initcall(uncached_init);
diff --git a/arch/ia64/kernel/unwind.c b/arch/ia64/kernel/unwind.c
index b6c0e63..62de896 100644
--- a/arch/ia64/kernel/unwind.c
+++ b/arch/ia64/kernel/unwind.c
@@ -2223,7 +2223,7 @@ create_gate_table (void)
 	return 0;
 }
 
-__initcall(create_gate_table);
+device_initcall(create_gate_table);
 
 void __init
 unw_init (void)
diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c
index ed41759..da31b31 100644
--- a/arch/ia64/mm/init.c
+++ b/arch/ia64/mm/init.c
@@ -716,4 +716,4 @@ per_linux32_init(void)
 	return 0;
 }
 
-__initcall(per_linux32_init);
+device_initcall(per_linux32_init);
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index 2f2eac2..0341a9e 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -534,7 +534,7 @@ load-$(CONFIG_SGI_IP32)		+= 0xffffffff80004000
 #
 # This is a LIB so that it links at the end, and initcalls are later
 # the sequence; but it is built as an object so that modules don't get
-# removed (as happens, even if they have __initcall/module_init)
+# removed (as happens, even if they have device_initcall/module_init)
 #
 core-$(CONFIG_SIBYTE_BCM112X)	+= arch/mips/sibyte/sb1250/
 core-$(CONFIG_SIBYTE_BCM112X)	+= arch/mips/sibyte/common/
diff --git a/arch/mips/kernel/unaligned.c b/arch/mips/kernel/unaligned.c
index 69b039c..7233ac8 100644
--- a/arch/mips/kernel/unaligned.c
+++ b/arch/mips/kernel/unaligned.c
@@ -567,5 +567,5 @@ static int __init debugfs_unaligned(void)
 		return -ENOMEM;
 	return 0;
 }
-__initcall(debugfs_unaligned);
+device_initcall(debugfs_unaligned);
 #endif
diff --git a/arch/mips/lasat/sysctl.c b/arch/mips/lasat/sysctl.c
index d87ffd0..6cc8d2f 100644
--- a/arch/mips/lasat/sysctl.c
+++ b/arch/mips/lasat/sysctl.c
@@ -285,4 +285,4 @@ static int __init lasat_register_sysctl(void)
 	return 0;
 }
 
-__initcall(lasat_register_sysctl);
+device_initcall(lasat_register_sysctl);
diff --git a/arch/mips/math-emu/cp1emu.c b/arch/mips/math-emu/cp1emu.c
index 8f2f8e9..3936be4 100644
--- a/arch/mips/math-emu/cp1emu.c
+++ b/arch/mips/math-emu/cp1emu.c
@@ -1325,5 +1325,5 @@ static int __init debugfs_fpuemu(void)
 
 	return 0;
 }
-__initcall(debugfs_fpuemu);
+device_initcall(debugfs_fpuemu);
 #endif
diff --git a/arch/mips/nxp/pnx8550/common/proc.c b/arch/mips/nxp/pnx8550/common/proc.c
index af094cd..9a10d8c 100644
--- a/arch/mips/nxp/pnx8550/common/proc.c
+++ b/arch/mips/nxp/pnx8550/common/proc.c
@@ -108,4 +108,4 @@ static int pnx8550_proc_init( void )
 	return 0;
 }
 
-__initcall(pnx8550_proc_init);
+device_initcall(pnx8550_proc_init);
diff --git a/arch/mips/sibyte/sb1250/bus_watcher.c b/arch/mips/sibyte/sb1250/bus_watcher.c
index 45274bd..e8e7f23 100644
--- a/arch/mips/sibyte/sb1250/bus_watcher.c
+++ b/arch/mips/sibyte/sb1250/bus_watcher.c
@@ -255,4 +255,4 @@ int __init sibyte_bus_watcher(void)
 	return 0;
 }
 
-__initcall(sibyte_bus_watcher);
+device_initcall(sibyte_bus_watcher);
diff --git a/arch/mn10300/kernel/gdb-stub.c b/arch/mn10300/kernel/gdb-stub.c
index 41b1170..22e0613 100644
--- a/arch/mn10300/kernel/gdb-stub.c
+++ b/arch/mn10300/kernel/gdb-stub.c
@@ -1884,7 +1884,7 @@ static int __init gdbstub_postinit(void)
 	return 0;
 }
 
-__initcall(gdbstub_postinit);
+device_initcall(gdbstub_postinit);
 #endif
 
 /*
diff --git a/arch/mn10300/kernel/mn10300-serial.c b/arch/mn10300/kernel/mn10300-serial.c
index ef34d5a..9cada2f 100644
--- a/arch/mn10300/kernel/mn10300-serial.c
+++ b/arch/mn10300/kernel/mn10300-serial.c
@@ -1350,7 +1350,7 @@ static int __init mn10300_serial_init(void)
 	return ret;
 }
 
-__initcall(mn10300_serial_init);
+device_initcall(mn10300_serial_init);
 
 
 #ifdef CONFIG_MN10300_TTYSM_CONSOLE
diff --git a/arch/mn10300/kernel/profile.c b/arch/mn10300/kernel/profile.c
index 20d7d03..e799032 100644
--- a/arch/mn10300/kernel/profile.c
+++ b/arch/mn10300/kernel/profile.c
@@ -48,4 +48,4 @@ static __init int profile_init(void)
 	return 0;
 }
 
-__initcall(profile_init);
+device_initcall(profile_init);
diff --git a/arch/parisc/kernel/pci-dma.c b/arch/parisc/kernel/pci-dma.c
index c07f618..e7c12c0 100644
--- a/arch/parisc/kernel/pci-dma.c
+++ b/arch/parisc/kernel/pci-dma.c
@@ -410,7 +410,7 @@ pcxl_dma_init(void)
 	return 0;
 }
 
-__initcall(pcxl_dma_init);
+device_initcall(pcxl_dma_init);
 
 static void * pa11_dma_alloc_consistent (struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t flag)
 {
diff --git a/arch/parisc/kernel/pdc_chassis.c b/arch/parisc/kernel/pdc_chassis.c
index d47ba1a..35ad4cb 100644
--- a/arch/parisc/kernel/pdc_chassis.c
+++ b/arch/parisc/kernel/pdc_chassis.c
@@ -295,7 +295,7 @@ static int __init pdc_chassis_create_procfs(void)
 	return 0;
 }
 
-__initcall(pdc_chassis_create_procfs);
+device_initcall(pdc_chassis_create_procfs);
 
 #endif /* CONFIG_PROC_FS */
 #endif /* CONFIG_PDC_CHASSIS_WARN */
diff --git a/arch/powerpc/kernel/audit.c b/arch/powerpc/kernel/audit.c
index a4dab7c..e721e2e 100644
--- a/arch/powerpc/kernel/audit.c
+++ b/arch/powerpc/kernel/audit.c
@@ -80,4 +80,4 @@ static int __init audit_classes_init(void)
 	return 0;
 }
 
-__initcall(audit_classes_init);
+device_initcall(audit_classes_init);
diff --git a/arch/powerpc/kernel/idle.c b/arch/powerpc/kernel/idle.c
index 049dda6..694861f 100644
--- a/arch/powerpc/kernel/idle.c
+++ b/arch/powerpc/kernel/idle.c
@@ -134,5 +134,5 @@ register_powersave_nap_sysctl(void)
 
 	return 0;
 }
-__initcall(register_powersave_nap_sysctl);
+device_initcall(register_powersave_nap_sysctl);
 #endif
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index 64f6f20..2e97ae9 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -1203,7 +1203,7 @@ static int __init irq_debugfs_init(void)
 
 	return 0;
 }
-__initcall(irq_debugfs_init);
+device_initcall(irq_debugfs_init);
 #endif /* CONFIG_VIRQ_DEBUG */
 
 #ifdef CONFIG_PPC64
diff --git a/arch/powerpc/kernel/proc_powerpc.c b/arch/powerpc/kernel/proc_powerpc.c
index 1ed3b8d..f53bdca 100644
--- a/arch/powerpc/kernel/proc_powerpc.c
+++ b/arch/powerpc/kernel/proc_powerpc.c
@@ -91,7 +91,7 @@ static int __init proc_ppc64_init(void)
 
 	return 0;
 }
-__initcall(proc_ppc64_init);
+device_initcall(proc_ppc64_init);
 
 #endif /* CONFIG_PPC64 */
 
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index 05131d6..628d6df 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -845,7 +845,7 @@ static int __init prom_reconfig_setup(void)
 {
 	return pSeries_reconfig_notifier_register(&prom_reconfig_nb);
 }
-__initcall(prom_reconfig_setup);
+device_initcall(prom_reconfig_setup);
 #endif
 
 /* Find the device node for a given logical cpu number, also returns the cpu
@@ -909,5 +909,5 @@ static int __init export_flat_device_tree(void)
 
 	return 0;
 }
-__initcall(export_flat_device_tree);
+device_initcall(export_flat_device_tree);
 #endif
diff --git a/arch/powerpc/kernel/rtas-proc.c b/arch/powerpc/kernel/rtas-proc.c
index 8777fb0..7578df5 100644
--- a/arch/powerpc/kernel/rtas-proc.c
+++ b/arch/powerpc/kernel/rtas-proc.c
@@ -279,7 +279,7 @@ static int __init proc_rtas_init(void)
 	return 0;
 }
 
-__initcall(proc_rtas_init);
+device_initcall(proc_rtas_init);
 
 static int parse_number(const char __user *p, size_t count, unsigned long *val)
 {
diff --git a/arch/powerpc/kernel/rtasd.c b/arch/powerpc/kernel/rtasd.c
index 2e4832a..1bfd919 100644
--- a/arch/powerpc/kernel/rtasd.c
+++ b/arch/powerpc/kernel/rtasd.c
@@ -508,7 +508,7 @@ static int __init rtas_init(void)
 
 	return 0;
 }
-__initcall(rtas_init);
+device_initcall(rtas_init);
 
 static int __init surveillance_setup(char *str)
 {
diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c
index e235e52..6ddb889 100644
--- a/arch/powerpc/kernel/sysfs.c
+++ b/arch/powerpc/kernel/sysfs.c
@@ -92,7 +92,7 @@ static int __init smt_setup(void)
 	of_node_put(options);
 	return 0;
 }
-__initcall(smt_setup);
+device_initcall(smt_setup);
 
 static int __init setup_smt_snooze_delay(char *str)
 {
diff --git a/arch/powerpc/kernel/tau_6xx.c b/arch/powerpc/kernel/tau_6xx.c
index a753b72..a38d207 100644
--- a/arch/powerpc/kernel/tau_6xx.c
+++ b/arch/powerpc/kernel/tau_6xx.c
@@ -248,7 +248,7 @@ int __init TAU_init(void)
 	return 0;
 }
 
-__initcall(TAU_init);
+device_initcall(TAU_init);
 
 /*
  * return current temp
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c
index 77f6421..c74aae9 100644
--- a/arch/powerpc/kernel/vio.c
+++ b/arch/powerpc/kernel/vio.c
@@ -1303,7 +1303,7 @@ static int __init vio_bus_init(void)
 
 	return 0;
 }
-__initcall(vio_bus_init);
+device_initcall(vio_bus_init);
 
 static ssize_t name_show(struct device *dev,
 		struct device_attribute *attr, char *buf)
diff --git a/arch/powerpc/platforms/iseries/lpevents.c b/arch/powerpc/platforms/iseries/lpevents.c
index b0f8a85..66bc6ff 100644
--- a/arch/powerpc/platforms/iseries/lpevents.c
+++ b/arch/powerpc/platforms/iseries/lpevents.c
@@ -337,5 +337,5 @@ static int __init proc_lpevents_init(void)
 		    &proc_lpevents_operations);
 	return 0;
 }
-__initcall(proc_lpevents_init);
+device_initcall(proc_lpevents_init);
 
diff --git a/arch/powerpc/platforms/iseries/mf.c b/arch/powerpc/platforms/iseries/mf.c
index 6617915..d140c09 100644
--- a/arch/powerpc/platforms/iseries/mf.c
+++ b/arch/powerpc/platforms/iseries/mf.c
@@ -1299,7 +1299,7 @@ static int __init mf_proc_init(void)
 	return 0;
 }
 
-__initcall(mf_proc_init);
+device_initcall(mf_proc_init);
 
 #endif /* CONFIG_PROC_FS */
 
diff --git a/arch/powerpc/platforms/iseries/proc.c b/arch/powerpc/platforms/iseries/proc.c
index 0676368..1e9ac90 100644
--- a/arch/powerpc/platforms/iseries/proc.c
+++ b/arch/powerpc/platforms/iseries/proc.c
@@ -117,4 +117,4 @@ static int __init iseries_proc_init(void)
 		    &proc_titantod_operations);
 	return 0;
 }
-__initcall(iseries_proc_init);
+device_initcall(iseries_proc_init);
diff --git a/arch/powerpc/platforms/iseries/viopath.c b/arch/powerpc/platforms/iseries/viopath.c
index 5aea94f..daac760 100644
--- a/arch/powerpc/platforms/iseries/viopath.c
+++ b/arch/powerpc/platforms/iseries/viopath.c
@@ -186,7 +186,7 @@ static int __init vio_proc_init(void)
 	proc_create("iSeries/config", 0, NULL, &proc_viopath_operations);
         return 0;
 }
-__initcall(vio_proc_init);
+device_initcall(vio_proc_init);
 
 /* See if a given LP is active.  Allow for invalid lps to be passed in
  * and just return invalid
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c
index 7df7fbb..cb72726 100644
--- a/arch/powerpc/platforms/pseries/eeh.c
+++ b/arch/powerpc/platforms/pseries/eeh.c
@@ -1287,4 +1287,4 @@ static int __init eeh_init_proc(void)
 		proc_create("ppc64/eeh", 0, NULL, &proc_eeh_operations);
 	return 0;
 }
-__initcall(eeh_init_proc);
+device_initcall(eeh_init_proc);
diff --git a/arch/powerpc/platforms/pseries/hvCall_inst.c b/arch/powerpc/platforms/pseries/hvCall_inst.c
index 1fefae7..ca1b4e2 100644
--- a/arch/powerpc/platforms/pseries/hvCall_inst.c
+++ b/arch/powerpc/platforms/pseries/hvCall_inst.c
@@ -164,4 +164,4 @@ static int __init hcall_inst_init(void)
 
 	return 0;
 }
-__initcall(hcall_inst_init);
+device_initcall(hcall_inst_init);
diff --git a/arch/powerpc/platforms/pseries/power.c b/arch/powerpc/platforms/pseries/power.c
index 6d62662..0eafaf8 100644
--- a/arch/powerpc/platforms/pseries/power.c
+++ b/arch/powerpc/platforms/pseries/power.c
@@ -77,5 +77,5 @@ static int __init apo_pm_init(void)
 {
 	return (sysfs_create_file(power_kobj, &auto_poweron_attr.attr));
 }
-__initcall(apo_pm_init);
+device_initcall(apo_pm_init);
 #endif
diff --git a/arch/powerpc/platforms/pseries/ras.c b/arch/powerpc/platforms/pseries/ras.c
index d20b96e..247bad9 100644
--- a/arch/powerpc/platforms/pseries/ras.c
+++ b/arch/powerpc/platforms/pseries/ras.c
@@ -152,7 +152,7 @@ static int __init init_ras_IRQ(void)
 
 	return 0;
 }
-__initcall(init_ras_IRQ);
+device_initcall(init_ras_IRQ);
 
 /*
  * Handle power subsystem events (EPOW).
diff --git a/arch/powerpc/platforms/pseries/reconfig.c b/arch/powerpc/platforms/pseries/reconfig.c
index a2305d2..d82ca6c 100644
--- a/arch/powerpc/platforms/pseries/reconfig.c
+++ b/arch/powerpc/platforms/pseries/reconfig.c
@@ -557,4 +557,4 @@ static int proc_ppc64_create_ofdt(void)
 
 	return 0;
 }
-__initcall(proc_ppc64_create_ofdt);
+device_initcall(proc_ppc64_create_ofdt);
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index 8bad7d5..cd1ce39 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -2751,7 +2751,7 @@ static int __init setup_xmon_sysrq(void)
 	register_sysrq_key('x', &sysrq_xmon_op);
 	return 0;
 }
-__initcall(setup_xmon_sysrq);
+device_initcall(setup_xmon_sysrq);
 #endif /* CONFIG_MAGIC_SYSRQ */
 
 static int __initdata xmon_early, xmon_off;
diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c
index 5c91995..af7ccb3 100644
--- a/arch/s390/appldata/appldata_base.c
+++ b/arch/s390/appldata/appldata_base.c
@@ -659,7 +659,7 @@ out_driver:
 	return rc;
 }
 
-__initcall(appldata_init);
+device_initcall(appldata_init);
 
 /**************************** init / exit <END> ******************************/
 
diff --git a/arch/s390/kernel/audit.c b/arch/s390/kernel/audit.c
index f4932c2..8a9023a 100644
--- a/arch/s390/kernel/audit.c
+++ b/arch/s390/kernel/audit.c
@@ -75,4 +75,4 @@ static int __init audit_classes_init(void)
 	return 0;
 }
 
-__initcall(audit_classes_init);
+device_initcall(audit_classes_init);
diff --git a/arch/s390/kernel/compat_exec_domain.c b/arch/s390/kernel/compat_exec_domain.c
index 914d494..e0715f6 100644
--- a/arch/s390/kernel/compat_exec_domain.c
+++ b/arch/s390/kernel/compat_exec_domain.c
@@ -26,4 +26,4 @@ static int __init s390_init (void)
 	return 0;
 }
 
-__initcall(s390_init);
+device_initcall(s390_init);
diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c
index 7eedbbc..19906a7 100644
--- a/arch/s390/kernel/ipl.c
+++ b/arch/s390/kernel/ipl.c
@@ -1806,7 +1806,7 @@ static int __init s390_ipl_init(void)
 	return 0;
 }
 
-__initcall(s390_ipl_init);
+device_initcall(s390_ipl_init);
 
 static void __init strncpy_skip_quote(char *dst, char *src, int n)
 {
diff --git a/arch/s390/kernel/topology.c b/arch/s390/kernel/topology.c
index 14ef6f0..1a1d7ee 100644
--- a/arch/s390/kernel/topology.c
+++ b/arch/s390/kernel/topology.c
@@ -291,7 +291,7 @@ out:
 	update_cpu_core_map();
 	return rc;
 }
-__initcall(init_topology_update);
+device_initcall(init_topology_update);
 
 void __init s390_init_cpu_topology(void)
 {
diff --git a/arch/sh/boards/board-edosk7760.c b/arch/sh/boards/board-edosk7760.c
index 35dc099..f47ac82 100644
--- a/arch/sh/boards/board-edosk7760.c
+++ b/arch/sh/boards/board-edosk7760.c
@@ -182,7 +182,7 @@ static int __init init_edosk7760_devices(void)
 	return platform_add_devices(edosk7760_devices,
 				    ARRAY_SIZE(edosk7760_devices));
 }
-__initcall(init_edosk7760_devices);
+device_initcall(init_edosk7760_devices);
 
 /*
  * The Machine Vector
diff --git a/arch/sh/boards/board-sh7785lcr.c b/arch/sh/boards/board-sh7785lcr.c
index fe7e686..ee65ff0 100644
--- a/arch/sh/boards/board-sh7785lcr.c
+++ b/arch/sh/boards/board-sh7785lcr.c
@@ -284,7 +284,7 @@ static int __init sh7785lcr_devices_setup(void)
 	return platform_add_devices(sh7785lcr_devices,
 				    ARRAY_SIZE(sh7785lcr_devices));
 }
-__initcall(sh7785lcr_devices_setup);
+device_initcall(sh7785lcr_devices_setup);
 
 /* Initialize IRQ setting */
 void __init init_sh7785lcr_IRQ(void)
diff --git a/arch/sh/boards/mach-cayman/setup.c b/arch/sh/boards/mach-cayman/setup.c
index 7e8216a..e89e8e1 100644
--- a/arch/sh/boards/mach-cayman/setup.c
+++ b/arch/sh/boards/mach-cayman/setup.c
@@ -165,7 +165,7 @@ static int __init smsc_superio_setup(void)
 
 	return 0;
 }
-__initcall(smsc_superio_setup);
+device_initcall(smsc_superio_setup);
 
 static void __iomem *cayman_ioport_map(unsigned long port, unsigned int len)
 {
diff --git a/arch/sh/boards/mach-landisk/setup.c b/arch/sh/boards/mach-landisk/setup.c
index 50337ac..62f26f4 100644
--- a/arch/sh/boards/mach-landisk/setup.c
+++ b/arch/sh/boards/mach-landisk/setup.c
@@ -83,7 +83,7 @@ static int __init landisk_devices_setup(void)
 				    ARRAY_SIZE(landisk_devices));
 }
 
-__initcall(landisk_devices_setup);
+device_initcall(landisk_devices_setup);
 
 static void __init landisk_setup(char **cmdline_p)
 {
diff --git a/arch/sh/boards/mach-r2d/setup.c b/arch/sh/boards/mach-r2d/setup.c
index b84df6a..4b98a52 100644
--- a/arch/sh/boards/mach-r2d/setup.c
+++ b/arch/sh/boards/mach-r2d/setup.c
@@ -258,7 +258,7 @@ static int __init rts7751r2d_devices_setup(void)
 	return platform_add_devices(rts7751r2d_devices,
 				    ARRAY_SIZE(rts7751r2d_devices));
 }
-__initcall(rts7751r2d_devices_setup);
+device_initcall(rts7751r2d_devices_setup);
 
 static void rts7751r2d_power_off(void)
 {
diff --git a/arch/sh/boards/mach-sdk7786/setup.c b/arch/sh/boards/mach-sdk7786/setup.c
index f094ea2..ddcc73d 100644
--- a/arch/sh/boards/mach-sdk7786/setup.c
+++ b/arch/sh/boards/mach-sdk7786/setup.c
@@ -132,7 +132,7 @@ static int __init sdk7786_devices_setup(void)
 
 	return sdk7786_i2c_setup();
 }
-__initcall(sdk7786_devices_setup);
+device_initcall(sdk7786_devices_setup);
 
 static int sdk7786_mode_pins(void)
 {
diff --git a/arch/sh/boards/mach-se/7206/setup.c b/arch/sh/boards/mach-se/7206/setup.c
index 8f5c65d..91d0823 100644
--- a/arch/sh/boards/mach-se/7206/setup.c
+++ b/arch/sh/boards/mach-se/7206/setup.c
@@ -77,7 +77,7 @@ static int __init se7206_devices_setup(void)
 {
 	return platform_add_devices(se7206_devices, ARRAY_SIZE(se7206_devices));
 }
-__initcall(se7206_devices_setup);
+device_initcall(se7206_devices_setup);
 
 /*
  * The Machine Vector
diff --git a/arch/sh/boards/mach-se/7751/setup.c b/arch/sh/boards/mach-se/7751/setup.c
index 5057251..69e1479 100644
--- a/arch/sh/boards/mach-se/7751/setup.c
+++ b/arch/sh/boards/mach-se/7751/setup.c
@@ -48,7 +48,7 @@ static int __init se7751_devices_setup(void)
 {
 	return platform_add_devices(se7751_devices, ARRAY_SIZE(se7751_devices));
 }
-__initcall(se7751_devices_setup);
+device_initcall(se7751_devices_setup);
 
 /*
  * The Machine Vector
diff --git a/arch/sh/boards/mach-sh03/setup.c b/arch/sh/boards/mach-sh03/setup.c
index af4a0c0..d4f79b2 100644
--- a/arch/sh/boards/mach-sh03/setup.c
+++ b/arch/sh/boards/mach-sh03/setup.c
@@ -96,7 +96,7 @@ static int __init sh03_devices_setup(void)
 
 	return platform_add_devices(sh03_devices, ARRAY_SIZE(sh03_devices));
 }
-__initcall(sh03_devices_setup);
+device_initcall(sh03_devices_setup);
 
 static struct sh_machine_vector mv_sh03 __initmv = {
 	.mv_name		= "Interface (CTP/PCI-SH03)",
diff --git a/arch/sh/kernel/traps_64.c b/arch/sh/kernel/traps_64.c
index e3f92eb..0868d8d 100644
--- a/arch/sh/kernel/traps_64.c
+++ b/arch/sh/kernel/traps_64.c
@@ -923,7 +923,7 @@ static int __init init_sysctl(void)
 	return 0;
 }
 
-__initcall(init_sysctl);
+device_initcall(init_sysctl);
 
 
 asmlinkage void do_debug_interrupt(unsigned long code, struct pt_regs *regs)
diff --git a/arch/sparc/kernel/apc.c b/arch/sparc/kernel/apc.c
index 71ec90b..768b51b 100644
--- a/arch/sparc/kernel/apc.c
+++ b/arch/sparc/kernel/apc.c
@@ -188,4 +188,4 @@ static int __init apc_init(void)
  * and is easiest to ioremap when SBus is already
  * initialized, so we install ourselves thusly:
  */
-__initcall(apc_init);
+device_initcall(apc_init);
diff --git a/arch/sparc/kernel/audit.c b/arch/sparc/kernel/audit.c
index 8fff0ac..4be9a78 100644
--- a/arch/sparc/kernel/audit.c
+++ b/arch/sparc/kernel/audit.c
@@ -80,4 +80,4 @@ static int __init audit_classes_init(void)
 	return 0;
 }
 
-__initcall(audit_classes_init);
+device_initcall(audit_classes_init);
diff --git a/arch/sparc/kernel/mdesc.c b/arch/sparc/kernel/mdesc.c
index cdc91d9..0fb5a9c 100644
--- a/arch/sparc/kernel/mdesc.c
+++ b/arch/sparc/kernel/mdesc.c
@@ -903,7 +903,7 @@ static int __init mdesc_misc_init(void)
 	return misc_register(&mdesc_misc);
 }
 
-__initcall(mdesc_misc_init);
+device_initcall(mdesc_misc_init);
 
 void __init sun4v_mdesc_init(void)
 {
diff --git a/arch/sparc/kernel/pmc.c b/arch/sparc/kernel/pmc.c
index 5e4563d..74a99b5 100644
--- a/arch/sparc/kernel/pmc.c
+++ b/arch/sparc/kernel/pmc.c
@@ -93,4 +93,4 @@ static int __init pmc_init(void)
  * and is easiest to ioremap when SBus is already
  * initialized, so we install ourselves thusly:
  */
-__initcall(pmc_init);
+device_initcall(pmc_init);
diff --git a/arch/um/drivers/mconsole_kern.c b/arch/um/drivers/mconsole_kern.c
index de317d0..c55fa3a 100644
--- a/arch/um/drivers/mconsole_kern.c
+++ b/arch/um/drivers/mconsole_kern.c
@@ -493,7 +493,7 @@ static int __init mem_mc_init(void)
 	return 0;
 }
 
-__initcall(mem_mc_init);
+device_initcall(mem_mc_init);
 
 #define CONFIG_BUF_SIZE 64
 
@@ -816,7 +816,7 @@ static int __init mconsole_init(void)
 	return 1;
 }
 
-__initcall(mconsole_init);
+device_initcall(mconsole_init);
 
 static ssize_t mconsole_proc_write(struct file *file,
 		const char __user *buffer, size_t count, loff_t *pos)
@@ -873,7 +873,7 @@ void unlock_notify(void)
 	spin_unlock(&notify_spinlock);
 }
 
-__initcall(create_proc_mconsole);
+device_initcall(create_proc_mconsole);
 
 #define NOTIFY "notify:"
 
@@ -923,7 +923,7 @@ static int add_notifier(void)
 	return 0;
 }
 
-__initcall(add_notifier);
+device_initcall(add_notifier);
 
 char *mconsole_notify_socket(void)
 {
diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c
index a74245a..3864903 100644
--- a/arch/um/drivers/net_kern.c
+++ b/arch/um/drivers/net_kern.c
@@ -824,7 +824,7 @@ static int uml_net_init(void)
 	return 0;
 }
 
-__initcall(uml_net_init);
+device_initcall(uml_net_init);
 
 static void close_devices(void)
 {
diff --git a/arch/um/drivers/stderr_console.c b/arch/um/drivers/stderr_console.c
index d07a97f..29eb7ce 100644
--- a/arch/um/drivers/stderr_console.c
+++ b/arch/um/drivers/stderr_console.c
@@ -59,4 +59,4 @@ static int __init unregister_stderr(void)
 	return 0;
 }
 
-__initcall(unregister_stderr);
+device_initcall(unregister_stderr);
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
index c1ff690..d5de090 100644
--- a/arch/um/drivers/ubd_kern.c
+++ b/arch/um/drivers/ubd_kern.c
@@ -1010,7 +1010,7 @@ static int __init ubd_mc_init(void)
 	return 0;
 }
 
-__initcall(ubd_mc_init);
+device_initcall(ubd_mc_init);
 
 static int __init ubd0_init(void)
 {
@@ -1024,7 +1024,7 @@ static int __init ubd0_init(void)
 	return 0;
 }
 
-__initcall(ubd0_init);
+device_initcall(ubd0_init);
 
 /* Used in ubd_init, which is an initcall */
 static struct platform_driver ubd_driver = {
diff --git a/arch/um/kernel/exitcode.c b/arch/um/kernel/exitcode.c
index 829df49..cb05ff8 100644
--- a/arch/um/kernel/exitcode.c
+++ b/arch/um/kernel/exitcode.c
@@ -75,4 +75,4 @@ static int make_proc_exitcode(void)
 	return 0;
 }
 
-__initcall(make_proc_exitcode);
+device_initcall(make_proc_exitcode);
diff --git a/arch/um/kernel/physmem.c b/arch/um/kernel/physmem.c
index a1a9090..87537f0 100644
--- a/arch/um/kernel/physmem.c
+++ b/arch/um/kernel/physmem.c
@@ -209,4 +209,4 @@ static int setup_iomem(void)
 	return 0;
 }
 
-__initcall(setup_iomem);
+device_initcall(setup_iomem);
diff --git a/arch/um/os-Linux/aio.c b/arch/um/os-Linux/aio.c
index 57e3d46..337437e 100644
--- a/arch/um/os-Linux/aio.c
+++ b/arch/um/os-Linux/aio.c
@@ -343,13 +343,13 @@ static int init_aio(void)
 }
 
 /*
- * The reason for the __initcall/__uml_exitcall asymmetry is that init_aio
+ * The reason for the device_initcall/__uml_exitcall asymmetry is that init_aio
  * needs to be called when the kernel is running because it calls run_helper,
  * which needs get_free_page.  exit_aio is a __uml_exitcall because the generic
  * kernel does not run __exitcalls on shutdown, and can't because many of them
  * break when called outside of module unloading.
  */
-__initcall(init_aio);
+device_initcall(init_aio);
 
 static void exit_aio(void)
 {
diff --git a/arch/um/os-Linux/skas/mem.c b/arch/um/os-Linux/skas/mem.c
index d261f17..a0a816a 100644
--- a/arch/um/os-Linux/skas/mem.c
+++ b/arch/um/os-Linux/skas/mem.c
@@ -46,7 +46,7 @@ static int __init init_syscall_regs(void)
 	return 0;
 }
 
-__initcall(init_syscall_regs);
+device_initcall(init_syscall_regs);
 
 extern int proc_mm;
 
diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c
index d6e0a22..25ef142 100644
--- a/arch/um/os-Linux/skas/process.c
+++ b/arch/um/os-Linux/skas/process.c
@@ -473,7 +473,7 @@ static int __init init_thread_regs(void)
 	return 0;
 }
 
-__initcall(init_thread_regs);
+device_initcall(init_thread_regs);
 
 int copy_context_skas0(unsigned long new_stack, int pid)
 {
diff --git a/arch/um/os-Linux/umid.c b/arch/um/os-Linux/umid.c
index a27defb..23f7b37 100644
--- a/arch/um/os-Linux/umid.c
+++ b/arch/um/os-Linux/umid.c
@@ -326,7 +326,7 @@ static int __init make_umid_init(void)
 	return 0;
 }
 
-__initcall(make_umid_init);
+device_initcall(make_umid_init);
 
 int __init umid_file_name(char *name, char *buf, int len)
 {
diff --git a/arch/um/sys-i386/tls.c b/arch/um/sys-i386/tls.c
index c6c7131..b285fd7 100644
--- a/arch/um/sys-i386/tls.c
+++ b/arch/um/sys-i386/tls.c
@@ -393,4 +393,4 @@ static int __init __setup_host_supports_tls(void)
 	return 0;
 }
 
-__initcall(__setup_host_supports_tls);
+device_initcall(__setup_host_supports_tls);
diff --git a/arch/x86/kernel/audit_64.c b/arch/x86/kernel/audit_64.c
index 06d3e5a..bab6ddc 100644
--- a/arch/x86/kernel/audit_64.c
+++ b/arch/x86/kernel/audit_64.c
@@ -78,4 +78,4 @@ static int __init audit_classes_init(void)
 	return 0;
 }
 
-__initcall(audit_classes_init);
+device_initcall(audit_classes_init);
diff --git a/arch/x86/kernel/tlb_uv.c b/arch/x86/kernel/tlb_uv.c
index 364d015..eb71685 100644
--- a/arch/x86/kernel/tlb_uv.c
+++ b/arch/x86/kernel/tlb_uv.c
@@ -860,5 +860,5 @@ static int __init uv_bau_init(void)
 
 	return 0;
 }
-__initcall(uv_bau_init);
-__initcall(uv_ptc_init);
+device_initcall(uv_bau_init);
+device_initcall(uv_ptc_init);
diff --git a/arch/x86/kernel/vsyscall_64.c b/arch/x86/kernel/vsyscall_64.c
index 1c0c6ab..df45aaf 100644
--- a/arch/x86/kernel/vsyscall_64.c
+++ b/arch/x86/kernel/vsyscall_64.c
@@ -244,7 +244,7 @@ static ctl_table kernel_root_table2[] = {
 };
 #endif
 
-/* Assume __initcall executes before all user space. Hopefully kmod
+/* Assume device_initcall executes before all user space. Hopefully kmod
    doesn't violate that. We'll find out if it does. */
 static void __cpuinit vsyscall_set_cpu(int cpu)
 {
@@ -306,4 +306,4 @@ static int __init vsyscall_init(void)
 	return 0;
 }
 
-__initcall(vsyscall_init);
+device_initcall(vsyscall_init);
diff --git a/arch/x86/mm/dump_pagetables.c b/arch/x86/mm/dump_pagetables.c
index a725b7f..a84535d 100644
--- a/arch/x86/mm/dump_pagetables.c
+++ b/arch/x86/mm/dump_pagetables.c
@@ -349,7 +349,7 @@ static int pt_dump_init(void)
 	return 0;
 }
 
-__initcall(pt_dump_init);
+device_initcall(pt_dump_init);
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Arjan van de Ven <arjan@linux.intel.com>");
 MODULE_DESCRIPTION("Kernel debugging helper that dumps pagetables");
diff --git a/arch/x86/vdso/vdso32-setup.c b/arch/x86/vdso/vdso32-setup.c
index 02b442e..6c73b85 100644
--- a/arch/x86/vdso/vdso32-setup.c
+++ b/arch/x86/vdso/vdso32-setup.c
@@ -374,7 +374,7 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
 
 #ifdef CONFIG_X86_64
 
-__initcall(sysenter_setup);
+device_initcall(sysenter_setup);
 
 #ifdef CONFIG_SYSCTL
 /* Register vsyscall32 into the ABI table */
@@ -405,7 +405,7 @@ static __init int ia32_binfmt_init(void)
 	register_sysctl_table(abi_root_table2);
 	return 0;
 }
-__initcall(ia32_binfmt_init);
+device_initcall(ia32_binfmt_init);
 #endif
 
 #else  /* CONFIG_X86_32 */
diff --git a/arch/x86/vdso/vma.c b/arch/x86/vdso/vma.c
index 21e1aeb..860addc 100644
--- a/arch/x86/vdso/vma.c
+++ b/arch/x86/vdso/vma.c
@@ -73,7 +73,7 @@ static int __init init_vdso_vars(void)
 	vdso_enabled = 0;
 	return -ENOMEM;
 }
-__initcall(init_vdso_vars);
+device_initcall(init_vdso_vars);
 
 struct linux_binprm;
 
diff --git a/arch/xtensa/platforms/iss/console.c b/arch/xtensa/platforms/iss/console.c
index e60a1f5..cdf1715 100644
--- a/arch/xtensa/platforms/iss/console.c
+++ b/arch/xtensa/platforms/iss/console.c
@@ -248,7 +248,7 @@ static __exit void rs_exit(void)
 }
 
 
-/* We use `late_initcall' instead of just `__initcall' as a workaround for
+/* We use `late_initcall' instead of just `device_initcall' as a workaround for
  * the fact that (1) simcons_tty_init can't be called before tty_init,
  * (2) tty_init is called via `module_init', (3) if statically linked,
  * module_init == device_init, and (4) there's no ordering of init lists.
diff --git a/drivers/net/arm/am79c961a.c b/drivers/net/arm/am79c961a.c
index f1f58c5..cc2c734 100644
--- a/drivers/net/arm/am79c961a.c
+++ b/drivers/net/arm/am79c961a.c
@@ -775,4 +775,4 @@ static int __init am79c961_init(void)
 	return platform_driver_register(&am79c961_driver);
 }
 
-__initcall(am79c961_init);
+device_initcall(am79c961_init);
diff --git a/drivers/net/hamradio/baycom_epp.c b/drivers/net/hamradio/baycom_epp.c
index a3c0dc9..fc6f80e 100644
--- a/drivers/net/hamradio/baycom_epp.c
+++ b/drivers/net/hamradio/baycom_epp.c
@@ -35,6 +35,7 @@
  *                    removed some pre-2.2 kernel compatibility cruft
  *   0.6  10.08.1999  Check if parport can do SPP and is safe to access during interrupt contexts
  *   0.7  12.02.2000  adapted to softnet driver interface
+ *   0.8  03.18.2010  update deprecated __initcall to device_initcall
  *
  */
 
diff --git a/drivers/net/hamradio/baycom_par.c b/drivers/net/hamradio/baycom_par.c
index 5f5af9a..f2ddffa 100644
--- a/drivers/net/hamradio/baycom_par.c
+++ b/drivers/net/hamradio/baycom_par.c
@@ -64,6 +64,7 @@
  *   0.8  12.02.2000  adapted to softnet driver interface
  *                    removed direct parport access, uses parport driver methods
  *   0.9  03.07.2000  fix interface name handling
+ *   0.10 03.18.2010  update deprecated __initcall to device_initcall
  */
 
 /*****************************************************************************/
diff --git a/drivers/net/hamradio/baycom_ser_fdx.c b/drivers/net/hamradio/baycom_ser_fdx.c
index 0cab992..d90ad93 100644
--- a/drivers/net/hamradio/baycom_ser_fdx.c
+++ b/drivers/net/hamradio/baycom_ser_fdx.c
@@ -67,6 +67,7 @@
  *   0.8  10.08.1999  use module_init/module_exit
  *   0.9  12.02.2000  adapted to softnet driver interface
  *   0.10 03.07.2000  fix interface name handling
+ *   0.11 03.18.2010  update deprecated __initcall to device_initcall
  */
 
 /*****************************************************************************/
diff --git a/drivers/net/hamradio/baycom_ser_hdx.c b/drivers/net/hamradio/baycom_ser_hdx.c
index 1686f6d..3033cae 100644
--- a/drivers/net/hamradio/baycom_ser_hdx.c
+++ b/drivers/net/hamradio/baycom_ser_hdx.c
@@ -57,6 +57,7 @@
  *   0.8  10.08.1999  use module_init/module_exit
  *   0.9  12.02.2000  adapted to softnet driver interface
  *   0.10 03.07.2000  fix interface name handling
+ *   0.11 03.18.2010  update deprecated __initcall to device_initcall
  */
 
 /*****************************************************************************/
diff --git a/drivers/s390/char/sclp_cmd.c b/drivers/s390/char/sclp_cmd.c
index b3beab6..642b3bf 100644
--- a/drivers/s390/char/sclp_cmd.c
+++ b/drivers/s390/char/sclp_cmd.c
@@ -628,7 +628,7 @@ out:
 	free_page((unsigned long) sccb);
 	return rc;
 }
-__initcall(sclp_detect_standby_memory);
+device_initcall(sclp_detect_standby_memory);
 
 #endif /* CONFIG_MEMORY_HOTPLUG */
 
diff --git a/drivers/s390/char/sclp_config.c b/drivers/s390/char/sclp_config.c
index b497afe..c257eb3 100644
--- a/drivers/s390/char/sclp_config.c
+++ b/drivers/s390/char/sclp_config.c
@@ -87,4 +87,4 @@ static int __init sclp_conf_init(void)
 	return rc;
 }
 
-__initcall(sclp_conf_init);
+device_initcall(sclp_conf_init);
diff --git a/drivers/s390/char/sclp_cpi_sys.c b/drivers/s390/char/sclp_cpi_sys.c
index 62c2647..1ebb83c 100644
--- a/drivers/s390/char/sclp_cpi_sys.c
+++ b/drivers/s390/char/sclp_cpi_sys.c
@@ -426,4 +426,4 @@ static int __init cpi_init(void)
 	return rc;
 }
 
-__initcall(cpi_init);
+device_initcall(cpi_init);
diff --git a/drivers/s390/char/sclp_vt220.c b/drivers/s390/char/sclp_vt220.c
index 3796ffd..deff553 100644
--- a/drivers/s390/char/sclp_vt220.c
+++ b/drivers/s390/char/sclp_vt220.c
@@ -707,7 +707,7 @@ out_driver:
 	put_tty_driver(driver);
 	return rc;
 }
-__initcall(sclp_vt220_tty_init);
+device_initcall(sclp_vt220_tty_init);
 
 static void __sclp_vt220_flush_buffer(void)
 {
diff --git a/drivers/s390/cio/blacklist.c b/drivers/s390/cio/blacklist.c
index 7eab9ab..363fd02 100644
--- a/drivers/s390/cio/blacklist.c
+++ b/drivers/s390/cio/blacklist.c
@@ -398,6 +398,6 @@ cio_ignore_proc_init (void)
 	return 0;
 }
 
-__initcall (cio_ignore_proc_init);
+device_initcall(cio_ignore_proc_init);
 
 #endif /* CONFIG_PROC_FS */
diff --git a/drivers/staging/rtl8192u/ieee80211/api.c b/drivers/staging/rtl8192u/ieee80211/api.c
index c627d02..156d867 100644
--- a/drivers/staging/rtl8192u/ieee80211/api.c
+++ b/drivers/staging/rtl8192u/ieee80211/api.c
@@ -229,7 +229,7 @@ static int __init init_crypto(void)
 	return 0;
 }
 
-__initcall(init_crypto);
+device_initcall(init_crypto);
 
 /*
 EXPORT_SYMBOL_GPL(crypto_register_alg);
diff --git a/fs/aio.c b/fs/aio.c
index 1cf12b3..80ddf44 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -92,7 +92,7 @@ static int __init aio_setup(void)
 
 	return 0;
 }
-__initcall(aio_setup);
+device_initcall(aio_setup);
 
 static void aio_free_ring(struct kioctx *ctx)
 {
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c
index 6d55b61..b579a82 100644
--- a/fs/compat_ioctl.c
+++ b/fs/compat_ioctl.c
@@ -1780,4 +1780,4 @@ static int __init init_sys32_ioctl(void)
 		init_sys32_ioctl_cmp, NULL);
 	return 0;
 }
-__initcall(init_sys32_ioctl);
+device_initcall(init_sys32_ioctl);
diff --git a/ipc/ipc_sysctl.c b/ipc/ipc_sysctl.c
index 56410fa..3d59d44 100644
--- a/ipc/ipc_sysctl.c
+++ b/ipc/ipc_sysctl.c
@@ -209,4 +209,4 @@ static int __init ipc_sysctl_init(void)
 	return 0;
 }
 
-__initcall(ipc_sysctl_init);
+device_initcall(ipc_sysctl_init);
diff --git a/ipc/mqueue.c b/ipc/mqueue.c
index e4e3f04..c58ca57 100644
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -1322,4 +1322,4 @@ out_sysctl:
 	return error;
 }
 
-__initcall(init_mqueue_fs);
+device_initcall(init_mqueue_fs);
diff --git a/ipc/util.c b/ipc/util.c
index 79ce84e..d82ec6c 100644
--- a/ipc/util.c
+++ b/ipc/util.c
@@ -106,7 +106,7 @@ static int __init ipc_init(void)
 	register_ipcns_notifier(&init_ipc_ns);
 	return 0;
 }
-__initcall(ipc_init);
+device_initcall(ipc_init);
 
 /**
  *	ipc_init_ids		-	initialise IPC identifiers
diff --git a/kernel/audit.c b/kernel/audit.c
index 78f7f86..d489f47 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -989,7 +989,7 @@ static int __init audit_init(void)
 
 	return 0;
 }
-__initcall(audit_init);
+device_initcall(audit_init);
 
 /* Process kernel command-line parameter at boot time.  audit=0 or audit=1. */
 static int __init audit_enable(char *str)
diff --git a/kernel/audit_tree.c b/kernel/audit_tree.c
index 028e856..e54d2c6 100644
--- a/kernel/audit_tree.c
+++ b/kernel/audit_tree.c
@@ -919,4 +919,4 @@ static int __init audit_tree_init(void)
 
 	return 0;
 }
-__initcall(audit_tree_init);
+device_initcall(audit_tree_init);
diff --git a/kernel/dma.c b/kernel/dma.c
index f903189..b54e161 100644
--- a/kernel/dma.c
+++ b/kernel/dma.c
@@ -153,7 +153,7 @@ static int __init proc_dma_init(void)
 	return 0;
 }
 
-__initcall(proc_dma_init);
+device_initcall(proc_dma_init);
 #endif
 
 EXPORT_SYMBOL(request_dma);
diff --git a/kernel/futex.c b/kernel/futex.c
index e7a35f1..94efb8c 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -2670,4 +2670,4 @@ static int __init futex_init(void)
 
 	return 0;
 }
-__initcall(futex_init);
+device_initcall(futex_init);
diff --git a/kernel/lockdep_proc.c b/kernel/lockdep_proc.c
index d4aba4f..a4088c9 100644
--- a/kernel/lockdep_proc.c
+++ b/kernel/lockdep_proc.c
@@ -687,5 +687,5 @@ static int __init lockdep_proc_init(void)
 	return 0;
 }
 
-__initcall(lockdep_proc_init);
+device_initcall(lockdep_proc_init);
 
diff --git a/kernel/pid_namespace.c b/kernel/pid_namespace.c
index 79aac93..2c7b5e7 100644
--- a/kernel/pid_namespace.c
+++ b/kernel/pid_namespace.c
@@ -189,4 +189,4 @@ static __init int pid_namespaces_init(void)
 	return 0;
 }
 
-__initcall(pid_namespaces_init);
+device_initcall(pid_namespaces_init);
diff --git a/kernel/posix-cpu-timers.c b/kernel/posix-cpu-timers.c
index 1a22dfd..036d64e 100644
--- a/kernel/posix-cpu-timers.c
+++ b/kernel/posix-cpu-timers.c
@@ -1727,4 +1727,4 @@ static __init int init_posix_cpu_timers(void)
 
 	return 0;
 }
-__initcall(init_posix_cpu_timers);
+device_initcall(init_posix_cpu_timers);
diff --git a/kernel/posix-timers.c b/kernel/posix-timers.c
index 00d1fda..e8c2d04 100644
--- a/kernel/posix-timers.c
+++ b/kernel/posix-timers.c
@@ -309,7 +309,7 @@ static __init int init_posix_timers(void)
 	return 0;
 }
 
-__initcall(init_posix_timers);
+device_initcall(init_posix_timers);
 
 static void schedule_next_timer(struct k_itimer *timr)
 {
diff --git a/kernel/resource.c b/kernel/resource.c
index 2d5be5d..e678177 100644
--- a/kernel/resource.c
+++ b/kernel/resource.c
@@ -136,7 +136,7 @@ static int __init ioresources_init(void)
 	proc_create("iomem", 0, NULL, &proc_iomem_operations);
 	return 0;
 }
-__initcall(ioresources_init);
+device_initcall(ioresources_init);
 
 #endif /* CONFIG_PROC_FS */
 
diff --git a/kernel/sched_debug.c b/kernel/sched_debug.c
index 67f95aa..c17988b 100644
--- a/kernel/sched_debug.c
+++ b/kernel/sched_debug.c
@@ -379,7 +379,7 @@ static int __init init_sched_debug_procfs(void)
 	return 0;
 }
 
-__initcall(init_sched_debug_procfs);
+device_initcall(init_sched_debug_procfs);
 
 void proc_sched_show_task(struct task_struct *p, struct seq_file *m)
 {
diff --git a/kernel/time/timer_list.c b/kernel/time/timer_list.c
index bdfb8dd..962b3b2 100644
--- a/kernel/time/timer_list.c
+++ b/kernel/time/timer_list.c
@@ -296,4 +296,4 @@ static int __init init_timer_list_procfs(void)
 		return -ENOMEM;
 	return 0;
 }
-__initcall(init_timer_list_procfs);
+device_initcall(init_timer_list_procfs);
diff --git a/kernel/time/timer_stats.c b/kernel/time/timer_stats.c
index 2f3b585..517552b 100644
--- a/kernel/time/timer_stats.c
+++ b/kernel/time/timer_stats.c
@@ -422,4 +422,4 @@ static int __init init_tstats_procfs(void)
 		return -ENOMEM;
 	return 0;
 }
-__initcall(init_tstats_procfs);
+device_initcall(init_tstats_procfs);
diff --git a/kernel/tracepoint.c b/kernel/tracepoint.c
index cc89be5..c4d12e8 100644
--- a/kernel/tracepoint.c
+++ b/kernel/tracepoint.c
@@ -580,7 +580,7 @@ static int init_tracepoints(void)
 {
 	return register_module_notifier(&tracepoint_module_nb);
 }
-__initcall(init_tracepoints);
+device_initcall(init_tracepoints);
 
 #endif /* CONFIG_MODULES */
 
diff --git a/kernel/utsname_sysctl.c b/kernel/utsname_sysctl.c
index a2cd77e..7cbb001 100644
--- a/kernel/utsname_sysctl.c
+++ b/kernel/utsname_sysctl.c
@@ -111,4 +111,4 @@ static int __init utsname_sysctl_init(void)
 	return 0;
 }
 
-__initcall(utsname_sysctl_init);
+device_initcall(utsname_sysctl_init);
diff --git a/lib/audit.c b/lib/audit.c
index 8e7dc1c..26f41a9 100644
--- a/lib/audit.c
+++ b/lib/audit.c
@@ -63,4 +63,4 @@ static int __init audit_classes_init(void)
 	return 0;
 }
 
-__initcall(audit_classes_init);
+device_initcall(audit_classes_init);
diff --git a/lib/debugobjects.c b/lib/debugobjects.c
index a9a8996..ee41495 100644
--- a/lib/debugobjects.c
+++ b/lib/debugobjects.c
@@ -666,7 +666,7 @@ err:
 
 	return -ENOMEM;
 }
-__initcall(debug_objects_init_debugfs);
+device_initcall(debug_objects_init_debugfs);
 
 #else
 static inline void debug_objects_init_debugfs(void) { }
diff --git a/mm/bounce.c b/mm/bounce.c
index a2b76a5..b6df140 100644
--- a/mm/bounce.c
+++ b/mm/bounce.c
@@ -39,7 +39,7 @@ static __init int init_emergency_pool(void)
 	return 0;
 }
 
-__initcall(init_emergency_pool);
+device_initcall(init_emergency_pool);
 
 /*
  * highmem version, map in to vec
diff --git a/mm/memory.c b/mm/memory.c
index 5b7f200..b39f34e 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -3231,7 +3231,7 @@ static int __init gate_vma_init(void)
 	gate_vma.vm_flags |= VM_ALWAYSDUMP;
 	return 0;
 }
-__initcall(gate_vma_init);
+device_initcall(gate_vma_init);
 #endif
 
 struct vm_area_struct *get_gate_vma(struct task_struct *tsk)
diff --git a/mm/mm_init.c b/mm/mm_init.c
index 4e0e265..6586ce5 100644
--- a/mm/mm_init.c
+++ b/mm/mm_init.c
@@ -149,4 +149,4 @@ static int __init mm_sysfs_init(void)
 	return 0;
 }
 
-__initcall(mm_sysfs_init);
+device_initcall(mm_sysfs_init);
diff --git a/mm/slab.c b/mm/slab.c
index a9f325b..891218c 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -1597,7 +1597,7 @@ static int __init cpucache_init(void)
 		start_cpu_timer(cpu);
 	return 0;
 }
-__initcall(cpucache_init);
+device_initcall(cpucache_init);
 
 /*
  * Interface to system's page allocator. No need to hold the cache-lock.
diff --git a/mm/slub.c b/mm/slub.c
index b364844..a048aa5 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -4577,7 +4577,7 @@ static int __init slab_sysfs_init(void)
 	return 0;
 }
 
-__initcall(slab_sysfs_init);
+device_initcall(slab_sysfs_init);
 #endif
 
 /*
diff --git a/mm/swapfile.c b/mm/swapfile.c
index 6cd0a8f..c1e2b6d 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -1764,7 +1764,7 @@ static int __init procswaps_init(void)
 	proc_create("swaps", 0, NULL, &proc_swaps_operations);
 	return 0;
 }
-__initcall(procswaps_init);
+device_initcall(procswaps_init);
 #endif /* CONFIG_PROC_FS */
 
 #ifdef MAX_SWAPFILES_CHECK
diff --git a/net/ipv4/syncookies.c b/net/ipv4/syncookies.c
index 5c24db4..5bdd7d2 100644
--- a/net/ipv4/syncookies.c
+++ b/net/ipv4/syncookies.c
@@ -32,7 +32,7 @@ static __init int init_syncookies(void)
 	get_random_bytes(syncookie_secret, sizeof(syncookie_secret));
 	return 0;
 }
-__initcall(init_syncookies);
+device_initcall(init_syncookies);
 
 #define COOKIEBITS 24	/* Upper bits store count */
 #define COOKIEMASK (((__u32)1 << COOKIEBITS) - 1)
diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c
index c1bc074..6e61075 100644
--- a/net/ipv4/sysctl_net_ipv4.c
+++ b/net/ipv4/sysctl_net_ipv4.c
@@ -748,4 +748,4 @@ static __init int sysctl_ipv4_init(void)
 	return 0;
 }
 
-__initcall(sysctl_ipv4_init);
+device_initcall(sysctl_ipv4_init);
diff --git a/security/keys/proc.c b/security/keys/proc.c
index 9d01021..9412316 100644
--- a/security/keys/proc.c
+++ b/security/keys/proc.c
@@ -83,7 +83,7 @@ static int __init key_proc_init(void)
 
 } /* end key_proc_init() */
 
-__initcall(key_proc_init);
+device_initcall(key_proc_init);
 
 /*****************************************************************************/
 /*
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 5feecb4..db02af5 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -5783,7 +5783,7 @@ out:
 	return err;
 }
 
-__initcall(selinux_nf_ip_init);
+device_initcall(selinux_nf_ip_init);
 
 #ifdef CONFIG_SECURITY_SELINUX_DISABLE
 static void selinux_nf_ip_exit(void)
diff --git a/security/selinux/netif.c b/security/selinux/netif.c
index b4e14bc..9f89a94 100644
--- a/security/selinux/netif.c
+++ b/security/selinux/netif.c
@@ -315,5 +315,5 @@ static __init int sel_netif_init(void)
 	return err;
 }
 
-__initcall(sel_netif_init);
+device_initcall(sel_netif_init);
 
diff --git a/security/selinux/netlink.c b/security/selinux/netlink.c
index 1ae5564..403b707 100644
--- a/security/selinux/netlink.c
+++ b/security/selinux/netlink.c
@@ -113,4 +113,4 @@ static int __init selnl_init(void)
 	return 0;
 }
 
-__initcall(selnl_init);
+device_initcall(selnl_init);
diff --git a/security/selinux/netnode.c b/security/selinux/netnode.c
index 7100072..e7ae484 100644
--- a/security/selinux/netnode.c
+++ b/security/selinux/netnode.c
@@ -344,4 +344,4 @@ static __init int sel_netnode_init(void)
 	return ret;
 }
 
-__initcall(sel_netnode_init);
+device_initcall(sel_netnode_init);
diff --git a/security/selinux/netport.c b/security/selinux/netport.c
index fe7fba6..94c29f4 100644
--- a/security/selinux/netport.c
+++ b/security/selinux/netport.c
@@ -278,4 +278,4 @@ static __init int sel_netport_init(void)
 	return ret;
 }
 
-__initcall(sel_netport_init);
+device_initcall(sel_netport_init);
diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c
index cd191bb..03eb7d8 100644
--- a/security/selinux/selinuxfs.c
+++ b/security/selinux/selinuxfs.c
@@ -1730,7 +1730,7 @@ static int __init init_sel_fs(void)
 	return err;
 }
 
-__initcall(init_sel_fs);
+device_initcall(init_sel_fs);
 
 #ifdef CONFIG_SECURITY_SELINUX_DISABLE
 void exit_sel_fs(void)
diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c
index cf27b3e..e7eb598 100644
--- a/security/selinux/ss/services.c
+++ b/security/selinux/ss/services.c
@@ -2964,7 +2964,7 @@ static int __init aurule_init(void)
 
 	return err;
 }
-__initcall(aurule_init);
+device_initcall(aurule_init);
 
 #ifdef CONFIG_NETLABEL
 /**
diff --git a/security/smack/smackfs.c b/security/smack/smackfs.c
index aeead75..8faf43e 100644
--- a/security/smack/smackfs.c
+++ b/security/smack/smackfs.c
@@ -1366,4 +1366,4 @@ static int __init init_smk_fs(void)
 	return err;
 }
 
-__initcall(init_smk_fs);
+device_initcall(init_smk_fs);
diff --git a/sound/last.c b/sound/last.c
index bdd0857..5efc26a 100644
--- a/sound/last.c
+++ b/sound/last.c
@@ -38,4 +38,4 @@ static int __init alsa_sound_last_init(void)
 	return 0;
 }
 
-__initcall(alsa_sound_last_init);
+device_initcall(alsa_sound_last_init);
-- 
1.6.5.GIT


^ permalink raw reply related

* Re: [PATCH 1/3] pci: fix return value from pcix_get_max_mmrbc()
From: Jesse Barnes @ 2010-03-19 19:42 UTC (permalink / raw)
  To: Dean Nelson; +Cc: netdev, linux-pci
In-Reply-To: <20100310032640.6331.39506.send-patch@aqua>

On Tue, 9 Mar 2010 22:26:40 -0500
Dean Nelson <dnelson@redhat.com> wrote:

> For the PCI_X_STATUS register, pcix_get_max_mmrbc() is returning an incorrect
> value, which is based on:
> 
> 	(stat & PCI_X_STATUS_MAX_READ) >> 12
> 
> Valid return values are 512, 1024, 2048, 4096, which correspond to a 'stat'
> (masked and right shifted by 21) of 0, 1, 2, 3, respectively.
> 
> A right shift by 11 would generate the correct return value when 'stat' (masked
> and right shifted by 21) has a value of 1 or 2. But for a value of 0 or 3 it's
> not possible to generate the correct return value by only right shifting.
> 
> Fix is based on pcix_get_mmrbc()'s similar dealings with the PCI_X_CMD register.
> 
> Signed-off-by: Dean Nelson <dnelson@redhat.com>
> 
> ---
> 
>  drivers/pci/pci.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
> index 5b548ae..1decd4f 100644
> --- a/drivers/pci/pci.c
> +++ b/drivers/pci/pci.c
> @@ -2571,7 +2571,7 @@ int pcix_get_max_mmrbc(struct pci_dev *dev)
>  	if (err)
>  		return -EINVAL;
>  
> -	return (stat & PCI_X_STATUS_MAX_READ) >> 12;
> +	return 512 << ((stat & PCI_X_STATUS_MAX_READ) >> 21);
>  }
>  EXPORT_SYMBOL(pcix_get_max_mmrbc);

Applied this series, thanks Dean.

-- 
Jesse Barnes, Intel Open Source Technology Center

^ permalink raw reply

* Re: [E1000-devel] recent e100 fixes cause kernel panic?
From: Jesse Brandeburg @ 2010-03-19 19:42 UTC (permalink / raw)
  To: Ed Ravin, roger.oksanen
  Cc: e1000-devel@lists.sourceforge.net, Stephen Hemminger,
	netdev@vger.kernel.org
In-Reply-To: <12968172.251031268372359953.JavaMail.root@tahiti.vyatta.com>

Added netdev, the place to talk about in-kernel driver problems.

On Thu, 2010-03-11 at 22:39 -0700, Stephen Hemminger wrote:
> ----- "Ed Ravin" <eravin@panix.com> wrote:
> 
> > I'm using the Vyatta "kenwood" Linux distribution, which is currently
> > at 2.6.31-1.  I upgraded to their latest version, and began seeing
> > kernel
> > panics shortly after starting to use ssh/scp on the network connected
> > to
> > an e100 NIC.  I was able to reproduce the problem immediately after
> > booting up - sometimes it even crashed during the boot.
> > 
> > One of the crash logs is attached.

Ed, thanks for the report, looks like these patches introduced a new
problem.  e100 hardware has a tricky data structure that seems to cause
some problems for (particularly arm) some cpu architectures.

> > 
> > Since the problem seemed to be related to e100.c, I reverted the two
> > commits to e100.c that had taken place since I last built the kernel
> > for this box:
> > 
> >   Author: Roger Oksanen <roger.oksanen@cs.helsinki.fi>
> >   Date:   Fri Dec 18 20:18:21 2009 -0800
> >   e100: Fix broken cbs accounting due to missing memset.
> > 
> >   Author: Roger Oksanen <roger.oksanen@cs.helsinki.fi>
> >   Date:   Sun Nov 29 17:17:29 2009 -0800
> >   e100: Use pci pool to work around GFP_ATOMIC order 5 memory
> > allocation failu
> > 
> > I rebuilt the kernel and it's not panicking anymore.

so you just reverted both, and its good news things are working again,
but can you try one or the other and let us know if things still break
for you?

> The Vyatta kernel for 2.6.31 is based on the 2.6.31.10 + unionfs.
> These two patches came from the 2.6.31.10 -stable update.

This is the only report of this issue I have heard so far, so something
must be a little unique to your system or workload such that the driver
works mostly.

I'm looking more closely into the panic trace now, maybe I can figure it
out from there.

-- 
Jesse Brandeburg
This email sent via Evolution, powered by Linux


^ permalink raw reply

* ( PROPOSAL ) DOWNLOAD, READ AND GET BACK TO ME. MR.VICTOR EDWARD.
From: Mr.Victor Edward @ 2010-03-19 18:28 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 74 bytes --]


BUSSINESS PROPOSAL DOWN LOAD, READ AND GET BACK TO ME. MR.VICTOR EDWARD.

[-- Attachment #2: Confidential business proposal.jpg --]
[-- Type: image/jpeg, Size: 163944 bytes --]

^ permalink raw reply

* Re: [PATCH 1/3] mfd: add support for Janz CMOD-IO PCI MODULbus Carrier Board
From: Ira W. Snyder @ 2010-03-19 18:22 UTC (permalink / raw)
  To: Samuel Ortiz
  Cc: socketcan-core-0fE9KPoRgkgATYTw5x5z8w,
	netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20100319163849.GB30409-jcdQHdrhKHMdnm+yROfE0A@public.gmane.org>

On Fri, Mar 19, 2010 at 05:38:51PM +0100, Samuel Ortiz wrote:
> Hi Ira,
> 
> Some comments below:
> 
> On Thu, Mar 18, 2010 at 09:38:42AM -0700, Ira W. Snyder wrote:
> > +/* Module Parameters */
> > +static unsigned int num_modules = CMODIO_MAX_MODULES;
> > +static unsigned char *modules[CMODIO_MAX_MODULES] = {
> > +	"janz-ican3",
> > +	"janz-ican3",
> > +	"",
> > +	"janz-ttl",
> > +};
> That's not very nice, but I honestly dont know how to make it less ugly...
> At least this should be all left blank by default, as Wolfgang hinted.
> 

Agreed, I've made the change in my tree.

> > +/*
> > + * Subdevice Support
> > + */
> Please use the mfd-core API for building and registering platform sub devices.
> The pieces of code below should shrink significantly.
> 

Using this framework, how is it possible to create  the devices that I
do down below. For each subdevice, I need three resources:

1) MODULbus registers -- PCI BAR3 + (0x200 * module_num)
2) PLX Control Registers -- PCI BAR4
3) IRQ

Specifically, the way IORESOURCE_MEM resources are copied seems wrong.
They start at the base address of only one resource and use the offsets
provided in the struct mfd_cell. See the if-statement at
drivers/mfd/mfd-core.c line 48.

I need two use two different parent resources. The mfd_add_devices()
function doesn't support this.

> > +static int cmodio_remove_subdev(struct device *dev, void *data)
> > +{
> > +	platform_device_unregister(to_platform_device(dev));
> > +	return 0;
> > +}
> > +
> > +static void cmodio_subdev_release(struct device *dev)
> > +{
> > +	kfree(to_platform_device(dev));
> > +}
> > +
> > +static struct platform_device *cmodio_create_subdev(struct cmodio_device *priv,
> > +						    char *name,
> > +						    unsigned int res_count,
> > +						    unsigned int pdata_size)
> > +{
> > +	struct platform_device *pdev;
> > +	size_t res_size;
> > +
> > +	res_size = sizeof(struct resource) * res_count;
> > +	pdev = kzalloc(sizeof(*pdev) + res_size + pdata_size, GFP_KERNEL);
> > +	if (!pdev)
> > +		return NULL;
> > +
> > +	pdev->dev.release = cmodio_subdev_release;
> > +	pdev->dev.parent = &priv->pdev->dev;
> > +	pdev->name = name;
> > +
> > +	if (res_count) {
> > +		pdev->resource = (struct resource *)(pdev + 1);
> > +		pdev->num_resources = res_count;
> > +	}
> > +
> > +	if (pdata_size)
> > +		pdev->dev.platform_data = (void *)(pdev + 1) + res_size;
> > +
> > +	return pdev;
> > +}
> > +
> > +/* Create a memory resource for a subdevice */
> > +static void cmodio_create_mem(struct resource *parent, struct resource *res,
> > +			      resource_size_t offset, resource_size_t size)
> > +{
> > +	res->flags = IORESOURCE_MEM;
> > +	res->parent = parent;
> > +	res->start = parent->start + offset;
> > +	res->end = parent->start + offset + size - 1;
> > +}
> > +
> > +/* Create an IRQ resource for a subdevice */
> > +static void cmodio_create_irq(struct resource *res, unsigned int irq)
> > +{
> > +	res->flags = IORESOURCE_IRQ;
> > +	res->parent = NULL;
> > +	res->start = irq;
> > +	res->end = irq;
> > +}
> > +
> > +static int __devinit cmodio_probe_subdevice(struct cmodio_device *priv,
> > +					    char *name, unsigned int modno)
> > +{
> > +	struct janz_platform_data *pdata;
> > +	struct platform_device *pdev;
> > +	resource_size_t offset, size;
> > +	struct pci_dev *pci;
> > +	int ret;
> > +
> > +	pci = priv->pdev;
> > +	pdev = cmodio_create_subdev(priv, name, 3, sizeof(*pdata));
> > +	if (!pdev) {
> > +		dev_err(&pci->dev, "MODULbus slot %d alloc failed\n", modno);
> > +		ret = -ENOMEM;
> > +		goto out_return;
> > +	}
> > +
> > +	pdata = pdev->dev.platform_data;
> > +	pdata->modno = modno;
> > +	pdev->id = priv->subdev_id++;
> > +
> > +	/* MODULbus registers -- PCI BAR3 is big-endian MODULbus access */
> > +	offset = CMODIO_MODULBUS_SIZE * modno;
> > +	size = CMODIO_MODULBUS_SIZE;
> > +	cmodio_create_mem(&pci->resource[3], &pdev->resource[0], offset, size);
> > +
> > +	/* PLX Control Registers -- PCI BAR4 is interrupt and other registers */
> > +	offset = 0;
> > +	size = resource_size(&pci->resource[4]);
> > +	cmodio_create_mem(&pci->resource[4], &pdev->resource[1], offset, size);
> > +
> > +	/* IRQ */
> > +	cmodio_create_irq(&pdev->resource[2], pci->irq);
> > +
> > +	/* Register the device */
> > +	ret = platform_device_register(pdev);
> > +	if (ret) {
> > +		dev_err(&pci->dev, "MODULbus slot %d register failed\n", modno);
> > +		goto out_free;
> > +	}
> > +
> > +	return 0;
> > +
> > +out_free:
> > +	cmodio_subdev_release(&pdev->dev);
> > +out_return:
> > +	return ret;
> > +}
> > +
> > +/* Probe each submodule using kernel parameters */
> > +static int __devinit cmodio_probe_submodules(struct cmodio_device *priv)
> > +{
> > +	char *name;
> > +	int i;
> > +
> > +	for (i = 0; i < num_modules; i++) {
> > +		name = modules[i];
> > +		if (!strcmp(name, ""))
> > +			continue;
> > +
> > +		dev_dbg(&priv->pdev->dev, "MODULbus %d: name %s\n", i, name);
> > +		cmodio_probe_subdevice(priv, name, i);
> > +	}
> > +
> > +	return 0;
> > +}
> 
> 
> > +/*
> > + * PCI Driver
> > + */
> > +
> > +static int __devinit cmodio_pci_probe(struct pci_dev *dev,
> > +				      const struct pci_device_id *id)
> > +{
> > +	struct cmodio_device *priv;
> > +	int ret;
> > +
> > +	priv = kzalloc(sizeof(*priv), GFP_KERNEL);
> > +	if (!priv) {
> > +		dev_err(&dev->dev, "unable to allocate private data\n");
> > +		ret = -ENOMEM;
> > +		goto out_return;
> > +	}
> > +
> > +	pci_set_drvdata(dev, priv);
> > +	priv->pdev = dev;
> > +
> > +	/* Hardware Initialization */
> > +	ret = pci_enable_device(dev);
> > +	if (ret) {
> > +		dev_err(&dev->dev, "unable to enable device\n");
> > +		goto out_free_priv;
> > +	}
> > +
> > +	pci_set_master(dev);
> > +	ret = pci_request_regions(dev, DRV_NAME);
> > +	if (ret) {
> > +		dev_err(&dev->dev, "unable to request regions\n");
> > +		goto out_pci_disable_device;
> > +	}
> > +
> > +	/* Onboard configuration registers */
> > +	priv->ctrl = pci_ioremap_bar(dev, 4);
> Why 4 ?
> 
> 

Because that is how the device works ;) There is a comment up above that
describes them as the "PLX control registers". Are you suggesting that I
add a comment here too?

I think lots of other PCI devices just use hard-coded numbers here.
They're device specific. You won't be able to program for the device at
all if you don't know the meaning of each PCI BAR.

> > +#define PCI_VENDOR_ID_JANZ		0x13c3
> That probably belongs to pci_ids.h
> 

Should I add a patch to the series for this?

Thanks,
Ira

^ permalink raw reply

* Re: [RFC] GTSM for IPv6
From: Pekka Savola @ 2010-03-19 18:02 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: David Miller,
	YOSHIFUJI Hideaki / 吉藤英明, netdev
In-Reply-To: <20100319095640.42c8d82d@nehalam>

On Fri, 19 Mar 2010, Stephen Hemminger wrote:
> Also RFC doesn't explicitly address GTSM on IPV6.
> Maybe the RFC editors think the problem will magically no longer exist
> in IPv6 world because everyone will be using IPsec.

Hmm. When I was editing the RFC, I seem to have put in some text about 
IPv6 (i.e. difference in TTL vs Hop Count naming).  As far as I know, 
there is no other difference :-)

In IPV6_MIN_HOPS hops would seem to point toward the "number of hops" 
which is logically the opposite: 255-$value.  So maybe 
IPV6_MIN_HOPCOUNT is better. But I can live with it either way :-)

-- 
Pekka Savola                 "You each name yourselves king, yet the
Netcore Oy                    kingdom bleeds."
Systems. Networks. Security. -- George R.R. Martin: A Clash of Kings

^ permalink raw reply

* Re: Add PGM protocol support to the IP stack
From: Andi Kleen @ 2010-03-19 17:18 UTC (permalink / raw)
  To: Christoph Lameter; +Cc: David Miller, netdev, linux-kernel
In-Reply-To: <alpine.DEB.2.00.1003181245050.23010@router.home>

Christoph Lameter <cl@linux-foundation.org> writes:
>
> I know about the openpgm implementation. Openpbm does this at the user
> level and requires linking to a library. It is essentially a communication
> protocol done in user space. It has privilege issues because it has to
> create PGM packets via a raw socket.

That seems like a poor reason alone to put something into the kernel
Perhaps you rather need some way to have unpriviledged raw sockets?

The classical way to do this is to start suid root, only open
the socket and then drop privileges.

-Andi

-- 
ak@linux.intel.com -- Speaking for myself only.

^ permalink raw reply

* [RFC] GTSM for IPv6
From: Stephen Hemminger @ 2010-03-19 16:56 UTC (permalink / raw)
  To: David Miller,
	YOSHIFUJI Hideaki / 吉藤英明; +Cc: netdev

This patch implements Generalized TTL Security Mechanism for IPv6.
It is not tested, but I am putting it out to get feedback about:
  * is this the API (setsockout IPV6_MIN_HOPS) that we want to use
  * compatibility with IPv4
  * minor growth of socket packet info structure

Also RFC doesn't explicitly address GTSM on IPV6.
Maybe the RFC editors think the problem will magically no longer exist
in IPv6 world because everyone will be using IPsec.


---
 include/linux/in6.h      |    3 +++
 include/linux/ipv6.h     |    3 ++-
 net/ipv6/ipv6_sockglue.c |   12 ++++++++++++
 net/ipv6/tcp_ipv6.c      |   17 ++++++++++++++---
 4 files changed, 31 insertions(+), 4 deletions(-)

--- a/net/ipv6/tcp_ipv6.c	2010-03-19 09:05:48.038329597 -0700
+++ b/net/ipv6/tcp_ipv6.c	2010-03-19 09:51:12.293647330 -0700
@@ -349,6 +349,12 @@ static void tcp_v6_err(struct sk_buff *s
 	if (sk->sk_state == TCP_CLOSE)
 		goto out;
 
+	np = inet6_sk(sk);
+	if (ipv6_hdr(skb)->hop_limit < np->min_hops) {
+		NET_INC_STATS_BH(net, LINUX_MIB_TCPMINTTLDROP);
+		goto out;
+	}
+
 	tp = tcp_sk(sk);
 	seq = ntohl(th->seq);
 	if (sk->sk_state != TCP_LISTEN &&
@@ -357,8 +363,6 @@ static void tcp_v6_err(struct sk_buff *s
 		goto out;
 	}
 
-	np = inet6_sk(sk);
-
 	if (type == ICMPV6_PKT_TOOBIG) {
 		struct dst_entry *dst = NULL;
 
@@ -1675,6 +1679,7 @@ ipv6_pktoptions:
 static int tcp_v6_rcv(struct sk_buff *skb)
 {
 	struct tcphdr *th;
+	struct ipv6hdr *hdr;
 	struct sock *sk;
 	int ret;
 	struct net *net = dev_net(skb->dev);
@@ -1701,12 +1706,13 @@ static int tcp_v6_rcv(struct sk_buff *sk
 		goto bad_packet;
 
 	th = tcp_hdr(skb);
+	hdr = ipv6_hdr(skb);
 	TCP_SKB_CB(skb)->seq = ntohl(th->seq);
 	TCP_SKB_CB(skb)->end_seq = (TCP_SKB_CB(skb)->seq + th->syn + th->fin +
 				    skb->len - th->doff*4);
 	TCP_SKB_CB(skb)->ack_seq = ntohl(th->ack_seq);
 	TCP_SKB_CB(skb)->when = 0;
-	TCP_SKB_CB(skb)->flags = ipv6_get_dsfield(ipv6_hdr(skb));
+	TCP_SKB_CB(skb)->flags = ipv6_get_dsfield(hdr);
 	TCP_SKB_CB(skb)->sacked = 0;
 
 	sk = __inet6_lookup_skb(&tcp_hashinfo, skb, th->source, th->dest);
@@ -1717,6 +1723,11 @@ process:
 	if (sk->sk_state == TCP_TIME_WAIT)
 		goto do_time_wait;
 
+	if (hdr->hop_limit < inet6_sk(sk)->min_hops) {
+		NET_INC_STATS_BH(net, LINUX_MIB_TCPMINTTLDROP);
+		goto discard_and_relse;
+	}
+
 	if (!xfrm6_policy_check(sk, XFRM_POLICY_IN, skb))
 		goto discard_and_relse;
 
--- a/include/linux/in6.h	2010-03-19 09:40:24.788957033 -0700
+++ b/include/linux/in6.h	2010-03-19 09:41:41.432704471 -0700
@@ -265,6 +265,9 @@ struct in6_flowlabel_req {
 #define IPV6_PREFER_SRC_CGA		0x0008
 #define IPV6_PREFER_SRC_NONCGA		0x0800
 
+/* RFC5082: Generalized Ttl Security Mechanism */
+#define IPV6_MIN_HOPS		73
+
 /*
  * Multicast Routing:
  * see include/linux/mroute6.h.
--- a/include/linux/ipv6.h	2010-03-19 09:26:17.368329255 -0700
+++ b/include/linux/ipv6.h	2010-03-19 09:27:03.929206412 -0700
@@ -348,6 +348,7 @@ struct ipv6_pinfo {
 						 * 010: prefer public address
 						 * 100: prefer care-of address
 						 */
+	__u8			min_hops;
 	__u8			tclass;
 
 	__u32			dst_cookie;
--- a/net/ipv6/ipv6_sockglue.c	2010-03-19 09:35:40.488016906 -0700
+++ b/net/ipv6/ipv6_sockglue.c	2010-03-19 09:39:57.948026685 -0700
@@ -766,6 +766,14 @@ pref_skip_coa:
 
 		break;
 	    }
+	case IPV6_MIN_HOPS:
+		if (optlen < sizeof(int))
+			goto e_inval;
+		if (val < 0 || val > 255)
+			goto e_inval;
+		np->min_hops = val;
+		retv = 0;
+		break;
 	}
 
 	release_sock(sk);
@@ -1114,6 +1122,10 @@ static int do_ipv6_getsockopt(struct soc
 			val |= IPV6_PREFER_SRC_HOME;
 		break;
 
+	case IPV6_MIN_HOPS:
+		val = np->min_hops;
+		break;
+
 	default:
 		return -ENOPROTOOPT;
 	}

^ permalink raw reply

* Re: [PATCH 1/3] mfd: add support for Janz CMOD-IO PCI MODULbus Carrier Board
From: Samuel Ortiz @ 2010-03-19 16:38 UTC (permalink / raw)
  To: Ira W. Snyder; +Cc: linux-kernel, netdev, socketcan-core
In-Reply-To: <1268930324-29841-2-git-send-email-iws@ovro.caltech.edu>

Hi Ira,

Some comments below:

On Thu, Mar 18, 2010 at 09:38:42AM -0700, Ira W. Snyder wrote:
> +/* Module Parameters */
> +static unsigned int num_modules = CMODIO_MAX_MODULES;
> +static unsigned char *modules[CMODIO_MAX_MODULES] = {
> +	"janz-ican3",
> +	"janz-ican3",
> +	"",
> +	"janz-ttl",
> +};
That's not very nice, but I honestly dont know how to make it less ugly...
At least this should be all left blank by default, as Wolfgang hinted.

> +/*
> + * Subdevice Support
> + */
Please use the mfd-core API for building and registering platform sub devices.
The pieces of code below should shrink significantly.

> +static int cmodio_remove_subdev(struct device *dev, void *data)
> +{
> +	platform_device_unregister(to_platform_device(dev));
> +	return 0;
> +}
> +
> +static void cmodio_subdev_release(struct device *dev)
> +{
> +	kfree(to_platform_device(dev));
> +}
> +
> +static struct platform_device *cmodio_create_subdev(struct cmodio_device *priv,
> +						    char *name,
> +						    unsigned int res_count,
> +						    unsigned int pdata_size)
> +{
> +	struct platform_device *pdev;
> +	size_t res_size;
> +
> +	res_size = sizeof(struct resource) * res_count;
> +	pdev = kzalloc(sizeof(*pdev) + res_size + pdata_size, GFP_KERNEL);
> +	if (!pdev)
> +		return NULL;
> +
> +	pdev->dev.release = cmodio_subdev_release;
> +	pdev->dev.parent = &priv->pdev->dev;
> +	pdev->name = name;
> +
> +	if (res_count) {
> +		pdev->resource = (struct resource *)(pdev + 1);
> +		pdev->num_resources = res_count;
> +	}
> +
> +	if (pdata_size)
> +		pdev->dev.platform_data = (void *)(pdev + 1) + res_size;
> +
> +	return pdev;
> +}
> +
> +/* Create a memory resource for a subdevice */
> +static void cmodio_create_mem(struct resource *parent, struct resource *res,
> +			      resource_size_t offset, resource_size_t size)
> +{
> +	res->flags = IORESOURCE_MEM;
> +	res->parent = parent;
> +	res->start = parent->start + offset;
> +	res->end = parent->start + offset + size - 1;
> +}
> +
> +/* Create an IRQ resource for a subdevice */
> +static void cmodio_create_irq(struct resource *res, unsigned int irq)
> +{
> +	res->flags = IORESOURCE_IRQ;
> +	res->parent = NULL;
> +	res->start = irq;
> +	res->end = irq;
> +}
> +
> +static int __devinit cmodio_probe_subdevice(struct cmodio_device *priv,
> +					    char *name, unsigned int modno)
> +{
> +	struct janz_platform_data *pdata;
> +	struct platform_device *pdev;
> +	resource_size_t offset, size;
> +	struct pci_dev *pci;
> +	int ret;
> +
> +	pci = priv->pdev;
> +	pdev = cmodio_create_subdev(priv, name, 3, sizeof(*pdata));
> +	if (!pdev) {
> +		dev_err(&pci->dev, "MODULbus slot %d alloc failed\n", modno);
> +		ret = -ENOMEM;
> +		goto out_return;
> +	}
> +
> +	pdata = pdev->dev.platform_data;
> +	pdata->modno = modno;
> +	pdev->id = priv->subdev_id++;
> +
> +	/* MODULbus registers -- PCI BAR3 is big-endian MODULbus access */
> +	offset = CMODIO_MODULBUS_SIZE * modno;
> +	size = CMODIO_MODULBUS_SIZE;
> +	cmodio_create_mem(&pci->resource[3], &pdev->resource[0], offset, size);
> +
> +	/* PLX Control Registers -- PCI BAR4 is interrupt and other registers */
> +	offset = 0;
> +	size = resource_size(&pci->resource[4]);
> +	cmodio_create_mem(&pci->resource[4], &pdev->resource[1], offset, size);
> +
> +	/* IRQ */
> +	cmodio_create_irq(&pdev->resource[2], pci->irq);
> +
> +	/* Register the device */
> +	ret = platform_device_register(pdev);
> +	if (ret) {
> +		dev_err(&pci->dev, "MODULbus slot %d register failed\n", modno);
> +		goto out_free;
> +	}
> +
> +	return 0;
> +
> +out_free:
> +	cmodio_subdev_release(&pdev->dev);
> +out_return:
> +	return ret;
> +}
> +
> +/* Probe each submodule using kernel parameters */
> +static int __devinit cmodio_probe_submodules(struct cmodio_device *priv)
> +{
> +	char *name;
> +	int i;
> +
> +	for (i = 0; i < num_modules; i++) {
> +		name = modules[i];
> +		if (!strcmp(name, ""))
> +			continue;
> +
> +		dev_dbg(&priv->pdev->dev, "MODULbus %d: name %s\n", i, name);
> +		cmodio_probe_subdevice(priv, name, i);
> +	}
> +
> +	return 0;
> +}


> +/*
> + * PCI Driver
> + */
> +
> +static int __devinit cmodio_pci_probe(struct pci_dev *dev,
> +				      const struct pci_device_id *id)
> +{
> +	struct cmodio_device *priv;
> +	int ret;
> +
> +	priv = kzalloc(sizeof(*priv), GFP_KERNEL);
> +	if (!priv) {
> +		dev_err(&dev->dev, "unable to allocate private data\n");
> +		ret = -ENOMEM;
> +		goto out_return;
> +	}
> +
> +	pci_set_drvdata(dev, priv);
> +	priv->pdev = dev;
> +
> +	/* Hardware Initialization */
> +	ret = pci_enable_device(dev);
> +	if (ret) {
> +		dev_err(&dev->dev, "unable to enable device\n");
> +		goto out_free_priv;
> +	}
> +
> +	pci_set_master(dev);
> +	ret = pci_request_regions(dev, DRV_NAME);
> +	if (ret) {
> +		dev_err(&dev->dev, "unable to request regions\n");
> +		goto out_pci_disable_device;
> +	}
> +
> +	/* Onboard configuration registers */
> +	priv->ctrl = pci_ioremap_bar(dev, 4);
Why 4 ?


> +#define PCI_VENDOR_ID_JANZ		0x13c3
That probably belongs to pci_ids.h

Cheers,
Samuel.
-- 
Intel Open Source Technology Centre
http://oss.intel.com/

^ permalink raw reply

* Re: [Uclinux-dist-devel] [PATCH] can: bfin_can: switch to common Blackfin can header
From: Mike Frysinger @ 2010-03-19 16:23 UTC (permalink / raw)
  To: Hartkopp, Oliver (K-EFFI/P)
  Cc: socketcan-core-0fE9KPoRgkgATYTw5x5z8w,
	netdev-u79uwXL29TY76Z2rM5mHXA, Thuermann, Urs, Dr. (K-EFFI/I),
	David Miller, uclinux-dist-devel-ZG0+EudsQA8dtHy/vicBwGD2FQJk+8+b
In-Reply-To: <26B4E6A46012A1469B4EB3BC2A7CAAEC44EF47-2ISBvSz7ubqzqAecw3LaLo+MsED4In1V@public.gmane.org>

On Fri, Mar 19, 2010 at 02:56, Hartkopp, Oliver (K-EFFI/P) wrote:
> your patch is just a cleanup and definitely not mission-critical.

ive already explained the background for when the patch can be merged.
 please read the whole thread before jumping in.
-mike

^ permalink raw reply

* [PATCH] igb: Add support for 82576 ET2 Quad Port Server Adapter
From: Jeff Kirsher @ 2010-03-19 16:07 UTC (permalink / raw)
  To: davem; +Cc: netdev, gospo, Carolyn Wyborny, Jeff Kirsher

From: Carolyn Wyborny <carolyn.wyborny@intel.com>

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 drivers/net/igb/e1000_82575.c |    1 +
 drivers/net/igb/e1000_hw.h    |    1 +
 drivers/net/igb/igb_main.c    |    1 +
 3 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/net/igb/e1000_82575.c b/drivers/net/igb/e1000_82575.c
index 9d7fa2f..0bc990e 100644
--- a/drivers/net/igb/e1000_82575.c
+++ b/drivers/net/igb/e1000_82575.c
@@ -94,6 +94,7 @@ static s32 igb_get_invariants_82575(struct e1000_hw *hw)
 	case E1000_DEV_ID_82576_FIBER:
 	case E1000_DEV_ID_82576_SERDES:
 	case E1000_DEV_ID_82576_QUAD_COPPER:
+	case E1000_DEV_ID_82576_QUAD_COPPER_ET2:
 	case E1000_DEV_ID_82576_SERDES_QUAD:
 		mac->type = e1000_82576;
 		break;
diff --git a/drivers/net/igb/e1000_hw.h b/drivers/net/igb/e1000_hw.h
index 4480052..82a533f 100644
--- a/drivers/net/igb/e1000_hw.h
+++ b/drivers/net/igb/e1000_hw.h
@@ -41,6 +41,7 @@ struct e1000_hw;
 #define E1000_DEV_ID_82576_FIBER              0x10E6
 #define E1000_DEV_ID_82576_SERDES             0x10E7
 #define E1000_DEV_ID_82576_QUAD_COPPER        0x10E8
+#define E1000_DEV_ID_82576_QUAD_COPPER_ET2    0x1526
 #define E1000_DEV_ID_82576_NS                 0x150A
 #define E1000_DEV_ID_82576_NS_SERDES          0x1518
 #define E1000_DEV_ID_82576_SERDES_QUAD        0x150D
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index 0ed25f0..45a0e4f 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -72,6 +72,7 @@ static DEFINE_PCI_DEVICE_TABLE(igb_pci_tbl) = {
 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82576_FIBER), board_82575 },
 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82576_SERDES), board_82575 },
 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82576_SERDES_QUAD), board_82575 },
+	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82576_QUAD_COPPER_ET2), board_82575 },
 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82576_QUAD_COPPER), board_82575 },
 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82575EB_COPPER), board_82575 },
 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82575EB_FIBER_SERDES), board_82575 },


^ permalink raw reply related

* Re: [Bug 14470] New: freez in TCP stack
From: Ilpo Järvinen @ 2010-03-19 15:52 UTC (permalink / raw)
  To: Andrew Morton
  Cc: David Miller, eric.dumazet, Stephen Hemminger, Netdev, kolo,
	bugzilla-daemon
In-Reply-To: <20100318140424.aaf3ec24.akpm@linux-foundation.org>

On Thu, 18 Mar 2010, Andrew Morton wrote:

> On Wed, 02 Dec 2009 22:24:46 -0800 (PST)
> David Miller <davem@davemloft.net> wrote:
> 
> > From: "Ilpo J__rvinen" <ilpo.jarvinen@helsinki.fi>
> > Date: Thu, 26 Nov 2009 23:54:53 +0200 (EET)
> > 
> > > [PATCH] tcp: clear hints to avoid a stale one (nfs only affected?)
> > 
> > Ok, since Linus just released 2.6.32 I'm tossing this into net-next-2.6
> > so it gets wider exposure.
> > 
> > I still want to see test results from the bug reporter, and if it fixes
> > things we can toss this into -stable too.
> 
> Despite my request to take this to email, quite a few people have been
> jumping onto this report via bugzilla:
> http://bugzilla.kernel.org/show_bug.cgi?id=14470
> 
> Bit of a pita, but it'd be worth someone taking a look to ensure that
> we're all talking about the same bug.

Could one try with this debug patch:

http://marc.info/?l=linux-kernel&m=126624014117610&w=2

It should prevent crashing too.

-- 
 i.

^ permalink raw reply

* Re: [PATCH 2/3] can: add support for Janz VMOD-ICAN3 Intelligent CAN module
From: Wolfgang Grandegger @ 2010-03-19 15:45 UTC (permalink / raw)
  To: Ira W. Snyder; +Cc: linux-kernel, socketcan-core, netdev, sameo
In-Reply-To: <20100319151914.GB13672@ovro.caltech.edu>

Ira W. Snyder wrote:
> On Fri, Mar 19, 2010 at 10:01:14AM +0100, Wolfgang Grandegger wrote:
>> Hi Ira,
>>
>> we already discussed this patch on the SocketCAN mailing list and there
>> are just a few minor issues and the request to add support for the new
>> "berr-reporting" option, if feasible. See:
>>
>>   commit 52c793f24054f5dc30d228e37e0e19cc8313f086
>>   Author: Wolfgang Grandegger <wg@grandegger.com>
>>   Date:   Mon Feb 22 22:21:17 2010 +0000
>>
>>     can: netlink support for bus-error reporting and counters
>>     
>>     This patch makes the bus-error reporting configurable and allows to
>>     retrieve the CAN TX and RX bus error counters via netlink interface.
>>     I have added support for the SJA1000. The TX and RX bus error counters
>>     are also copied to the data fields 6..7 of error messages when state
>>     changes are reported.
>>
>> Should not be a big deal.
>>
> 
> I think this patch came along since my last post of the driver. I must
> have missed it. I'll try and add support.

No problem, it's really new. Just just need to enable BEI depending on
CAN_CTRLMODE_BERR_REPORTING.

>> More inline...
>>
>> Ira W. Snyder wrote:
>>> The Janz VMOD-ICAN3 is a MODULbus daughterboard which fits onto any
>>> MODULbus carrier board. It is an intelligent CAN controller with a
>>> microcontroller and associated firmware.
>>>
>>> Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
>>> Cc: socketcan-core@lists.berlios.de
>>> Cc: netdev@vger.kernel.org
>>> ---
>>>  drivers/net/can/Kconfig      |   10 +
>>>  drivers/net/can/Makefile     |    1 +
>>>  drivers/net/can/janz-ican3.c | 1659 ++++++++++++++++++++++++++++++++++++++++++
>>>  3 files changed, 1670 insertions(+), 0 deletions(-)
>>>  create mode 100644 drivers/net/can/janz-ican3.c
>>>
>>> diff --git a/drivers/net/can/Kconfig b/drivers/net/can/Kconfig
>>> index 05b7517..2c5227c 100644
>>> --- a/drivers/net/can/Kconfig
>>> +++ b/drivers/net/can/Kconfig
>>> @@ -63,6 +63,16 @@ config CAN_BFIN
>>>  	  To compile this driver as a module, choose M here: the
>>>  	  module will be called bfin_can.
>>>  
>>> +config CAN_JANZ_ICAN3
>>> +	tristate "Janz VMOD-ICAN3 Intelligent CAN controller"
>>> +	depends on CAN_DEV && MFD_JANZ_CMODIO
>>> +	---help---
>>> +	  Driver for Janz VMOD-ICAN3 Intelligent CAN controller module, which
>>> +	  connects to a MODULbus carrier board.
>>> +
>>> +	  This driver can also be built as a module. If so, the module will be
>>> +	  called janz-ican3.ko.
>>> +
>>>  source "drivers/net/can/mscan/Kconfig"
>>>  
>>>  source "drivers/net/can/sja1000/Kconfig"
>>> diff --git a/drivers/net/can/Makefile b/drivers/net/can/Makefile
>>> index 7a702f2..9047cd0 100644
>>> --- a/drivers/net/can/Makefile
>>> +++ b/drivers/net/can/Makefile
>>> @@ -15,5 +15,6 @@ obj-$(CONFIG_CAN_AT91)		+= at91_can.o
>>>  obj-$(CONFIG_CAN_TI_HECC)	+= ti_hecc.o
>>>  obj-$(CONFIG_CAN_MCP251X)	+= mcp251x.o
>>>  obj-$(CONFIG_CAN_BFIN)		+= bfin_can.o
>>> +obj-$(CONFIG_CAN_JANZ_ICAN3)	+= janz-ican3.o
>>>  
>>>  ccflags-$(CONFIG_CAN_DEBUG_DEVICES) := -DDEBUG
>>> diff --git a/drivers/net/can/janz-ican3.c b/drivers/net/can/janz-ican3.c
>>> new file mode 100644
>>> index 0000000..94d4995
>>> --- /dev/null
>>> +++ b/drivers/net/can/janz-ican3.c
>> [snip]
>>  +struct ican3_dev {
>>> +
>>> +	/* must be the first member */
>>> +	struct can_priv can;
>>> +
>>> +	/* CAN network device */
>>> +	struct net_device *ndev;
>>> +	struct napi_struct napi;
>>> +
>>> +	/* Device for printing */
>>> +	struct device *dev;
>>> +
>>> +	/* module number */
>>> +	unsigned int num;
>>> +
>>> +	/* base address of registers and IRQ */
>>> +	struct janz_cmodio_onboard_regs __iomem *ctrl;
>>> +	struct ican3_dpm_control *dpmctrl;
>>> +	void __iomem *dpm;
>>> +	int irq;
>>> +
>>> +	/* old and new style host interface */
>>> +	unsigned int iftype;
>>> +	spinlock_t lock;
>> Please describe what the lock is used for.
>>
>>> +	/* new host interface */
>>> +	unsigned int rx_int;
>>> +	unsigned int rx_num;
>>> +	unsigned int tx_num;
>>> +
>>> +	/* fast host interface */
>>> +	unsigned int fastrx_start;
>>> +	unsigned int fastrx_int;
>>> +	unsigned int fastrx_num;
>>> +	unsigned int fasttx_start;
>>> +	unsigned int fasttx_num;
>>> +
>>> +	/* first free DPM page */
>>> +	unsigned int free_page;
>>> +};
>> [snip]
>>> +static void ican3_to_can_frame(struct ican3_dev *mod,
>>> +			       struct ican3_fast_desc *desc,
>>> +			       struct can_frame *cf)
>>> +{
>>> +	if ((desc->command & ICAN3_CAN_TYPE_MASK) == ICAN3_CAN_TYPE_SFF) {
>>> +		dev_dbg(mod->dev, "%s: old frame format\n", __func__);
>> This prints a debug message for every message which is not really
>> useful for the user. Please remove.
>>
>>> +		if (desc->data[1] & ICAN3_SFF_RTR)
>>> +			cf->can_id |= CAN_RTR_FLAG;
>>> +
>>> +		cf->can_id |= desc->data[0] << 3;
>>> +		cf->can_id |= (desc->data[1] & 0xe0) >> 5;
>>> +		cf->can_dlc = desc->data[1] & ICAN3_CAN_DLC_MASK;
>>> +		memcpy(cf->data, &desc->data[2], sizeof(cf->data));
>>> +	} else {
>>> +		dev_dbg(mod->dev, "%s: new frame format\n", __func__);
>> Ditto.
>>
>>> +		cf->can_dlc = desc->data[0] & ICAN3_CAN_DLC_MASK;
>>> +		if (desc->data[0] & ICAN3_EFF_RTR)
>>> +			cf->can_id |= CAN_RTR_FLAG;
>>> +
>>> +		if (desc->data[0] & ICAN3_EFF) {
>>> +			cf->can_id |= CAN_EFF_FLAG;
>>> +			cf->can_id |= desc->data[2] << 21; /* 28-21 */
>>> +			cf->can_id |= desc->data[3] << 13; /* 20-13 */
>>> +			cf->can_id |= desc->data[4] << 5;  /* 12-5  */
>>> +			cf->can_id |= (desc->data[5] & 0xf8) >> 3;
>>> +		} else {
>>> +			cf->can_id |= desc->data[2] << 3;  /* 10-3  */
>>> +			cf->can_id |= desc->data[3] >> 5;  /* 2-0   */
>>> +		}
>>> +
>>> +		memcpy(cf->data, &desc->data[6], sizeof(cf->data));
>>> +	}
>>> +}
>>> +
>>> +static void can_frame_to_ican3(struct ican3_dev *mod,
>>> +			       struct can_frame *cf,
>>> +			       struct ican3_fast_desc *desc)
>>> +{
>>> +	/* clear out any stale data in the descriptor */
>>> +	memset(desc->data, 0, sizeof(desc->data));
>>> +
>>> +	/* we always use the extended format, with the ECHO flag set */
>>> +	desc->command = ICAN3_CAN_TYPE_EFF;
>>> +	desc->data[0] |= cf->can_dlc;
>>> +	desc->data[1] |= ICAN3_ECHO;
>>> +
>>> +	if (cf->can_id & CAN_RTR_FLAG)
>>> +		desc->data[0] |= ICAN3_EFF_RTR;
>>> +
>>> +	/* pack the id into the correct places */
>>> +	if (cf->can_id & CAN_EFF_FLAG) {
>>> +		dev_dbg(mod->dev, "%s: extended frame\n", __func__);
>> Ditto.
>>
>>> +		desc->data[0] |= ICAN3_EFF;
>>> +		desc->data[2] = (cf->can_id & 0x1fe00000) >> 21; /* 28-21 */
>>> +		desc->data[3] = (cf->can_id & 0x001fe000) >> 13; /* 20-13 */
>>> +		desc->data[4] = (cf->can_id & 0x00001fe0) >> 5;  /* 12-5  */
>>> +		desc->data[5] = (cf->can_id & 0x0000001f) << 3;  /* 4-0   */
>>> +	} else {
>>> +		dev_dbg(mod->dev, "%s: standard frame\n", __func__);
>> Ditto.
>>
>>> +		desc->data[2] = (cf->can_id & 0x7F8) >> 3; /* bits 10-3 */
>>> +		desc->data[3] = (cf->can_id & 0x007) << 5; /* bits 2-0  */
>>> +	}
>>> +
>>> +	/* copy the data bits into the descriptor */
>>> +	memcpy(&desc->data[6], cf->data, sizeof(cf->data));
>>> +}
>> [snip]
>>> +/*
>>> + * Handle CAN Event Indication Messages from the firmware
>>> + *
>>> + * The ICAN3 firmware provides the values of some SJA1000 registers when it
>>> + * generates this message. The code below is largely copied from the
>>> + * drivers/net/can/sja1000/sja1000.c file, and adapted as necessary
>>> + */
>>> +static int ican3_handle_cevtind(struct ican3_dev *mod, struct ican3_msg *msg)
>>> +{
>>> +	struct net_device *dev = mod->ndev;
>>> +	struct net_device_stats *stats = &dev->stats;
>>> +	enum can_state state = mod->can.state;
>>> +	struct can_frame *cf;
>>> +	struct sk_buff *skb;
>>> +	u8 status, isrc;
>>> +
>>> +	/* we can only handle the SJA1000 part */
>>> +	if (msg->data[1] != CEVTIND_CHIP_SJA1000) {
>>> +		dev_err(mod->dev, "unable to handle errors on non-SJA1000\n");
>>> +		return -ENODEV;
>>> +	}
>>> +
>>> +	/* check the message length for sanity */
>>> +	if (msg->len < 6) {
>>> +		dev_err(mod->dev, "error message too short\n");
>>> +		return -EINVAL;
>>> +	}
>>> +
>>> +	skb = alloc_can_err_skb(dev, &cf);
>>> +	if (skb == NULL)
>>> +		return -ENOMEM;
>>> +
>>> +	isrc = msg->data[0];
>>> +	status = msg->data[3];
>>> +
>>> +	/* data overrun interrupt */
>>> +	if (isrc == CEVTIND_DOI || isrc == CEVTIND_LOST) {
>> Here and for the other errors below a dev_dbg() would be useful. Please
>> check sja1000.c.
>>
>>> +		cf->can_id |= CAN_ERR_CRTL;
>>> +		cf->data[1] = CAN_ERR_CRTL_RX_OVERFLOW;
>>> +		stats->rx_over_errors++;
>>> +		stats->rx_errors++;
>>> +		dev_info(mod->dev, "%s: overflow frame generated\n", __func__);
>> s/dev_info/dev_dbg/ ?
>>
> 
> Whoops, a leftover from debugging. Will change to dev_dbg().
> 
>>> +	}
>>> +
>>> +	/* error warning interrupt */
>>> +	if (isrc == CEVTIND_EI) {
>>> +		if (status & SR_BS) {
>>> +			state = CAN_STATE_BUS_OFF;
>>> +			cf->can_id |= CAN_ERR_BUSOFF;
>>> +			can_bus_off(dev);
>>> +		} else if (status & SR_ES) {
>>> +			state = CAN_STATE_ERROR_WARNING;
>>> +		} else {
>>> +			state = CAN_STATE_ERROR_ACTIVE;
>>> +		}
>>> +	}
>>> +
>>> +	/* bus error interrupt */
>>> +	if (isrc == CEVTIND_BEI) {
>>> +		u8 ecc = msg->data[2];
>> Add an empty line, please.
>>
>>> +		mod->can.can_stats.bus_error++;
>>> +		stats->rx_errors++;
>>> +		cf->can_id |= CAN_ERR_PROT | CAN_ERR_BUSERROR;
>>> +
>>> +		switch (ecc & ECC_MASK) {
>>> +		case ECC_BIT:
>>> +			cf->data[2] |= CAN_ERR_PROT_BIT;
>>> +			break;
>>> +		case ECC_FORM:
>>> +			cf->data[2] |= CAN_ERR_PROT_FORM;
>>> +			break;
>>> +		case ECC_STUFF:
>>> +			cf->data[2] |= CAN_ERR_PROT_STUFF;
>>> +			break;
>>> +		default:
>>> +			cf->data[2] |= CAN_ERR_PROT_UNSPEC;
>>> +			cf->data[3] = ecc & ECC_SEG;
>>> +			break;
>>> +		}
>>> +
>>> +		if ((ecc & ECC_DIR) == 0)
>>> +			cf->data[2] |= CAN_ERR_PROT_TX;
>>> +	}
>>> +
>>> +	if (state != mod->can.state && (state == CAN_STATE_ERROR_WARNING ||
>>> +					state == CAN_STATE_ERROR_PASSIVE)) {
>>> +		u8 rxerr = msg->data[4];
>>> +		u8 txerr = msg->data[5];
>> Ditto.
>>
>>> +		cf->can_id |= CAN_ERR_CRTL;
>>> +		if (state == CAN_STATE_ERROR_WARNING) {
>>> +			mod->can.can_stats.error_warning++;
>>> +			cf->data[1] = (txerr > rxerr) ?
>>> +				CAN_ERR_CRTL_TX_WARNING :
>>> +				CAN_ERR_CRTL_RX_WARNING;
>>> +		} else {
>>> +			mod->can.can_stats.error_passive++;
>>> +			cf->data[1] = (txerr > rxerr) ?
>>> +				CAN_ERR_CRTL_TX_PASSIVE :
>>> +				CAN_ERR_CRTL_RX_PASSIVE;
>>> +		}
>>> +	}
>>> +
>>> +	mod->can.state = state;
>>> +	stats->rx_errors++;
>>> +	stats->rx_bytes += cf->can_dlc;
>>> +	netif_rx(skb);
>>> +	return 0;
>>> +}
>> [snip]
>>> +static irqreturn_t ican3_irq(int irq, void *dev_id)
>>> +{
>>> +	struct ican3_dev *mod = dev_id;
>>> +	u8 stat;
>>> +
>>> +	/*
>>> +	 * The interrupt status register on this device reports interrupts
>>> +	 * as zeroes instead of using ones like most other devices
>>> +	 */
>>> +	stat = ioread8(&mod->ctrl->int_disable) & (1 << mod->num);
>>> +	if (stat == (1 << mod->num))
>>> +		return IRQ_NONE;
>>> +
>>> +	dev_dbg(mod->dev, "IRQ: module %d\n", mod->num);
>> Please remove this dev_dbg() as well.
>>
>> [snip]
>>> +/*
>>> + * Startup an ICAN module, bringing it into fast mode
>>> + */
>>> +static int __devinit ican3_startup_module(struct ican3_dev *mod)
>>> +{
>>> +	int ret;
>>> +
>>> +	ret = ican3_reset_module(mod);
>>> +	if (ret) {
>>> +		dev_err(mod->dev, "unable to reset module\n");
>>> +		return ret;
>>> +	}
>>> +
>>> +	/* re-enable interrupts so we can send messages */
>>> +	iowrite8(1 << mod->num, &mod->ctrl->int_enable);
>>> +
>>> +	ret = ican3_msg_connect(mod);
>>> +	if (ret) {
>>> +		dev_err(mod->dev, "unable to connect to module\n");
>>> +		return ret;
>>> +	}
>>> +
>>> +	ican3_init_new_host_interface(mod);
>>> +	ret = ican3_msg_newhostif(mod);
>>> +	if (ret) {
>>> +		dev_err(mod->dev, "unable to switch to new-style interface\n");
>>> +		return ret;
>>> +	}
>>> +
>>> +	ret = ican3_set_termination(mod, true);
>>> +	if (ret) {
>>> +		dev_err(mod->dev, "unable to enable termination\n");
>>> +		return ret;
>>> +	}
>>
>> Could you please allow the user to disable termination, e.g. via module parameter
>> "bus_termination=0" in case he uses a cable with built-in termination.
>>
> 
> What would you think about a sysfs node instead, so it could be changed
> at runtime, on a per-daughtercard basis? Do you think enabling bus
> termination is a good default? IMO, it is a pretty safe default for most
> users.

I have no problem with the default. There should just be a way to
disable termination somehow. A dev_info(dev, "CAN bus termination
enabled") would furthermore make clear, that it's active. Setting
termination via SysFS is the better solution, of course, as it's per
device. It might even be useful to handle this in future in a common way
via CAN_CTRLMODE_BUS_TERMINATION.

Wolfgang.

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox