29 Sep, 2012

1 commit

  • Conflicts:
    drivers/net/team/team.c
    drivers/net/usb/qmi_wwan.c
    net/batman-adv/bat_iv_ogm.c
    net/ipv4/fib_frontend.c
    net/ipv4/route.c
    net/l2tp/l2tp_netlink.c

    The team, fib_frontend, route, and l2tp_netlink conflicts were simply
    overlapping changes.

    qmi_wwan and bat_iv_ogm were of the "use HEAD" variety.

    With help from Antonio Quartulli.

    Signed-off-by: David S. Miller

    David S. Miller
     

28 Sep, 2012

2 commits

  • The LAN8710/LAN8720 chips do have broken the "FlexPWR" smart power-saving
    capability. Enabling it leads to the PHY not being able to detect Link when
    cold-started without cable connected. Thus, make sure this is disabled.

    Signed-off-by: Marek Vasut
    Cc: Christian Hohnstaedt
    Cc: David S. Miller
    Cc: Fabio Estevam
    Cc: Giuseppe Cavallaro
    Cc: Otavio Salvador
    Acked-by: Otavio Salvador
    Signed-off-by: David S. Miller

    Marek Vasut
     
  • This patch adds proper handling of the buggy revision A2 of LXT973 phy, adding
    precautions linked to ERRATA Item 4:

    Revision A2 of LXT973 chip randomly returns the contents of the previous even
    register when you read a odd register regularly

    Signed-off-by: Christophe Leroy
    Acked-by: Richard Cochran
    Signed-off-by: David S. Miller

    LEROY Christophe
     

25 Sep, 2012

2 commits

  • There is no such part as KS8001, KS8041 or KS8051. There are only
    KSZ8001, KSZ8041 and KSZ8051. Rename these parts as such to match
    the Micrel naming.

    Signed-off-by: Marek Vasut
    Cc: David J. Choi
    Cc: David S. Miller
    Cc: Nobuhiro Iwamatsu
    Cc: Linux ARM kernel
    Cc: Fabio Estevam
    Cc: Shawn Guo
    Signed-off-by: David S. Miller

    Marek Vasut
     
  • The KSZ8021 PHY was previously caught by KS8051, which is not correct.
    This PHY needs additional setup if it is strapped for address 0. In such
    case an reserved bit must be written in the 0x16, "Operation Mode Strap
    Override" register. According to the KS8051 datasheet, that bit means
    "PHY Address 0 in non-broadcast" and it indeed behaves as such on KSZ8021.
    The issue where the ethernet controller (Freescale FEC) did not communicate
    with network is fixed by writing this bit as 1.

    Signed-off-by: Marek Vasut
    Cc: David J. Choi
    Cc: David S. Miller
    Cc: Nobuhiro Iwamatsu
    Signed-off-by: David S. Miller

    Marek Vasut
     

23 Sep, 2012

2 commits

  • PTP Hardware Clock devices appear as class devices in sysfs. This patch
    changes the registration API to use the parent device, clarifying the
    clock's relationship to the underlying device.

    Signed-off-by: Richard Cochran
    Acked-by: Ben Hutchings
    Acked-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Richard Cochran
     
  • Currently the driver has no MODULE_LICENSE attribute in its source which
    results in a kernel taint if I load this:

    root@(none):~# modprobe bcm87xx
    bcm87xx: module license 'unspecified' taints kernel.

    Since the first lines of the source code clearly state:
    * This file is subject to the terms and conditions of the GNU General
    * Public License. See the file "COPYING" in the main directory of this
    * archive for more details.
    I think it's safe to add the MODULE_LICENSE("GPL") macro and thus remove
    the kernel taint.

    Cc: stable@vger.kernel.org
    Signed-off-by: Peter Huewe
    Signed-off-by: David S. Miller

    Peter Hüwe
     

08 Sep, 2012

1 commit

  • mdio-mux-mmioreg.c uses function of_address_to_resource(), which is defined
    in linux/of_address.h. This fixes a compilation error:

    drivers/net/phy/mdio-mux-mmioreg.c: In function 'mdio_mux_mmioreg_probe':
    drivers/net/phy/mdio-mux-mmioreg.c:83:2: error: implicit declaration of
    function 'of_address_to_resource'

    Reported-by: Randy Dunlap
    Signed-off-by: Timur Tabi
    Signed-off-by: David S. Miller

    Timur Tabi
     

31 Aug, 2012

2 commits

  • Add support for an MDIO bus multiplexer controlled by a simple memory-mapped
    device, like an FPGA. The device must be memory-mapped and contain only
    8-bit registers (which keeps things simple).

    Tested on a Freescale P5020DS board which uses the "PIXIS" FPGA attached
    to the localbus.

    Signed-off-by: Timur Tabi
    Signed-off-by: David S. Miller

    Timur Tabi
     
  • This patch cleans up the way device tree support is added in mdio-gpio
    driver. I found lot of code duplication which is not necessary.
    Also strangely a new platform driver was also introduced for device tree
    support. All this forced me to do this cleanup patch.
    After this patch, the driver probe checks the of_node pointer to get the
    data from device tree.

    Signed-off-by: Srinivas Kandagatla
    Signed-off-by: David S. Miller

    Srinivas Kandagatla
     

23 Aug, 2012

1 commit

  • The helper functions which translate IEEE MDIO Manageable Device (MMD)
    Energy-Efficient Ethernet (EEE) registers 3.20, 7.60 and 7.61 to and from
    the comparable ethtool supported/advertised settings will be needed by
    drivers other than those in PHYLIB (e.g. e1000e in a follow-on patch).

    In the same fashion as similar translation functions in linux/mii.h, move
    these functions from the PHYLIB core to the linux/mdio.h header file so the
    code will not have to be duplicated in each driver needing MMD-to-ethtool
    (and vice-versa) translations. The function and some variable names have
    been renamed to be more descriptive.

    Not tested on the only hardware that currently calls the related functions,
    stmmac, because I don't have access to any. Has been compile tested and
    the translations have been tested on a locally modified version of e1000e.

    Signed-off-by: Bruce Allan
    Cc: Giuseppe Cavallaro
    Signed-off-by: David S. Miller

    Allan, Bruce W
     

20 Aug, 2012

1 commit

  • The mdio-mux driver scans all child mdio nodes, without regard to whether
    the node is actually used. Some device trees include all possible
    mdio-mux nodes and rely on the boot loader to disable those that are not
    present, based on some run-time configuration. Those nodes need to be
    skipped.

    Signed-off-by: Timur Tabi
    Signed-off-by: David S. Miller

    Timur Tabi
     

07 Aug, 2012

1 commit


31 Jul, 2012

1 commit

  • Pull MIPS updates from Ralf Baechle:
    "More hardware support across the field including a bunch of device
    drivers. The highlight however really are further steps towards
    device tree.

    This has been sitting in -next for ages. All MIPS _defconfigs have
    been tested to boot or where I don't have hardware available, to at
    least build fine."

    * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (77 commits)
    MIPS: Loongson 1B: Add defconfig
    MIPS: Loongson 1B: Add board support
    MIPS: Netlogic: early console fix
    MIPS: Netlogic: Fix indentation of smpboot.S
    MIPS: Netlogic: remove cpu_has_dc_aliases define for XLP
    MIPS: Netlogic: Remove unused pcibios_fixups
    MIPS: Netlogic: Add XLP SoC devices in FDT
    MIPS: Netlogic: Add IRQ mappings for more devices
    MIPS: Netlogic: USB support for XLP
    MIPS: Netlogic: XLP PCIe controller support.
    MIPS: Netlogic: Platform changes for XLR/XLS I2C
    MIPS: Netlogic: Platform NAND/NOR flash support
    MIPS: Netlogic: Platform changes for XLS USB
    MIPS: Netlogic: Remove NETLOGIC_ prefix
    MIPS: Netlogic: SMP wakeup code update
    MIPS: Netlogic: Update comments in smpboot.S
    MIPS: BCM63XX: Add 96328avng reference board
    MIPS: Expose PCIe drivers for MIPS
    MIPS: BCM63XX: Add PCIe Support for BCM6328
    MIPS: BCM63XX: Move the PCI initialization into its own function
    ...

    Linus Torvalds
     

25 Jul, 2012

1 commit

  • Pull trivial tree from Jiri Kosina:
    "Trivial updates all over the place as usual."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (29 commits)
    Fix typo in include/linux/clk.h .
    pci: hotplug: Fix typo in pci
    iommu: Fix typo in iommu
    video: Fix typo in drivers/video
    Documentation: Add newline at end-of-file to files lacking one
    arm,unicore32: Remove obsolete "select MISC_DEVICES"
    module.c: spelling s/postition/position/g
    cpufreq: Fix typo in cpufreq driver
    trivial: typo in comment in mksysmap
    mach-omap2: Fix typo in debug message and comment
    scsi: aha152x: Fix sparse warning and make printing pointer address more portable.
    Change email address for Steve Glendinning
    Btrfs: fix typo in convert_extent_bit
    via: Remove bogus if check
    netprio_cgroup.c: fix comment typo
    backlight: fix memory leak on obscure error path
    Documentation: asus-laptop.txt references an obsolete Kconfig item
    Documentation: ManagementStyle: fixed typo
    mm/vmscan: cleanup comment error in balance_pgdat
    mm: cleanup on the comments of zone_reclaim_stat
    ...

    Linus Torvalds
     

23 Jul, 2012

1 commit

  • Get the MDIO bus controller addresses from the device tree, small
    clean up in use of devm_*

    Remove, now unused, platform device setup code.

    Signed-off-by: David Daney
    Acked-by: David S. Miller
    Cc: linux-mips@linux-mips.org
    Cc: devicetree-discuss@lists.ozlabs.org
    Cc: Grant Likely
    Cc: Rob Herring
    Cc: linux-kernel@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/3938/
    Signed-off-by: Ralf Baechle

    David Daney
     

17 Jul, 2012

1 commit

  • I no longer have a mailbox at smsc.com, and I've had two reports
    that that email address now bounces from people trying to
    contact me. This patch updates all references to that invalid
    address to one that I can be contacted on more permanently.

    This patch also updates the maintainer status to reflect
    the fact I'm no longer directly paid to maintain these drivers.

    Signed-off-by: Steve Glendinning
    Signed-off-by: Jiri Kosina

    Steve Glendinning
     

11 Jul, 2012

1 commit

  • Conflicts:
    net/batman-adv/bridge_loop_avoidance.c
    net/batman-adv/bridge_loop_avoidance.h
    net/batman-adv/soft-interface.c
    net/mac80211/mlme.c

    With merge help from Antonio Quartulli (batman-adv) and
    Stephen Rothwell (drivers/net/usb/qmi_wwan.c).

    The net/mac80211/mlme.c conflict seemed easy enough, accounting for a
    conversion to some new tracing macros.

    Signed-off-by: David S. Miller

    David S. Miller
     

09 Jul, 2012

4 commits

  • With lockdep enabled we get:

    =============================================
    [ INFO: possible recursive locking detected ]
    3.4.4-Cavium-Octeon+ #313 Not tainted
    ---------------------------------------------
    kworker/u:1/36 is trying to acquire lock:
    (&bus->mdio_lock){+.+...}, at: [] mdio_mux_read+0x38/0xa0

    but task is already holding lock:
    (&bus->mdio_lock){+.+...}, at: [] mdiobus_read+0x44/0x88

    other info that might help us debug this:
    Possible unsafe locking scenario:

    CPU0
    ----
    lock(&bus->mdio_lock);
    lock(&bus->mdio_lock);

    *** DEADLOCK ***

    May be due to missing lock nesting notation
    .
    .
    .

    This is a false positive, since we are indeed using 'nested' locking,
    we need to use mutex_lock_nested().

    Now in theory we can stack multiple MDIO multiplexers, but that would
    require passing the nesting level (which is difficult to know) to
    mutex_lock_nested(). Instead we assume the simple case of a single
    level of nesting. Since these are only warning messages, it isn't so
    important to solve the general case.

    Signed-off-by: David Daney
    Signed-off-by: David S. Miller

    David Daney
     
  • broadcom, not marvell.

    Signed-off-by: Peter Korsgaard
    Acked-by: David Daney
    Signed-off-by: David S. Miller

    Peter Korsgaard
     
  • If registering of one of them fails, all already registered drivers
    of this module will be unregistered.

    Use the new register/unregister functions in all drivers
    registering more than one driver.

    amd.c, realtek.c: Simplify: directly return registration result.

    Tested with broadcom.c
    All others compile-tested.

    Signed-off-by: Christian Hohnstaedt
    Signed-off-by: David S. Miller

    Christian Hohnstaedt
     
  • The bcm87xx phys don't support autonegotiation, so don't use it by
    default, as otherwise phy_state_machine() will try to enable it (using
    c22 requests, which also don't make any sense for the bcm78xx).

    Signed-off-by: Peter Korsgaard
    Signed-off-by: David S. Miller

    Peter Korsgaard
     

01 Jul, 2012

1 commit

  • This patch adds the support for the Energy-Efficient Ethernet (EEE)
    to the Physical Abstraction Layer.
    To support the EEE we have to access to the MMD registers 3.20 and
    7.60/61. So two new functions have been added to read/write the MMD
    registers (clause 45).

    An Ethernet driver (I tested the stmmac) can invoke the phy_init_eee to properly
    check if the EEE is supported by the PHYs and it can also set the clock
    stop enable bit in the 3.0 register.
    The phy_get_eee_err can be used for reporting the number of time where
    the PHY failed to complete its normal wake sequence.

    In the end, this patch also adds the EEE ethtool support implementing:
    o phy_ethtool_set_eee
    o phy_ethtool_get_eee

    v1: initial patch
    v2: fixed some errors especially on naming convention
    v3: renamed again the mmd read/write functions thank to Ben's feedback
    v4: moved file to phy.c and added the ethtool support.
    v5: fixed phy_adv_to_eee, phy_eee_to_supported, phy_eee_to_adv return
    values according to ethtool API (thanks to Ben's feedback).
    Renamed some macros to avoid too long names.
    v6: fixed kernel-doc comments to be properly parsed.
    Fixed the phy_init_eee function: we need to check which link mode
    was autonegotiated and then the corresponding bits in 7.60 and 7.61
    registers.
    v7: reviewed the way to get the negotiated settings.
    v8: fixed a problem in the phy_init_eee return value erroneously added
    when included the phy_read_status call.
    v9: do not remove the MDIO_AN_EEE_ADV_100TX and MDIO_AN_EEE_ADV_1000T
    and fixed the eee_{cap,lp,adv} declaration as "int" instead of u16.

    Signed-off-by: Giuseppe Cavallaro
    Reviewed-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Giuseppe CAVALLARO
     

28 Jun, 2012

4 commits

  • drivers/net/phy/phy_device.c: In function ‘get_phy_device’:
    drivers/net/phy/phy_device.c:340:14: warning: ‘phy_id’ may be used uninitialized in this function [-Wmaybe-uninitialized]

    GCC can't see that when we return zero we always initialize
    phy_id and that's the only path where we use it.

    Initialize phy_id to zero to shut it up.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Add a driver for BCM8706 and BCM8727 devices. These are a 10Gig PHYs
    which use MII_ADDR_C45 addressing. They are always 10G full duplex, so
    there is no autonegotiation. All we do is report link state and send
    interrupts when it changes.

    If the PHY has a device tree of_node associated with it, the
    "broadcom,c45-reg-init" property is used to supply register
    initialization values when config_init() is called.

    Signed-off-by: David Daney
    Signed-off-by: David S. Miller

    David Daney
     
  • Allow PHY drivers to supply their own device matching function
    (match_phy_device()), or to be matched OF compatible properties.

    PHYs following IEEE802.3 clause 45 have more than one device
    identifier constants, which breaks the default device matching code.
    Other 10G PHYs don't follow the standard manufacturer/device
    identifier register layout standards, but they do use the standard
    MDIO bus protocols for register access. Both of these require
    adjustments to the PHY driver to device matching code.

    If the there is an of_node associated with such a PHY, we can match it
    to its driver using the "compatible" properties, just as we do with
    certain platform devices. If the "compatible" property match fails,
    first check if there is a driver supplied matching function, and if
    not fall back to the existing identifier matching rules.

    Signed-off-by: David Daney
    Signed-off-by: David S. Miller

    David Daney
     
  • The IEEE802.3 clause 45 MDIO bus protocol allows for directly
    addressing PHY registers using a 21 bit address, and is used by many
    10G Ethernet PHYS. Already existing is the ability of MDIO bus
    drivers to use clause 45, with the MII_ADDR_C45 flag. Here we add
    struct phy_c45_device_ids to hold the device identifier registers
    present in clause 45. struct phy_device gets a couple of new fields:
    c45_ids to hold the identifiers and is_c45 to signal that it is clause
    45.

    get_phy_device() gets a new parameter is_c45 to indicate that the PHY
    device should use the clause 45 protocol, and its callers are adjusted
    to pass false. The follow-on patch to of_mdio.c will pass true where
    appropriate.

    EXPORT phy_device_create() so that the follow-on patch to of_mdio.c
    can use it to create phy devices for PHYs, that have non-standard
    device identifier registers, based on the device tree bindings.

    Signed-off-by: David Daney
    Signed-off-by: David S. Miller

    David Daney
     

26 Jun, 2012

1 commit

  • Conflicts:
    drivers/net/usb/qmi_wwan.c
    net/batman-adv/translation-table.c
    net/ipv6/route.c

    qmi_wwan.c resolution provided by Bjørn Mork.

    batman-adv conflict is dealing merely with the changes
    of global function names to have a proper subsystem
    prefix.

    ipv6's route.c conflict is merely two side-by-side additions
    of network namespace methods.

    Signed-off-by: David S. Miller

    David S. Miller
     

19 Jun, 2012

1 commit

  • On a freescale imx6q platform, a hardware phy chip KSZ9021 is
    recognized as a KS8001 chip by the current driver like this:
    eth0: Freescale FEC PHY driver [Micrel KS8001 or KS8721]

    KSZ9021 has phy_id 0x00221610, while KSZ8001 has phy_id
    0x0022161a, the current phy_id_mask (0x00fffff0/0x00ffff10) can't
    distinguish them. So change phy_id_mask to resolve this problem.

    Although the micrel datasheet says that the 4 LSB of phyid2 register
    contains the chip revision number and the current driver is designed
    to follow this rule, in reality the chip implementation doesn't follow
    it.

    Cc: David J. Choi
    Cc: David S. Miller
    Cc: Nobuhiro Iwamatsu
    Signed-off-by: Hui Wang
    Signed-off-by: David S. Miller

    Jason Wang
     

13 Jun, 2012

1 commit

  • Conflicts:
    MAINTAINERS
    drivers/net/wireless/iwlwifi/pcie/trans.c

    The iwlwifi conflict was resolved by keeping the code added
    in 'net' that turns off the buggy chip feature.

    The MAINTAINERS conflict was merely overlapping changes, one
    change updated all the wireless web site URLs and the other
    changed some GIT trees to be Johannes's instead of John's.

    Signed-off-by: David S. Miller

    David S. Miller
     

12 Jun, 2012

1 commit

  • Use a more current logging style.

    Add pr_fmt and missing newlines.
    Remove embedded prefixes.
    Neaten phy_print_status to avoid using KERN_CONT.

    Signed-off-by: Joe Perches
    Signed-off-by: David S. Miller

    Joe Perches
     

09 Jun, 2012

1 commit

  • Fix kernel-doc warnings in drivers/net/phy:

    Warning(drivers/net/phy/mdio_bus.c:109): No description found for parameter 'mdio_bus_np'
    Warning(drivers/net/phy/mdio_bus.c:109): Excess function parameter 'mdio_np' description in 'of_mdio_find_bus'

    Signed-off-by: Randy Dunlap
    Signed-off-by: David S. Miller

    Randy Dunlap
     

05 Jun, 2012

1 commit

  • This patch fixes the interrupt mask for IC101 A/G devices
    and now enables the link/speed/duplex interrupts.
    This is done by setting the "INTR pin used" bit and cleaning
    all the other bits in the Register 17.

    Reported-by: Stuart Menefy
    Signed-off-by: Giuseppe Cavallaro
    Signed-off-by: David S. Miller

    Giuseppe CAVALLARO
     

16 May, 2012

1 commit


12 May, 2012

1 commit


08 May, 2012

3 commits

  • The GPIO pins select which sub bus is connected to the master.

    Initially tested with an sn74cbtlv3253 switch device wired into the
    MDIO bus.

    Signed-off-by: David Daney
    Signed-off-by: David S. Miller

    David Daney
     
  • This patch adds a somewhat generic framework for MDIO bus
    multiplexers. It is modeled on the I2C multiplexer.

    The multiplexer is needed if there are multiple PHYs with the same
    address connected to the same MDIO bus adepter, or if there is
    insufficient electrical drive capability for all the connected PHY
    devices.

    Conceptually it could look something like this:

    ------------------
    | Control Signal |
    --------+---------
    |
    --------------- --------+------
    | MDIO MASTER |---| Multiplexer |
    --------------- --+-------+----
    | |
    C C
    h h
    i i
    l l
    d d
    | |
    --------- A B ---------
    | | | | | |
    | PHY@1 +-------+ +---+ PHY@1 |
    | | | | | |
    --------- | | ---------
    --------- | | ---------
    | | | | | |
    | PHY@2 +-------+ +---+ PHY@2 |
    | | | |
    --------- ---------

    This framework configures the bus topology from device tree data. The
    mechanics of switching the multiplexer is left to device specific
    drivers.

    The follow-on patch contains a multiplexer driven by GPIO lines.

    Signed-off-by: David Daney
    Signed-off-by: David S. Miller

    David Daney
     
  • Add of_mdio_find_bus() which allows an mii_bus to be located given its
    associated the device tree node.

    This is needed by the follow-on patch to add a driver for MDIO bus
    multiplexers.

    The of_mdiobus_register() function is modified so that the device tree
    node is recorded in the mii_bus. Then we can find it again by
    iterating over all mdio_bus_class devices.

    Because the OF device tree has now become an integral part of the
    kernel, this can live in mdio_bus.c (which contains the needed
    mdio_bus_class structure) instead of of_mdio.c.

    Signed-off-by: David Daney
    Cc: Grant Likely
    Cc: "David S. Miller"
    Signed-off-by: David S. Miller

    David Daney
     

24 Apr, 2012

1 commit


20 Apr, 2012

1 commit