22 Jan, 2014

1 commit


04 Sep, 2013

1 commit


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

    Florian Fainelli
     
  • 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

    Florian Fainelli
     

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

    Florian Fainelli
     

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

    Florian Fainelli
     
  • 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

    Florian Fainelli
     

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

    Florian Fainelli
     

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

    Jiri Pirko
     

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

    Ben Hutchings
     

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

    viresh kumar
     

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

    Tejun Heo
     

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

    Joe Perches
     

29 Nov, 2011

3 commits


27 Nov, 2011

6 commits


01 Nov, 2011

1 commit


18 Aug, 2011

1 commit


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

    Barry Grussling
     

06 May, 2011

1 commit


29 Apr, 2011

1 commit


20 Apr, 2011

1 commit


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
    ...

    Linus Torvalds
     

07 Apr, 2011

1 commit


31 Mar, 2011

1 commit


09 Mar, 2011

1 commit


24 Jan, 2011

1 commit


24 Dec, 2010

1 commit


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

    Randy Dunlap
     

21 Jul, 2010

1 commit


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

    Richard Cochran
     

13 Jul, 2010

1 commit


12 Apr, 2010

1 commit


04 Apr, 2010

1 commit