Jeff Kirsher [Fri, 28 Mar 2008 16:15:11 +0000 (09:15 -0700)]
e1000e: rename mc_addr_list_update
Rename this function to be consistent with function naming (verb first)
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Bruce Allan [Fri, 28 Mar 2008 16:15:03 +0000 (09:15 -0700)]
e1000e: reformat comment blocks, cosmetic changes only
Adjusting the comment blocks here to be code-style compliant. no
code changes.
Changed some copyright dates to 2008.
Indentation fixes.
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Denis V. Lunev [Thu, 27 Mar 2008 11:39:17 +0000 (14:39 +0300)]
Compilation fix for ixgbe_main.c.
Under CONFIG_DCA the compilation is broken since the commit
bd0362dde080cef377d99fa5beb5c25308c29c73 (ixgbe: Add optional
DCA infrastructure).
IXGBE_SUCCESS is not defined anywhere, replace it with 0.
Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Mariusz Kozlowski [Fri, 28 Mar 2008 21:41:29 +0000 (14:41 -0700)]
net: yellowfin parenthesis fix
The code is under unused #ifdef NO_TXSTATS branch but its better to have it
fixed.
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Daniel Walker [Fri, 28 Mar 2008 21:41:28 +0000 (14:41 -0700)]
netdev: ehea: port_lock semaphore to mutex
Convert the port_lock to a mutex. There is also some additional cleanup. The
line length inside the ehea_rereg_mrs was getting long so I made some
adjustments to shorten them.
[akpm@linux-foundation.org: dec99ification]
Signed-off-by: Daniel Walker <dwalker@mvista.com>
Cc: Christoph Raisch <raisch@de.ibm.com>
Cc: Jan-Bernd Themann <themann@de.ibm.com>
Cc: Thomas Klein <tklein@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Daniel Walker [Fri, 28 Mar 2008 21:41:28 +0000 (14:41 -0700)]
netdev: ehea: bcmc_regs semaphore to mutex
Convert the ehea_bcmc_regs.lock to a mutex.
Signed-off-by: Daniel Walker <dwalker@mvista.com>
Cc: Christoph Raisch <raisch@de.ibm.com>
Cc: Jan-Bernd Themann <themann@de.ibm.com>
Cc: Thomas Klein <tklein@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Daniel Walker [Fri, 28 Mar 2008 21:41:27 +0000 (14:41 -0700)]
netdev: ehea: locking order correction
Nested locks always need to be taken in the same order. This change factors
out the ehea_fw_handles.lock to make the locking order consistent.
Signed-off-by: Daniel Walker <dwalker@mvista.com>
Cc: Christoph Raisch <raisch@de.ibm.com>
Cc: Jan-Bernd Themann <themann@de.ibm.com>
Cc: Thomas Klein <tklein@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Daniel Walker [Fri, 28 Mar 2008 21:41:26 +0000 (14:41 -0700)]
netdev: ehea: ehea_fw_handles semaphore to mutex
Converted the ehea_fw_handles.lock to a mutex.
Signed-off-by: Daniel Walker <dwalker@mvista.com>
Cc: Christoph Raisch <raisch@de.ibm.com>
Cc: Jan-Bernd Themann <themann@de.ibm.com>
Cc: Thomas Klein <tklein@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Daniel Walker [Fri, 28 Mar 2008 21:41:26 +0000 (14:41 -0700)]
netdev: ehea: semaphore to mutex
Converted the dlpar_mem_lock. With a bit of cleanup, I converted to
DEFINE_MUTEX() instead of a runtime init. I also made the lock static.
Signed-off-by: Daniel Walker <dwalker@mvista.com>
Cc: Christoph Raisch <raisch@de.ibm.com>
Acked-by: Jan-Bernd Themann <themann@de.ibm.com>
Cc: Thomas Klein <tklein@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
S.Caglar Onur [Fri, 28 Mar 2008 21:41:25 +0000 (14:41 -0700)]
drivers/net/tokenring/3c359.c: use time_* macros
The functions time_before, time_before_eq, time_after, and time_after_eq are
more robust for comparing jiffies against other values.
So use the time_after() macro, defined in linux/jiffies.h, which deals with
wrapping correctly.
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: S.Caglar Onur <caglar@pardus.org.tr>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
S.Caglar Onur [Fri, 28 Mar 2008 21:41:24 +0000 (14:41 -0700)]
drivers/net/arcnet/arcnet.c: use time_* macros
The functions time_before, time_before_eq, time_after, and time_after_eq are
more robust for comparing jiffies against other values.
So use the time_after() macro, defined in linux/jiffies.h, which deals with
wrapping correctly.
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: S.Caglar Onur <caglar@pardus.org.tr>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Ondrej Zary [Fri, 28 Mar 2008 21:41:23 +0000 (14:41 -0700)]
3c509: convert to isa_driver and pnp_driver
Convert 3c509 driver to isa_driver and pnp_driver. The result is that
autoloading using udev and hibernation works with ISA PnP cards. It also adds
hibernation support for non-PnP ISA cards.
xcvr module parameter was removed as its value was not used.
Tested using 3 ISA cards in various combinations of PnP and non-PnP modes.
EISA and MCA only compile-tested.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
David S. Miller [Sat, 29 Mar 2008 01:22:32 +0000 (18:22 -0700)]
[NET]: Fix dev_alloc_skb() typo.
Noticed by Joe Perches.
Signed-off-by: David S. Miller <davem@davemloft.net>
Pavel Emelyanov [Fri, 28 Mar 2008 23:39:58 +0000 (16:39 -0700)]
[LIB]: Drop the pcounter itself.
The knock-out. The pcounter abstraction is not used any longer in the
kernel.
Not sure whether this should go via netdev tree, but as far as I
remember it was added via this one, and besides Eric thinks that
Andrew shouldn't mind this.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Pavel Emelyanov [Fri, 28 Mar 2008 23:39:33 +0000 (16:39 -0700)]
[SOCK]: Drop inuse pcounter from struct proto (v2).
An uppercut - do not use the pcounter on struct proto.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Pavel Emelyanov [Fri, 28 Mar 2008 23:39:10 +0000 (16:39 -0700)]
[SOCK]: Drop per-proto inuse init and fre functions (v2).
Constructive part of the set is finished here. We have to remove the
pcounter, so start with its init and free functions.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Pavel Emelyanov [Fri, 28 Mar 2008 23:38:43 +0000 (16:38 -0700)]
[SOCK]: Introduce a percpu inuse counters array (v2).
And redirect sock_prot_inuse_add and _get to use one.
As far as the dereferences are concerned. Before the patch we made
1 dereference to proto->inuse.add call, the call itself and then
called the __get_cpu_var() on a static variable. After the patch we
make a direct call, then one dereference to proto->inuse_idx and
then the same __get_cpu_var() on a still static variable. So this
patch doesn't seem to produce performance penalty on SMP.
This is not per-net yet, but I will deliberately make NET_NS=y case
separated from NET_NS=n one, since it'll cost us one-or-two more
dereferences to get the struct net and the inuse counter.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Pavel Emelyanov [Fri, 28 Mar 2008 23:38:17 +0000 (16:38 -0700)]
[SOCK]: Enumerate struct proto-s to facilitate percpu inuse accounting (v2).
The inuse counters are going to become a per-cpu array. Introduce an
index for this array on the struct proto.
To handle the case of proto register-unregister-register loop the
bitmap is used. All its bits manipulations are protected with
proto_list_lock and a sanity check for the bitmap being exhausted is
also added.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Fri, 28 Mar 2008 23:35:27 +0000 (16:35 -0700)]
[NET]: Rename inet_frag.h identifiers COMPLETE, FIRST_IN, LAST_IN to INET_FRAG_*
On Fri, 2008-03-28 at 03:24 -0700, Andrew Morton wrote:
> they should all be renamed.
Done for include/net and net
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Rami Rosen [Fri, 28 Mar 2008 23:26:45 +0000 (16:26 -0700)]
[IPV6]: Remove unused method declaration in include/net/addrconf.h.
This patches removes unused declaration of addrconf_forwarding_on() method
in include/net/addrconf.h.
Signed-off-by: Rami Rosen <ramirose@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Denys Vlasenko [Fri, 28 Mar 2008 22:57:39 +0000 (15:57 -0700)]
[NET]: Add inline intent commentary to dev_alloc_skb().
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 28 Mar 2008 22:53:11 +0000 (15:53 -0700)]
[NET]: Protect device namespace inlines with CONFIG_NET
Include sites should not be bothered by whether
CONFIG_NET is set or not when trying to include
benign files like linux/etherdevice.h et al.
From a report by Stephen Rothwell.
Signed-off-by: David S. Miller <davem@davemloft.net>
YOSHIFUJI Hideaki [Fri, 28 Mar 2008 04:37:58 +0000 (13:37 +0900)]
[IPV6] NEIGH: Optimize is_router check.
Our interest is not the whole entry of proxy neighbor but the
NTF_ROUTER flag. Let's test it explicitly.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
YOSHIFUJI Hideaki [Fri, 28 Mar 2008 03:46:53 +0000 (12:46 +0900)]
[NET] NEIGHBOUR: Extract hash/lookup functions for pneigh entries.
Extract hash function for pneigh entries from pneigh_lookup(),
__pneigh_lookup() and pneigh_delete() as pneigh_hash().
Extract core of pneigh_lookup() and __pneigh_lookup() as
__pneigh_lookup_1().
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
YOSHIFUJI Hideaki [Mon, 24 Mar 2008 09:39:10 +0000 (18:39 +0900)]
[NET] NEIGHBOUR: Make each EXPORT_SYMBOL{,_GPL}() immediately follow its function/variable.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
David S. Miller [Fri, 28 Mar 2008 01:48:56 +0000 (18:48 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/usb/rndis_host.c
drivers/net/wireless/b43/dma.c
net/ipv6/ndisc.c
David S. Miller [Fri, 28 Mar 2008 01:01:13 +0000 (18:01 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6.26
Ilpo Järvinen [Fri, 28 Mar 2008 00:54:29 +0000 (17:54 -0700)]
[SCTP]: Remove sctp_add_cmd_sf wrapper bloat
With a was number of callsites sctp_add_cmd_sf wrapper bloats
kernel by some amount. Due to unlikely tracking allyesconfig,
with the initial result were around ~7kB (thus caught my
attention) while a non-debug config produced only ~2.3kB effect.
I (ij) proposed first a patch to uninline it but Vlad responded
with a patch that removed the only sctp_add_cmd call which is
wrapped by sctp_add_cmd_sf (I wasn't sure if I could do that).
I did minor cleanup to Vlad's patch.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ilpo Järvinen [Fri, 28 Mar 2008 00:54:01 +0000 (17:54 -0700)]
[NET]: uninline skb_trim, de-bloats
Allyesconfig (v2.6.24-mm1):
-10976 209 funcs, 123 +, 11099 -, diff: -10976 --- skb_trim
Without number of debug related CONFIGs (v2.6.25-rc2-mm1):
-7360 192 funcs, 131 +, 7491 -, diff: -7360 --- skb_trim
skb_trim | +42
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ilpo Järvinen [Fri, 28 Mar 2008 00:53:31 +0000 (17:53 -0700)]
[NET]: uninline dst_release
Codiff stats (allyesconfig, v2.6.24-mm1):
-16420 187 funcs, 103 +, 16523 -, diff: -16420 --- dst_release
Without number of debug related CONFIGs (v2.6.25-rc2-mm1):
-7257 186 funcs, 70 +, 7327 -, diff: -7257 --- dst_release
dst_release | +40
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ilpo Järvinen [Fri, 28 Mar 2008 00:52:40 +0000 (17:52 -0700)]
[NET]: uninline skb_push, de-bloats a lot
Allyesconfig (v2.6.24-mm1):
-21593 356 funcs, 2418 +, 24011 -, diff: -21593 --- skb_push
Without many debug related CONFIGs (v2.6.25-rc2-mm1):
-13890 341 funcs, 189 +, 14079 -, diff: -13890 --- skb_push
skb_push | +46
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ilpo Järvinen [Fri, 28 Mar 2008 00:51:31 +0000 (17:51 -0700)]
[NET]: uninline dev_alloc_skb, de-bloats a lot
Allyesconfig (v2.6.24-mm1):
-23668 392 funcs, 104 +, 23772 -, diff: -23668 --- dev_alloc_skb
Without many debug CONFIGs (v2.6.25-rc2-mm1):
-12178 382 funcs, 157 +, 12335 -, diff: -12178 --- dev_alloc_skb
dev_alloc_skb | +37
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ilpo Järvinen [Fri, 28 Mar 2008 00:47:24 +0000 (17:47 -0700)]
[NET]: uninline skb_pull, de-bloats a lot
Allyesconfig (v2.6.24-mm1):
-28162 354 funcs, 3005 +, 31167 -, diff: -28162 --- skb_pull
Without number of debug related CONFIGs (v2.6.25-rc2-mm1):
-9697 338 funcs, 221 +, 9918 -, diff: -9697 --- skb_pull
skb_pull | +44
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ilpo Järvinen [Fri, 28 Mar 2008 00:43:41 +0000 (17:43 -0700)]
[NET]: uninline skb_put, de-bloats a lot
Allyesconfig (v2.6.24-mm1):
~500 files changed
...
869 funcs, 198 +, 111003 -, diff: -110805 --- skb_put
skb_put | +104
Without number of debug related CONFIGs (v2.6.25-rc2-mm1):
-60744 855 funcs, 861 +, 61605 -, diff: -60744 --- skb_put
skb_put | +57
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 28 Mar 2008 00:42:50 +0000 (17:42 -0700)]
[NET]: Use local_irq_{save,restore}() in napi_complete().
Based upon a lockdep report.
Since ->poll() can be invoked from netpoll with interrupts
disabled, we must not unconditionally enable interrupts
in napi_complete().
Instead we must use local_irq_{save,restore}().
Noticed by Peter Zijlstra:
<irqs disabled>
netpoll_poll()
poll_napi()
spin_trylock(&napi->poll_lock)
poll_one_napi()
napi->poll() := sky2_poll()
napi_complete()
local_irq_disable()
local_irq_enable() <--- *BUG*
<irq>
irq_exit()
do_softirq()
net_rx_action()
spin_lock(&napi->poll_lock) <--- Deadlock!
Because we still hold the lock....
Signed-off-by: David S. Miller <davem@davemloft.net>
Rami Rosen [Fri, 28 Mar 2008 00:39:19 +0000 (17:39 -0700)]
[IPV6]: Remove three unused method declarations in include/net/ipv6.h
This patch removes three unused method declarations in include/net/ipv6.h:
inet_getfrag_t(), ipv6_build_nfrag_opts() and ipv6_build_frag_opts().
Signed-off-by: Rami Rosen <ramirose@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Denis V. Lunev [Thu, 27 Mar 2008 23:55:53 +0000 (16:55 -0700)]
[NETFILTER]: Replate direct proc_fops assignment with proc_create call.
This elliminates infamous race during module loading when one could lookup
proc entry without proc_fops assigned.
Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Denis V. Lunev [Thu, 27 Mar 2008 23:53:37 +0000 (16:53 -0700)]
[PKT_SCHED]: Pass real namespace in net scheduler classifiers.
Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Thomas Graf [Thu, 27 Mar 2008 23:08:03 +0000 (16:08 -0700)]
[ESP]: Ensure IV is in linear part of the skb to avoid BUG() due to OOB access
ESP does not account for the IV size when calling pskb_may_pull() to
ensure everything it accesses directly is within the linear part of a
potential fragment. This results in a BUG() being triggered when the
both the IPv4 and IPv6 ESP stack is fed with an skb where the first
fragment ends between the end of the esp header and the end of the IV.
This bug was found by Dirk Nehring <dnehring@gmx.net> .
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Denis V. Lunev [Thu, 27 Mar 2008 21:26:30 +0000 (14:26 -0700)]
[NETNS]: Do no include NET related headers if CONFIG_NET is not set.
This fix broken compilation for 'allnoconfig'. This was introduced by
Introduced by commit
1218854afa6f659be90b748cf1bc7badee954a35 ("[NET]
NETNS: Omit seq_net_private->net without CONFIG_NET_NS.")
Signed-off-by: Denis V. Lunev <den@openvz.org>
Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Denis V. Lunev [Thu, 27 Mar 2008 21:25:53 +0000 (14:25 -0700)]
[NETNS]: Compile NET /proc support only if CONFIG_NET is set.
This fix broken compilation for 'allnoconfig'. This was introduced by
Introduced by commit
1218854afa6f659be90b748cf1bc7badee954a35 ("[NET]
NETNS: Omit seq_net_private->net without CONFIG_NET_NS.")
Signed-off-by: Denis V. Lunev <den@openvz.org>
Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Holger Schurig [Wed, 26 Mar 2008 09:04:44 +0000 (10:04 +0100)]
libertas: reduce debug output
This patch tries to make dmesg logs between different runs easier
to compare by
* removing the jiffies (use CONFIG_PRINTK_TIME if you need
timing)
* remove the line numbers, they change with each applied patch
It also changes the deprecated __FUNCTION__ to __func__ to make
checkpatch.pl happy.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 26 Mar 2008 22:21:47 +0000 (23:21 +0100)]
mac80211: reorder fields to make some structures smaller
This patch reorders some fields in various structures to have
less padding within the structures, making them smaller. It
doesn't yet make any type adjustments, but often size_t is used
for example for IE lengths which is total overkill since size_t
will be 8 bytes long on 64-bit yet the length can at most fill
a u8.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Wed, 26 Mar 2008 19:21:33 +0000 (15:21 -0400)]
prism54: correct thinko in "prism54: Convert stats_sem in a mutex"
mutex_trylock has different return code semantics than down_trylock...
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ron Rindjunsky [Wed, 26 Mar 2008 18:36:03 +0000 (20:36 +0200)]
mac80211: A-MPDU MLME use dynamic allocation
This patch alters the A-MPDU MLME in sta_info to use dynamic allocation,
thus drastically improving memory usage - from a constant ~2 Kbyte in
the previous (static) allocation to a lower limit of ~200 Byte and an upper
limit of ~2 Kbyte.
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 26 Mar 2008 13:14:55 +0000 (14:14 +0100)]
cfg80211: don't export ieee80211_get_channel
This patch makes ieee80211_get_channel a static inline defined in
cfg80211's header file which simply calls __ieee80211_get_channel
to avoid symbol clashes with the ieee80211 code.
The problem was pointed out by David Miller, thanks!
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Holger Schurig [Wed, 26 Mar 2008 12:26:55 +0000 (13:26 +0100)]
libertas: the compact flash driver is no longer experimental
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Holger Schurig [Wed, 26 Mar 2008 08:57:45 +0000 (09:57 +0100)]
libertas: remove CMD_802_11_PWR_CFG
This has nowhere been used. Note: in the firmware manual this was
documented as CMD_802_11_PA_CFG. If we ever need it, we can/should
re-implement it as a direct command.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Holger Schurig [Wed, 26 Mar 2008 08:57:14 +0000 (09:57 +0100)]
libertas: kill useless #define LBS_MONITOR_OFF 0
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Tomas Winkler [Tue, 25 Mar 2008 23:33:41 +0000 (16:33 -0700)]
iwlwifi: iwl_priv - clean up in types of members
This patch fix types of is_open and iw_mode members
of iwl_priv sturct
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Emmanuel Grumbach [Tue, 25 Mar 2008 23:33:40 +0000 (16:33 -0700)]
iwlwifi: allow a default callback for ASYNC host commands
This patch provides a default callback for ASYNC host commands instead
of calling to BUG_ON. Most of the callbacks are now just empty functions
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ron Rindjunsky [Tue, 25 Mar 2008 23:33:39 +0000 (16:33 -0700)]
mac80211: fix wrong Rx A-MPDU control via debugfs
This patch eliminate the use of buf_size as a trigger in favor of a new
flag to control Rx A-MPDU sessions through debugfs
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Tomas Winkler [Tue, 25 Mar 2008 23:33:38 +0000 (16:33 -0700)]
iwlwifi: improve NIC i/o debug prints information
This patch gives the function's caller name in case NIC
access reference count was not used by it.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Tomas Winkler [Tue, 25 Mar 2008 23:33:37 +0000 (16:33 -0700)]
iwlwifi: rename iwl-4965-io.h to iwl-io.h
This patch renames iwl-4965-io.h back to iw-io.h
it also remove 4965 from all functions it supplies
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Mohamed Abbas [Tue, 25 Mar 2008 23:33:36 +0000 (16:33 -0700)]
iwlwifi: Add led support
This patch add LEDS support to 3965 and 4965 drivers. It is based on
led trigger and class. For our drivers we needed to avoid two things.
1- We receive led trigger on/off on each Rx\Tx frame. In our driver
we can not call led command like that. In this driver once driver
receive a start of traffic it call the led command to start blinking
then we count all bytes of Tx and Rx frame, after two second we count the
blink rate of last two second then id blink rate changed we call the led
commands
2- Since we can call led command very often, we make sure we call the
led command after we receive the statistics notification so
we don't need to wake up the ucode id it is in sleep state.
This patch was tested with 4965 and 3945.
Signed-off-by: Mohamed Abbas <mabbas@linux.intel.com>
Signed-off-by: Ian Schram<ischram@telenet.be>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Tue, 25 Mar 2008 19:58:40 +0000 (15:58 -0400)]
iwlwifi: do not register bands with no supported channels
Otherwise, b/g-only devices fail in wiphy_register.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Tue, 25 Mar 2008 15:43:15 +0000 (11:43 -0400)]
mac80211: silently accept deletion of non-existant key
Otherwise, 'iwconfig wlan0 key off' with no key set results in:
Error for wireless request "Set Encode" (8B2A) :
SET failed on device wlan0 ; No such file or directory.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Benjamin Thery [Wed, 26 Mar 2008 23:53:30 +0000 (16:53 -0700)]
[NETNS][IPV6] flowlabels - make proc per namespace
Make /proc/net/ip6_flowlabel show only flow labels belonging to the
current network namespace.
Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Benjamin Thery [Wed, 26 Mar 2008 23:53:08 +0000 (16:53 -0700)]
[NETNS][IPV6] flowlabels - make flowlabels per namespace
This patch introduces a new member, fl_net, in struct ip6_flowlabel.
This allows to create labels with the same value in different namespaces.
Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Daniel Lezcano [Wed, 26 Mar 2008 23:52:32 +0000 (16:52 -0700)]
[NETNS][IPV6] anycast - handle several network namespace
Make use of the network namespace information to have this protocol to
handle several network namespace.
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Herbert Xu [Wed, 26 Mar 2008 23:51:09 +0000 (16:51 -0700)]
[IPSEC]: Fix BEET output
The IPv6 BEET output function is incorrectly including the inner
header in the payload to be protected. This causes a crash as
the packet doesn't actually have that many bytes for a second
header.
The IPv4 BEET output on the other hand is broken when it comes
to handling an inner IPv6 header since it always assumes an
inner IPv4 header.
This patch fixes both by making sure that neither BEET output
function touches the inner header at all. All access is now
done through the protocol-independent cb structure. Two new
attributes are added to make this work, the IP header length
and the IPv4 option length. They're filled in by the inner
mode's output function.
Thanks to Joakim Koskela for finding this problem.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Pavel Emelyanov [Wed, 26 Mar 2008 23:49:40 +0000 (16:49 -0700)]
[IPV6]: Fix potential net leak and oops in ipv6 routing code.
The commits
f3db4851 ([NETNS][IPV6] ip6_fib - fib6_clean_all handle several
network namespaces) and
69ddb805 ([NETNS][IPV6] route6 - Make proc entry
/proc/net/rt6_stats per namespace) made some proc files per net.
Both of them introduced potential OOPS - get_proc_net can return NULL, but
this check is lost - and a struct net leak - in case single_open() fails the
previously got net is not put.
Kill all these bugs with one patch.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Allan Stephens [Wed, 26 Mar 2008 23:48:21 +0000 (16:48 -0700)]
[TIPC]: Cosmetic cleanup of TIPC polling logic
This patch eliminates an unnecessary poll-related routine
by merging it into TIPC's main polling routine, and updates
the comments associated with this code.
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Pavel Emelyanov [Wed, 26 Mar 2008 23:27:22 +0000 (16:27 -0700)]
[VLAN]: Reduce memory consumed by vlan_groups
Currently each vlan_groupd contains 8 pointers on arrays with 512
pointers on struct net_device each :) Such a construction "in many
cases ... wastes memory".
My proposal is to allow for some of these arrays pointers be NULL,
meaning that there are no devices in it. When a new device is added
to the vlan_group, the appropriate array is allocated.
The check in vlan_group_get_device's is safe, since the pointer
vg->vlan_devices_arrays[x] can only switch from NULL to not-NULL.
The vlan_group_prealloc_vid() is guarded with rtnl lock and is
also safe.
I've checked (I hope that) all the places, that use these arrays
and found, that the register_vlan_dev is the only place, that can
put a vlan device on an empty vlan_group.
Rough calculations shows, that after the patch a setup with a
single vlan dev (or up to 512 vlans with sequential vids) will
occupy approximately 8 times less memory.
The question I have is - does this patch makes sense, or a totally
new structures are required to store the vlan_devs?
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
David S. Miller [Wed, 26 Mar 2008 23:09:43 +0000 (16:09 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6
Pavel Emelyanov [Wed, 26 Mar 2008 09:27:09 +0000 (02:27 -0700)]
[ICMP]: Dst entry leak in icmp_send host re-lookup code (v2).
Commit
8b7817f3a959ed99d7443afc12f78a7e1fcc2063 ([IPSEC]: Add ICMP host
relookup support) introduced some dst leaks on error paths: the rt
pointer can be forgotten to be put. Fix it bu going to a proper label.
Found after net namespace's lo refused to unregister :) Many thanks to
Den for valuable help during debugging.
Herbert pointed out, that xfrm_lookup() will put the rtable in case
of error itself, so the first goto fix is redundant.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Pavel Emelyanov [Wed, 26 Mar 2008 09:19:25 +0000 (02:19 -0700)]
[NETNS][ICMP]: Build fix for NET_NS=n case (dev->nd_net is omitted).
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Robert P. J. Day [Wed, 26 Mar 2008 09:14:38 +0000 (02:14 -0700)]
[AX25]: Remove obsolete references to BKL from TODO file.
Given that there are no apparent calls to lock_kernel() or
unlock_kernel() under net/ax25, delete the TODO reference related to
that.
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
Patrick McHardy [Wed, 26 Mar 2008 09:12:11 +0000 (02:12 -0700)]
[NET]: Fix multicast device ioctl checks
SIOCADDMULTI/SIOCDELMULTI check whether the driver has a set_multicast_list
method to determine whether it supports multicast. Drivers implementing
secondary unicast support use set_rx_mode however.
Check for both dev->set_multicast_mode and dev->set_rx_mode to determine
multicast capabilities.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Pavel Emelyanov [Wed, 26 Mar 2008 09:00:21 +0000 (02:00 -0700)]
[NETNS][ICMP]: Use per-net sysctls in ipv4/icmp.c.
This mostly re-uses the net, used in icmp netnsization patches from Denis.
After this ICMP sysctls are completely virtualized.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Pavel Emelyanov [Wed, 26 Mar 2008 08:56:24 +0000 (01:56 -0700)]
[NETNS][ICMP]: Make ctl tables for ICMP sysctls per-net.
Add some flesh to ipv4_sysctl_init_net and ipv4_sysctl_exit_net,
i.e. copy the table, alter .data pointers and register it per-net.
Other ipv4_table's sysctls are now global, but this is going to
change once sysctl permissions patches migrate from -mm tree to
mainline in 2.6.26 merge window :)
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Pavel Emelyanov [Wed, 26 Mar 2008 08:55:37 +0000 (01:55 -0700)]
[NETNS][ICMP]: Move ICMP sysctls on struct net.
Initialization is moved to icmp_sk_init, all the places, that
refer to them use init_net for now.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Pavel Emelyanov [Wed, 26 Mar 2008 08:54:18 +0000 (01:54 -0700)]
[NETNS][ICMP]: Register pernet subsys to make ICMP sysctls per-net.
This includes adding pernet_operations, empty init and exit
hooks and a bit of changes in sysctl_ipv4_init just not to
have this part in next patches.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Wed, 26 Mar 2008 07:55:50 +0000 (00:55 -0700)]
[IRDA]: Store irnet_socket termios properly.
It should be a "struct ktermios" not a "struct termios".
Based upon a build warning reported by Stephen Rothwell.
Signed-off-by: David S. Miller <davem@davemloft.net>
Denis V. Lunev [Wed, 26 Mar 2008 07:48:17 +0000 (00:48 -0700)]
[NETNS]: Compilation warnings under CONFIG_NET_NS.
Recent commits from YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
have been introduced a several compilation warnings
'assignment discards qualifiers from pointer target type'
due to extra const modifier in the inline call parameters of
{dev|sock|twsk}_net_set.
Drop it.
Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Denis V. Lunev [Wed, 26 Mar 2008 07:47:14 +0000 (00:47 -0700)]
[NETNS]: Compilation fix for include/linux/netdevice.h.
Commit commit
c346dca10840a874240c78efe3f39acf4312a1f2
([NET] NETNS: Omit net_device->nd_net without CONFIG_NET_NS)
breaks compilation with CONFIG_NET_NS set.
Fix the typo.
Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Patrick McHardy [Wed, 26 Mar 2008 07:16:29 +0000 (00:16 -0700)]
[UML]: uml-net: don't set IFF_ALLMULTI in set_multicast_list
IFF_ALLMULTI is an indication from the network stack to the driver
to disable multicast filters, drivers should never set it directly.
Since the UML networking device doesn't have any filtering capabilites,
it doesn't the set_multicast_list function at all, it is kept so userspace
can still issue SIOCADDMULTI/SIOCDELMULTI ioctls however.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Patrick McHardy [Wed, 26 Mar 2008 07:15:17 +0000 (00:15 -0700)]
[VLAN]: Don't copy ALLMULTI/PROMISC flags from underlying device
Changing these flags requires to use dev_set_allmulti/dev_set_promiscuity
or dev_change_flags. Setting it directly causes two unwanted effects:
- the next dev_change_flags call will notice a difference between
dev->gflags and the actual flags, enable promisc/allmulti
mode and incorrectly update dev->gflags
- this keeps the underlying device in promisc/allmulti mode until
the VLAN device is deleted
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Wed, 26 Mar 2008 06:11:25 +0000 (23:11 -0700)]
Merge branch 'upstream-net26' of /linux/kernel/git/jgarzik/netdev-2.6
Andy Fleming [Mon, 24 Mar 2008 15:53:28 +0000 (10:53 -0500)]
gianfar: Fix Rx/Tx HW interrupt coalescing counter reset procedure.
- Fix Rx/Tx HW interrupt coalescing counter reset logic. Disabling
is required before resetting the counter.
- Update the Default both Rx and Tx coalescing timer
threshold. Formerly 4 is set which is equal to 1.5 frame at the line
rate of 1GbE interface, and it doesn't match to the coalescing frame
count which is set to 16. Threashold 21 is matched to frame count 16.
Signed-off-by: Dai Haruki <dai.haruki@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Andy Fleming [Mon, 24 Mar 2008 15:53:27 +0000 (10:53 -0500)]
gianfar: Only process completed frames
If the LAST bit is not set in the RxBD, it's possible we're processing
an incomplete frame, which is bad. While we're at it, add a constant
for the error bitmask, so the whole if-clause fits on one line,
and is more legible.
Signed-off-by: Dai Haruki <dai.haruki@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Dai Haruki [Mon, 24 Mar 2008 15:53:26 +0000 (10:53 -0500)]
gianfar: Fix frame size calculation when hardware VLAN acceleration is on
In gfar_change_mtu(), the frame size needs to be increased to account
for the extra 4 bytes VLAN adds to the ethernet header. However,
it was being increased by the length of the whole header (18 bytes),
which is wrong.
Signed-off-by: Dai Haruki <dai.haruki@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Dai Haruki [Mon, 24 Mar 2008 15:53:29 +0000 (10:53 -0500)]
gianfar: Fix the data buffer stashing amount
- Buffer stashing parameter change to 96 from 64 in order to cover
the Layer 4 header.
Signed-off-by: Dai Haruki <dai.haruki@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Pavel Emelyanov [Mon, 18 Feb 2008 10:55:10 +0000 (13:55 +0300)]
Use single_open instead of manual manipulations.
The code opening proc entry for each device makes the
same thing, as the single_open does, so remove the
unneeded code.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Anton Vorontsov [Tue, 4 Mar 2008 16:41:32 +0000 (19:41 +0300)]
phy/broadcom: add support for BCM5481 PHY
This patch adds support for BCM5481 PHY. Unfortunately it's hard to
get specifications for this PHY, so its special register 0x18 isn't
annotated properly (but we know it's used to set up the delays).
I've kept the magic numbers, so we'll not forget to fix it at the
first opportunity, and will name that register and its bits correctly.
p.s. also fixed the line with broken indention, introduced by
commit
03157ac31eb4a8883382a212b161d2e6c5059fbf
PHYLIB: Add BCM5482 PHY support
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Marcin Slusarz [Tue, 4 Mar 2008 23:19:20 +0000 (15:19 -0800)]
qla3xxx: convert byte order of constant instead of variable
Convert byte order of constant instead of variable which can be done at
compile time (vs run time)
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Acked-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Julia Lawall [Tue, 4 Mar 2008 23:19:19 +0000 (15:19 -0800)]
drivers/net/mv643xx_eth.c: Use FIELD_SIZEOF
Robert P.J. Day proposed to use the macro FIELD_SIZEOF in replace of code
that matches its definition.
The modification was made using the following semantic patch
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@haskernel@
@@
#include <linux/kernel.h>
@depends on haskernel@
type t;
identifier f;
@@
- (sizeof(((t*)0)->f))
+ FIELD_SIZEOF(t, f)
@depends on haskernel@
type t;
identifier f;
@@
- sizeof(((t*)0)->f)
+ FIELD_SIZEOF(t, f)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Florian Fainelli [Wed, 19 Mar 2008 16:14:51 +0000 (17:14 +0100)]
Add support the Korina (IDT RC32434) Ethernet MAC
This patch adds support for the IDT rc32434 Ethernet MAC
we can find in the IDT boards and the Mikrotik RB500.
Driver references some code from the linux-mips RB500
support.
Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Philip Rischel <rischelp@idt.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Daniel Drake [Tue, 18 Mar 2008 11:07:18 +0000 (11:07 +0000)]
forcedeth: Use round_jiffies for stats timer
This timer doesn't need to run at precise times, so round it to a whole
second to decrease wakeups.
Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Al Viro [Sun, 16 Mar 2008 22:23:14 +0000 (22:23 +0000)]
s2io annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Al Viro [Sun, 16 Mar 2008 22:43:06 +0000 (22:43 +0000)]
endianness annotations: rndis
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Al Viro [Sun, 16 Mar 2008 22:22:54 +0000 (22:22 +0000)]
annotate cxgb3 (ab)uses of skb->priority/skb->csum
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Al Viro [Sun, 16 Mar 2008 22:22:24 +0000 (22:22 +0000)]
skfp annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Al Viro [Sun, 16 Mar 2008 22:21:54 +0000 (22:21 +0000)]
misc drivers/net annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Al Viro [Wed, 19 Mar 2008 09:44:39 +0000 (09:44 +0000)]
ni52: more unbreaking
missed read*/write* plus a bunch of wrong-sized ones...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Al Viro [Wed, 19 Mar 2008 09:44:29 +0000 (09:44 +0000)]
ni52: switch to ioremap()
isa_bus_to_virt() is the wrong thing to do here; it happens
to work on i386, but only by accident. What we want is
normal ioremap/readb/etc. set - it's all in iomem.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Al Viro [Wed, 19 Mar 2008 09:44:19 +0000 (09:44 +0000)]
ni52: clean up check586()
take iscp-based testing into helper, kill the loop, stop
wanking with reassignments of priv->iscp
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Al Viro [Wed, 19 Mar 2008 09:44:09 +0000 (09:44 +0000)]
ni52: clean up initialization of priv
* initialize spinlock once
* check586() used to be done before we'd allocated ->priv; these days
it's there from the very beginning, so we don't have to play with
private copy. Consequently, we don't need to mess with reinitializing
->base, etc. afterwards.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Al Viro [Wed, 19 Mar 2008 09:43:59 +0000 (09:43 +0000)]
ni52: make ->base char __iomem *
... and store the virt address where we map the ->mem_addr, while we
are at it.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Al Viro [Wed, 19 Mar 2008 09:43:49 +0000 (09:43 +0000)]
ni52: kill the second argument of check586(), get rid of bogus pointer
Passing ISA bus address explicitly cast to char * only to cast it back to
unsigned long is dumb; so's passing it at all when it's always dev->mem_start...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>