safe/jmp/linux-2.6
14 years agotg3: Allow DMAs to cross cacheline boundaries
Matt Carlson [Fri, 13 Nov 2009 13:03:40 +0000 (13:03 +0000)]
tg3: Allow DMAs to cross cacheline boundaries

By default, the 5717 (and future chips) break up PCIe DMA packets across
cacheline boundaries.  This isn't necessary on x86.  This patch
selectively loosens the restriction.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: Use tg3_start_xmit_dma_bug for 5717 A0
Matt Carlson [Fri, 13 Nov 2009 13:03:39 +0000 (13:03 +0000)]
tg3: Use tg3_start_xmit_dma_bug for 5717 A0

The A0 revision of the 5717 has problems with short packet fragments.
It needs to use the tg3_start_xmit_dma_bug() routine.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: Add new HW_TSO_3 flag for 5717
Matt Carlson [Fri, 13 Nov 2009 13:03:38 +0000 (13:03 +0000)]
tg3: Add new HW_TSO_3 flag for 5717

The 5717 sets up TSO slightly differently in the transmit path.  It
looks like this method will be the new way of doing things.  This patch
defines a flag to indicate this.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: Refine TSO and MSI discovery
Matt Carlson [Fri, 13 Nov 2009 13:03:37 +0000 (13:03 +0000)]
tg3: Refine TSO and MSI discovery

This patch consolidates the TSO capability discovery code into its own
code block.  The code that decides whether or not to allow TSO is then
cleaned up.  Finally, the patch consolidates all MSI and MSIX
capability code into a single code block.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: Move TG3_FLG2_PROTECTED_NVRAM to tg3_flags3
Matt Carlson [Fri, 13 Nov 2009 13:03:36 +0000 (13:03 +0000)]
tg3: Move TG3_FLG2_PROTECTED_NVRAM to tg3_flags3

We need room for another TSO flag and it would be most efficient if it
resided in tg3_flags2.  This patch moves the TG3_FLG2_PROTECTED_NVRAM
to tg3_flags3 to make room.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: Napify tg3_start_xmit_dma_bug()
Matt Carlson [Fri, 13 Nov 2009 13:03:35 +0000 (13:03 +0000)]
tg3: Napify tg3_start_xmit_dma_bug()

This patch converts tg3_start_xmit_dma_bug() to accomodate multiple NAPI
instances.  This is prep work for a later patch in this series.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: Don't touch RCB nic addresses
Matt Carlson [Fri, 13 Nov 2009 13:03:34 +0000 (13:03 +0000)]
tg3: Don't touch RCB nic addresses

This patch avoids reprogramming the RCB NIC addresses for all 5755 and
later devices.  The address is incorrect for 5717 devices and should be
correct by default for all other affected devices.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: Add 5717 phy ID
Matt Carlson [Fri, 13 Nov 2009 13:03:33 +0000 (13:03 +0000)]
tg3: Add 5717 phy ID

This patch adds the 5717 phy ID.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: Optimize hard_start_xmit() return checking
Jarek Poplawski [Sun, 15 Nov 2009 07:20:12 +0000 (07:20 +0000)]
net: Optimize hard_start_xmit() return checking

Recent changes in the TX error propagation require additional checking
and masking of values returned from hard_start_xmit(), mainly to
separate cases where skb was consumed. This aim can be simplified by
changing the order of NETDEV_TX and NET_XMIT codes, because the latter
are treated similarly to negative (ERRNO) values.

After this change much simpler dev_xmit_complete() is also used in
sch_direct_xmit(), so it is moved to netdevice.h.

Additionally NET_RX definitions in netdevice.h are moved up from
between TX codes to avoid confusion while reading the TX comment.

Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoiwmc3200top: simplify the driver version
Tomas Winkler [Sat, 14 Nov 2009 08:36:36 +0000 (08:36 +0000)]
iwmc3200top: simplify the driver version

drop the version parts not needed for in-tree driver

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoiwmc3200top: use prefered style for the device table.
Tomas Winkler [Sat, 14 Nov 2009 08:36:35 +0000 (08:36 +0000)]
iwmc3200top: use prefered style for the device table.

Use device id number directly accompany with
comment rather then a #define

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: check the return value of ndo_select_queue()
Eric Dumazet [Fri, 13 Nov 2009 21:54:04 +0000 (21:54 +0000)]
net: check the return value of ndo_select_queue()

Check the return value of ndo_select_queue(). If the value isn't smaller
than the real_num_tx_queues, print a warning message, and reset it to zero.

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
----
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetxen: update MAINTAINERS
Amit Kumar Salecha [Fri, 13 Nov 2009 16:37:37 +0000 (16:37 +0000)]
netxen: update MAINTAINERS

Changing MAINTAINERS for netxen nic driver.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agomISDN: fix error return in HFCmulti_init()
Roel Kluin [Mon, 16 Nov 2009 05:18:13 +0000 (21:18 -0800)]
mISDN: fix error return in HFCmulti_init()

The returned error should stay negative

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Karsten Keil <keil@b1-systems.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoforcedeth: mac address fix
Stanislav O. Bezzubtsev [Mon, 16 Nov 2009 05:17:02 +0000 (21:17 -0800)]
forcedeth: mac address fix

Use the existing random_ether_addr() to generate random MAC
instead of doing it by-hand.

Signed-off-by: Stanislav O. Bezzubtsev <stas@lvk.cs.msu.su>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agor6040: fix version printing
Florian Fainelli [Mon, 16 Nov 2009 05:14:59 +0000 (21:14 -0800)]
r6040: fix version printing

The version string already contains the printk level
specifying it again results in the following message
being printed:
<6>r6040: RDC R6040 NAPI ...

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agohamradio/mkiss: fix typo in compat_ioctl
Arnd Bergmann [Mon, 16 Nov 2009 05:13:21 +0000 (21:13 -0800)]
hamradio/mkiss: fix typo in compat_ioctl

My last commit introduced an typo causing the
compat_ioctl function to do nothing useful.
The obvious way for an ioctl function to work
is to look at the command, not the argument first.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluet...
David S. Miller [Mon, 16 Nov 2009 04:59:34 +0000 (20:59 -0800)]
Merge branch 'master' of git://git./linux/kernel/git/holtmann/bluetooth-2.6

14 years agoBluetooth: Fix regression with L2CAP configuration in Basic Mode
Gustavo F. Padovan [Sun, 18 Oct 2009 00:41:01 +0000 (21:41 -0300)]
Bluetooth: Fix regression with L2CAP configuration in Basic Mode

Basic Mode is the default mode of operation of a L2CAP entity. In
this case the RFC (Retransmission and Flow Control) configuration
option should not be used at all.

Normally remote L2CAP implementation should just ignore this option,
but it can cause various side effects with other Bluetooth stacks
that are not capable of handling unknown options.

Signed-off-by: Gustavo F. Padovan <gustavo@las.ic.unicamp.br>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
14 years agoBluetooth: Select Basic Mode as default for SOCK_SEQPACKET
Gustavo F. Padovan [Tue, 29 Sep 2009 04:42:23 +0000 (01:42 -0300)]
Bluetooth: Select Basic Mode as default for SOCK_SEQPACKET

The default mode for SOCK_SEQPACKET is Basic Mode. So when no
mode has been specified, Basic Mode shall be used.

This is important for current application to keep working as
expected and not cause a regression.

Signed-off-by: Gustavo F. Padovan <gustavo@las.ic.unicamp.br>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
14 years agoBluetooth: Set general bonding security for ACL by default
Andrei Emeltchenko [Thu, 3 Sep 2009 09:34:19 +0000 (12:34 +0300)]
Bluetooth: Set general bonding security for ACL by default

This patch fixes double pairing issues with Secure Simple
Paring support. It was observed that when pairing with SSP
enabled, that the confirmation will be asked twice.

http://www.spinics.net/lists/linux-bluetooth/msg02473.html

This also causes bug when initiating SSP connection from
Windows Vista.

The reason is because bluetoothd does not store link keys
since HCIGETAUTHINFO returns 0. Setting default to general
bonding fixes these issues.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
14 years agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/lowpan/lowpan
David S. Miller [Sun, 15 Nov 2009 04:24:30 +0000 (20:24 -0800)]
Merge branch 'for-next' of git://git./linux/kernel/git/lowpan/lowpan

14 years agoalpha: Fixup recvmmsg syscall glue
Arnaldo Carvalho de Melo [Sat, 14 Nov 2009 17:02:48 +0000 (09:02 -0800)]
alpha: Fixup recvmmsg syscall glue

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/can: add driver for mscan family & mpc52xx_mscan
Wolfram Sang [Fri, 13 Nov 2009 06:14:52 +0000 (06:14 +0000)]
net/can: add driver for mscan family & mpc52xx_mscan

Taken from socketcan-svn, fixed remaining todos, cleaned up, tested with a
phyCORE-MPC5200B-IO and a custom board.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Wolfgang Grandegger <wg@grandegger.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoPhonet: convert routing table to RCU
Rémi Denis-Courmont [Fri, 13 Nov 2009 05:01:19 +0000 (05:01 +0000)]
Phonet: convert routing table to RCU

Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoPhonet: put protocols array under RCU
Rémi Denis-Courmont [Fri, 13 Nov 2009 05:01:18 +0000 (05:01 +0000)]
Phonet: put protocols array under RCU

Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetiucv: displayed TX bytes value much too high
Ursula Braun [Thu, 12 Nov 2009 21:46:30 +0000 (21:46 +0000)]
netiucv: displayed TX bytes value much too high

tx_bytes value must be updated by skb length before skb is freed.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agos390: remove cu3088 layer for lcs and ctcm
Ursula Braun [Thu, 12 Nov 2009 21:46:29 +0000 (21:46 +0000)]
s390: remove cu3088 layer for lcs and ctcm

The cu3088-driver used as common base for lcs- and ctcm-devices
makes it difficult to assign the appropriate driver to an lcs-device
or a ctcm-device. This patch eliminates the cu3088-driver and thus
the root device "cu3088". Path /sys/devices/cu3088 is replaced with
the pathes /sys/devices/lcs and /sys/devices/ctcm.

Patch is based on a proposal from Cornelia Huck.

Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoctcm: suspend has to wait for outstanding I/O
Frank Blaschka [Thu, 12 Nov 2009 21:46:28 +0000 (21:46 +0000)]
ctcm: suspend has to wait for outstanding I/O

State transition to DEV_STATE_STOPPED indicates all outstanding I/O has
finished. Add wait queue to wait for this state.

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoiucv: add work_queue cleanup for suspend
Ursula Braun [Thu, 12 Nov 2009 21:46:27 +0000 (21:46 +0000)]
iucv: add work_queue cleanup for suspend

If iucv_work_queue is not empty during kernel freeze, a kernel panic
occurs. This suspend-patch adds flushing of the work queue for
pending connection requests and severing of remaining pending
connections.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoinetpeer: Optimize inet_getid()
Eric Dumazet [Thu, 12 Nov 2009 09:33:09 +0000 (09:33 +0000)]
inetpeer: Optimize inet_getid()

While investigating for network latencies, I found inet_getid() was a
contention point for some workloads, as inet_peer_idlock is shared
by all inet_getid() users regardless of peers.

One way to fix this is to make ip_id_count an atomic_t instead
of __u16, and use atomic_add_return().

In order to keep sizeof(struct inet_peer) = 64 on 64bit arches
tcp_ts_stamp is also converted to __u32 instead of "unsigned long".

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipv6: speedup inet6_dump_addr()
Eric Dumazet [Thu, 12 Nov 2009 04:11:50 +0000 (04:11 +0000)]
ipv6: speedup inet6_dump_addr()

When handling large number of netdevices, inet6_dump_addr()
is very slow because it has O(N^2) complexity.

Instead of scanning one single list, we can use the NETDEV_HASHENTRIES
sub lists of the dev_index hash table, and RCU lookups.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoinet: fix inet_bind_bucket_for_each
Lucian Adrian Grijincu [Thu, 12 Nov 2009 05:07:26 +0000 (05:07 +0000)]
inet: fix inet_bind_bucket_for_each

The first "node" is supposed to be the cursor used in the for_each.

The second "node" is ment literally and should not be macro expanded:
it's the name of the hlist_node field from the inet_bind_bucket.

This currently works because when inet_bind_bucket_for_each is called
it's argument is still "node".

Signed-off-by: Lucian Adrian Grijincu <lgrijincu@ixiacom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipv4: speedup inet_dump_ifaddr()
Eric Dumazet [Thu, 12 Nov 2009 07:44:25 +0000 (07:44 +0000)]
ipv4: speedup inet_dump_ifaddr()

Stephen Hemminger a écrit :
> On Thu, 12 Nov 2009 15:11:36 +0100
> Eric Dumazet <eric.dumazet@gmail.com> wrote:
>
>> When handling large number of netdevices, inet_dump_ifaddr()
>> is very slow because it has O(N^2) complexity.
>>
>> Instead of scanning one single list, we can use the NETDEV_HASHENTRIES
>> sub lists of the dev_index hash table, and RCU lookups.
>>
>> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
>
> You might be able to make RCU critical section smaller by moving
> it into loop.
>

Indeed. But we dump at most one skb (<= 8192 bytes ?), so rcu_read_lock
holding time is small, unless we meet many netdevices without
addresses. I wonder if its really common...

Thanks

[PATCH net-next-2.6] ipv4: speedup inet_dump_ifaddr()

When handling large number of netdevices, inet_dump_ifaddr()
is very slow because it has O(N2) complexity.

Instead of scanning one single list, we can use the NETDEV_HASHENTRIES
sub lists of the dev_index hash table, and RCU lookups.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: Make queue pairs on single MSI-X interrupts
PJ Waskiewicz [Thu, 12 Nov 2009 23:50:43 +0000 (23:50 +0000)]
ixgbe: Make queue pairs on single MSI-X interrupts

This patch pairs similar-numbered Rx and Tx queues onto a single
MSI-X vector.  For example, Tx queue 0 and Rx queue 0's interrupt
with be ethX-RxTx-0.  This allows for more efficient cleanup, since
fewer interrupts will be firing during device operation.  It also
helps with a cleaner CPU affinity for IRQ affinity.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: Flush the LSC mask change to prevent repeated interrupts
Nelson, Shannon [Thu, 12 Nov 2009 18:47:11 +0000 (18:47 +0000)]
ixgbe: Flush the LSC mask change to prevent repeated interrupts

Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: only recycle page if it is on our numa node
Alexander Duyck [Thu, 12 Nov 2009 18:38:35 +0000 (18:38 +0000)]
igb: only recycle page if it is on our numa node

This patch makes it so that we only recycle pages when they are from the
local NUMA node.  Non-local pages are freed and replaced with locally
allocated pages.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: check for packets on all tx rings when link is down
Alexander Duyck [Thu, 12 Nov 2009 18:38:16 +0000 (18:38 +0000)]
igb: check for packets on all tx rings when link is down

We were previously only checking the first tx ring to see if it had any
packets in it when the link when down.  However we should be checking all
of the rings so this patch makes it so that all of the rings are now being
checked.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: removed unused tx/rx total bytes/packets from adapter struct
Alexander Duyck [Thu, 12 Nov 2009 18:37:56 +0000 (18:37 +0000)]
igb: removed unused tx/rx total bytes/packets from adapter struct

This patch removes unused variables total_tx_bytes, total_tx_packets,
total_rx_bytes, and total_rx_packets from the adapter struct.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: Rework how netdev->stats is handled
Alexander Duyck [Thu, 12 Nov 2009 18:37:38 +0000 (18:37 +0000)]
igb: Rework how netdev->stats is handled

This patch does some refactoring work that I felt was needed after reviewing
the changes recently submitted relating to the replacement of net_stats with
netdev->stats.

This patch essentially creates two different collections of stats.  The
first handles the adapter specific states and is stored in gstring_stats,
and the second is for netdev specific stats and is stored in
gstring_net_stats.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: when number of CPUs > 4 combine tx/rx queues to allow more queues
Alexander Duyck [Thu, 12 Nov 2009 18:37:19 +0000 (18:37 +0000)]
igb: when number of CPUs > 4 combine tx/rx queues to allow more queues

This patch makes it so that nics such as 82576 and newer can support more
hardware queues when there are more than 4 cpus by combining a tx/rx queue
pair onto one interrupt so that 8 queue pairs can be supported and thus
allow for more queues.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: move timesync init into a seperate function
Alexander Duyck [Thu, 12 Nov 2009 18:37:00 +0000 (18:37 +0000)]
igb: move timesync init into a seperate function

Current code is quite large and making igb_probe difficult to read.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: change type for ring sizes to u16 in igb_set_ring_param
Alexander Duyck [Thu, 12 Nov 2009 18:36:41 +0000 (18:36 +0000)]
igb: change type for ring sizes to u16 in igb_set_ring_param

Change the type for the ring size values to u16 and use min/max_t instead of
min/max.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoARM: fix bug of checking on signed return value using unsigned statement in w90p910...
Wan ZongShun [Wed, 11 Nov 2009 04:35:22 +0000 (04:35 +0000)]
ARM: fix bug of checking on signed return value using unsigned statement in w90p910 platform

To fix the bug of checking on signed return value using unsigned statement.
Thanks Roel Kluin for digging out it.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigmp: Use next_net_device_rcu()
Eric Dumazet [Wed, 11 Nov 2009 17:48:52 +0000 (17:48 +0000)]
igmp: Use next_net_device_rcu()

We need to use next_det_device_rcu() in RCU protected section.

We also can avoid in_dev_get()/in_dev_put() overhead (code size mainly)
in rcu_read_lock() sections.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipv6: use RCU to walk list of network devices
Eric Dumazet [Wed, 11 Nov 2009 17:34:30 +0000 (17:34 +0000)]
ipv6: use RCU to walk list of network devices

No longer need read_lock(&dev_base_lock), use RCU instead.
We also can avoid taking references on inet6_dev structs.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: TCP_MSS_DEFAULT, TCP_MSS_DESIRED
William Allen Simpson [Tue, 10 Nov 2009 09:51:18 +0000 (09:51 +0000)]
net: TCP_MSS_DEFAULT, TCP_MSS_DESIRED

Define two symbols needed in both kernel and user space.

Remove old (somewhat incorrect) kernel variant that wasn't used in
most cases.  Default should apply to both RMSS and SMSS (RFC2581).

Replace numeric constants with defined symbols.

Stand-alone patch, originally developed for TCPCT.

Signed-off-by: William.Allen.Simpson@gmail.com
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agor8169: Fix receive buffer length when MTU is between 1515 and 1536
Raimonds Cicans [Fri, 13 Nov 2009 10:52:19 +0000 (10:52 +0000)]
r8169: Fix receive buffer length when MTU is between 1515 and 1536

In r8169 driver MTU is used to calculate receive buffer size.
Receive buffer size is used to configure hardware incoming packet filter.

For jumbo frames:
Receive buffer size = Max frame size = MTU + 14 (ethernet header) + 4
(vlan header) + 4 (ethernet checksum) = MTU + 22

Bug:
driver for all MTU up to 1536 use receive buffer size 1536

As you can see from formula, this mean all IP packets > 1536 - 22
(for vlan tagged, 1536 - 18 for not tagged) are dropped by hardware
filter.

Example:

host_good>  ifconfig eth0 mtu 1536
host_r8169> ifconfig eth0 mtu 1536
host_good>  ping host_r8169
Ok
host_good>  ping -s 1500 host_r8169
Fail
host_good>  ifconfig eth0 mtu 7000
host_r8169> ifconfig eth0 mtu 7000
host_good>  ping -s 1500 host_r8169
Ok

Bonus: got rid of magic number 8

Signed-off-by: Raimonds Cicans <ray@apollo.lv>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocan: add the missing netlink get_xstats_size callback
Wolfgang Grandegger [Thu, 12 Nov 2009 05:34:05 +0000 (05:34 +0000)]
can: add the missing netlink get_xstats_size callback

This patch adds the missing "get_xstats_size" callback for the
netlink interface, which is required if "fill_xstats" is used,
as pointed out by Patrick McHardy.

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocan: Fix driver Kconfig structure
Oliver Hartkopp [Thu, 12 Nov 2009 01:35:01 +0000 (01:35 +0000)]
can: Fix driver Kconfig structure

In 2.6.32-rc the new EMS USB CAN driver was contributed and added the Kconfig
entry right behind an entry of the same *vendor*. This teared the SJA1000
based driver selection into pieces.

This fix cleans up the 2.6.32-rc Kconfig files for the CAN drivers and moves
the SJA1000 and USB Kconfig portions into the belonging directories.

As there are many new CAN drivers in the queue getting this cleanup into
2.6.32-rc would massively reduce the problems for the upcoming drivers.

Thanks,
Oliver

Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net>
Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipmr: missing dev_put() on error path in vif_add()
Dan Carpenter [Wed, 11 Nov 2009 02:03:54 +0000 (02:03 +0000)]
ipmr: missing dev_put() on error path in vif_add()

The other error paths in front of this one have a dev_put() but this one
got missed.

Found by smatch static checker.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Wang Chen <ellre923@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agos2io: fixing a ethtool test that is broken
Breno Leitao [Tue, 10 Nov 2009 09:44:23 +0000 (09:44 +0000)]
s2io: fixing a ethtool test that is broken

Due commit 4b77b0a2ba27d64f58f16d8d4d48d8319dda36ff, it is not more
possible to pci_restore_state() more than once without calling
pci_save_state() in the middle.

Actually running a ethtool test on s2io makes the card inactive,
and it needs to unload/reload the module to fix.

This patch just save the state just after it restore in order to
keep the old behaviour

Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosctp: Set socket source address when additing first transport
Vlad Yasevich [Wed, 11 Nov 2009 11:54:37 +0000 (11:54 +0000)]
sctp: Set socket source address when additing first transport

Recent commits
sctp: Get rid of an extra routing lookup when adding a transport
and
sctp: Set source addresses on the association before adding transports

changed when routes are added to the sctp transports.  As such,
we didn't set the socket source address correctly when adding the first
transport.  The first transport is always the primary/active one, so
when adding it, set the socket source address.  This was causing
regression failures in SCTP tests.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosctp: Fix regression introduced by new sctp_connectx api
Vlad Yasevich [Wed, 11 Nov 2009 08:19:24 +0000 (08:19 +0000)]
sctp: Fix regression introduced by new sctp_connectx api

A new (unrealeased to the user) sctp_connectx api

c6ba68a26645dbc5029a9faa5687ebe6fcfc53e4
    sctp: support non-blocking version of the new sctp_connectx() API

introduced a regression cought by the user regression test
suite.  In particular, the API requires the user library to
re-allocate the buffer and could potentially trigger a SIGFAULT.

This change corrects that regression by passing the original
address buffer to the kernel unmodified, but still allows for
a returned association id.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosctp: Set source addresses on the association before adding transports
Vlad Yasevich [Tue, 10 Nov 2009 08:57:34 +0000 (08:57 +0000)]
sctp: Set source addresses on the association before adding transports

Recent commit 8da645e101a8c20c6073efda3c7cc74eec01b87f
sctp: Get rid of an extra routing lookup when adding a transport
introduced a regression in the connection setup.  The behavior was

different between IPv4 and IPv6.  IPv4 case ended up working because the
route lookup routing returned a NULL route, which triggered another
route lookup later in the output patch that succeeded.  In the IPv6 case,
a valid route was returned for first call, but we could not find a valid
source address at the time since the source addresses were not set on the
association yet.  Thus resulted in a hung connection.

The solution is to set the source addresses on the association prior to
adding peers.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agort2800lib: fix some typos and punctuation in comments
Thadeu Lima de Souza Cascardo [Thu, 12 Nov 2009 19:04:52 +0000 (20:04 +0100)]
rt2800lib: fix some typos and punctuation in comments

fix some typos and punctuation in comments

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
[bart: ported the change from the older patch for rt2800usb & rt61pci]
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: Fix AR_GPIO_INPUT_EN_VAL_BT_PRIORITY_BB and its shift value in 0x4054
Vasanthakumar Thiagarajan [Fri, 13 Nov 2009 09:02:40 +0000 (14:32 +0530)]
ath9k_hw: Fix AR_GPIO_INPUT_EN_VAL_BT_PRIORITY_BB and its shift value in 0x4054

The bit value of AR_GPIO_INPUT_EN_VAL_BT_PRIORITY_BB is wrong, it should
be 0x400 and the number of bits to be right shifted is 10. Having this
wrong value in 0x4054 sometimes affects bt quality on btcoex environment.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: Fix possible OOB array indexing in gen_timer_index[] on 64-bit
Vasanthakumar Thiagarajan [Fri, 13 Nov 2009 09:02:39 +0000 (14:32 +0530)]
ath9k_hw: Fix possible OOB array indexing in gen_timer_index[] on 64-bit

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agonl80211: only allow adding stations to running vlan interfaces
Felix Fietkau [Wed, 11 Nov 2009 16:23:31 +0000 (17:23 +0100)]
nl80211: only allow adding stations to running vlan interfaces

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: fix broadcast frame handling for 4-addr AP VLANs
Felix Fietkau [Wed, 11 Nov 2009 12:17:36 +0000 (13:17 +0100)]
mac80211: fix broadcast frame handling for 4-addr AP VLANs

Without this patch, broadcast frames from the station behind a
4-addr AP VLAN would be reflected back to the source.
Fix this by checking the 4-addr flag before bridging multicast
frames in the cell.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocfg80211: return channel noise via survey API
Holger Schurig [Wed, 11 Nov 2009 11:25:40 +0000 (12:25 +0100)]
cfg80211: return channel noise via survey API

This patch implements the NL80211_CMD_GET_SURVEY command and an get_survey()
ops that a driver can implement. The goal of this command is to allow a
drivers to report channel survey data (e.g. channel noise, channel
occupation).

For now, only the mechanism to report back channel noise has been
implemented.

In future, there will either be a survey-trigger command --- or the existing
scan-trigger command will be enhanced. This will allow user-space to
request survey for arbitrary channels.

Note: any driver that cannot report channel noise should not report
any value at all, e.g. made-up -92 dBm.

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocfg80211: introduce nl80211_get_ifidx()
Holger Schurig [Wed, 11 Nov 2009 10:30:02 +0000 (11:30 +0100)]
cfg80211: introduce nl80211_get_ifidx()

... which get's rid of three indentical cut-n-paste sections.

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Properly detect Ralink RT3070 devices.
Gertjan van Wingerde [Tue, 10 Nov 2009 21:41:51 +0000 (22:41 +0100)]
rt2x00: Properly detect Ralink RT3070 devices.

Allow rt2800usb to properly detect RT307X based devices, and set the appropriate chipset values.

Signed-off-by: Gertjan van Wingede <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: update copyrights to 2009
Rui Paulo [Mon, 9 Nov 2009 23:46:58 +0000 (23:46 +0000)]
mac80211: update copyrights to 2009

Signed-off-by: Rui Paulo <rpaulo@gmail.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Reviewed-by: Andrey Yurovsky <andrey@cozybit.com>
Tested-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: add nl80211/cfg80211 handling of the new mesh root mode option.
Rui Paulo [Mon, 9 Nov 2009 23:46:57 +0000 (23:46 +0000)]
mac80211: add nl80211/cfg80211 handling of the new mesh root mode option.

Signed-off-by: Rui Paulo <rpaulo@gmail.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Reviewed-by: Andrey Yurovsky <andrey@cozybit.com>
Tested-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: implement a timer to send RANN action frames
Rui Paulo [Mon, 9 Nov 2009 23:46:56 +0000 (23:46 +0000)]
mac80211: implement a timer to send RANN action frames

RANN (Root Annoucement) frame TX. Send an action frame every second
trying to build a path to all nodes on the mesh.

Signed-off-by: Rui Paulo <rpaulo@gmail.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Reviewed-by: Andrey Yurovsky <andrey@cozybit.com>
Tested-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: replace "destination" with "target" to follow the spec
Rui Paulo [Mon, 9 Nov 2009 23:46:55 +0000 (23:46 +0000)]
mac80211: replace "destination" with "target" to follow the spec

Resulting object files have the same MD5 as before.

Signed-off-by: Rui Paulo <rpaulo@gmail.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Reviewed-by: Andrey Yurovsky <andrey@cozybit.com>
Tested-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: add the DS params to the beacon
Rui Paulo [Mon, 9 Nov 2009 23:46:54 +0000 (23:46 +0000)]
mac80211: add the DS params to the beacon

Signed-off-by: Rui Paulo <rpaulo@gmail.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Reviewed-by: Andrey Yurovsky <andrey@cozybit.com>
Tested-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: fix BSSID setup for beacon frames
Rui Paulo [Mon, 9 Nov 2009 23:46:53 +0000 (23:46 +0000)]
mac80211: fix BSSID setup for beacon frames

BSSID is now set to the TA.

Signed-off-by: Rui Paulo <rpaulo@gmail.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Reviewed-by: Andrey Yurovsky <andrey@cozybit.com>
Tested-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: set the AID field correctly for mesh peer frames
Rui Paulo [Mon, 9 Nov 2009 23:46:52 +0000 (23:46 +0000)]
mac80211: set the AID field correctly for mesh peer frames

This sets the AID field correctly for mesh peer confirm frames.

Signed-off-by: Rui Paulo <rpaulo@gmail.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Reviewed-by: Andrey Yurovsky <andrey@cozybit.com>
Tested-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: properly forward the RANN IE
Rui Paulo [Mon, 9 Nov 2009 23:46:51 +0000 (23:46 +0000)]
mac80211: properly forward the RANN IE

Increase hopcount and convert metric to LE before forwarding the RANN
action frame.

Signed-off-by: Rui Paulo <rpaulo@gmail.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Reviewed-by: Andrey Yurovsky <andrey@cozybit.com>
Tested-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: update PERR frame format
Rui Paulo [Mon, 9 Nov 2009 23:46:50 +0000 (23:46 +0000)]
mac80211: update PERR frame format

Update the PERR IE frame format according to latest draft (3.03).

Signed-off-by: Rui Paulo <rpaulo@gmail.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Reviewed-by: Andrey Yurovsky <andrey@cozybit.com>
Tested-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: implement RANN processing and forwarding
Rui Paulo [Wed, 11 Nov 2009 00:01:31 +0000 (00:01 +0000)]
mac80211: implement RANN processing and forwarding

Process the RANN (Root Annoucement) Frame and try to find the HWMP
root station by sending a PREQ.

Signed-off-by: Rui Paulo <rpaulo@gmail.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Reviewed-by: Andrey Yurovsky <andrey@cozybit.com>
Tested-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoMAINTAINERS: RFKILL - Fix pattern entry missing colon
Joe Perches [Thu, 12 Nov 2009 22:55:00 +0000 (14:55 -0800)]
MAINTAINERS: RFKILL - Fix pattern entry missing colon

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agop54usb: Remove DMA buffer from stack
Larry Finger [Thu, 12 Nov 2009 00:02:29 +0000 (18:02 -0600)]
p54usb: Remove DMA buffer from stack

On 2.6.32-rc6 from wireless-testing, the following warning is emitted:

------------[ cut here ]------------
WARNING: at lib/dma-debug.c:860 check_for_stack+0xaa/0xe0()
Hardware name: HP Pavilion dv2700 Notebook PC
ehci_hcd 0000:00:02.1: DMA-API: device driver maps memory fromstack
 [addr=ffff8800b6e2bca8]
Modules linked in: <Removed>
Pid: 16378, comm: modprobe Not tainted 2.6.32-rc6-wl #244
Call Trace:
 [<ffffffff81049698>] warn_slowpath_common+0x78/0xb0
 [<ffffffff8104972c>] warn_slowpath_fmt+0x3c/0x40
 [<ffffffff811ae52a>] check_for_stack+0xaa/0xe0
 [<ffffffff811afc8d>] debug_dma_map_page+0xfd/0x170
 [<ffffffffa006297a>] usb_hcd_submit_urb+0x3da/0x9c0 [usbcore]
 [<ffffffff81076e6f>] ? lockdep_init_map+0x5f/0x5d0
 [<ffffffffa0063365>] usb_submit_urb+0xe5/0x260 [usbcore]
 [<ffffffffa0064b7e>] usb_start_wait_urb+0x5e/0xf0 [usbcore]
 [<ffffffffa0063943>] ? usb_init_urb+0x23/0x40 [usbcore]
 [<ffffffffa0064cd4>] usb_bulk_msg+0xc4/0x150 [usbcore]
 [<ffffffffa0441a91>] T.719+0x31/0x40 [p54usb]
 [<ffffffffa0441acf>] p54u_upload_firmware_3887+0x2f/0x490 [p54usb]
 [<ffffffffa049c667>] ? p54_parse_firmware+0x427/0x450 [p54common]
 <Rest of traceback removed>
---[ end trace f77df0316ddad3de ]---

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Update MAINTAINERS
Gertjan van Wingerde [Sun, 8 Nov 2009 11:31:20 +0000 (12:31 +0100)]
rt2x00: Update MAINTAINERS

Add myself to the list of maintainers for the rt2x00 driver.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoRevert "libipw: initiate cfg80211 API conversion"
John W. Linville [Fri, 13 Nov 2009 21:56:13 +0000 (16:56 -0500)]
Revert "libipw: initiate cfg80211 API conversion"

This reverts commit b8ecd988b1670035a05035c553c08331214d6603.

Due to poor API call balancing by me, this commit not only broke ipw2200
if it can't find it's firmware, it broke ipw2100 basically anytime you
removed the module.  At this point in the cycle, let's just put it back
to a sane state and try again next time...

Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agovlan/macvlan: propagate transmission state to upper layers
Patrick McHardy [Tue, 10 Nov 2009 06:14:24 +0000 (06:14 +0000)]
vlan/macvlan: propagate transmission state to upper layers

Both vlan and macvlan devices usually don't use a qdisc and immediately
queue packets to the underlying device. Propagate transmission state of
the underlying device to the upper layers so they can react on congestion
and/or inform the sending process.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: allow to propagate errors through ->ndo_hard_start_xmit()
Patrick McHardy [Tue, 10 Nov 2009 06:14:14 +0000 (06:14 +0000)]
net: allow to propagate errors through ->ndo_hard_start_xmit()

Currently the ->ndo_hard_start_xmit() callbacks are only permitted to return
one of the NETDEV_TX codes. This prevents any kind of error propagation for
virtual devices, like queue congestion of the underlying device in case of
layered devices, or unreachability in case of tunnels.

This patches changes the NET_XMIT codes to avoid clashes with the NETDEV_TX
codes and changes the two callers of dev_hard_start_xmit() to expect either
errno codes, NET_XMIT codes or NETDEV_TX codes as return value.

In case of qdisc_restart(), all non NETDEV_TX codes are mapped to NETDEV_TX_OK
since no error propagation is possible when using qdiscs. In case of
dev_queue_xmit(), the error is propagated upwards.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoniu.c: Use correct length in strncmp
Joe Perches [Mon, 9 Nov 2009 18:05:45 +0000 (18:05 +0000)]
niu.c: Use correct length in strncmp

Untested, no hardware

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotcp: provide more information on the tcp receive_queue bugs
Ilpo Järvinen [Fri, 13 Nov 2009 21:56:33 +0000 (13:56 -0800)]
tcp: provide more information on the tcp receive_queue bugs

The addition of rcv_nxt allows to discern whether the skb
was out of place or tp->copied. Also catch fancy combination
of flags if necessary (sadly we might miss the actual causer
flags as it might have already returned).

Btw, we perhaps would want to forward copied_seq in
somewhere or otherwise we might have some nice loop with
WARN stuff within but where to do that safely I don't
know at this stage until more is known (but it is not
made significantly worse by this patch).

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoieee802154: make wpan-phy class registration to subsys_initcall
Dmitry Eremin-Solenikov [Thu, 12 Nov 2009 20:58:23 +0000 (23:58 +0300)]
ieee802154: make wpan-phy class registration to subsys_initcall

Move ieee802154 initialisation to subsys_initcall call, so that
wpan-phy class is initialised before all devices (thus saving us from
oops during bootup).

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
14 years agonet/atm: move all compat_ioctl handling to atm/ioctl.c
Arnd Bergmann [Wed, 11 Nov 2009 03:45:22 +0000 (03:45 +0000)]
net/atm: move all compat_ioctl handling to atm/ioctl.c

We have two implementations of the compat_ioctl handling for ATM, the
one that we have had for ages in fs/compat_ioctl.c and the one added to
net/atm/ioctl.c by David Woodhouse. Unfortunately, both versions are
incomplete, and in practice we use a very confusing combination of the
two.

For ioctl numbers that have the same identifier on 32 and 64 bit systems,
we go directly through the compat_ioctl socket operation, for those that

differ, we do a conversion in fs/compat_ioctl.c.

This patch moves both variants into the vcc_compat_ioctl() function,
while preserving the current behaviour. It also kills off the COMPATIBLE_IOCTL
definitions that we never use here.
Doing it this way is clearly not a good solution, but I hope it is a
step into the right direction, so that someone is able to clean up this
mess for real.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/compat: fix dev_ifsioc emulation corner cases
Arnd Bergmann [Wed, 11 Nov 2009 03:39:40 +0000 (03:39 +0000)]
net/compat: fix dev_ifsioc emulation corner cases

Handling for SIOCSHWTSTAMP is broken on architectures
with a split user/kernel address space like s390,
because it passes a real user pointer while using
set_fs(KERNEL_DS).
A similar problem might arise the next time somebody
adds code to dev_ifsioc.

Split up dev_ifsioc into three separate functions for
SIOCSHWTSTAMP, SIOC*IFMAP and all other numbers so
we can get rid of set_fs in all potentially affected
cases.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Patrick Ohly <patrick.ohly@intel.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoDM9000: Wake on LAN support
Ben Dooks [Tue, 10 Nov 2009 07:22:24 +0000 (07:22 +0000)]
DM9000: Wake on LAN support

Add support for Wake on LAN (WOL) reception and waking the device up from
this signal via the ethtool interface. Currently we are only supporting
the magic-packet variant of wakeup.

WOL is enabled by specifying a second interrupt resource to the driver
which indicates where the interrupt for the WOL is being signalled. This
then enables the necessary ethtool calls to leave the device in a state
to receive WOL frames when going into suspend.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Simtec Linux Team <linux@simtec.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: r_idx not used in ixgbe_msix_clean_rx()
Ali Gholami Rudi [Tue, 10 Nov 2009 06:40:06 +0000 (06:40 +0000)]
ixgbe: r_idx not used in ixgbe_msix_clean_rx()

The values of r_idx and rx_ring are not used after the last time they
are set in ixgbe_msix_clean_rx(), so they can be removed.

Signed-off-by: Ali Gholami Rudi <ali@rudi.ir>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodecnet: convert dndev_lock to spinlock
stephen hemminger [Wed, 11 Nov 2009 07:40:36 +0000 (07:40 +0000)]
decnet: convert dndev_lock to spinlock

There is no reason for this lock to be reader/writer since
the reader only has lock held for a very brief period.
The overhead of read_lock is more expensive than spinlock.

Compile tested only, I am not a decnet user.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodecnet: add RTNL lock when reading address list
stephen hemminger [Wed, 11 Nov 2009 07:39:27 +0000 (07:39 +0000)]
decnet: add RTNL lock when reading address list

Add missing locking in the case of auto binding to the
default device. The address list might change while this code is looking
at the list.

Compile tested only, I am not a decnet user.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetdev: fold name hash properly (v3)
stephen hemminger [Tue, 10 Nov 2009 07:20:34 +0000 (07:20 +0000)]
netdev: fold name hash properly (v3)

The full_name_hash function does not produce well distributed values in
the lower bits, so most code uses hash_32() to fold it.  This is really
a bug introduced when name hashing was added, back in 2.5 when I added
name hashing.

hash_32 is all that is needed since full_name_hash returns unsigned int
which is only 32 bits on 64 bit platforms.

Also, there is no point in using hash_32 on ifindex, because the is naturally
sequential and usually well distributed.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Change version to v1.00.00.23.00.00-01.
Ron Mercer [Wed, 11 Nov 2009 12:54:06 +0000 (12:54 +0000)]
qlge: Change version to v1.00.00.23.00.00-01.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Clean up module parameter name.
Ron Mercer [Wed, 11 Nov 2009 12:54:05 +0000 (12:54 +0000)]
qlge: Clean up module parameter name.

Change it to match qlge_xxx convention.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Add asic reset to open call.
Ron Mercer [Wed, 11 Nov 2009 12:54:04 +0000 (12:54 +0000)]
qlge: Add asic reset to open call.

Force asic to known state at open().

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Do not change frame routing during suspend.
Ron Mercer [Wed, 11 Nov 2009 12:54:03 +0000 (12:54 +0000)]
qlge: Do not change frame routing during suspend.

We do not need to change the frame routing to direct all frames to the
management fifo during suspend.  This is now done by the firmware.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoclocksource/timecompare: Fix symbol exports to be GPL'd.
David S. Miller [Thu, 12 Nov 2009 03:06:30 +0000 (19:06 -0800)]
clocksource/timecompare: Fix symbol exports to be GPL'd.

Noticed by Thomas GLeixner.

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agogianfar: Revive SKB recycling
Anton Vorontsov [Tue, 10 Nov 2009 14:11:10 +0000 (14:11 +0000)]
gianfar: Revive SKB recycling

Before calling gfar_clean_tx_ring() the driver grabs an irqsave
spinlock, and then tries to recycle skbs. But since
skb_recycle_check() returns 0 with IRQs disabled, we'll never
recycle any skbs.

It appears that gfar_clean_tx_ring() and gfar_start_xmit() are
mostly idependent and can work in parallel, except when they
modify num_txbdfree.

So we can drop the lock from most sections and thus fix the skb
recycling.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agogianfar: Fix race between gfar_error() and gfar_start_xmit()
Anton Vorontsov [Tue, 10 Nov 2009 14:11:08 +0000 (14:11 +0000)]
gianfar: Fix race between gfar_error() and gfar_start_xmit()

gfar_error() can arrive at the middle of gfar_start_xmit() processing,
and so it can trigger transfers of BDs that we don't yet expect to
be transmitted.

Fix this by locking the tx queues in gfar_error().

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agogianfar: Fix thinko in gfar_set_rx_stash_index()
Anton Vorontsov [Tue, 10 Nov 2009 14:11:07 +0000 (14:11 +0000)]
gianfar: Fix thinko in gfar_set_rx_stash_index()

We obviously want to write a modified 'temp' value back to the
register, not the saved IRQ flags.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agogianfar: Fix build with CONFIG_PM=y
Anton Vorontsov [Tue, 10 Nov 2009 14:11:05 +0000 (14:11 +0000)]
gianfar: Fix build with CONFIG_PM=y

commit fba4ed030cfae7efdb6b79a57b0c5a9d72c9 ("gianfar: Add Multiple
Queue Support") introduced the following build failure:

  CC      gianfar.o
gianfar.c: In function 'gfar_restore':
gianfar.c:1249: error: request for member 'napi' in something not a structure or union

This patch fixes the issue.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agogianfar: Remove 'Interrupt problem!' warning
Anton Vorontsov [Tue, 10 Nov 2009 14:11:03 +0000 (14:11 +0000)]
gianfar: Remove 'Interrupt problem!' warning

It is OK to poll with disabled IRQs, so remove the warning.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoskbuff: Do not allow skb recycling with disabled IRQs
Anton Vorontsov [Tue, 10 Nov 2009 14:11:01 +0000 (14:11 +0000)]
skbuff: Do not allow skb recycling with disabled IRQs

NAPI drivers try to recycle SKBs in their polling routine, but we
generally don't know the context in which the polling will be called,
and the skb recycling itself may require IRQs to be enabled.

This patch adds irqs_disabled() test to the skb_recycle_check()
routine, so that we'll not let the drivers hit the skb recycling
path with IRQs disabled.

As a side effect, this patch actually disables skb recycling for some
[broken] drivers. E.g. gianfar driver grabs an irqsave spinlock during
TX ring processing, and then tries to recycle an skb, and that caused
the following badness:

nf_conntrack version 0.5.0 (1008 buckets, 4032 max)
------------[ cut here ]------------
Badness at kernel/softirq.c:143
NIP: c003e3c4 LR: c423a528 CTR: c003e344
...
NIP [c003e3c4] local_bh_enable+0x80/0xc4
LR [c423a528] destroy_conntrack+0xd4/0x13c [nf_conntrack]
Call Trace:
[c15d1b60] [c003e32c] local_bh_disable+0x1c/0x34 (unreliable)
[c15d1b70] [c423a528] destroy_conntrack+0xd4/0x13c [nf_conntrack]
[c15d1b80] [c02c6370] nf_conntrack_destroy+0x3c/0x70

Signed-off-by: David S. Miller <davem@davemloft.net>