22 Jan, 2014
1 commit
-
Use ether_addr_copy instead of memcpy(a, b, ETH_ALEN) to
save some cycles on arm and powerpc.Signed-off-by: Joe Perches
Signed-off-by: David S. Miller
04 Sep, 2013
1 commit
-
A device inheriting a random or set address should reflect this in
its addr_assign_type.Signed-off-by: Bjørn Mork
Signed-off-by: David S. Miller
26 Mar, 2013
2 commits
-
If we have defined a sparse port allocation which is non-contiguous and
contains gaps, the code freeing port_names will just stop when it
encouters a first NULL port_names, which is not right, we should iterate
over all possible number of ports (DSA_MAX_PORTS) until we are done.Signed-off-by: Florian Fainelli
Signed-off-by: David S. Miller -
This patch factors the freeing of the struct dsa_platform_data
manipulated by the driver identically in two places to a single
function.Signed-off-by: Florian Fainelli
Signed-off-by: David S. Miller
25 Mar, 2013
1 commit
-
This patch adds support for registering DSA switches using Device Tree
bindings. Note that we support programming the switch routing table even
though no in-tree user seems to require it. I tested this on Armada 370
with a Marvell 88E6172 (not supported by mainline yet).Signed-off-by: Florian Fainelli
Signed-off-by: David S. Miller
22 Jan, 2013
2 commits
-
This patch changes dsa_switch_setup() to ensure that at least one valid
valid port name is specified and will bail out with an error in case we
walked the maximum number of port with a valid port name found.Signed-off-by: Florian Fainelli
Signed-off-by: David S. Miller -
The slave MII bus registered by the DSA code is using the parent MII bus
as part of its name (ds->master_mii_bus_id), in case the parent MII bus
name is already 16 characters long (such as d0072004.mdio-mi) we will
get the following WARN_ON in dsa_switch_setup() when calling
mdiobus_register():[ 79.088782] ------------[ cut here ]------------
[ 79.093448] WARNING: at fs/sysfs/dir.c:536 sysfs_add_one+0x80/0xa0()
[ 79.099831] sysfs: cannot create duplicate filename
'/class/mdio_bus/d0072004.mdio-mi'This is a genuine warning, because the DSA slave MII bus will also be
named d0072004.mdio-mi, and since MII_BUS_ID_SIZE is 17 characters long
(with null-terminator) the following will truncate the slave MII bus id:snprintf(ds->slave_mii_bus->id, MII_BUS_ID_SIZE, "%s-%d:%.2x",
ds->master_mii_bus->id, ds->pd->sw_addr);Fix this by using dsa-: which is guaranteed to be
unique.Signed-off-by: Florian Fainelli
Signed-off-by: David S. Miller
15 Jan, 2013
1 commit
-
The flags argument of the phy_{attach,connect,connect_direct} functions
is then used to assign a struct phy_device dev_flags with its value.
All callers but the tg3 driver pass the flag 0, which results in the
underlying PHY drivers in drivers/net/phy/ not being able to actually
use any of the flags they would set in dev_flags. This patch gets rid of
the flags argument, and passes phydev->dev_flags to the internal PHY
library call phy_attach_direct() such that drivers which actually modify
a phy device dev_flags get the value preserved for use by the underlying
phy driver.Acked-by: Kosta Zertsekel
Signed-off-by: Florian Fainelli
Signed-off-by: David S. Miller
07 Jan, 2013
1 commit
-
Use strlcpy where possible to ensure the string is \0 terminated.
Use always sizeof(string) instead of 32, ETHTOOL_BUSINFO_LEN
and custom defines.
Use snprintf instead of sprint.
Remove unnecessary inits of ->fw_version
Remove unnecessary inits of drvinfo struct.Signed-off-by: Jiri Pirko
Signed-off-by: David S. Miller
27 Nov, 2012
1 commit
-
Commit 82167cb8c6b2f8166d5c7532e5ef4b5e0cc46a72 ('net: dsa/slave: Fix
compilation warnings') fixed one possible invalid configuration
(NET_DSA enabled with no trailer formats) but added others: drivers
can select NET_DSA without its dependencies being met.It's not very useful to make either the DSA core or the tagging
formats manually selectable without a driver to use them, so:1. Define a hidden HAVE_NET_DSA option and move the dependencies of
NET_DSA to that. While we're at it, drop the deprecated
EXPERIMENTAL dependency.
2. Make NET_DSA and the drivers dependent on HAVE_NET_DSA.
3. Hide the tagging format options again.
4. Make drivers select both NET_DSA and the appropriate tagging format
option.Signed-off-by: Ben Hutchings
Acked-by: Randy Dunlap
Signed-off-by: David S. Miller
26 Nov, 2012
1 commit
-
Currently when none of CONFIG_NET_DSA_TAG_DSA, CONFIG_NET_DSA_TAG_EDSA and
CONFIG_NET_DSA_TAG_TRAILER is defined, we get following compilation warnings:net/dsa/slave.c:51:12: warning: 'dsa_slave_init' defined but not used [-Wunused-function]
net/dsa/slave.c:60:12: warning: 'dsa_slave_open' defined but not used [-Wunused-function]
net/dsa/slave.c:98:12: warning: 'dsa_slave_close' defined but not used [-Wunused-function]
net/dsa/slave.c:116:13: warning: 'dsa_slave_change_rx_flags' defined but not used [-Wunused-function]
net/dsa/slave.c:127:13: warning: 'dsa_slave_set_rx_mode' defined but not used [-Wunused-function]
net/dsa/slave.c:136:12: warning: 'dsa_slave_set_mac_address' defined but not used [-Wunused-function]
net/dsa/slave.c:164:12: warning: 'dsa_slave_ioctl' defined but not used [-Wunused-function]Earlier approach to fix this was discussed here:
lkml.org/lkml/2012/10/29/549
This is another approach to fix it. This is done by some changes in config
options, which make more sense than the earlier approach. As, atleast one
tagging option must always be selected for using net/dsa/ infrastructure, this
patch selects NET_DSA from tagging configs instead of having it as an selectable
config.Signed-off-by: Viresh Kumar
Signed-off-by: David S. Miller
21 Aug, 2012
1 commit
-
flush[_delayed]_work_sync() are now spurious. Mark them deprecated
and convert all users to flush[_delayed]_work().If you're cc'd and wondering what's going on: Now all workqueues are
non-reentrant and the regular flushes guarantee that the work item is
not pending or running on any CPU on return, so there's no reason to
use the sync flushes at all and they're going away.This patch doesn't make any functional difference.
Signed-off-by: Tejun Heo
Cc: Russell King
Cc: Paul Mundt
Cc: Ian Campbell
Cc: Jens Axboe
Cc: Mattia Dongili
Cc: Kent Yoder
Cc: David Airlie
Cc: Jiri Kosina
Cc: Karsten Keil
Cc: Bryan Wu
Cc: Benjamin Herrenschmidt
Cc: Alasdair Kergon
Cc: Mauro Carvalho Chehab
Cc: Florian Tobias Schandinat
Cc: David Woodhouse
Cc: "David S. Miller"
Cc: linux-wireless@vger.kernel.org
Cc: Anton Vorontsov
Cc: Sangbeom Kim
Cc: "James E.J. Bottomley"
Cc: Greg Kroah-Hartman
Cc: Eric Van Hensbergen
Cc: Takashi Iwai
Cc: Steven Whitehouse
Cc: Petr Vandrovec
Cc: Mark Fasheh
Cc: Christoph Hellwig
Cc: Avi Kivity
10 May, 2012
1 commit
-
Use the new bool function ether_addr_equal to add
some clarity and reduce the likelihood for misuse
of compare_ether_addr for sorting.Done via cocci script:
$ cat compare_ether_addr.cocci
@@
expression a,b;
@@
- !compare_ether_addr(a, b)
+ ether_addr_equal(a, b)@@
expression a,b;
@@
- compare_ether_addr(a, b)
+ !ether_addr_equal(a, b)@@
expression a,b;
@@
- !ether_addr_equal(a, b) == 0
+ ether_addr_equal(a, b)@@
expression a,b;
@@
- !ether_addr_equal(a, b) != 0
+ !ether_addr_equal(a, b)@@
expression a,b;
@@
- ether_addr_equal(a, b) == 0
+ !ether_addr_equal(a, b)@@
expression a,b;
@@
- ether_addr_equal(a, b) != 0
+ ether_addr_equal(a, b)@@
expression a,b;
@@
- !!ether_addr_equal(a, b)
+ ether_addr_equal(a, b)Signed-off-by: Joe Perches
Signed-off-by: David S. Miller
29 Nov, 2011
3 commits
-
Support for specific hardware belongs under drivers/net/ not net/.
Signed-off-by: Ben Hutchings
Acked-by: Lennert Buytenhek
Signed-off-by: David S. Miller -
Any headers included by drivers should be under include/, and
any definitions they use are not really private to the core as
the name "dsa_priv.h" suggests.Signed-off-by: Ben Hutchings
Acked-by: Lennert Buytenhek
Signed-off-by: David S. Miller -
I mistakenly exported functions from slave.c that are only called from
dsa.c, part of the same module.Signed-off-by: Ben Hutchings
Acked-by: Lennert Buytenhek
Signed-off-by: David S. Miller
27 Nov, 2011
6 commits
-
Change the kconfig types to tristate and adjust the condition for
declaring net_device::dsa_ptr to allow for this.Adjust the makefile so that if NET_DSA_MV88E6123_61_65=y and
NET_DSA_MV88E6131=m or vice versa then both drivers are built-in. We
could leave these options as bool and make NET_DSA_MV88E6XXX a
user-selected option, but that would break existing configurations.Signed-off-by: Ben Hutchings
Signed-off-by: David S. Miller -
Signed-off-by: Ben Hutchings
Signed-off-by: David S. Miller -
These drivers share a lot of code, so if we make them modular they
should be built into the same module. Therefore, link them together
and merge their respective module init and exit functions.Signed-off-by: Ben Hutchings
Signed-off-by: David S. Miller -
These files have circular dependencies, so if we make DSA modular then
they must be built into the same module. Therefore, link them
together and merge their respective module init and exit functions.Signed-off-by: Ben Hutchings
Signed-off-by: David S. Miller -
Signed-off-by: Ben Hutchings
Signed-off-by: David S. Miller -
eth_type_trans() will use these functions if DSA is enabled, which
blocks building DSA as a module.Signed-off-by: Ben Hutchings
Signed-off-by: David S. Miller
01 Nov, 2011
1 commit
-
With calls to modular infrastructure, these files really
needs the full module.h header. Call it out so some of the
cleanups of implicit and unrequired includes elsewhere can be
cleaned up.Signed-off-by: Paul Gortmaker
18 Aug, 2011
1 commit
-
replace it by ndo_set_rx_mode
Signed-off-by: Jiri Pirko
Signed-off-by: David S. Miller
29 Jun, 2011
1 commit
-
This patch enables the 6131 family of chips to forward DSA
packets to other switch chips. This is needed if multiple
DSA chips are used in a device. Without this patch the
chip will drop any DSA packets not destined for it.This patch only enables the forwarding of DSA packets if
multiple chips are used in the switch configuration.Signed-off-by: Barry Grussling
Signed-off-by: David S. Miller
06 May, 2011
1 commit
-
Conflicts:
drivers/net/tg3.c
29 Apr, 2011
1 commit
-
The 88e6085 has a few differences from the other devices in the port
control registers, causing unknown multicast/broadcast packets to get
dropped when using the standard port setup.At the same time update kconfig to clarify that the mv88e6085 is now
supported.Signed-off-by: Peter Korsgaard
Acked-by: Lennert Buytenhek
Signed-off-by: David S. Miller
20 Apr, 2011
1 commit
-
Remove set_sg from DSA slave ethtool_ops. Features inheritance looks
broken/not fully implemented anyway.Signed-off-by: Michał Mirosław
Signed-off-by: David S. Miller
11 Apr, 2011
1 commit
-
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (34 commits)
net: Add support for SMSC LAN9530, LAN9730 and LAN89530
mlx4_en: Restoring RX buffer pointer in case of failure
mlx4: Sensing link type at device initialization
ipv4: Fix "Set rt->rt_iif more sanely on output routes."
MAINTAINERS: add entry for Xen network backend
be2net: Fix suspend/resume operation
be2net: Rename some struct members for clarity
pppoe: drop PPPOX_ZOMBIEs in pppoe_flush_dev
dsa/mv88e6131: add support for mv88e6085 switch
ipv6: Enable RFS sk_rxhash tracking for ipv6 sockets (v2)
be2net: Fix a potential crash during shutdown.
bna: Fix for handling firmware heartbeat failure
can: mcp251x: Allow pass IRQ flags through platform data.
smsc911x: fix mac_lock acquision before calling smsc911x_mac_read
iwlwifi: accept EEPROM version 0x423 for iwl6000
rt2x00: fix cancelling uninitialized work
rtlwifi: Fix some warnings/bugs
p54usb: IDs for two new devices
wl12xx: fix potential buffer overflow in testmode nvs push
zd1211rw: reset rx idle timer from tasklet
...
07 Apr, 2011
1 commit
-
The mv88e6085 is identical to the mv88e6095, except that all ports are
10/100 Mb/s, so use the existing setup code except for the cpu/dsa speed
selection in _setup_port().Signed-off-by: Peter Korsgaard
Acked-by: Lennert Buytenhek
Signed-off-by: David S. Miller
31 Mar, 2011
1 commit
-
Fixes generated by 'codespell' and manually reviewed.
Signed-off-by: Lucas De Marchi
09 Mar, 2011
1 commit
-
The mv88e6060 uses either the lower 16 or upper 16 mii addresses,
depending on the value of the EE_CLK/ADDR4 pin. Support both
configurations by using the sw_addr setting as base address.Signed-off-by: Peter Korsgaard
Acked-by: Lennert Buytenhek
Signed-off-by: David S. Miller
24 Jan, 2011
1 commit
-
You always needed them when you were a module, but the builtin versions
of the macros used to be more lenient.Reported-by: Stephen Rothwell
Signed-off-by: Rusty Russell
24 Dec, 2010
1 commit
-
flush_scheduled_work() is deprecated and scheduled to be removed.
Directly flush dst->link_poll_work on remove instead.Signed-off-by: Tejun Heo
Acked-by: Lennert Buytenhek
12 Aug, 2010
1 commit
-
Several gigabit network drivers (SB1250_MAC, TIGON3, FSL, GIANFAR,
UCC_GETH, MV643XX_ETH, XILINX_LL_TEMAC, S6GMAC, STMMAC_ETH, PASEMI_MAC,
and OCTEON_ETHERNET) select PHYLIB. These drivers are not under
NET_ETHERNET (10/100 mbit), so this warning is generated (long, irrelevant
parts are omitted):warning: (NET_DSA && NET && EXPERIMENTAL && NET_ETHERNET && !S390 || ... || SB1250_MAC && NETDEVICES && NETDEV_1000 && SIBYTE_SB1xxx_SOC || TIGON3 && NETDEVICES && NETDEV_1000 && PCI || FSL_PQ_MDIO && NETDEVICES && NETDEV_1000 && FSL_SOC || GIANFAR && NETDEVICES && NETDEV_1000 && FSL_SOC || UCC_GETH && NETDEVICES && NETDEV_1000 && QUICC_ENGINE || MV643XX_ETH && NETDEVICES && NETDEV_1000 && (MV64X60 || PPC32 || PLAT_ORION) || XILINX_LL_TEMAC && NETDEVICES && NETDEV_1000 && (PPC || MICROBLAZE) || S6GMAC && NETDEVICES && NETDEV_1000 && XTENSA_VARIANT_S6000 || STMMAC_ETH && NETDEV_1000 && NETDEVICES && CPU_SUBTYPE_ST40 || PASEMI_MAC && NETDEVICES && NETDEV_10000 && PPC_PASEMI && PCI || OCTEON_ETHERNET && STAGING && !STAGING_EXCLUDE_BUILD && CPU_CAVIUM_OCTEON) selects PHYLIB which has unmet direct dependencies (!S390 && NET_ETHERNET)
PHYLIB is used by non-10/100 mbit ethernet drivers, so change the dependencies
to be NETDEVICES instead of NET_ETHERNET.Signed-off-by: Randy Dunlap
Signed-off-by: David S. Miller
21 Jul, 2010
1 commit
-
Conflicts:
drivers/vhost/net.c
net/bridge/br_device.cFix merge conflict in drivers/vhost/net.c with guidance from
Stephen Rothwell.Revert the effects of net-2.6 commit 573201f36fd9c7c6d5218cdcd9948cee700b277d
since net-next-2.6 has fixes that make bridge netpoll work properly thus
we don't need it disabled.Signed-off-by: David S. Miller
19 Jul, 2010
1 commit
-
The phy_mii_ioctl() function unnecessarily throws away the original ifreq.
We need access to the ifreq in order to support PHYs that can perform
hardware time stamping.Two maverick drivers filter the ioctl commands passed to phy_mii_ioctl().
This is unnecessary since phylib will check the command in any case.Signed-off-by: Richard Cochran
Signed-off-by: David S. Miller
13 Jul, 2010
1 commit
-
Based upon a report by Randy Dunlap.
DSA needs PHYLIB, but PHYLIB needs NET_ETHERNET. So, in order
to select PHYLIB we have to make DSA depend upon NET_ETHERNET.Signed-off-by: David S. Miller
12 Apr, 2010
1 commit
-
Conflicts:
drivers/net/stmmac/stmmac_main.c
drivers/net/wireless/wl12xx/wl1271_cmd.c
drivers/net/wireless/wl12xx/wl1271_main.c
drivers/net/wireless/wl12xx/wl1271_spi.c
net/core/ethtool.c
net/mac80211/scan.c
04 Apr, 2010
1 commit
-
+little renaming of unicast functions to be smooth with multicast ones
Signed-off-by: Jiri Pirko
Signed-off-by: David S. Miller