]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
15 years agovlan: multiqueue vlan device
Eric Dumazet [Thu, 3 Sep 2009 01:03:00 +0000 (18:03 -0700)]
vlan: multiqueue vlan device

vlan devices are currently not multi-queue capable.

We can do that with a new rtnl_link_ops method,
get_tx_queues(), called from rtnl_create_link()

This new method gets num_tx_queues/real_num_tx_queues
from real device.

register_vlan_device() is also handled.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: drop_monitor: make last_rx timestamp private
Neil Horman [Wed, 2 Sep 2009 21:37:45 +0000 (14:37 -0700)]
net: drop_monitor: make last_rx timestamp private

It was recently pointed out to me that the last_rx field of the
net_device structure wasn't updated regularly.  In fact only the
bonding driver really uses it currently.  Since the drop_monitor code
relies on the last_rx field to detect drops on recevie in hardware, We
need to find a more reliable way to rate limit our drop checks (so
that we don't check for drops on every frame recevied, which would be
inefficient.  This patch makes a last_rx timestamp that is private to
the drop monitor code and is updated for every device that we track.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Wed, 2 Sep 2009 21:18:09 +0000 (14:18 -0700)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6

15 years agoath9k: Reconfigure beacon timers after the scan is completed.
Vivek Natarajan [Wed, 2 Sep 2009 10:20:55 +0000 (15:50 +0530)]
ath9k: Reconfigure beacon timers after the scan is completed.

Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agocfg80211: fix looping soft lockup in find_ie()
Bob Copeland [Tue, 1 Sep 2009 22:12:11 +0000 (18:12 -0400)]
cfg80211: fix looping soft lockup in find_ie()

The find_ie() function uses a size_t for the len parameter, and
directly uses len as a loop variable.  If any received packets
are malformed, it is possible for the decrease of len to overflow,
and since the result is unsigned, the loop will not terminate.
Change it to a signed int so the loop conditional works for
negative values.

This fixes the following soft lockup:

[38573.102007] BUG: soft lockup - CPU#0 stuck for 61s! [phy0:2230]
[38573.102007] Modules linked in: aes_i586 aes_generic fuse af_packet ipt_REJECT xt_tcpudp nf_conntrack_ipv4 nf_defrag_ipv4 xt_state iptable_filter ip_tables x_tables acpi_cpufreq binfmt_misc dm_mirror dm_region_hash dm_log dm_multipath dm_mod kvm_intel kvm uinput i915 arc4 ecb drm snd_hda_codec_idt ath5k snd_hda_intel hid_apple mac80211 usbhid appletouch snd_hda_codec snd_pcm ath cfg80211 snd_timer i2c_algo_bit ohci1394 video snd processor ieee1394 rfkill ehci_hcd sg sky2 backlight snd_page_alloc uhci_hcd joydev output ac thermal button battery sr_mod applesmc cdrom input_polldev evdev unix [last unloaded: scsi_wait_scan]
[38573.102007] irq event stamp: 2547724535
[38573.102007] hardirqs last  enabled at (2547724534): [<c1002ffc>] restore_all_notrace+0x0/0x18
[38573.102007] hardirqs last disabled at (2547724535): [<c10038f4>] apic_timer_interrupt+0x28/0x34
[38573.102007] softirqs last  enabled at (92950144): [<c103ab48>] __do_softirq+0x108/0x210
[38573.102007] softirqs last disabled at (92950274): [<c1348e74>] _spin_lock_bh+0x14/0x80
[38573.102007]
[38573.102007] Pid: 2230, comm: phy0 Tainted: G        W  (2.6.31-rc7-wl #8) MacBook1,1
[38573.102007] EIP: 0060:[<f8ea2d50>] EFLAGS: 00010292 CPU: 0
[38573.102007] EIP is at cmp_ies+0x30/0x180 [cfg80211]
[38573.102007] EAX: 00000082 EBX: 00000000 ECX: ffffffc1 EDX: d8efd014
[38573.102007] ESI: ffffff7c EDI: 0000004d EBP: eee2dc50 ESP: eee2dc3c
[38573.102007]  DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
[38573.102007] CR0: 8005003b CR2: d8efd014 CR3: 01694000 CR4: 000026d0
[38573.102007] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
[38573.102007] DR6: ffff0ff0 DR7: 00000400
[38573.102007] Call Trace:
[38573.102007]  [<f8ea2f8d>] cmp_bss+0xed/0x100 [cfg80211]
[38573.102007]  [<f8ea33e4>] cfg80211_bss_update+0x84/0x410 [cfg80211]
[38573.102007]  [<f8ea3884>] cfg80211_inform_bss_frame+0x114/0x180 [cfg80211]
[38573.102007]  [<f97255ff>] ieee80211_bss_info_update+0x4f/0x180 [mac80211]
[38573.102007]  [<f972b118>] ieee80211_rx_bss_info+0x88/0xf0 [mac80211]
[38573.102007]  [<f9739297>] ? ieee802_11_parse_elems+0x27/0x30 [mac80211]
[38573.102007]  [<f972b224>] ieee80211_rx_mgmt_probe_resp+0xa4/0x1c0 [mac80211]
[38573.102007]  [<f972bc59>] ieee80211_sta_rx_queued_mgmt+0x919/0xc50 [mac80211]
[38573.102007]  [<c1009707>] ? sched_clock+0x27/0xa0
[38573.102007]  [<c1009707>] ? sched_clock+0x27/0xa0
[38573.102007]  [<c105ffd0>] ? mark_held_locks+0x60/0x80
[38573.102007]  [<c1348be5>] ? _spin_unlock_irqrestore+0x55/0x70
[38573.102007]  [<c134baa5>] ? sub_preempt_count+0x85/0xc0
[38573.102007]  [<c1348bce>] ? _spin_unlock_irqrestore+0x3e/0x70
[38573.102007]  [<c12c1c0f>] ? skb_dequeue+0x4f/0x70
[38573.102007]  [<f972c021>] ieee80211_sta_work+0x91/0xb80 [mac80211]
[38573.102007]  [<c1009707>] ? sched_clock+0x27/0xa0
[38573.102007]  [<c134baa5>] ? sub_preempt_count+0x85/0xc0
[38573.102007]  [<c10479af>] worker_thread+0x18f/0x320
[38573.102007]  [<c104794e>] ? worker_thread+0x12e/0x320
[38573.102007]  [<c1348be5>] ? _spin_unlock_irqrestore+0x55/0x70
[38573.102007]  [<f972bf90>] ? ieee80211_sta_work+0x0/0xb80 [mac80211]
[38573.102007]  [<c104cbb0>] ? autoremove_wake_function+0x0/0x50
[38573.102007]  [<c1047820>] ? worker_thread+0x0/0x320
[38573.102007]  [<c104c854>] kthread+0x84/0x90
[38573.102007]  [<c104c7d0>] ? kthread+0x0/0x90
[38573.102007]  [<c1003ab7>] kernel_thread_helper+0x7/0x10

Cc: stable@kernel.org
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowireless: remove mac80211 rate selection extra menu
Luis R. Rodriguez [Tue, 1 Sep 2009 15:22:46 +0000 (08:22 -0700)]
wireless: remove mac80211 rate selection extra menu

We can just display this upon enabling mac80211 with an
'if MAC80211 != n' check.

Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowireless: update reg debug kconfig entry
Luis R. Rodriguez [Tue, 1 Sep 2009 15:22:43 +0000 (08:22 -0700)]
wireless: update reg debug kconfig entry

Refer to the wireless wiki for more information.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agowireless: update top level wireless driver entry
Luis R. Rodriguez [Tue, 1 Sep 2009 15:22:40 +0000 (08:22 -0700)]
wireless: update top level wireless driver entry

Change it to a menuconfig to give it some documentation, to
refer users to our wireless wiki for extra resources and
documentation. It seems our wiki is still obscure to some.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agonet: file_operations should be const
Stephen Hemminger [Tue, 1 Sep 2009 19:25:05 +0000 (19:25 +0000)]
net: file_operations should be const

All instances of file_operations should be const.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoinet: inet_connection_sock_af_ops const
Stephen Hemminger [Tue, 1 Sep 2009 19:25:04 +0000 (19:25 +0000)]
inet: inet_connection_sock_af_ops const

The function block inet_connect_sock_af_ops contains no data
make it constant.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotcp: MD5 operations should be const
Stephen Hemminger [Tue, 1 Sep 2009 19:25:03 +0000 (19:25 +0000)]
tcp: MD5 operations should be const

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: seq_operations should be const
Stephen Hemminger [Tue, 1 Sep 2009 19:25:02 +0000 (19:25 +0000)]
net: seq_operations should be const

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetdev: drivers should make ethtool_ops const
Stephen Hemminger [Wed, 2 Sep 2009 08:03:33 +0000 (01:03 -0700)]
netdev: drivers should make ethtool_ops const

No need to put ethtool_ops in data, they should be const.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotg3: Update version to 3.102
Matt Carlson [Tue, 1 Sep 2009 13:22:42 +0000 (13:22 +0000)]
tg3: Update version to 3.102

This patch updates the tg3 version to 3.102.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotg3: Add MDIO bus address assignments
Matt Carlson [Tue, 1 Sep 2009 13:21:36 +0000 (13:21 +0000)]
tg3: Add MDIO bus address assignments

The 5717 is a dual port chip that has a shared MDIO bus design.  While
it is impossible for one function to interface with the wrong phy, that
function still needs to know which MDIO bus address to use when
interfacing with its own phy.  This patch adds code to determine which
MDIO bus address to use.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotg3: Add 5717 NVRAM detection routines
Matt Carlson [Tue, 1 Sep 2009 13:20:17 +0000 (13:20 +0000)]
tg3: Add 5717 NVRAM detection routines

This patch adds NVRAM detection routines for the 5717.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotg3: Add 5717 asic rev
Matt Carlson [Tue, 1 Sep 2009 13:19:53 +0000 (13:19 +0000)]
tg3: Add 5717 asic rev

This patch adds the 5717 asic rev.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotg3: Assign rx ret producer indexes by vector
Matt Carlson [Tue, 1 Sep 2009 13:19:05 +0000 (13:19 +0000)]
tg3: Assign rx ret producer indexes by vector

When RSS is enabled, the status block format changes slightly.  The
"rx_jumbo_consumer", "reserved", and "rx_mini_consumer" members get
mapped to the other three rx return ring producer indexes.  This patch
introduces a new per-interrupt member which identifies which location
in the status block a particular vector should look for return ring
updates.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotg3: Adjust RSS ring allocation strategies
Matt Carlson [Tue, 1 Sep 2009 13:16:33 +0000 (13:16 +0000)]
tg3: Adjust RSS ring allocation strategies

When multivector RSS is enabled, the first interrupt vector is only used
to report link interrupts and error conditions.  This patch changes the
code so that rx and tx ring resources are not allocated for this vector.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotg3: Add RSS support
Matt Carlson [Tue, 1 Sep 2009 13:13:00 +0000 (13:13 +0000)]
tg3: Add RSS support

This patch adds code needed to enable RSS.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotg3: Add coalesce parameters for msix vectors
Matt Carlson [Tue, 1 Sep 2009 13:12:00 +0000 (13:12 +0000)]
tg3: Add coalesce parameters for msix vectors

This patch adds code to tune the coalescing parameters for the other
msix vectors.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotg3: Enable NAPI instances for other int vectors
Matt Carlson [Tue, 1 Sep 2009 13:10:19 +0000 (13:10 +0000)]
tg3: Enable NAPI instances for other int vectors

This patch adds code to enable and disable the rest of the NAPI
instances.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotg3: Add TSS support
Matt Carlson [Tue, 1 Sep 2009 13:09:39 +0000 (13:09 +0000)]
tg3: Add TSS support

This patch exposes the additional transmit rings to the kernel and makes
the necessary modifications to transmit, open, and close paths.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotg3: Update intmbox and coal_now for msix
Matt Carlson [Tue, 1 Sep 2009 13:08:58 +0000 (13:08 +0000)]
tg3: Update intmbox and coal_now for msix

This patch fixes up two spots that need attention now that msix support
has been added.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotg3: Add tx and rx ring resource tracking
Matt Carlson [Tue, 1 Sep 2009 13:04:37 +0000 (13:04 +0000)]
tg3: Add tx and rx ring resource tracking

This patch adds code to assign status block, tx producer ring and rx
return ring resources needed for the other interrupt vectors.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotg3: Add mailbox assignments
Matt Carlson [Tue, 1 Sep 2009 12:58:41 +0000 (12:58 +0000)]
tg3: Add mailbox assignments

The 5717 assigns mailbox locations to interrupt vectors in a rather
non-intuitive way.  (Much of the complexity stems from legacy
compatibility issues.)  This patch implements the assignment scheme.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotg3: Add MSI-X support
Matt Carlson [Tue, 1 Sep 2009 12:55:46 +0000 (12:55 +0000)]
tg3: Add MSI-X support

This patch adds MSI-X support.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotg3: Add support code around kernel interrupt API
Matt Carlson [Tue, 1 Sep 2009 12:55:02 +0000 (12:55 +0000)]
tg3: Add support code around kernel interrupt API

This patch adds code to support multiple interrupt vectors around the
kernel's interrupt API.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotg3: Create tg3_rings_reset()
Matt Carlson [Tue, 1 Sep 2009 12:53:31 +0000 (12:53 +0000)]
tg3: Create tg3_rings_reset()

This patch moves most of the chip ring setup logic into a separate
function.  This will make it easier to verify the multi ring setup
changes.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotg3: Add per-int coalesce now member
Matt Carlson [Tue, 1 Sep 2009 12:51:13 +0000 (12:51 +0000)]
tg3: Add per-int coalesce now member

Each interrupt vector has its own bit in the host coalescing register to
force that vector's status block to be updated and generate an
interrupt.  This patch adds a member to the per-interrupt structure
that records which bit belongs to that vector.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotg3: inline tg3_cond_int()
Matt Carlson [Tue, 1 Sep 2009 12:47:49 +0000 (12:47 +0000)]
tg3: inline tg3_cond_int()

This patch inlines the code of tg3_cond_int() into the function's only
callsite.  This prep work makes the following patch cleaner.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Wed, 2 Sep 2009 07:32:56 +0000 (00:32 -0700)]
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

Conflicts:
drivers/net/yellowfin.c

15 years agoipv6: ip6_push_pending_frames() should increment IPSTATS_MIB_OUTDISCARDS
Eric Dumazet [Wed, 2 Sep 2009 01:37:16 +0000 (18:37 -0700)]
ipv6: ip6_push_pending_frames() should increment IPSTATS_MIB_OUTDISCARDS

qdisc drops should be notified to IP_RECVERR enabled sockets, as done in IPV4.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodrop_monitor: fix trace_napi_poll_hit()
Xiao Guangrong [Sun, 30 Aug 2009 20:10:43 +0000 (20:10 +0000)]
drop_monitor: fix trace_napi_poll_hit()

The net_dev of backlog napi is NULL, like below:

__get_cpu_var(softnet_data).backlog.dev == NULL

So, we should check it in napi tracepoint's probe function

Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agopkt_sched: Revert tasklet_hrtimer changes.
David S. Miller [Wed, 2 Sep 2009 00:59:25 +0000 (17:59 -0700)]
pkt_sched: Revert tasklet_hrtimer changes.

These are full of unresolved problems, mainly that conversions don't
work 1-1 from hrtimers to tasklet_hrtimers because unlike hrtimers
tasklets can't be killed from softirq context.

And when a qdisc gets reset, that's exactly what we need to do here.

We'll work this out in the net-next-2.6 tree and if warranted we'll
backport that work to -stable.

This reverts the following 3 changesets:

a2cb6a4dd470d7a64255a10b843b0d188416b78f
("pkt_sched: Fix bogon in tasklet_hrtimer changes.")

38acce2d7983632100a9ff3fd20295f6e34074a8
("pkt_sched: Convert CBQ to tasklet_hrtimer.")

ee5f9757ea17759e1ce5503bdae2b07e48e32af9
("pkt_sched: Convert qdisc_watchdog to tasklet_hrtimer")

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoxilinx_emaclite: Fix permissions on driver sources.
David S. Miller [Wed, 2 Sep 2009 00:50:50 +0000 (17:50 -0700)]
xilinx_emaclite: Fix permissions on driver sources.

Noticed by Michal Simek.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: sk_free() should be allowed right after sk_alloc()
Jarek Poplawski [Sun, 30 Aug 2009 23:15:36 +0000 (23:15 +0000)]
net: sk_free() should be allowed right after sk_alloc()

After commit 2b85a34e911bf483c27cfdd124aeb1605145dc80
(net: No more expensive sock_hold()/sock_put() on each tx)
sk_free() frees socks conditionally and depends
on sk_wmem_alloc being set e.g. in sock_init_data(). But in some
cases sk_free() is called earlier, usually after other alloc errors.

Fix is to move sk_wmem_alloc initialization from sock_init_data()
to sk_alloc() itself.

Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: make neigh_ops constant
Stephen Hemminger [Tue, 1 Sep 2009 11:13:19 +0000 (11:13 +0000)]
net: make neigh_ops constant

These tables are never modified at runtime. Move to read-only
section.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoau1000_eth: possible NULL dereference of aup->mii_bus->irq in au1000_probe()
roel kluin [Sun, 30 Aug 2009 22:40:15 +0000 (22:40 +0000)]
au1000_eth: possible NULL dereference of aup->mii_bus->irq in au1000_probe()

aup->mii_bus->irq allocation may fail, prevent a dereference of NULL.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoRTO connection timeout: sysctl documentation update
Damian Lukowski [Tue, 1 Sep 2009 10:24:04 +0000 (10:24 +0000)]
RTO connection timeout: sysctl documentation update

This patch updates the sysctl documentation concerning the interpretation
of tcp_retries{1,2} and tcp_orphan_retries.

Signed-off-by: Damian Lukowski <damian@tvk.rwth-aachen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoRTO connection timeout: coding style fixes and comments
Damian Lukowski [Tue, 1 Sep 2009 10:24:00 +0000 (10:24 +0000)]
RTO connection timeout: coding style fixes and comments

This patch affects the retransmits_timed_out() function.

Changes:
1) Variables have more meaningful names
2) retransmits_timed_out() has an introductionary comment.
3) Small coding style changes.

Signed-off-by: Damian Lukowski <damian@tvk.rwth-aachen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosky2: Use 32bit read to read Y2_VAUX_AVAIL
Mike McCormack [Tue, 1 Sep 2009 03:54:27 +0000 (03:54 +0000)]
sky2: Use 32bit read to read Y2_VAUX_AVAIL

B0_CTST is a 24bit register according to the vendor driver (sk98lin).
A 16bit read on B0_CTST will always return 0 for Y2_VAUX_AVAIL (1<<16),
 so use a 32bit read when testing Y2_VAUX_AVAIL

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosky2: Create buffer alloc and free helpers
Mike McCormack [Tue, 1 Sep 2009 03:21:35 +0000 (03:21 +0000)]
sky2: Create buffer alloc and free helpers

Refactor similar two sections of code that free buffers into one.
Only call tx_init if all buffer allocations succeed.

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosky2: fix management of driver LED
Stephen Hemminger [Mon, 31 Aug 2009 07:31:41 +0000 (07:31 +0000)]
sky2: fix management of driver LED

Observed by Mike McCormack.

The LED bit here is just a software controlled value used to
turn on one of the LED's on some boards. The register value was wrong,
which could have been causing some power control issues.
Get rid of problematic define use the correct mask.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotun: reuse struct sock fields
Michael S. Tsirkin [Sun, 30 Aug 2009 07:04:42 +0000 (07:04 +0000)]
tun: reuse struct sock fields

As tun always has an embeedded struct sock,
use sk and sk_receive_queue fields instead of
duplicating them in tun_struct.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetns: embed ip6_dst_ops directly
Alexey Dobriyan [Sat, 29 Aug 2009 01:34:49 +0000 (01:34 +0000)]
netns: embed ip6_dst_ops directly

struct net::ipv6.ip6_dst_ops is separatedly dynamically allocated,
but there is no fundamental reason for it. Embed it directly into
struct netns_ipv6.

For that:
* move struct dst_ops into separate header to fix circular dependencies
I honestly tried not to, it's pretty impossible to do other way
* drop dynamical allocation, allocate together with netns

For a change, remove struct dst_ops::dst_net, it's deducible
by using container_of() given dst_ops pointer.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agobonding: use compare_ether_addr_64bits() in ALB
Eric Dumazet [Tue, 1 Sep 2009 06:31:18 +0000 (06:31 +0000)]
bonding: use compare_ether_addr_64bits() in ALB

We can speedup ether addresses compares using compare_ether_addr_64bits()
instead of memcmp(). We make sure all operands are at least 8 bytes long and
16bits aligned (or better, long word aligned if possible)

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Reviewed-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomacvlan: Use compare_ether_addr_64bits()
Eric Dumazet [Tue, 1 Sep 2009 05:46:05 +0000 (05:46 +0000)]
macvlan: Use compare_ether_addr_64bits()

To speedup ether addresses compares, we can use compare_ether_addr_64bits()
(all operands are guaranteed to be at least 8 bytes long)

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoixgbe: Patch to fix 82599 multispeed fiber link issues when driver is loaded without...
Mallikarjuna R Chilakala [Tue, 1 Sep 2009 13:50:14 +0000 (13:50 +0000)]
ixgbe: Patch to fix 82599 multispeed fiber link issues when driver is loaded without any cable and reconnecting it to 1G partner

In 82599 multi speed fiber case when driver is loaded without any
cable and reconnecting the cable with a 1G partner does not bring
up the link in 1Gb mode. When there is no link we first setup the link
at 10G & 1G and then try to re-establish the link at highest speed 10G
and thereby changing autoneg_advertised value to highest speed 10G.
After connecting back the cable to a 1G link partner we never try 1G
as autoneg advertised value is changed to link at 10G only. The
following patch fixes the issue by properly initializing the
autoneg_advertised value just before exiting from link setup routine.

Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
Acked-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>
15 years agoixgbe: Properly disable DCB arbiters prior to applying changes
Peter P Waskiewicz Jr [Tue, 1 Sep 2009 13:49:56 +0000 (13:49 +0000)]
ixgbe: Properly disable DCB arbiters prior to applying changes

When disabling the Rx and Tx data arbiters prior to configuration changes,
the arbiters were not being shut down properly.  This can create a race
in the DCB hardware blocks, and potentially hang the arbiters.  Also, the
Tx descriptor arbiter shouldn't be disabled when applying configuration
changes; disabling this arbiter can cause a Tx hang.

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>
15 years agoixgbe: refactor link setup code
Mallikarjuna R Chilakala [Tue, 1 Sep 2009 13:49:35 +0000 (13:49 +0000)]
ixgbe: refactor link setup code

Link code cleanup: a number of redundant functions and MAC variables are cleaned up,
with some functions being consolidated into a single-purpose code path.
Removed following deprecated link functions and mac variables
 * ixgbe_setup_copper_link_speed_82598
 * ixgbe_setup_mac_link_speed_multispeed_fiber
 * ixgbe_setup_mac_link_speed_82599
 * mac.autoneg, mac.autoneg_succeeded, phy.autoneg_wait_to_complete

Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
Acked-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>
15 years agoe1000: Fix for e1000 kills IPMI on a tagged vlan.
Graham, David [Mon, 31 Aug 2009 14:12:51 +0000 (14:12 +0000)]
e1000: Fix for e1000 kills IPMI on a tagged vlan.

Enabling VLAN filters (VFE) when the primary interface is brought up
(per commit 78ed11a) has caused problems for some users who manage
their systems using IPMI over a VLAN. This is because when the driver
enables the VLAN filter, this same filter table is enabled for the
management channel, and the table is initially empty, which means that
the IPMI/VLAN packets are filtered out and not received by the BMC.
This is a problem only on e1000 class adapters, as it is only
on e1000 that the filter table is common to the management and host
streams.

With this change, filtering is only enabled when one or more host VLANs
exist, and is disabled when the last host VLAN is removed. VLAN filtering
is always disabled when the primary interface is in promiscuous mode,
and will be (re)enabled if VLANs exist when the interface exits
promiscuous mode.

Note that this does not completely resolve the issue for those using VLAN
management, because if the host adds a VLAN, then the above problem
occurs when that VLAN is enabled. However, it does mean the there is no
problem for configurations where management is on a VLAN and the host is
not.

A complete solution to this issue would require further driver changes.
The driver would need to discover if (and which) management VLANs are
active before enabling VLAN filtering, so that it could ensure that the
managed VLANs are included in the VLAN filter table. This discovery
requires that the BMC identifies its VLAN in registers accessible
to the driver, and at least on Dell PE2850 systems the BMC does not
identify its VLAN to allow such discovery. Intel is pursuing this issue
with the BMC vendor.

Signed-off-by: Dave Graham <david.graham@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Tested-by: Krzysztof Piotr Oledzki <ole@ans.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoiwmc3200wifi: Add a last_fw_err debugfs entry
Samuel Ortiz [Tue, 1 Sep 2009 13:14:06 +0000 (15:14 +0200)]
iwmc3200wifi: Add a last_fw_err debugfs entry

In order to check what was the last fw error we got accross resets, we add
this debugfs entry. It displays the complete ASSERT information.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwmc3200wifi: Handle UMAC stalls and UMAC assert properly
Samuel Ortiz [Tue, 1 Sep 2009 13:14:05 +0000 (15:14 +0200)]
iwmc3200wifi: Handle UMAC stalls and UMAC assert properly

When UMAC stalls or asserts, we want to reset the device. But when we're
associated, the current reset worker will end up calling
cfg80211_connect_result() with the cfg80211 sme layer knowing that we're
reassociating. That ends up with some ugly warnings.
With this patch we're telling the upper layer that we've roamed if
reassociation succeeds, and that we're disconnected if it fails.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwmc3200wifi: New initial LMAC calibration
Samuel Ortiz [Tue, 1 Sep 2009 13:14:04 +0000 (15:14 +0200)]
iwmc3200wifi: New initial LMAC calibration

The LMAC calibration API got broken mostly by having a configuration bitmap
being different than the result one.
This patch tries to address that issue by correctly running calibrations with
the newest firmwares, and keeping a backward compatibility fallback path for
older firmwares, where the configuration and result bitmaps were identical.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwmc3200wifi: fix misuse of le16_to_cpu
Zhu Yi [Tue, 1 Sep 2009 13:14:03 +0000 (15:14 +0200)]
iwmc3200wifi: fix misuse of le16_to_cpu

Also mark some functions static.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwmc3200wifi: add disconnect work
Zhu Yi [Tue, 1 Sep 2009 13:14:02 +0000 (15:14 +0200)]
iwmc3200wifi: add disconnect work

When the driver receives "connection terminated" event from device,
it could be caused by 2 reasons: the firmware is roaming or the
connection is lost (AP disappears). For the former, an association
complete event is supposed to come within 3 seconds. For the latter,
the driver won't receive any event except the connection terminated.
So we kick a delayed work (5*HZ) when we receive the connection
terminated event. It will be canceled if it turns out to be a roaming
event later. Otherwise we notify SME and userspace the disconnection.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwmc3200wifi: use cfg80211_roamed to send roam event
Zhu Yi [Tue, 1 Sep 2009 13:14:01 +0000 (15:14 +0200)]
iwmc3200wifi: use cfg80211_roamed to send roam event

The device sends connection terminated and [re]association success
(or failure) events when roaming occours. The patch uses
cfg80211_roamed instead of cfg80211_connect_result to notify SME
for roaming.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwmc3200wifi: Fix sparse warning
Samuel Ortiz [Tue, 1 Sep 2009 13:14:00 +0000 (15:14 +0200)]
iwmc3200wifi: Fix sparse warning

iwm_cfg80211_get_station() should be static.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwmc3200wifi: Set WEP key from connect
Samuel Ortiz [Tue, 1 Sep 2009 13:13:59 +0000 (15:13 +0200)]
iwmc3200wifi: Set WEP key from connect

When connect is called with the LEGACY_PSK authentication type set, and a
proper sme->key, we need to set the WEP key straight after setting the
profile otherwise the authentication will never start.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwmc3200wifi: invalidate profile when necessary before connect
Zhu Yi [Tue, 1 Sep 2009 13:13:58 +0000 (15:13 +0200)]
iwmc3200wifi: invalidate profile when necessary before connect

If cfg80211 requests to connect when we have already had an active
profile, invalidate the current profile first before sending a new
profile to UMAC.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agorndis_wlan: remove 'select WIRELESS_EXT' in Kconfig
Jussi Kivilinna [Tue, 1 Sep 2009 12:33:11 +0000 (15:33 +0300)]
rndis_wlan: remove 'select WIRELESS_EXT' in Kconfig

Since rndis_wlan is now converted to cfg80211, WIRELESS_EXT isn't
required anymore.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agorndis_wlan: fix sparse endianess warnings
Jussi Kivilinna [Tue, 1 Sep 2009 12:33:06 +0000 (15:33 +0300)]
rndis_wlan: fix sparse endianess warnings

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agorndis_wlan: cleanup
Jussi Kivilinna [Tue, 1 Sep 2009 12:33:00 +0000 (15:33 +0300)]
rndis_wlan: cleanup

- remove double newlines between functions
- remove commented out function (rndis_set_config_parameter_u32())
- coding style fix in rndis_set_config_parameter_str()
- add comment banners between function sections

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agorndis_wlan: use bool for on/off switches
Jussi Kivilinna [Tue, 1 Sep 2009 12:32:55 +0000 (15:32 +0300)]
rndis_wlan: use bool for on/off switches

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Call spin_lock_bh() on btcoex_lock
Vasanthakumar Thiagarajan [Tue, 1 Sep 2009 12:16:33 +0000 (17:46 +0530)]
ath9k: Call spin_lock_bh() on btcoex_lock

As generic hw timer interrupt handler is moved to tasklet,
we no more need to call spin_lock_irqsave().

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath9k: Move generic hw timer intr handler to bottom-half
Vasanthakumar Thiagarajan [Tue, 1 Sep 2009 12:16:32 +0000 (17:46 +0530)]
ath9k: Move generic hw timer intr handler to bottom-half

There is no point handling this in hard irq, move it to
tasklet.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agorfkill: relicense header file
Johannes Berg [Wed, 26 Aug 2009 16:13:17 +0000 (18:13 +0200)]
rfkill: relicense header file

This header file is copied into userspace tools that
need not be GPLv2 licensed, make that easier.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Acked-by: Iñaky Pérez-González <inaky@linux.intel.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Acked-by: Michael Buesch <mb@bu3sch.de>
Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoRevert Backoff [v3]: Calculate TCP's connection close threshold as a time value.
Damian Lukowski [Wed, 26 Aug 2009 00:16:34 +0000 (00:16 +0000)]
Revert Backoff [v3]: Calculate TCP's connection close threshold as a time value.

RFC 1122 specifies two threshold values R1 and R2 for connection timeouts,
which may represent a number of allowed retransmissions or a timeout value.
Currently linux uses sysctl_tcp_retries{1,2} to specify the thresholds
in number of allowed retransmissions.

For any desired threshold R2 (by means of time) one can specify tcp_retries2
(by means of number of retransmissions) such that TCP will not time out
earlier than R2. This is the case, because the RTO schedule follows a fixed
pattern, namely exponential backoff.

However, the RTO behaviour is not predictable any more if RTO backoffs can be
reverted, as it is the case in the draft
"Make TCP more Robust to Long Connectivity Disruptions"
(http://tools.ietf.org/html/draft-zimmermann-tcp-lcd).

In the worst case TCP would time out a connection after 3.2 seconds, if the
initial RTO equaled MIN_RTO and each backoff has been reverted.

This patch introduces a function retransmits_timed_out(N),
which calculates the timeout of a TCP connection, assuming an initial
RTO of MIN_RTO and N unsuccessful, exponentially backed-off retransmissions.

Whenever timeout decisions are made by comparing the retransmission counter
to some value N, this function can be used, instead.

The meaning of tcp_retries2 will be changed, as many more RTO retransmissions
can occur than the value indicates. However, it yields a timeout which is
similar to the one of an unpatched, exponentially backing off TCP in the same
scenario. As no application could rely on an RTO greater than MIN_RTO, there
should be no risk of a regression.

Signed-off-by: Damian Lukowski <damian@tvk.rwth-aachen.de>
Acked-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoRevert Backoff [v3]: Revert RTO on ICMP destination unreachable
Damian Lukowski [Wed, 26 Aug 2009 00:16:31 +0000 (00:16 +0000)]
Revert Backoff [v3]: Revert RTO on ICMP destination unreachable

Here, an ICMP host/network unreachable message, whose payload fits to
TCP's SND.UNA, is taken as an indication that the RTO retransmission has
not been lost due to congestion, but because of a route failure
somewhere along the path.
With true congestion, a router won't trigger such a message and the
patched TCP will operate as standard TCP.

This patch reverts one RTO backoff, if an ICMP host/network unreachable
message, whose payload fits to TCP's SND.UNA, arrives.
Based on the new RTO, the retransmission timer is reset to reflect the
remaining time, or - if the revert clocked out the timer - a retransmission
is sent out immediately.
Backoffs are only reverted, if TCP is in RTO loss recovery, i.e. if
there have been retransmissions and reversible backoffs, already.

Changes from v2:
1) Renaming of skb in tcp_v4_err() moved to another patch.
2) Reintroduced tcp_bound_rto() and __tcp_set_rto().
3) Fixed code comments.

Signed-off-by: Damian Lukowski <damian@tvk.rwth-aachen.de>
Acked-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoRevert Backoff [v3]: Rename skb to icmp_skb in tcp_v4_err()
Damian Lukowski [Wed, 26 Aug 2009 00:16:27 +0000 (00:16 +0000)]
Revert Backoff [v3]: Rename skb to icmp_skb in tcp_v4_err()

This supplementary patch renames skb to icmp_skb in tcp_v4_err() in order to
disambiguate from another sk_buff variable, which will be introduced
in a separate patch.

Signed-off-by: Damian Lukowski <damian@tvk.rwth-aachen.de>
Acked-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoixgbe: Add support for dcbnl_rtnl_ops.setapp/getapp
Yi Zou [Mon, 31 Aug 2009 12:34:28 +0000 (12:34 +0000)]
ixgbe: Add support for dcbnl_rtnl_ops.setapp/getapp

Add support for dcbnl_rtnl_ops.setapp/getapp to set or get the current user
priority bitmap for the given application protocol. Currently, 82599 only
supports setapp/getapp for Fiber Channel over Ethernet (FCoE) protocol.

Signed-off-by: Yi Zou <yi.zou@intel.com>
Acked-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>
15 years agodcbnl: Add implementations of dcbnl setapp/getapp commands
Yi Zou [Mon, 31 Aug 2009 12:33:40 +0000 (12:33 +0000)]
dcbnl: Add implementations of dcbnl setapp/getapp commands

Implements the dcbnl netlink setapp/getapp pair. When a setapp/getapp
is received, dcbnl would just pass on to dcbnl_rtnl_op.setapp/getapp
that are supposed to be implemented by the low level drivers.

Signed-off-by: Yi Zou <yi.zou@intel.com>
Acked-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>
15 years agodcbnl: Add netlink attributes for setapp/getapp to dcbnl
Yi Zou [Mon, 31 Aug 2009 12:33:20 +0000 (12:33 +0000)]
dcbnl: Add netlink attributes for setapp/getapp to dcbnl

Add defines for dcbnl netlink attributes to support netlink message passing of
setapp/getapp in dcbnl.

Signed-off-by: Yi Zou <yi.zou@intel.com>
Acked-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>
15 years agodcbnl: Add support for setapp/getapp to netdev dcbnl_rtnl_ops
Yi Zou [Mon, 31 Aug 2009 12:32:55 +0000 (12:32 +0000)]
dcbnl: Add support for setapp/getapp to netdev dcbnl_rtnl_ops

Adds support of dcbnl setapp/getapp to dcbnl_rtnl_ops in netdev to allow
LLDs to implement their corresponding dcbnl setapp/getapp ops to support
the IEEE 802.1Q DCBX setapp/getapp commands.

Signed-off-by: Yi Zou <yi.zou@intel.com>
Acked-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>
15 years agodcbnl: Add support for setapp/getapp commands to dcbnl
Yi Zou [Mon, 31 Aug 2009 12:32:34 +0000 (12:32 +0000)]
dcbnl: Add support for setapp/getapp commands to dcbnl

This patch adds dcbnl command definitions to support setapp/getapp
functionality from the IEEE 802.1Qaz Data Center Bridging Capability
Exchange protocol (DCBX) specification. Section 3.3 defines the
application protocol and its 802.1p user priority in DCBX, which is
implemented here as a pair of setapp/getapp commands in the kernel
dcbnl for setting and retrieving the user priority for an given
application protocol. The protocol is identified by the combination of
an id and an idtype. Currently, when idtype is 0, the corresponding
id gives the ether type of this protocol, e.g., for FCoE, it will be
0x8906; when idtype is 1, then the corresponding id gives the TCP or
UDP port number.

For more information regarding DCBX spec., please refer to the following:
http://www.ieee802.org/1/files/public/docs2008/
az-wadekar-dcbx-capability-exchange-discovery-protocol-1108-v1.01.pdf

Signed-off-by: Yi Zou <yi.zou@intel.com>
Acked-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>
15 years agoixgbe: Add support for the net_device_ops.ndo_fcoe_enable/disable to 82599
Yi Zou [Mon, 31 Aug 2009 12:32:14 +0000 (12:32 +0000)]
ixgbe: Add support for the net_device_ops.ndo_fcoe_enable/disable to 82599

This adds support to the net_device_ops.ndo_fcoe_enable/disable for 82599. This
consequently allows us to dynamically turn FCoE offload feature on or off
upon incoming calls to ndo_fcoe_enable/disable. When this happens, FCoE offload
features are enabled/disabled accordingly, and this is regardless of whether
DCB being turned on or not.

Signed-off-by: Yi Zou <yi.zou@intel.com>
Acked-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>
15 years agovlan: Add support for net_devices_ops.ndo_fcoe_enable/_disable to VLAN
Yi Zou [Mon, 31 Aug 2009 12:31:55 +0000 (12:31 +0000)]
vlan: Add support for net_devices_ops.ndo_fcoe_enable/_disable to VLAN

This adds implementation of the net_devices_ops.ndo_fcoe_enable/_disable to
the VLAN driver. It checks if the real_dev has support for ndo_fcoe_enable/
ndo_fcoe_disable and if so, passes on to call the associated real_dev.

Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: Add ndo_fcoe_enable/ndo_fcoe_disable to net_device_ops
Yi Zou [Mon, 31 Aug 2009 12:31:36 +0000 (12:31 +0000)]
net: Add ndo_fcoe_enable/ndo_fcoe_disable to net_device_ops

Add ndo_fcoe_enable/_disable to net_device_ops so the corresponding
HW can initialize itself for FCoE traffic or clean up after FCoE traffic is
done. This is expected to be called by the kernel FCoE stack upon receiving
a request for creating an FCoE instance on the corresponding netdev interface.
When implemented by the actual HW, the HW driver check the op code to perform
corresponding initialization or clean up for FCoE. The initialization normally
includes allocating extra queues for FCoE, setting corresponding HW registers
for FCoE, indicating FCoE offload features via netdev, etc. The clean-up would
include releasing the resources allocated for FCoE.

Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetdev: convert bulk of drivers to netdev_tx_t
Stephen Hemminger [Mon, 31 Aug 2009 19:50:58 +0000 (19:50 +0000)]
netdev: convert bulk of drivers to netdev_tx_t

In a couple of cases collapse some extra code like:
   int retval = NETDEV_TX_OK;
   ...
   return retval;
into
   return NETDEV_TX_OK;

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agowireless: convert drivers to netdev_tx_t
Stephen Hemminger [Mon, 31 Aug 2009 19:50:57 +0000 (19:50 +0000)]
wireless: convert drivers to netdev_tx_t

Mostly just simple conversions:
  * ray_cs had bogus return of NET_TX_LOCKED but driver
    was not using NETIF_F_LLTX
  * hostap and ipw2x00 had some code that returned value
    from a called function that also had to change to return netdev_tx_t

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoappletalk: convert drivers to netdev_tx_t
Stephen Hemminger [Mon, 31 Aug 2009 19:50:56 +0000 (19:50 +0000)]
appletalk: convert drivers to netdev_tx_t

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agointel: convert drivers to netdev_tx_t
Stephen Hemminger [Mon, 31 Aug 2009 19:50:55 +0000 (19:50 +0000)]
intel: convert drivers to netdev_tx_t

Get rid of some bogus return wrapping as well.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years ago3com: convert drivers to netdev_tx_t
Stephen Hemminger [Mon, 31 Aug 2009 19:50:54 +0000 (19:50 +0000)]
3com: convert drivers to netdev_tx_t

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotulip: convert drivers to netdev_tx_t
Stephen Hemminger [Mon, 31 Aug 2009 19:50:53 +0000 (19:50 +0000)]
tulip: convert drivers to netdev_tx_t

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agouwb: convert to netdev_tx_t
Stephen Hemminger [Mon, 31 Aug 2009 19:50:52 +0000 (19:50 +0000)]
uwb: convert to netdev_tx_t

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetdev: convert pseudo drivers to netdev_tx_t
Stephen Hemminger [Mon, 31 Aug 2009 19:50:51 +0000 (19:50 +0000)]
netdev: convert pseudo drivers to netdev_tx_t

These are all drivers that don't touch real hardware.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoirda: convert to netdev_tx_t
Stephen Hemminger [Mon, 31 Aug 2009 19:50:50 +0000 (19:50 +0000)]
irda: convert to netdev_tx_t

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetdev: convert pcmcia drivers to netdev_tx_t
Stephen Hemminger [Mon, 31 Aug 2009 19:50:49 +0000 (19:50 +0000)]
netdev: convert pcmcia drivers to netdev_tx_t

Update all the pcmcia network drivers for netdev_tx_t.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agohdlc: convert to netdev_tx_t
Stephen Hemminger [Mon, 31 Aug 2009 19:50:48 +0000 (19:50 +0000)]
hdlc: convert to netdev_tx_t

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agowan: convert drivers to netdev_tx_t
Stephen Hemminger [Mon, 31 Aug 2009 19:50:47 +0000 (19:50 +0000)]
wan: convert drivers to netdev_tx_t

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotokenring: convert to netdev_tx_t
Stephen Hemminger [Mon, 31 Aug 2009 19:50:46 +0000 (19:50 +0000)]
tokenring: convert to netdev_tx_t

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agousbnet: convert to netdev_tx_t
Stephen Hemminger [Mon, 31 Aug 2009 19:50:45 +0000 (19:50 +0000)]
usbnet: convert to netdev_tx_t

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoisdn: convert to netdev_tx_t
Stephen Hemminger [Mon, 31 Aug 2009 19:50:44 +0000 (19:50 +0000)]
isdn: convert to netdev_tx_t

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoconvert hamradio drivers to netdev_txreturnt_t
Stephen Hemminger [Mon, 31 Aug 2009 19:50:43 +0000 (19:50 +0000)]
convert hamradio drivers to netdev_txreturnt_t

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoconvert ATM drivers to netdev_tx_t
Stephen Hemminger [Mon, 31 Aug 2009 19:50:42 +0000 (19:50 +0000)]
convert ATM drivers to netdev_tx_t

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetdev: convert pseudo-devices to netdev_tx_t
Stephen Hemminger [Mon, 31 Aug 2009 19:50:41 +0000 (19:50 +0000)]
netdev: convert pseudo-devices to netdev_tx_t

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonetdev: change transmit to limited range type
Stephen Hemminger [Mon, 31 Aug 2009 19:50:40 +0000 (19:50 +0000)]
netdev: change transmit to limited range type

The transmit function should only return one of three possible values,
some drivers got confused and returned errno's or other values.
This changes the definition so that this can be caught at compile time.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoath9k: Do an AHB reset before doing RTC reset
Vasanthakumar Thiagarajan [Mon, 31 Aug 2009 12:18:36 +0000 (17:48 +0530)]
ath9k: Do an AHB reset before doing RTC reset

Doing an RTC reset when DMA is active may corrupt memory,
make sure no DMA is active at this moment by doing an
AHB reset.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoipw2200: fix kconfig dependencies
Randy Dunlap [Sun, 30 Aug 2009 20:22:57 +0000 (13:22 -0700)]
ipw2200: fix kconfig dependencies

Fix kconfig dependencies for ipw2x00 drivers, fixes build errors:

ERROR: "wiphy_free" [drivers/net/wireless/ipw2x00/libipw.ko] undefined!
ERROR: "wiphy_unregister" [drivers/net/wireless/ipw2x00/libipw.ko] undefined!
ERROR: "wiphy_new" [drivers/net/wireless/ipw2x00/libipw.ko] undefined!
ERROR: "cfg80211_wext_giwname" [drivers/net/wireless/ipw2x00/ipw2200.ko] undefined!
ERROR: "wiphy_register" [drivers/net/wireless/ipw2x00/ipw2200.ko] undefined!

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>