Danny Kukawka [Fri, 17 Feb 2012 05:43:29 +0000 (05:43 +0000)]
ethoc: set addr_assign_type if random_ether_addr() used
Set addr_assign_type correctly to NET_ADDR_RANDOM in case
a random MAC address was generated and assigned to the netdevice.
Fixed ethoc_set_mac_address() to check if the given mac
address is valid and set also dev_addr of the net_device.
Check also the return value of ethoc_set_mac_address() in
ethoc_probe().
Reset the state to NET_ADDR_PERM as soon as the MAC get
changed via .ndo_set_mac_address.
v2: set net_device->dev_addr in ethoc_set_mac_address(),
check if given address is valid
Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Danny Kukawka [Fri, 17 Feb 2012 05:43:27 +0000 (05:43 +0000)]
batman-adv: use eth_hw_addr_random() instead of random_ether_addr()
Use eth_hw_addr_random() instead of calling random_ether_addr()
to set addr_assign_type correctly to NET_ADDR_RANDOM.
Remove dev_addr in interface_setup(), it's not needed anymore.
Reset the state to NET_ADDR_PERM as soon as the MAC get
changed via .ndo_set_mac_address.
v2: use bitops, adapt to eth_hw_addr_random()
Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Danny Kukawka [Fri, 17 Feb 2012 05:43:26 +0000 (05:43 +0000)]
igbvf: reset netdevice addr_assign_type if changed
Reset the state of addr_assign_type to NET_ADDR_PERM as soon as
the MAC get changed via .ndo_set_mac_address.
v2: use bitops to reset addr_assign_type
Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Danny Kukawka [Fri, 17 Feb 2012 05:43:25 +0000 (05:43 +0000)]
xilinx ll_temac: use eth_hw_addr_random() instead of random_ether_addr()
Use eth_hw_addr_random() instead of calling random_ether_addr()
to set addr_assign_type correctly to NET_ADDR_RANDOM.
Reset the state to NET_ADDR_PERM as soon as the MAC get
changed via .ndo_set_mac_address.
v2: reworked to prevent using an extra variable
Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Danny Kukawka [Fri, 17 Feb 2012 05:43:24 +0000 (05:43 +0000)]
davinci_emac: use eth_hw_addr_random() instead of random_ether_addr()
Use eth_hw_addr_random() instead of calling random_ether_addr()
to set addr_assign_type correctly to NET_ADDR_RANDOM.
Reset the state to NET_ADDR_PERM as soon as the MAC get
changed via .ndo_set_mac_address.
Remove one memcpy from emac_dev_setmac_addr() since this is a
duplicate: it's already done some lines above.
v2: use bitops, adapt to eth_hw_addr_random, remove a memcpy
Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Danny Kukawka [Fri, 17 Feb 2012 05:43:23 +0000 (05:43 +0000)]
lantiq_etop: set addr_assign_type if random_ether_addr() used
Set addr_assign_type correctly to NET_ADDR_RANDOM in case
a random MAC address was generated and assigned to the netdevice.
v2: added comment, renamed bool variable to random_mac
Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Danny Kukawka [Fri, 17 Feb 2012 05:43:22 +0000 (05:43 +0000)]
au1000_eth: use eth_hw_addr_random() instead of random_ether_addr()
Use eth_hw_addr_random() instead of calling random_ether_addr()
to set addr_assign_type correctly to NET_ADDR_RANDOM.
v2: adapt to eth_hw_addr_random()
Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 17 Feb 2012 20:49:12 +0000 (15:49 -0500)]
Merge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-merge
Yoshihiro Shimoda [Wed, 15 Feb 2012 17:55:06 +0000 (17:55 +0000)]
net: sh_eth: add support for VLAN tag filtering
Some controllers have TSU. It can register one VLAN tag, and it can
filter other VLAN tag by hardware.
If vlan_rx_add_vid() is called twice or more, the driver will disable
the filtering.
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yoshihiro Shimoda [Wed, 15 Feb 2012 17:55:03 +0000 (17:55 +0000)]
net: sh_eth: add support for multicast filtering
Some controllers have TSU. It can filter multicast by hardware.
This patch supports it.
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yoshihiro Shimoda [Wed, 15 Feb 2012 17:55:01 +0000 (17:55 +0000)]
net: sh_eth: modify a condition of ioremap for TSU
If the controller has TSU, the each channel needs TSU registers.
This patch also fixes the iounmap condition in the sh_eth_drv_remove().
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yoshihiro Shimoda [Wed, 15 Feb 2012 17:54:56 +0000 (17:54 +0000)]
net: sh_eth: change the condition of initialization
The SH7757 has 2 Fast Ethernet and 2 Gigabit Ethernet, and the first
Gigabit channel needs the initialization. So, this patch adds the
parameter of "needs_init", and if the sh_eth_plat_data is set it
to 1, the driver will initialize the channel.
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yoshihiro Shimoda [Wed, 15 Feb 2012 17:54:51 +0000 (17:54 +0000)]
net: sh_eth: add the value of tsu to the SH7757's GETHER
The SH7757's GETHER has TSU registers. So, this patch adds the value
of ".tsu = 1" in the sh_eth_cpu_data.
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Thu, 16 Feb 2012 22:08:06 +0000 (17:08 -0500)]
Merge git://git./linux/kernel/git/bwh/sfc-next
Marek Lindner [Mon, 28 Nov 2011 16:15:37 +0000 (00:15 +0800)]
batman-adv: export used routing algorithm via sysfs
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Marek Lindner [Sat, 10 Dec 2011 11:45:53 +0000 (19:45 +0800)]
batman-adv: allowing changing the routing algorithm via module parameter
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Marek Lindner [Mon, 28 Nov 2011 13:31:55 +0000 (21:31 +0800)]
batman-adv: convert batman iv algorithm to use dynamic infrastructure
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Marek Lindner [Mon, 28 Nov 2011 09:40:17 +0000 (17:40 +0800)]
batman-adv: add infrastructure to change routing algorithm at runtime
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Marek Lindner [Wed, 7 Dec 2011 10:02:50 +0000 (18:02 +0800)]
batman-adv: warn if added interface is part of a bridge
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Martin Hundebøll [Thu, 8 Dec 2011 12:32:41 +0000 (13:32 +0100)]
batman-adv: Move is_out_of_time() to main.h for general use
Both translation tables and network coding use timeouts to do house
keeping, so we might as well share the function used to compare a
timestamp+timeout with current time.
For readability and simplicity, the function is renamed to
has_timed_out() and uses time_is_before_jiffies() instead of
time_after().
Signed-off-by: Martin Hundebøll <martin@hundeboll.net>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Martin Hundebøll [Thu, 8 Dec 2011 11:48:26 +0000 (12:48 +0100)]
batman-adv: Rm empty line from is_my_mac() in main.c
Signed-off-by: Martin Hundebøll <martin@hundeboll.net>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Marek Lindner [Sun, 4 Dec 2011 20:01:51 +0000 (04:01 +0800)]
batman-adv: simplify bat_ogm_receive API call
Most of the values in that call are derived from the skb, so we can hand
over the skb instead.
Reported-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Sven Eckelmann [Sun, 20 Nov 2011 14:47:38 +0000 (15:47 +0100)]
batman-adv: Explicitly mark the common header structure
All batman-adv packets have a common 3 byte header. It can be used to share
some code between different code paths, but it was never explicit stated that
this header has to be always the same for all packets. Therefore, new code
changes always have the problem that they may accidently introduce regressions
by moving some elements around.
A new structure is introduced that contains the common header and makes it
easier visible that these 3 bytes have to be the same for all on-wire packets.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Antonio Quartulli [Mon, 7 Nov 2011 15:36:40 +0000 (16:36 +0100)]
batman-adv: add tt_initialised flag to the orig_node struct
(ttvn == 0) is currently used as initial condition. However this is not a good
idea because ttvn gets the vale zero each time after reaching the maximum value
(wrap around). For this reason a new flag is added in order to define whether a
node has an initialised table or not. Moreover, after invoking
tt_global_del_orig(), tt_initialised has to be set to false
Reported-by: Alexey Fisher <bug-track@fisher-privat.net>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Tested-by: Alexey Fisher <bug-track@fisher-privat.net>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Ben Hutchings [Tue, 14 Feb 2012 00:48:07 +0000 (00:48 +0000)]
sfc: Add SR-IOV back-end support for SFC9000 family
On the SFC9000 family, each port has 1024 Virtual Interfaces (VIs),
each with an RX queue, a TX queue, an event queue and a mailbox
register. These may be assigned to up to 127 SR-IOV virtual functions
per port, with up to 64 VIs per VF.
We allocate an extra channel (IRQ and event queue only) to receive
requests from VF drivers.
There is a per-port limit of 4 concurrent RX queue flushes, and queue
flushes may be initiated by the MC in response to a Function Level
Reset (FLR) of a VF. Therefore, when SR-IOV is in use, we submit all
flush requests via the MC.
The RSS indirection table is shared with VFs, so the number of RX
queues used in the PF is limited to the number of VIs per VF.
This is almost entirely the work of Steve Hodgson, formerly
shodgson@solarflare.com.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Ben Hutchings [Wed, 15 Feb 2012 01:58:49 +0000 (01:58 +0000)]
sfc: Allocate SRAM between buffer table and descriptor caches at init time
Each port has a block of 64-bit SRAM that is divided between buffer
table and descriptor cache regions at initialisation time. Currently
we use a fixed allocation, but it needs to be changed to support
larger numbers of queues.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Ben Hutchings [Tue, 14 Feb 2012 20:15:57 +0000 (20:15 +0000)]
sfc: Pass NIC structure into efx_wanted_parallelism()
This lets us identify the NIC affected in case of failure, and
will be necessary to adjust for SR-IOV constraints.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Ben Hutchings [Mon, 13 Feb 2012 23:45:02 +0000 (23:45 +0000)]
sfc: Add support for 'extra' channel types
Abstract some of the channel operations to allow for 'extra'
channels that do not have RX or TX queues.
- Try to assign a channel to each extra channel type that is enabled
for the NIC, but gracefully degrade if we can't allocate sufficient
MSI-X vectors
- Allow each extra channel type to generate its own channel name
- Allow channel types to disable reallocation and reinitialisation
of their channels
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Ben Hutchings [Tue, 14 Feb 2012 00:40:12 +0000 (00:40 +0000)]
sfc: Make all CPU/IRQ/channel/queue counts unsigned
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Ben Hutchings [Mon, 13 Feb 2012 23:14:23 +0000 (23:14 +0000)]
sfc: Make buffer table indices and counts consistently unsigned
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Steve Hodgson [Mon, 23 May 2011 11:18:45 +0000 (12:18 +0100)]
sfc: Disable flow control during flushes
The TX DMA engine issues upstream read requests when there is room in
the TX FIFO for the completion. However, the fetches for the rest of
the packet might be delayed by any back pressure. Since a flush must
wait for an EOP, the entire flush may be delayed by back pressure.
Mitigate this by disabling flow control before the flushes are
started. Since PF and VF flushes run in parallel introduce
fc_disable, a reference count of the number of flushes outstanding.
The same principle could be applied to Falcon, but that
would bring with it its own testing.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Ben Hutchings [Fri, 10 Feb 2012 22:23:41 +0000 (22:23 +0000)]
sfc: Generalise event generation to cover VF-owned event queues
For SR-IOV we will need to send events to event queues that belong to
VFs serviced by other drivers. Change the parameters of
efx_generate_event() to allow this and declare it extern.
While we're at it, remove the existing declaration under the wrong
name efx_nic_generate_event().
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Ben Hutchings [Fri, 10 Feb 2012 23:01:48 +0000 (23:01 +0000)]
sfc: Use proper function to test for RX channel in efx_poll()
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Ben Hutchings [Wed, 8 Feb 2012 00:11:20 +0000 (00:11 +0000)]
sfc: Leave interrupts and event queues enabled whenever we can
When SR-IOV is enabled we may receive FLR (Function-Level Reset)
events, associated queue flush events and requests from VF drivers at
any time. Therefore we need to keep event queues and interrupts
enabled whenever possible.
Currently we stop interrupt-driven event processing before flushing RX
and TX queues; efx_nic_flush_queues() then polls event queues for
flush events and discards any others it finds. Change it to work with
the regular event handling functions.
Currently efx_start_channel() fills RX queues synchronously when a
device is brought up. This could now race with NAPI, so change it to
send fill events.
This was almost entirely written by Steve Hodgson, formerly
shodgson@solarflare.com.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Ben Hutchings [Tue, 7 Feb 2012 23:49:52 +0000 (23:49 +0000)]
sfc: Generate RX fill events based on RX queues, not channels
This makes it harder to accidentally send such events to TX-only
channels.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Ben Hutchings [Tue, 7 Feb 2012 23:39:18 +0000 (23:39 +0000)]
sfc: Generalise driver event generation
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Ben Hutchings [Mon, 6 Feb 2012 18:00:57 +0000 (18:00 +0000)]
sfc: Correct MAC filter bitfield definitions
The RMFT_DEST_MAC and TMFT_SRC_MAC register fields were previously
documented as 44 bits wide, whereas a MAC address has 48 bits.
Thankfully the hardware uses the correct width and the driver has
used separate definitions that divide each of these into 32-bit and
16-bit fields.
Fix the initial definitions for these fields and rewrite the latter
definitions to use them.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Ben Hutchings [Mon, 6 Feb 2012 17:27:52 +0000 (17:27 +0000)]
sfc: Add support for TX MAC filters
On Siena each TX queue can be configured to send only packets for
which there is a TX MAC filter that matches the source MAC address,
queue ID, and optionally VID. This will be used to implement the
'spoofchk' feature for SR-IOV virtual functions.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Ben Hutchings [Thu, 2 Feb 2012 22:41:49 +0000 (22:41 +0000)]
sfc: Add support for configuring RX unicast/multicast default filters
On Siena all received packets that don't match a more specific filter
will match the unicast or multicast default filter. Currently we
leave these set to the default values (RSS with base queue number of
0). Allow them to be reconfigured to select a single RX queue.
These default filters are programmed through the FILTER_CTL register,
but we represent them internally as an additional table of size 2.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
David S. Miller [Wed, 15 Feb 2012 22:48:35 +0000 (17:48 -0500)]
ipv4: Eliminate spurious argument to __ipv4_neigh_lookup
'tbl' is always arp_tbl, so specifying it is pointless.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Wed, 15 Feb 2012 21:37:44 +0000 (16:37 -0500)]
decnet: net/dn.h needs net/flow.h
Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Divy Le Ray [Mon, 13 Feb 2012 10:28:46 +0000 (10:28 +0000)]
cxgb3: update firmware version
Hi Dave,
This patch is sent in conjunction with the cxgb3 firmware update submission on linux-firmware.
(https://lkml.org/lkml/2012/2/13/27)
Cheers,
Divy
From: Divy Le Ray <divy@chelsio.com>
This patch updates the firmware version cxgb3 is requesting to 7.12.0.
Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Danny Kukawka [Wed, 15 Feb 2012 07:54:43 +0000 (07:54 +0000)]
renesas/sh_eth.c: fix linux/interrupt.h included twice
Remove double include of linux/interrupt.h.
Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Danny Kukawka [Wed, 15 Feb 2012 06:45:40 +0000 (06:45 +0000)]
net: use eth_hw_addr_random() and reset addr_assign_type
Use eth_hw_addr_random() instead of calling random_ether_addr()
to set addr_assign_type correctly to NET_ADDR_RANDOM.
Reset the state to NET_ADDR_PERM as soon as the MAC get
changed via .ndo_set_mac_address.
v2: adapt to renamed eth_hw_addr_random()
Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Danny Kukawka [Wed, 15 Feb 2012 06:45:39 +0000 (06:45 +0000)]
net: replace random_ether_addr() with eth_hw_addr_random()
Replace usage of random_ether_addr() with eth_hw_addr_random()
to set addr_assign_type correctly to NET_ADDR_RANDOM.
Change the trivial cases.
v2: adapt to renamed eth_hw_addr_random()
Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Mintz Yuval [Wed, 15 Feb 2012 02:10:32 +0000 (02:10 +0000)]
bnx2x: allow all functions to display the phy FW version
The phy FW version is stored in regular memory, no MDC-MDIO access or
any special locks are required to read it in the current implementation.
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Mintz Yuval [Wed, 15 Feb 2012 02:10:31 +0000 (02:10 +0000)]
bnx2x: removed code re-checking memory base after device open
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Mintz Yuval [Wed, 15 Feb 2012 02:10:30 +0000 (02:10 +0000)]
bnx2x: allow BCM84833 phy to advertise 100Base-T speeds
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Mintz Yuval [Wed, 15 Feb 2012 02:10:29 +0000 (02:10 +0000)]
bnx2x: notify cnic of address of info-to-the-mcp
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Mintz Yuval [Wed, 15 Feb 2012 02:10:28 +0000 (02:10 +0000)]
bnx2x: allocate smaller Rx rings for 1G functions
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Mintz Yuval [Wed, 15 Feb 2012 02:10:27 +0000 (02:10 +0000)]
bnx2x: allocate memory dynamically in ethtool self-test.
From: Merav Sicron <meravs@broadcom.com>
Current ethtool self tests usesa large buffer on stack. This patch replaces
that array by dynamically allocated memory
Signed-off-by: Merav Sicron <meravs@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Mintz Yuval [Wed, 15 Feb 2012 02:10:26 +0000 (02:10 +0000)]
bnx2x: force 10G on 84833 phy should be autoneg with only 10G advertised
From: Yaniv Rosner <yaniv.rosner@broadcom.com>
Signed-off-by: Yaniv Rosner <yaniv.rosner@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Mintz Yuval [Wed, 15 Feb 2012 02:10:25 +0000 (02:10 +0000)]
bnx2x: added autoneg-restart after link advertisement changes
From: Yaniv Rosner <yaniv.rosner@broadcom.com>
Signed-off-by: Yaniv Rosner <yaniv.rosner@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Mintz Yuval [Wed, 15 Feb 2012 02:10:24 +0000 (02:10 +0000)]
bnx2x: ethtool publishes link partners speed and FC
Following the changes in the ethtool source code, this patch enables
the bnx2x driver to publish the Link partner's capabilities s, when ethtool
is used on an interface which completed autoneg.
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Yaniv Rosner <yaniv.rosner@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Mintz Yuval [Wed, 15 Feb 2012 02:10:23 +0000 (02:10 +0000)]
bnx2x: half duplex support added for several boards
From: Yaniv Rosner <yaniv.rosner@broadcom.com>
Several boards require an additional HW bit written in-order to enable
half duplex.
Signed-off-by: Yaniv Rosner <yaniv.rosner@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Mintz Yuval [Wed, 15 Feb 2012 02:10:22 +0000 (02:10 +0000)]
bnx2x: consistent statistics after internal driver reload
Currently bnx2x statistics are reset by inner driver reload, e.g. by MTU
change. This patch fixes this issue - from now on statistics should only
be reset upon device closure.
Thanks to Michal Schmidt <mschmidt@redhat.com> for his initial patch
regarding this issue.
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eugenia Emantayev [Tue, 14 Feb 2012 06:38:38 +0000 (06:38 +0000)]
mlx4: add unicast steering entries to resource_tracker
Add unicast steering entries to resource tracker.
Do qp_detach also for these entries when VF doesn't shut down gracefully.
Otherwise there is leakage of these resources, since they are not tracked.
Signed-off-by: Eugenia Emantayev <eugenia@mellanox.co.il>
Reviewed-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eugenia Emantayev [Tue, 14 Feb 2012 06:38:33 +0000 (06:38 +0000)]
mlx4: attach multicast with correct flag
mlx4_multicast_attach/detach() should use always MLX4_MC_STEER flag
Signed-off-by: Eugenia Emantayev <eugenia@mellanox.co.il>
Reviewed-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eugenia Emantayev [Tue, 14 Feb 2012 06:38:12 +0000 (06:38 +0000)]
mlx4: remove redundant adding of steering type to gid
mlx4_uc_steer_add/release() should not add MLX4_UC_STEER flag to gid.
It is added in mlx4_unicast_attach/detach().
Signed-off-by: Eugenia Emantayev <eugenia@mellanox.co.il>
Reviewed-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eugenia Emantayev [Tue, 14 Feb 2012 06:37:46 +0000 (06:37 +0000)]
mlx4: remove unnecessary variables and arguments
mlx4_qp_attach/detach_common() don't use hash variable, move it to find_entry()
static find_entry() in mcg.c doesn't use steer argument
Signed-off-by: Eugenia Emantayev <eugenia@mellanox.co.il>
Reviewed-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eugenia Emantayev [Tue, 14 Feb 2012 06:37:41 +0000 (06:37 +0000)]
mlx4: remove unused field high_prios
Remove unnecessary field high_prios from mlx4_steer struct and initialization
Signed-off-by: Eugenia Emantayev <eugenia@mellanox.co.il>
Reviewed-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eugenia Emantayev [Tue, 14 Feb 2012 06:37:22 +0000 (06:37 +0000)]
mlx4: fix QP tree trashing
When adding new unicast steer entry, before moving qp to state ready,
actually before calling mlx4_RST2INIT_QP_wrapper(), there were added
a lot of entries with local_qpn=0 into radix tree.
This fact impacted the get_res() function and proper functioning
of resource tracker in addition to adding trash entries into radix tree.
Signed-off-by: Eugenia Emantayev <eugenia@mellanox.co.il>
Reviewed-by: Yevgeny Petrilin <yevgenyp@melllanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eugenia Emantayev [Tue, 14 Feb 2012 06:37:16 +0000 (06:37 +0000)]
mlx4_core: fix buffer overrun
When passing MLX4_UC_STEER=1 it was translated to value 2
after mlx4_QP_ATTACH_wrapper. Therefore in new_steering_entry()
unicast steer entries were added to index 2 of array of size 2.
Fixing this bug by shift right to one position.
Signed-off-by: Eugenia Emantayev <eugenia@mellanox.co.il>
Reviewed-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Mon, 13 Feb 2012 15:20:17 +0000 (15:20 +0000)]
tg3: Update copyright
This patch updates the copyright dates in the tg3 driver.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Mon, 13 Feb 2012 15:20:16 +0000 (15:20 +0000)]
tg3: Use *_UNKNOWN ethtool definitions
This patch replaces tg3's private SPEED_INVALID and DUPLEX_INVALID
definitions with SPEED_UNKNOWN and DUPLEX_UNKNOWN respectively.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Mon, 13 Feb 2012 15:20:15 +0000 (15:20 +0000)]
tg3: Remove unneeded link_config.orig_... members
This patch removes the unneeded link_config.orig_* members. When the
phy is in a low power state, the TG3_PHYFLG_IS_LOW_POWER flag solely
determines how the link is configured. When the phy is powered back up,
it can resume using the original settings.
For the phylib case, the link configuration still needs to be saved, but
since the phylib maintains its own configuration, we can repurpose the
(unused in this case) tg3 link configuration members.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Mon, 13 Feb 2012 15:20:14 +0000 (15:20 +0000)]
tg3: Remove unused link config code
When tg3 devices are shutdown, the driver uses the
TG3_PHYFLG_IS_LOW_POWER flag to enable a static phy configuration.
Any attempt to use the link configuration variables is dead code. This
patch removes such code.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Mon, 13 Feb 2012 15:20:13 +0000 (15:20 +0000)]
tg3: Consolidate ASIC rev detection code
Detecting the ASIC revision of a device is getting to be an increasingly
complex process. This patch consolidates all the ASIC rev detection
code to a single routine for better maintainability.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Mon, 13 Feb 2012 15:20:12 +0000 (15:20 +0000)]
tg3: Reduce UMP event collision window
The tg3 driver needs to submit a few phy register values to the UMP
firmware each time the link state changes. Up until now, the driver
would wait for the previous event to complete, then proceed to gather
data through a series of phy accesses. Since phy accesses are
relatively slow, it is possible for another thread to attempt to submit
its own event while the UMP code is still construction its message.
This patch seeks to minimize the collision window as much as possible by
preloading the phy data.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Mon, 13 Feb 2012 15:20:11 +0000 (15:20 +0000)]
tg3: Fix NVRAM page writes on newer devices
On newer devices, the hardware expects the NVRAM address register
to be written only once per NVRAM page. To do otherwise causes NVRAM
corruption. This patch fixes the problem.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Mon, 13 Feb 2012 15:20:10 +0000 (15:20 +0000)]
tg3: Fix copper autoneg adv checks
When checking the autoneg advertisements, the driver failed to include
the master and master enable bits for the bcm5701. This patch fixes the
problem.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Mon, 13 Feb 2012 15:20:09 +0000 (15:20 +0000)]
tg3: Fix stats while interface is down
If the tg3 interface is down, the driver will return ethtool stats
uninitialized. This patch zeroes out the destination stat buffer in
such a case.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Mon, 13 Feb 2012 15:20:08 +0000 (15:20 +0000)]
tg3: Disable new DMA engine for 57766
A bug was found in the new DMA engine for the 57766. This patch
disables it, which causes the device to fallback to the old DMA engine.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Mon, 13 Feb 2012 23:47:20 +0000 (18:47 -0500)]
Merge branch 'master' of git://git./linux/kernel/git/jkirsher/net-next
Ben Hutchings [Fri, 27 Jan 2012 17:23:58 +0000 (17:23 +0000)]
sfc: Warn if unable to create MTDs
Log an explicit warning if we are unable to create MTDs for a net
device. Also correct the comment about why mtd_device_register() may
fail; there is no longer an MTD table to fill up.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Ben Hutchings [Thu, 2 Feb 2012 21:21:15 +0000 (21:21 +0000)]
sfc: Replace some literal constants with EFX_PAGE_SIZE/EFX_BUF_SIZE
The 'page size' for PCIe DMA, i.e. the alignment of boundaries at
which DMA must be broken, is 4KB. Name this value as EFX_PAGE_SIZE
and use it in efx_max_tx_len(). Redefine EFX_BUF_SIZE as
EFX_PAGE_SIZE since its value is also a result of that requirement,
and use it in efx_init_special_buffer().
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Ben Hutchings [Sat, 19 Nov 2011 00:35:47 +0000 (00:35 +0000)]
sfc: Do not retry hardware probe if it schedules a reset
If efx_pci_probe_main() schedules an INVISIBLE or ALL reset (but
nothing more drastic), we retry it up to 5 times. So far as I'm
aware, this was a workaround for bugs in Falcon A0 which were fixed
in production silicon. Remove the retry.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Ben Hutchings [Mon, 13 Feb 2012 23:29:16 +0000 (23:29 +0000)]
sfc: Skip RX end-of-batch work on channels without an RX queue
The code in efx_process_channel() to update the RX queue after each
batch of RX completions works out as a no-op on a TX-only channel
where the RX queue structure is set to all-zeroes, but
(1) efx_channel_get_rx_queue() will BUG() if DEBUG is defined, and
(2) it's a waste of time.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Bruce Allan [Wed, 8 Feb 2012 02:55:56 +0000 (02:55 +0000)]
e1000e: cleanup goto statements to exit points without common work
Per ./Documentation/CodingStyle, goto statements are acceptable for the
centralized exiting of functions when there are multiple exit points which
share common work such as cleanup. When no common work is required for
multiple exit points, the function should just return at these exit points
instead of doing an unnecessary jump to a centralized return. This patch
cleans up the inappropriate use of goto statements, and removes unnecessary
variables (or move to a smaller scope) where possible as a result of the
cleanups.
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Bruce Allan [Wed, 8 Feb 2012 02:55:51 +0000 (02:55 +0000)]
e1000e: potentially incorrect return for e1000e_setup_fiber_serdes_link
In the unlikely event that e1000_poll_fiber_serdes_link_generic() is called
and it returns an error, the returned error code value is not propagated to
the caller of e1000e_setup_fiber_serdes_link().
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Bruce Allan [Wed, 8 Feb 2012 02:55:46 +0000 (02:55 +0000)]
e1000e: potentially incorrect return for e1000_init_hw_ich8lan
In the unlikely event that e1000_setup_link_ich8lan() returns an error,
the returned error code value is not propagated to the caller of
e1000_init_hw_ich8lan().
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Bruce Allan [Wed, 8 Feb 2012 02:55:40 +0000 (02:55 +0000)]
e1000e: cleanup: minor whitespace addition (insert blank line separator)
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Bruce Allan [Wed, 8 Feb 2012 02:55:35 +0000 (02:55 +0000)]
e1000e: cleanup: remove unnecessary variable initializations
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Bruce Allan [Wed, 8 Feb 2012 02:55:30 +0000 (02:55 +0000)]
e1000e: cleanup: remove unnecessary test and return
Fall-through to a return statement that effectively does the same.
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Bruce Allan [Wed, 8 Feb 2012 02:55:25 +0000 (02:55 +0000)]
e1000e: cleanup: remove unnecessary variable ret_val
ret_val gets initialized to -E1000_ERR_NVM and never set differently, so
get rid of it and just return -E1000_ERR_NVM.
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Bruce Allan [Wed, 8 Feb 2012 02:55:19 +0000 (02:55 +0000)]
e1000e: cleanup: remove unreachable statement
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Bruce Allan [Wed, 8 Feb 2012 02:55:14 +0000 (02:55 +0000)]
e1000e: potentially incorrect return for e1000_set_d3_lplu_state_ich8lan
In the unlikely event that e1e_wphy() returns an error, the returned error
code is not propogated to the caller of e1000_set_d3_lplu_state_ich8lan().
With this change, there is a rare possibility that ret_val might not get
set so it must be initialized.
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Eric Dumazet [Mon, 13 Feb 2012 05:40:45 +0000 (05:40 +0000)]
net_sched: sch_plug: plug_qdisc_ops is static
net/sched/sch_plug.c:211:18: warning: symbol 'plug_qdisc_ops' was not
declared. Should it be static?
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet [Mon, 13 Feb 2012 04:23:24 +0000 (04:23 +0000)]
ppp: fix truesize underestimation
When building frag_list, head truesize should be sum of all frag
truesize.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet [Mon, 13 Feb 2012 04:09:20 +0000 (04:09 +0000)]
gro: fix truesize underestimation
skb_gro_receive() doesnt update truesize properly when adding one skb to
frag_list.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Mon, 13 Feb 2012 10:20:12 +0000 (10:20 +0000)]
tg3: Move transmit comment to a better location
This patch moves a comment in the transmit path to a better location.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Mon, 13 Feb 2012 10:20:11 +0000 (10:20 +0000)]
tg3: Eliminate unneeded prototype
This patch eliminates the unneeded tg3_halt_cpu() prototype and moves
the tg3_setup_phy() prototype closer to where it is needed.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Mon, 13 Feb 2012 10:20:10 +0000 (10:20 +0000)]
tg3: Relocate tg3_find_peer
This patch relocates tg3_find_peer to eliminate a prototype.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Mon, 13 Feb 2012 10:20:09 +0000 (10:20 +0000)]
tg3: Move tg3_nvram_write_block functions
This patch moves the tg3_nvram_write_block functions higher in the file
to eliminate a prototype.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Mon, 13 Feb 2012 10:20:08 +0000 (10:20 +0000)]
tg3: Move tg3_set_rx_mode
This patch moves __tg3_set_rx_mode above its first use and moves
tg3_set_rx_mode down closer to where the netdev_ops functions should be.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Mon, 13 Feb 2012 10:20:07 +0000 (10:20 +0000)]
tg3: Move tg3_change_mtu to a better location
This patch moves tg3_change_mtu to a better location.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Mon, 13 Feb 2012 10:20:06 +0000 (10:20 +0000)]
tg3: Relocate tg3_reset_task
This patch moves tg3_reset_task further down in the file where it makes
more sense to be.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Mon, 13 Feb 2012 10:20:05 +0000 (10:20 +0000)]
tg3: Move tg3_restart_hw to a better location
This patch relocates tg3_restart_hw() to a better location.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet [Mon, 13 Feb 2012 06:53:41 +0000 (06:53 +0000)]
virtio: net: remove sparse errors
commit
3fa2a1df909 (virtio-net: per cpu 64 bit stats (v2)) added extra
__percpu qualifiers and sparse errors.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Bruce Allan [Wed, 8 Feb 2012 02:55:09 +0000 (02:55 +0000)]
e1000e: cleanup: always return 0
These are a few instances of returning a value that can only be 0 so just
use a 'return 0' to make it more obvious.
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>