1. 19 7月, 2018 24 次提交
  2. 18 7月, 2018 16 次提交
    • D
      Merge tag 'batadv-next-for-davem-20180717' of git://git.open-mesh.org/linux-merge · c0b78038
      David S. Miller 提交于
      Simon Wunderlich says:
      
      ====================
      This feature/cleanup patchset includes the following patches:
      
       - Don't call BATMAN_V experimental in Kconfig anymore, by Sven Eckelmann
      
       - Enable DAT by default at compile time, by Antonio Quartulli
      
       - Remove obsolete default n in Kconfig, by Sven Eckelmann
      
       - Fix checkpatch spelling errors, by Sven Eckelmann
      
       - Unify header guards style, by Sven Eckelmann
      
       - Consolidate batadv_purge_orig functions, by Sven Eckelmann
      
       - Replace type define with proper typedef, by Sven Eckelmann
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c0b78038
    • H
      net/rds: Remove unnecessary variable · fa52531e
      Håkon Bugge 提交于
      Signed-off-by: NHåkon Bugge <haakon.bugge@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fa52531e
    • H
      net/rds: void function cannot return -1 · bfd42711
      Håkon Bugge 提交于
      Commit b6fb0df1 ("RDS/IB: Make ib_recv_refill return void") did
      not change the comment accordingly.
      
      Fixes: b6fb0df1 ("RDS/IB: Make ib_recv_refill return void")
      Signed-off-by: NHåkon Bugge <haakon.bugge@oracle.com>
      Acked-by: NSantosh Shilimkar <santosh.shilimkar@oracle.ccom>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bfd42711
    • D
      dsa: rtl8366: Remove unused variable. · db53770a
      David S. Miller 提交于
      drivers/net/dsa/rtl8366.c: In function ‘rtl8366_reset_vlan’:
      drivers/net/dsa/rtl8366.c:234:25: warning: unused variable ‘vlan4k’ [-Wunused-variable]
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      db53770a
    • D
      Merge branch 'ravb-small-sparse-fixes' · abd709c7
      David S. Miller 提交于
      Niklas Söderlund says:
      
      ====================
      ravb: small sparse fixes
      
      This are fixes that have bugged me whenever I run sparse to check my own
      changes to the driver. It's based on the latest net-next tree and tested
      on M3-N.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      abd709c7
    • N
      ravb: fix byte order for TX descriptor tag field lower bits · e49b42fa
      Niklas Söderlund 提交于
      The wrong helper is used to swap the bytes when adding the lower bits of
      the TX descriptors tag field in the shared ds_tagl variable. The
      variable contains the DS[11:0] field and then the TAG[3:0] bits.
      
      The mistake was highlighted by the sparse warning:
      
      ravb_main.c:1622:31:    left side has type restricted __le16
      ravb_main.c:1622:31:    right side has type unsigned short
      ravb_main.c:1622:31: warning: invalid assignment: |=
      ravb_main.c:1622:34: warning: cast to restricted __le16
      Signed-off-by: NNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
      Reviewed-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Acked-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e49b42fa
    • N
      ravb: fix warning about memcpy length · 49f3303a
      Niklas Söderlund 提交于
      This fixes sparse warning:
      
      ravb_main.c:1257 ravb_get_strings() error: memcpy() '*ravb_gstrings_stats' too small (32 vs 960)
      Signed-off-by: NNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
      Reviewed-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Acked-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      49f3303a
    • N
      ravb: fix shadowing of symbol 'stats' in ravb_get_ethtool_stats() · c94f2fc4
      Niklas Söderlund 提交于
      Inside a loop in ravb_get_ethtool_stats() a variable 'stats' is declared
      resulting in the argument also named 'stats' to be shadowed. Fix this
      warning by renaming the unused argument 'stats' to 'estats'.
      
      This fixes the sparse warning:
      
      ravb_main.c:1225:36: originally declared here
      ravb_main.c:1233:41: warning: symbol 'stats' shadows an earlier one
      Signed-off-by: NNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
      Reviewed-by: NGeert Uytterhoeven <geert+renesas@glider.be>
      Acked-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c94f2fc4
    • L
      ARM: dts: Add ethernet and switch to D-Link DIR-685 · 22a001e8
      Linus Walleij 提交于
      This adds the Ethernet and Realtek switch device to the
      D-Link DIR-685 Gemini-based device.
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      22a001e8
    • L
      net: dsa: realtek-smi: Add Realtek SMI driver · d8652956
      Linus Walleij 提交于
      This adds a driver core for the Realtek SMI chips and a
      subdriver for the RTL8366RB. I just added this chip simply
      because it is all I can test.
      
      The code is a massaged variant of the code that has been
      sitting out-of-tree in OpenWRT for years in the absence of
      a proper switch subsystem. This creates a DSA driver for it.
      I have tried to credit the original authors wherever
      possible.
      
      The main changes I've done from the OpenWRT code:
      
      - Added an IRQ chip inside the RTL8366RB switch to demux and
        handle the line state IRQs.
      
      - Distributed the phy handling out to the PHY driver.
      
      - Added some RTL8366RB code that was missing in the driver at
        the time, such as setting up "green ethernet" with a funny
        jam table and forcing MAC5 (the CPU port) into 1 GBit.
      
      - Select jam table and add the default jam table from the
        vendor driver, also for ASIC "version 0" if need be.
      
      - Do not store jam tables in the device tree, store them
        in the driver.
      
      - Pick in the "initvals" jam tables from OpenWRT's driver
        and make those get selected per compatible for the
        whole system. It's apparently about electrical settings
        for this system and whatnot, not really configuration
        from device tree.
      
      - Implemented LED control: beware of bugs because there are
        no LEDs on the device I am using!
      
      We do not implement custom DSA tags. This is explained in
      a comment in the driver as well: this "tagging protocol" is
      not simply a few extra bytes tagged on to the ethernet
      frame as DSA is used to. Instead, enabling the CPU tags
      will make the switch start talking Realtek RRCP internally.
      For example a simple ping will make this kind of packets
      appear inside the switch:
      
      0000   ff ff ff ff ff ff bc ae c5 6b a8 3d 88 99 a2 00
      0010   08 06 00 01 08 00 06 04 00 01 bc ae c5 6b a8 3d
      0020   a9 fe 01 01 00 00 00 00 00 00 a9 fe 01 02 00 00
      0030   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
      
      As you can see a custom "8899" tagged packet using the
      protocol 0xa2. Norm RRCP appears to always have this
      protocol set to 0x01 according to OpenRRCP. You can also
      see that this is not a ping packet at all, instead the
      switch is starting to talk network management issues
      with the CPU port.
      
      So for now custom "tagging" is disabled.
      
      This was tested on the D-Link DIR-685 with initramfs and
      OpenWRT userspaces and works fine on all the LAN ports
      (lan0 .. lan3). The WAN port is yet not working.
      
      Cc: Antti Seppälä <a.seppala@gmail.com>
      Cc: Roman Yeryomin <roman@advem.lv>
      Cc: Colin Leitner <colin.leitner@googlemail.com>
      Cc: Gabor Juhos <juhosg@openwrt.org>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d8652956
    • L
      net: dsa: Add bindings for Realtek SMI DSAs · 3b3b6b46
      Linus Walleij 提交于
      The Realtek SMI family is a set of DSA chips that provide
      switching in routers. This binding just follows the pattern
      set by other switches but with the introduction of an embedded
      irqchip to demux and handle the interrupts fired by the single
      line from the chip.
      
      This interrupt construction is similar to how we handle
      interrupt controllers inside PCI bridges etc.
      
      Cc: Antti Seppälä <a.seppala@gmail.com>
      Cc: Roman Yeryomin <roman@advem.lv>
      Cc: Colin Leitner <colin.leitner@googlemail.com>
      Cc: Gabor Juhos <juhosg@openwrt.org>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Cc: devicetree@vger.kernel.org
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3b3b6b46
    • L
      net: phy: realtek: Support RTL8366RB variant · d8545825
      Linus Walleij 提交于
      The RTL8366RB is an ASIC with five internal PHYs for
      LAN0..LAN3 and WAN. The PHYs are spawn off the main
      device so they can be handled in a distributed manner
      by the Realtek PHY driver. All that is really needed
      is the power save feature enablement and letting the
      PHY driver core pick up the IRQ from the switch chip.
      
      Cc: Antti Seppälä <a.seppala@gmail.com>
      Cc: Roman Yeryomin <roman@advem.lv>
      Cc: Colin Leitner <colin.leitner@googlemail.com>
      Cc: Gabor Juhos <juhosg@openwrt.org>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d8545825
    • H
      r8169: power down chip in probe · 07df5bd8
      Heiner Kallweit 提交于
      The removed code would be called in two situations:
      1. interface is brought up never or >10s after driver load
      2. after close()
      
      Case 1 we can handle cleaner by ensuring chip is powered down when
      leaving probe(). open() callback will power up the chip.
      
      In case 2 we call rtl_pll_power_down() twice currently, from the
      close() callback and 10s later when entering runtime-suspend.
      This is avoided by this patch.
      Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      07df5bd8
    • D
      Merge branch 'HWMON-support-for-SFP-modules' · fd3d96ae
      David S. Miller 提交于
      Andrew Lunn says:
      
      ====================
      HWMON support for SFP modules
      
      This patchset adds HWMON support to SFP modules. The two patches add
      some attributes for temperature and power sensors which are currently
      missing from the hwmon core. The third patch adds a helper for
      filtering out characters in hwmon names which are invalid. The last
      patch then extends the core SFP code to export the sensors found in
      SFP modules.
      
      This code has been tested with two SFP modules:
      
      module OEM SFP-7000-85 rev 11.0 sn M1512220075 dc 160221
      module FINISAR CORP. FTLF8524E2GNL rev A sn PW40MNN dc 160725
      
      The anonymous module uses external calibration, while the FINISAR uses
      internal calibration. Thus both code paths have been tested.
      
      Due to the cross subsystem nature of these patches, as discussed with
      the RFC, it is hoped Guenter Roeck will ACK the patches, and then Dave
      Miller will merge them all via net-next.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fd3d96ae
    • A
      net: phy: sfp: Add HWMON support for module sensors · 1323061a
      Andrew Lunn 提交于
      SFP modules can contain a number of sensors. The EEPROM also contains
      recommended alarm and critical values for each sensor, and indications
      of if these have been exceeded. Export this information via
      HWMON. Currently temperature, VCC, bias current, transmit power, and
      possibly receiver power is supported.
      
      The sensors in the modules can either return calibrate or uncalibrated
      values. Uncalibrated values need to be manipulated, using coefficients
      provided in the SFP EEPROM. Uncalibrated receive power values require
      floating point maths in order to calibrate them. Performing this in
      the kernel is hard. So if the SFP module indicates it uses
      uncalibrated values, RX power is not made available.
      
      With this hwmon device, it is possible to view the sensor values using
      lm-sensors programs:
      
      in0:          +3.29 V  (crit min =  +2.90 V, min =  +3.00 V)
                             (max =  +3.60 V, crit max =  +3.70 V)
      temp1:        +33.0°C  (low  =  -5.0°C, high = +80.0°C)
                             (crit low = -10.0°C, crit = +85.0°C)
      power1:      1000.00 nW (max = 794.00 uW, min =  50.00 uW)  ALARM (LCRIT)
                             (lcrit =  40.00 uW, crit = 1000.00 uW)
      curr1:        +0.00 A  (crit min =  +0.00 A, min =  +0.00 A)  ALARM (LCRIT, MIN)
                             (max =  +0.01 A, crit max =  +0.01 A)
      
      The scaling sensors performs on the bias current is not particularly
      good. The raw values are more useful:
      
      curr1:
        curr1_input: 0.000
        curr1_min: 0.002
        curr1_max: 0.010
        curr1_lcrit: 0.000
        curr1_crit: 0.011
        curr1_min_alarm: 1.000
        curr1_max_alarm: 0.000
        curr1_lcrit_alarm: 1.000
        curr1_crit_alarm: 0.000
      
      In order to keep the I2C overhead to a minimum, the constant values,
      such as limits and calibration coefficients are read once at module
      insertion time. Thus only reading *_input and *_alarm properties
      requires i2c read operations.
      Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
      Acked-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1323061a
    • A
      hwmon: Add helper to tell if a char is invalid in a name · dcb5d0fc
      Andrew Lunn 提交于
      HWMON device names are not allowed to contain "-* \t\n". Add a helper
      which will return true if passed an invalid character. It can be used
      to massage a string into a hwmon compatible name by replacing invalid
      characters with '_'.
      Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
      Acked-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      dcb5d0fc