firefly-linux-kernel-4.4.55.git
13 years agoipv4: Cache learned PMTU information in inetpeer.
David S. Miller [Thu, 10 Feb 2011 04:42:07 +0000 (20:42 -0800)]
ipv4: Cache learned PMTU information in inetpeer.

The general idea is that if we learn new PMTU information, we
bump the peer genid.

This triggers the dst_ops->check() code to validate and if
necessary propagate the new PMTU value into the metrics.

Learned PMTU information self-expires.

This means that it is not necessary to kill a cached route
entry just because the PMTU information is too old.

As a consequence:

1) When the path appears unreachable (dst_ops->link_failure
   or dst_ops->negative_advice) we unwind the PMTU state if
   it is out of date, instead of killing the cached route.

   A redirected route will still be invalidated in these
   situations.

2) rt_check_expire(), rt_worker_func(), et al. are no longer
   necessary at all.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agophy/micrel: add ability to support 50MHz RMII clock on KZS8051RNL
Baruch Siach [Mon, 14 Feb 2011 02:05:33 +0000 (02:05 +0000)]
phy/micrel: add ability to support 50MHz RMII clock on KZS8051RNL

Platform code can now set the MICREL_PHY_50MHZ_CLK bit of dev_flags in a fixup
routine (registered with phy_register_fixup_for_uid()), to make the KZS8051RNL
PHY work with 50MHz RMII reference clock.

Cc: David J. Choi <david.choi@micrel.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoROSE: AX25: finding routes simplification
Bernard Pidoux [Mon, 14 Feb 2011 21:33:49 +0000 (13:33 -0800)]
ROSE: AX25: finding routes simplification

With previous patch, rose_get_neigh() routine
investigates the full list of neighbor nodes
until it finds or not an already connected node whether
it is called locally or through a level 3 transit frame.
If no routes are opened through an adjacent connected node
then a classical connect request is attempted.

Then there is no more reason for an extra loop such
as the one removed by this patch.

Signed-off-by: Bernard Pidoux <f6bvp@free.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoROSE: rose AX25 packet routing improvement
Bernard Pidoux [Mon, 14 Feb 2011 21:31:09 +0000 (13:31 -0800)]
ROSE: rose AX25 packet routing improvement

FPAC AX25 packet application is using Linux kernel ROSE
routing skills in order to connect or send packets to remote stations
knowing their ROSE address via a network of interconnected nodes.

Each FPAC node has a ROSE routing table that Linux ROSE module is
looking at each time a ROSE frame is relayed by the node or when
a connect request to a neighbor node is received.

A previous patch improved the system time response by looking at
already established routes each time the system was looking for a
route to relay a frame. If a neighbor node routing the destination
address was already connected, then the frame would be sent
through him. If not, a connection request would be issued.

The present patch extends the same routing capability to a connect
request asked by a user locally connected into an FPAC node.
Without this patch, a connect request was not well handled unless it
was directed to an immediate connected neighbor of the local node.

Implemented at a number of ROSE FPAC node stations, the present patch
improved dramatically FPAC ROSE routing time response and efficiency.

Signed-off-by: Bernard Pidoux <f6bvp@free.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: fix rcu lock imbalance in fib_select_default()
Eric Dumazet [Mon, 14 Feb 2011 19:23:04 +0000 (11:23 -0800)]
ipv4: fix rcu lock imbalance in fib_select_default()

Commit 0c838ff1ade7 (ipv4: Consolidate all default route selection
implementations.) forgot to remove one rcu_read_unlock() from
fib_select_default().

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocan: c_can: Added support for Bosch C_CAN controller
Bhupesh Sharma [Mon, 14 Feb 2011 06:51:44 +0000 (22:51 -0800)]
can: c_can: Added support for Bosch C_CAN controller

Bosch C_CAN controller is a full-CAN implementation which is compliant
to CAN protocol version 2.0 part A and B. Bosch C_CAN user manual can be
obtained from:

http://www.semiconductors.bosch.de/media/en/pdf/ipmodules_1/c_can/users_manual_c_can.pdf

This patch adds the support for this controller.
The following are the design choices made while writing the controller
driver:
1. Interface Register set IF1 has be used only in the current design.
2. Out of the 32 Message objects available, 16 are kept aside for RX
   purposes and the rest for TX purposes.
3. NAPI implementation is such that both the TX and RX paths function
   in polling mode.

Signed-off-by: Bhupesh Sharma <bhupesh.sharma@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agojme: Advance driver version
Guo-Fu Tseng [Sun, 13 Feb 2011 19:27:18 +0000 (19:27 +0000)]
jme: Advance driver version

Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agojme: Don't show UDP Checksum error if HW misjudged
Guo-Fu Tseng [Sun, 13 Feb 2011 19:27:17 +0000 (19:27 +0000)]
jme: Don't show UDP Checksum error if HW misjudged

Some JMicron Chip treat 0 as error checksum for UDP packets.
Which should be "No checksum needed".

Reported-by: Adam Swift <Adam.Swift@omnitude.net>
Confirmed-by: "Aries Lee" <arieslee@jmicron.com>
Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agojme: Refill receive unicase MAC addr after resume
Guo-Fu Tseng [Sun, 13 Feb 2011 18:27:40 +0000 (18:27 +0000)]
jme: Refill receive unicase MAC addr after resume

The value of the register which holds receive Unicast MAC Address
sometimes get messed-up after resume.
This patch refill it before enabling the hardware filter.

Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agojme: Safer MAC processor reset sequence
Guo-Fu Tseng [Sun, 13 Feb 2011 18:27:39 +0000 (18:27 +0000)]
jme: Safer MAC processor reset sequence

Adding control to clk_rx, and makes the control of clk_{rx|tx|tcp}
with safer sequence.
This sequence is provided by JMicron.

Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agojme: Fix hardware action of full-duplex
Guo-Fu Tseng [Sun, 13 Feb 2011 18:27:38 +0000 (18:27 +0000)]
jme: Fix hardware action of full-duplex

Clear Transmit Timer/Retry setting while full-duplex.

Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agojme: Rename phyfifo function for easier understand
Guo-Fu Tseng [Sun, 13 Feb 2011 18:27:37 +0000 (18:27 +0000)]
jme: Rename phyfifo function for easier understand

Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agojme: Fix bit typo of JMC250A2 workaround
Guo-Fu Tseng [Sun, 13 Feb 2011 18:27:36 +0000 (18:27 +0000)]
jme: Fix bit typo of JMC250A2 workaround

Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agojme: PHY Power control for new chip
Guo-Fu Tseng [Sun, 13 Feb 2011 18:27:35 +0000 (18:27 +0000)]
jme: PHY Power control for new chip

After main chip rev 5, the hardware support more power saving
control registers.
Some Non-Linux drivers might turn off the phy power with new
interfaces, this patch makes it possible for Linux to turn it
on again.

Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agojme: Extract main and sub chip revision
Guo-Fu Tseng [Sun, 13 Feb 2011 18:27:34 +0000 (18:27 +0000)]
jme: Extract main and sub chip revision

Get the main and sub chip revision for later workaround use.

Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobridge: implement [add/del]_slave ops
Jiri Pirko [Sun, 13 Feb 2011 09:33:42 +0000 (09:33 +0000)]
bridge: implement [add/del]_slave ops

add possibility to addif/delif via rtnetlink

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobond: implement [add/del]_slave ops
Jiri Pirko [Sun, 13 Feb 2011 09:33:01 +0000 (09:33 +0000)]
bond: implement [add/del]_slave ops

allow enslaving/releasing using netlink interface

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agortnetlink: implement setting of master device
Jiri Pirko [Sun, 13 Feb 2011 10:15:37 +0000 (10:15 +0000)]
rtnetlink: implement setting of master device

This patch allows userspace to enslave/release slave devices via netlink
interface using IFLA_MASTER. This introduces generic way to add/remove
underling devices.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Acked-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotlan: Fix bugs introduced by the last tlan cleanup patch
Sakari Ailus [Wed, 9 Feb 2011 10:25:06 +0000 (10:25 +0000)]
tlan: Fix bugs introduced by the last tlan cleanup patch

Fix two bugs introduced by the commit
c659c38b2796578638548b77ef626d93609ec8ac ("tlan: Code cleanup:
checkpatch.pl is relatively happy now.") In that change,
TLAN_CSTAT_READY was considered as a bit mask containing a single bit
set while it was actually had two set instead.

Many thanks to Dan Carpenter for finding the mistake.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: make dev->master general
Jiri Pirko [Sat, 12 Feb 2011 06:48:36 +0000 (06:48 +0000)]
net: make dev->master general

dev->master is now tightly connected to bonding driver. This patch makes
this pointer more general and ready to be used by others.

 - netdev_set_master() - bond specifics moved to new function
   netdev_set_bond_master()
 - introduced netif_is_bond_slave() to check if device is a bonding slave

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: remove the unnecessary dance around skb_bond_should_drop
Jiri Pirko [Sat, 12 Feb 2011 00:46:06 +0000 (00:46 +0000)]
net: remove the unnecessary dance around skb_bond_should_drop

No need to check (master) twice and to drive in and out the header file.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Reviewed-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agophy: Remove unneeded depends on PHYLIB
hartleys [Fri, 11 Feb 2011 12:14:06 +0000 (12:14 +0000)]
phy: Remove unneeded depends on PHYLIB

Remove unneeded depends on PHYLIB.  The config selection is already in
an if PHYLIB / endif block.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonetwork: Allow af_packet to transmit +4 bytes for VLAN packets.
Ben Greear [Fri, 11 Feb 2011 09:35:18 +0000 (09:35 +0000)]
network: Allow af_packet to transmit +4 bytes for VLAN packets.

This allows user-space to send a '1500' MTU VLAN packet on a
1500 MTU ethernet frame.  The extra 4 bytes of a VLAN header is
not usually charged against the MTU when other parts of the
network stack is transmitting vlans...

Signed-off-by: Ben Greear <greearb@candelatech.com>
Reviewed-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'batman-adv/next' of git://git.open-mesh.org/ecsv/linux-merge
David S. Miller [Sat, 12 Feb 2011 05:20:27 +0000 (21:20 -0800)]
Merge branch 'batman-adv/next' of git://git.open-mesh.org/ecsv/linux-merge

13 years agobe2net: restrict WOL to PFs only.
Ajit Khaparde [Fri, 11 Feb 2011 13:39:30 +0000 (13:39 +0000)]
be2net: restrict WOL to PFs only.

WOL is not supported for Vrtual Functions.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: detect a UE even when a interface is down.
Ajit Khaparde [Fri, 11 Feb 2011 13:38:29 +0000 (13:38 +0000)]
be2net: detect a UE even when a interface is down.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: gracefully handle situations when UE is detected
Ajit Khaparde [Fri, 11 Feb 2011 13:38:17 +0000 (13:38 +0000)]
be2net: gracefully handle situations when UE is detected

Avoid accessing the hardware when UE is detected.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: fix be_suspend/resume/shutdown
Ajit Khaparde [Fri, 11 Feb 2011 13:38:03 +0000 (13:38 +0000)]
be2net: fix be_suspend/resume/shutdown

> call pci msix disable in be_suspend
> call pci msix enable in be_resume
> stop worker thread in be_suspend
> start worker thread in be_resume
> stop worker thread in be_shutdown

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: pass proper hdr_size while flashing redboot.
Ajit Khaparde [Fri, 11 Feb 2011 13:37:42 +0000 (13:37 +0000)]
be2net: pass proper hdr_size while flashing redboot.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: Fix broken priority setting when vlan tagging is enabled.
Ajit Khaparde [Fri, 11 Feb 2011 13:37:25 +0000 (13:37 +0000)]
be2net: Fix broken priority setting when vlan tagging is enabled.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: Allow VFs to call be_cmd_reset_function.
Ajit Khaparde [Fri, 11 Feb 2011 13:36:57 +0000 (13:36 +0000)]
be2net: Allow VFs to call be_cmd_reset_function.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: pass domain numbers for pmac_add/del functions
Ajit Khaparde [Fri, 11 Feb 2011 13:36:37 +0000 (13:36 +0000)]
be2net: pass domain numbers for pmac_add/del functions

be_cmd_pmac_add/del functions need to pass domain number to the firmware.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: For the VF MAC, use the OUI from current MAC address
Ajit Khaparde [Fri, 11 Feb 2011 13:36:18 +0000 (13:36 +0000)]
be2net: For the VF MAC, use the OUI from current MAC address

Currently we are always using the Emulex OUI for a VF MAC address
while generating MAC for a VF.  Use OUI from current MAC instead.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: Cleanup the VF interface handles
Ajit Khaparde [Fri, 11 Feb 2011 13:35:56 +0000 (13:35 +0000)]
be2net: Cleanup the VF interface handles

The PF needs to cleanup all the interface handles that it created for the VFs.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: call be_vf_eth_addr_config() after register_netdev
Ajit Khaparde [Fri, 11 Feb 2011 13:35:41 +0000 (13:35 +0000)]
be2net: call be_vf_eth_addr_config() after register_netdev

This is to avoid the completion processing for be_vf_eth_addr_config
to consume the link status notification before netdev_register.
Otherwise this causes the PF miss its first link status update.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: Initialize and cleanup sriov resources only if pci_enable_sriov has succeeded.
Ajit Khaparde [Fri, 11 Feb 2011 13:35:02 +0000 (13:35 +0000)]
be2net: Initialize and cleanup sriov resources only if pci_enable_sriov has succeeded.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: Use domain id when be_cmd_if_destroy is called.
Ajit Khaparde [Fri, 11 Feb 2011 13:34:46 +0000 (13:34 +0000)]
be2net: Use domain id when be_cmd_if_destroy is called.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: endianness fix in be_cmd_set_qos().
Ajit Khaparde [Fri, 11 Feb 2011 13:33:02 +0000 (13:33 +0000)]
be2net: endianness fix in be_cmd_set_qos().

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: While configuring QOS for VF, pass proper domain id
Ajit Khaparde [Fri, 11 Feb 2011 13:32:32 +0000 (13:32 +0000)]
be2net: While configuring QOS for VF, pass proper domain id

While configuring QOS for VFs, the VF number should be translated
to domain number correctly.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/jkirsher/net...
David S. Miller [Sat, 12 Feb 2011 05:09:04 +0000 (21:09 -0800)]
Merge branch 'master' of /linux/kernel/git/jkirsher/net-next-2.6

13 years agobatman-adv: Disallow originator addressing within mesh layer
Linus Lüssing [Mon, 7 Feb 2011 00:14:40 +0000 (00:14 +0000)]
batman-adv: Disallow originator addressing within mesh layer

For a host in the mesh network, the batman layer should be transparent.
However, we had one exception, data packets within the mesh network
which have the same destination as a originator are being routed to
that node, although there is no host that node's bat0 interface and
therefore gets dropped anyway. This commit removes this exception.

Signed-off-by: Linus Lüssing <linus.luessing@ascom.ch>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
13 years agobatman-adv: Remove duplicate types.h inclusions
Linus Lüssing [Sun, 6 Feb 2011 23:08:37 +0000 (23:08 +0000)]
batman-adv: Remove duplicate types.h inclusions

types.h is included by main.h, which is included at the beginning of any
other c-file anyway. Therefore this commit removes those duplicate
inclussions.

Signed-off-by: Linus Lüssing <linus.luessing@ascom.ch>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
13 years agobatman-adv: Split combined variable declarations
Marek Lindner [Tue, 8 Feb 2011 12:43:54 +0000 (12:43 +0000)]
batman-adv: Split combined variable declarations

Multiple variable declarations in a single statements over multiple lines can
be split into multiple variable declarations without changing the actual
behavior.

Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
13 years agoatl1: Do not use legacy PCI power management
Rafael J. Wysocki [Thu, 10 Feb 2011 06:55:19 +0000 (06:55 +0000)]
atl1: Do not use legacy PCI power management

The atl1 driver uses the legacy PCI power management, so it has to
do some PCI-specific things in its ->suspend() and ->resume()
callbacks, which isn't necessary and should better be done by the PCI
subsystem-level power management code.

Convert atl1 to the new PCI power management framework and make it
let the PCI subsystem take care of all the PCI-specific aspects of
device handling during system power transitions.

Tested-by: Thomas Fjellstrom <thomas@fjellstrom.ca>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoatl1c: Do not call device_init_wakeup() in atl1c_probe()
Rafael J. Wysocki [Thu, 10 Feb 2011 06:54:04 +0000 (06:54 +0000)]
atl1c: Do not call device_init_wakeup() in atl1c_probe()

The atl1c driver shouldn't call device_init_wakeup() in its probe
routine with the second argument equal to 1, because for PCI devices
the wakeup capability setting is initialized as appropriate by the
PCI subsystem.  Remove the potentially harmful call.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotg3: Avoid setting power.can_wakeup for devices that cannot wake up
Rafael J. Wysocki [Thu, 10 Feb 2011 06:53:09 +0000 (06:53 +0000)]
tg3: Avoid setting power.can_wakeup for devices that cannot wake up

The tg3 driver uses device_init_wakeup() in such a way that the
device's power.can_wakeup flag may be set even though the PCI
subsystem cleared it before, in which case the device cannot wake
up the system from sleep states.  Modify the driver to only change
the power.can_wakeup flag if the device is not capable of generating
wakeup signals.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoixgbe: Adding 100MB FULL support in ethtool
Atita Shirwaikar [Wed, 5 Jan 2011 02:00:55 +0000 (02:00 +0000)]
ixgbe: Adding 100MB FULL support in ethtool

Current driver does not show 100MB support in ethtool.
Adding support for the same.

Signed-off-by: Atita Shirwaikar <atita.shirwaikar@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: cleanup ixgbe_init_mbx_params_pf namespace issue
Don Skidmore [Fri, 28 Jan 2011 02:28:36 +0000 (02:28 +0000)]
ixgbe: cleanup ixgbe_init_mbx_params_pf namespace issue

The function ixgbe_init_mbx_params_pf isn't used unless CONFIG_PCI_IOV
is defined.  This is causing namespace warnings.  So I wrapped its
definition in CONFIG_PCI_IOV too.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: cleanup namespace complaint by removing little used function
Don Skidmore [Fri, 28 Jan 2011 02:28:31 +0000 (02:28 +0000)]
ixgbe: cleanup namespace complaint by removing little used function

We had a support function that just walked a few pointers to get
from the ixgbe_hw struct to the netdev pointer.  This was causing
a namespace warning so I removed it and just reference the pointers
directly.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: fix namespace issue with ixgbe_dcb_txq_to_tc
Don Skidmore [Fri, 28 Jan 2011 02:28:26 +0000 (02:28 +0000)]
ixgbe: fix namespace issue with ixgbe_dcb_txq_to_tc

We didn't need the prototype and it was causing namespace complaints so
I made it static.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: DCB, use hardware independent routines
John Fastabend [Wed, 5 Jan 2011 04:48:45 +0000 (04:48 +0000)]
ixgbe: DCB, use hardware independent routines

This consolidates hardware specifics to ixgbe_dcb.c this simplifies
code that was previously branching based on hardware type.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: DCB, remove RESET bit it is no longer needed
John Fastabend [Fri, 7 Jan 2011 15:30:46 +0000 (15:30 +0000)]
ixgbe: DCB, remove RESET bit it is no longer needed

This removes the RESET bit previously used to force a device
reset when DCB bandwidth configurations were changed. This can
now be done dynamically without a reset so the bit is no longer
needed. The only remaining operations that force a device reset
are DCB enable/disable and FCoE application priority changes.
DCB enable/disable is a hardware requirement.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: DCB, do not reset on CEE pg changes
John Fastabend [Sat, 22 Jan 2011 06:07:05 +0000 (06:07 +0000)]
ixgbe: DCB, do not reset on CEE pg changes

The 82599 and 82598 devices do not require hardware resets to
configure CEE pg settings. This patch changes DCB configuration
to set the CEE pg values directly from the dcbnl ops routine.

This reduces the number of resets seen on the wire and allows
LLDP to reach a steady state faster.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: DCB, implement 802.1Qaz routines
John Fastabend [Thu, 10 Feb 2011 14:40:01 +0000 (14:40 +0000)]
ixgbe: DCB, implement 802.1Qaz routines

Implements 802.1Qaz support for ixgbe driver. Additionally,
this adds IEEE_8021QAZ_TSA_{} defines to dcbnl.h this is to
avoid having to use cryptic numeric codes for the TSA type.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: DCB, abstract out dcb_config from DCB hardware configuration
John Fastabend [Wed, 5 Jan 2011 04:47:43 +0000 (04:47 +0000)]
ixgbe: DCB, abstract out dcb_config from DCB hardware configuration

Currently the routines that configure the HW for DCB require a
ixgbe_dcb_config structure. This structure was designed to support
the CEE standard and does not match the IEEE standard well.

This patch changes the HW routines in ixgbe_dcb_8259x.{ch} to use
raw pfc and bandwidth values. This requires some parsing of the DCB
configuration but makes the HW routines independent of the data
structure that contains the DCB configuration.

The primary advantage to doing this is we can do HW setup directly
from the 802.1Qaz ops without having to arbitrarily encapsulate this
data into the CEE structure.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: DCB, remove round robin mode on 82598 devices
John Fastabend [Wed, 5 Jan 2011 04:47:38 +0000 (04:47 +0000)]
ixgbe: DCB, remove round robin mode on 82598 devices

Remove round robin configuration code for 82598 parts it
is not settable and is always false.

If we need/want this in the future we can add it back properly.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: DCB, only reprogram HW if the FCoE priority is changed
John Fastabend [Tue, 1 Feb 2011 02:10:20 +0000 (02:10 +0000)]
ixgbe: DCB, only reprogram HW if the FCoE priority is changed

If the FCoE priority is not changing do not set the RESET and
APP_UPCHG bits. This causes unneeded HW resets and which can
cause unneeded LLDP frames and negotiations.

The current check is not sufficient because the FCoE priority
can change twice during a negotiation which results in the
bits being set. This occurs when the switch changes the
priority or when the link is reset with switches that do not
include the APP priority until after PFC has been negotiated.

This results in set_app being called with the local APP
priority. Then the negotiation completes and set_app
is called again with the peer APP priority. The check
fails so the device is reset and the above occurs again
resulting in an endless loop of resets.

By only resetting the device if the APP priority has really
changed we short circuit the loop.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoigb: Enable PF side of SR-IOV support for i350 devices
Carolyn Wyborny [Thu, 20 Jan 2011 06:40:45 +0000 (06:40 +0000)]
igb: Enable PF side of SR-IOV support for i350 devices

This patch adds full support for SR-IOV by enabling the PF side.
VF side has already been committed.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoe1000e: return appropriate errors for 'ethtool -r'
Bruce Allan [Thu, 20 Jan 2011 06:58:07 +0000 (06:58 +0000)]
e1000e: return appropriate errors for 'ethtool -r'

...when invoked while interface is not up or when auto-negotiation is
disabled as done by other drivers.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoe1000e: use correct pointer when memcpy'ing a 2-dimensional array
Bruce Allan [Wed, 19 Jan 2011 04:23:39 +0000 (04:23 +0000)]
e1000e: use correct pointer when memcpy'ing a 2-dimensional array

*e1000_gstrings_test is not the same size as e1000_gstrings_test.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoe1000e: replace unbounded sprintf with snprintf
Bruce Allan [Wed, 19 Jan 2011 04:20:59 +0000 (04:20 +0000)]
e1000e: replace unbounded sprintf with snprintf

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agotg3: Expand 5719 workaround
Matt Carlson [Fri, 11 Feb 2011 04:06:46 +0000 (20:06 -0800)]
tg3: Expand 5719 workaround

As a precautionary measure, expand the fix submitted in commit
4d163b75e979833979cc401ae433cb1d7743d57e entitled "tg3: Fix 5719 A0 tx
completion bug" to apply to all 5719 revisions.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobatman-adv: Use successive sequence numbers for fragments
Sven Eckelmann [Thu, 10 Feb 2011 14:33:56 +0000 (14:33 +0000)]
batman-adv: Use successive sequence numbers for fragments

The two fragments of an unicast packet must have successive sequence numbers to
allow the receiver side to detect matching fragments and merge them again. The
current implementation doesn't provide that property because a sequence of two
atomic_inc_return may be interleaved with another sequence which also changes
the variable.

The access to the fragment sequence number pool has either to be protected by
correct locking or it has to reserve two sequence numbers in a single fetch.
The latter one can easily be done by increasing the value of the last used
sequence number by 2 in a single step. The generated window of two currently
unused sequence numbers can now be scattered across the two fragments.

Reported-by: Linus Lüssing <linus.luessing@web.de>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
13 years agoinet: Create a mechanism for upward inetpeer propagation into routes.
David S. Miller [Tue, 8 Feb 2011 04:38:06 +0000 (20:38 -0800)]
inet: Create a mechanism for upward inetpeer propagation into routes.

If we didn't have a routing cache, we would not be able to properly
propagate certain kinds of dynamic path attributes, for example
PMTU information and redirects.

The reason is that if we didn't have a routing cache, then there would
be no way to lookup all of the active cached routes hanging off of
sockets, tunnels, IPSEC bundles, etc.

Consider the case where we created a cached route, but no inetpeer
entry existed and also we were not asked to pre-COW the route metrics
and therefore did not force the creation a new inetpeer entry.

If we later get a PMTU message, or a redirect, and store this
information in a new inetpeer entry, there is no way to teach that
cached route about the newly existing inetpeer entry.

The facilities implemented here handle this problem.

First we create a generation ID.  When we create a cached route of any
kind, we remember the generation ID at the time of attachment.  Any
time we force-create an inetpeer entry in response to new path
information, we bump that generation ID.

The dst_ops->check() callback is where the knowledge of this event
is propagated.  If the global generation ID does not equal the one
stored in the cached route, and the cached route has not attached
to an inetpeer yet, we look it up and attach if one is found.  Now
that we've updated the cached route's information, we update the
route's generation ID too.

This clears the way for implementing PMTU and redirects directly in
the inetpeer cache.  There is absolutely no need to consult cached
route information in order to maintain this information.

At this point nothing bumps the inetpeer genids, that comes in the
later changes which handle PMTUs and redirects using inetpeers.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoinetpeer: Add redirect and PMTU discovery cached info.
David S. Miller [Wed, 9 Feb 2011 23:36:47 +0000 (15:36 -0800)]
inetpeer: Add redirect and PMTU discovery cached info.

Validity of the cached PMTU information is indicated by it's
expiration value being non-zero, just as per dst->expires.

The scheme we will use is that we will remember the pre-ICMP value
held in the metrics or route entry, and then at expiration time
we will restore that value.

In this way PMTU expiration does not kill off the cached route as is
done currently.

Redirect information is permanent, or at least until another redirect
is received.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoinetpeer: Abstract address representation further.
David S. Miller [Wed, 9 Feb 2011 22:30:26 +0000 (14:30 -0800)]
inetpeer: Abstract address representation further.

Future changes will add caching information, and some of
these new elements will be addresses.

Since the family is implicit via the ->daddr.family member,
replicating the family in ever address we store is entirely
redundant.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: rename group sysfs entry to netdev_group
Xiaotian Feng [Thu, 10 Feb 2011 03:16:15 +0000 (19:16 -0800)]
net: rename group sysfs entry to netdev_group

commit a512b92 adds sysfs entry for net device group, but
before this commit, tun also uses group sysfs, so after this
commit checkin, kernel warns like this:
    sysfs: cannot create duplicate filename '/devices/virtual/net/vnet0/group'

Since tun has used this for years, rename sysfs under tun might
break existing userspace, so rename group sysfs entry for net device
group is a better choice.

Signed-off-by: Xiaotian Feng <dfeng@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6
David S. Miller [Wed, 9 Feb 2011 20:39:12 +0000 (12:39 -0800)]
Merge branch 'master' of git://git./linux/kernel/git/kaber/nf-next-2.6

13 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Wed, 9 Feb 2011 01:19:01 +0000 (17:19 -0800)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6

Conflicts:
drivers/net/e1000e/netdev.c

13 years agopch_can: fix module reload issue with MSI
Tomoya [Mon, 7 Feb 2011 23:29:03 +0000 (23:29 +0000)]
pch_can: fix module reload issue with MSI

Currently, in case reload pch_can,
pch_can not to be able to catch interrupt.

The cause is bus-master is not set in pch_can.
Thus, add enabling bus-master processing.

Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agopch_can: fix rmmod issue
Tomoya [Mon, 7 Feb 2011 23:29:02 +0000 (23:29 +0000)]
pch_can: fix rmmod issue

Currently, when rmmod pch_can, kernel failure occurs.
The cause is pci_iounmap executed before pch_can_reset.
Thus pci_iounmap moves after pch_can_reset.

Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agopch_can: fix 800k comms issue
Tomoya [Mon, 7 Feb 2011 23:29:01 +0000 (23:29 +0000)]
pch_can: fix 800k comms issue

Currently, 800k comms fails since prop_seg set zero.
(EG20T PCH CAN register of prop_seg must be set more than 1)
To prevent prop_seg set to zero, change tseg2_min 1 to 2.

Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Kill NETEVENT_PMTU_UPDATE.
David S. Miller [Wed, 9 Feb 2011 00:17:55 +0000 (16:17 -0800)]
net: Kill NETEVENT_PMTU_UPDATE.

Nobody actually does anything in response to the event,
so just kill it off.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Remove bogus barrier() in dst_allfrag().
David S. Miller [Tue, 8 Feb 2011 23:33:22 +0000 (15:33 -0800)]
net: Remove bogus barrier() in dst_allfrag().

I simply missed this one when modifying the other dst
metric interfaces earlier.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Fix lockdep regression caused by initializing netdev queues too early.
David S. Miller [Tue, 8 Feb 2011 23:02:50 +0000 (15:02 -0800)]
net: Fix lockdep regression caused by initializing netdev queues too early.

In commit aa9421041128abb4d269ee1dc502ff65fb3b7d69 ("net: init ingress
queue") we moved the allocation and lock initialization of the queues
into alloc_netdev_mq() since register_netdevice() is way too late.

The problem is that dev->type is not setup until the setup()
callback is invoked by alloc_netdev_mq(), and the dev->type is
what determines the lockdep class to use for the locks in the
queues.

Fix this by doing the queue allocation after the setup() callback
runs.

This is safe because the setup() callback is not allowed to make any
state changes that need to be undone on error (memory allocations,
etc.).  It may, however, make state changes that are undone by
free_netdev() (such as netif_napi_add(), which is done by the
ipoib driver's setup routine).

The previous code also leaked a reference to the &init_net namespace
object on RX/TX queue allocation failures.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet/caif: Fix dangling list pointer in freed object on error.
David S. Miller [Tue, 8 Feb 2011 22:31:31 +0000 (14:31 -0800)]
net/caif: Fix dangling list pointer in freed object on error.

rtnl_link_ops->setup(), and the "setup" callback passed to alloc_netdev*(),
cannot make state changes which need to be undone on failure.  There is
no cleanup mechanism available at this point.

So we have to add the caif private instance to the global list once we
are sure that register_netdev() has succedded in ->newlink().

Otherwise, if register_netdev() fails, the caller will invoke free_netdev()
and we will have a reference to freed up memory on the chnl_net_list.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipsec: allow to align IPv4 AH on 32 bits
Nicolas Dichtel [Wed, 2 Feb 2011 06:29:02 +0000 (06:29 +0000)]
ipsec: allow to align IPv4 AH on 32 bits

The Linux IPv4 AH stack aligns the AH header on a 64 bit boundary
(like in IPv6). This is not RFC compliant (see RFC4302, Section
3.3.3.2.1), it should be aligned on 32 bits.

For most of the authentication algorithms, the ICV size is 96 bits.
The AH header alignment on 32 or 64 bits gives the same results.

However for SHA-256-128 for instance, the wrong 64 bit alignment results
in adding useless padding in IPv4 AH, which is forbidden by the RFC.

To avoid breaking backward compatibility, we use a new flag
(XFRM_STATE_ALIGN4) do change original behavior.

Initial patch from Dang Hongwu <hongwu.dang@6wind.com> and
Christophe Gouault <christophe.gouault@6wind.com>.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoUSB CDC NCM errata updates for cdc_ncm host driver
Alexey Orishko [Mon, 7 Feb 2011 09:45:10 +0000 (09:45 +0000)]
USB CDC NCM errata updates for cdc_ncm host driver

Specification links:
- CDC NCM errata link:
  http://www.usb.org/developers/devclass_docs/NCM10_012011.zip
- CDC and WMC errata link:
  http://www.usb.org/developers/devclass_docs/CDC1.2_WMC1.1_012011.zip

Changes:
- driver updated to match cdc.h header with errata changes
- added support for USB_CDC_SET_NTB_INPUT_SIZE control request with
  8 byte length
- fixes to comply with specification: send only control requests supported by
  device, set number of datagrams for IN direction, connection speed structure
  update, etc.
- packet loss fixed for tx direction; misleading flag renamed.
- adjusted hard_mtu value.

Signed-off-by: Alexey Orishko <alexey.orishko@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoCDC NCM errata updates for cdc.h
Alexey Orishko [Mon, 7 Feb 2011 09:45:09 +0000 (09:45 +0000)]
CDC NCM errata updates for cdc.h

Changes are based on the following documents:
- CDC NCM errata:
http://www.usb.org/developers/devclass_docs/NCM10_012011.zip
- CDC and WMC errata link:
http://www.usb.org/developers/devclass_docs/CDC1.2_WMC1.1_012011.zip

Signed-off-by: Alexey Orishko <alexey.orishko@stericsson.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Tue, 8 Feb 2011 21:52:31 +0000 (13:52 -0800)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-next-2.6

13 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/jkirsher/net-2.6
David S. Miller [Tue, 8 Feb 2011 20:16:52 +0000 (12:16 -0800)]
Merge branch 'master' of /linux/kernel/git/jkirsher/net-2.6

13 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Tue, 8 Feb 2011 20:03:54 +0000 (12:03 -0800)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6

13 years agoixgbe: update version string
Don Skidmore [Wed, 26 Jan 2011 06:04:37 +0000 (06:04 +0000)]
ixgbe: update version string

This will synchronize the version string with that of the latest source
forge driver which shares its functionality.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: cleanup variable initialization
Don Skidmore [Wed, 26 Jan 2011 06:04:17 +0000 (06:04 +0000)]
ixgbe: cleanup variable initialization

The ixgbe_fcoe_ddp_get function wasn't initializing one of its variables
and this was producing compiler warnings.  This patch cleans that up.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: limit VF access to network traffic
Alexander Duyck [Wed, 19 Jan 2011 18:33:05 +0000 (18:33 +0000)]
ixgbe: limit VF access to network traffic

This change fixes VM pool allocation issues based on MAC address filtering,
as well as limits the scope of VF access to promiscuous mode.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: fix for 82599 erratum on Header Splitting
Don Skidmore [Tue, 18 Jan 2011 22:53:47 +0000 (22:53 +0000)]
ixgbe: fix for 82599 erratum on Header Splitting

We have found a hardware erratum on 82599 hardware that can lead to
unpredictable behavior when Header Splitting mode is enabled.  So
we are no longer enabling this feature on affected hardware.

Please see the 82599 Specification Update for more information.

CC: stable@kernel.org
Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: fix variable set but not used warnings by gcc 4.6
Emil Tantilov [Wed, 5 Jan 2011 07:09:41 +0000 (07:09 +0000)]
ixgbe: fix variable set but not used warnings by gcc 4.6

Caught with gcc 4.6 -Wunused-but-set-variable

Remove unused napi_vectors variable.

Fix the use of reset_bit in ixgbe_reset_hw_X540()

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoe1000: add support for Marvell Alaska M88E1118R PHY
Florian Fainelli [Mon, 24 Jan 2011 14:48:03 +0000 (14:48 +0000)]
e1000: add support for Marvell Alaska M88E1118R PHY

This patch adds support for Marvell Alask M88E188R PHY chips. Support for
other M88* PHYs is already there, so there is nothing more to add than its
PHY id.

CC: Dirk Brandewie <dirk.j.brandewie@intel.com>
Signed-off-by: Florian Fainelli <ffainelli@freebox.fr>
Acked-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoe1000e: tx_timeout should not increment for non-hang events
Jesse Brandeburg [Wed, 2 Feb 2011 10:19:55 +0000 (10:19 +0000)]
e1000e: tx_timeout should not increment for non-hang events

Currently the driver increments the tx_timeout counter (an error counter)
when simply resetting the part with outstanding transmit work pending.
This is an unnecessary count of an error, when all we should be doing is
just resetting the part and discarding the transmits.  With this change the
only increment of tx_timeout is when the stack calls the watchdog reset
function due to a true Tx timeout.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Reviewed-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoMerge branch 'batman-adv/merge' of git://git.open-mesh.org/ecsv/linux-merge
David S. Miller [Tue, 8 Feb 2011 03:54:14 +0000 (19:54 -0800)]
Merge branch 'batman-adv/merge' of git://git.open-mesh.org/ecsv/linux-merge

13 years agobatman-adv: Linearize fragment packets before merge
Sven Eckelmann [Sun, 6 Feb 2011 23:26:43 +0000 (23:26 +0000)]
batman-adv: Linearize fragment packets before merge

We access the data inside the skbs of two fragments directly using memmove
during the merge. The data of the skb could span over multiple skb pages. An
direct access without knowledge about the pages would lead to an invalid memory
access.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
[lindner_marek@yahoo.de: Move return from function to the end]
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
13 years agox25: possible skb leak on bad facilities
andrew hendry [Mon, 7 Feb 2011 00:08:15 +0000 (00:08 +0000)]
x25: possible skb leak on bad facilities

Originally x25_parse_facilities returned
-1 for an error
 0 meaning 0 length facilities
>0 the length of the facilities parsed.

5ef41308f94dc ("x25: Prevent crashing when parsing bad X.25 facilities") introduced more
error checking in x25_parse_facilities however used 0 to indicate bad parsing
a6331d6f9a429 ("memory corruption in X.25 facilities parsing") followed this further for
DTE facilities, again using 0 for bad parsing.

The meaning of 0 got confused in the callers.
If the facilities are messed up we can't determine where the data starts.
So patch makes all parsing errors return -1 and ensures callers close and don't use the skb further.

Reported-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Hendry <andrew.hendry@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agomac80211: remove unneeded check
Dan Carpenter [Mon, 7 Feb 2011 19:03:35 +0000 (22:03 +0300)]
mac80211: remove unneeded check

"ap" is the address of sdata->u.ap so it can never be NULL here.  Also
we dereferenced it on the previous line.  I removed the check.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Update comments for not parsing DTIM period
Mohammed Shafi Shajakhan [Mon, 7 Feb 2011 15:38:28 +0000 (21:08 +0530)]
ath9k: Update comments for not parsing DTIM period

Add few comments for not parsing DTIM period from mac80211

Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Update comments on radiotap MCS index
Mohammed Shafi Shajakhan [Mon, 7 Feb 2011 04:40:04 +0000 (10:10 +0530)]
mac80211: Update comments on radiotap MCS index

mac80211 now supports passing MCS index to radiotap, so update the
comments regarding this

Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: as a 4-addr station, do not receive packets for other stations
Felix Fietkau [Sat, 5 Feb 2011 22:48:37 +0000 (23:48 +0100)]
mac80211: as a 4-addr station, do not receive packets for other stations

Since 4-addr frames completely override the source address which will
make it into the converted 802.3 frames, receiving frames for other
4-addr stations will confuse the bridging code.

To be able to handle traffic for all connected devices, the bridge
code will automatically turn on promiscuous mode, which triggers
this problem.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Reported-by: Steve Brown <sbrown@cortland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Make some mlme timers module paramaters.
Ben Greear [Fri, 4 Feb 2011 23:30:24 +0000 (15:30 -0800)]
mac80211: Make some mlme timers module paramaters.

This allows users to tune the connection-loss algorithms
to be more or less lenient.  In particular, larger
null-func retries helps when using lots of virtual
stations on a loaded network.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Fix fast channel switching
Nick Kossifidis [Thu, 3 Feb 2011 23:41:02 +0000 (01:41 +0200)]
ath5k: Fix fast channel switching

Fast channel change fixes:

a) Always set OFDM timings
b) Don't re-activate PHY
c) Enable only NF calibration, not AGC

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: fix the skb cloned check in the tx path
Felix Fietkau [Mon, 7 Feb 2011 11:05:00 +0000 (12:05 +0100)]
mac80211: fix the skb cloned check in the tx path

Using skb_header_cloned to check if it's safe to write to the skb is not
enough - mac80211 also touches the tailroom of the skb.
Initially this check was only used to increase a counter, however this
commit changed the code to also skip skb data reallocation if no extra
head/tailroom was needed:

commit 4cd06a344db752f513437138953af191cbe9a691
mac80211: skip unnecessary pskb_expand_head calls

It added a regression at least with iwl3945, which is fixed by this patch.

Reported-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Tested-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: Re-enable RF_KILL interrupt when down
Don Fry [Sun, 6 Feb 2011 17:29:45 +0000 (09:29 -0800)]
iwlagn: Re-enable RF_KILL interrupt when down

With commit 554d1d027b19265c4aa3f718b3126d2b86e09a08 only one RF_KILL
interrupt will be seen by the driver when the interface is down.

Re-enable the interrupt when it occurs to see all transitions.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>