1. 01 5月, 2019 4 次提交
  2. 28 4月, 2019 5 次提交
  3. 20 4月, 2019 1 次提交
  4. 04 4月, 2019 1 次提交
    • G
      net: dsa: microchip: mark expected switch fall-through · 0fd12842
      Gustavo A. R. Silva 提交于
      In preparation to enabling -Wimplicit-fallthrough, mark switch cases
      where we are expecting to fall through.
      
      This patch fixes the following warning:
      
      drivers/net/dsa/microchip/ksz9477.c: In function ‘ksz9477_get_interface’:
      drivers/net/dsa/microchip/ksz9477.c:1145:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
         if (gbit)
            ^
      drivers/net/dsa/microchip/ksz9477.c:1147:2: note: here
        case 0:
        ^~~~
      
      Warning level 3 was used: -Wimplicit-fallthrough=3
      
      This patch is part of the ongoing efforts to enable
      -Wimplicit-fallthrough.
      Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0fd12842
  5. 28 3月, 2019 2 次提交
    • H
      net: dsa: mv88e6xxx: fix few issues in mv88e6390x_port_set_cmode · 5ceaeb99
      Heiner Kallweit 提交于
      This patches fixes few issues in mv88e6390x_port_set_cmode().
      
      1. When entering the function the old cmode may be 0, in this case
         mv88e6390x_serdes_get_lane() returns -ENODEV. As result we bail
         out and have no chance to set a new mode. Therefore deal properly
         with -ENODEV.
      
      2. Once we have disabled power and irq, let's set the cached cmode to 0.
         This reflects the actual status and is cleaner if we bail out with an
         error in the following function calls.
      
      3. The cached cmode is used by mv88e6390x_serdes_get_lane(),
         mv88e6390_serdes_power_lane() and mv88e6390_serdes_irq_enable().
         Currently we set the cached mode to the new one at the very end of
         the function only, means until then we use the old one what may be
         wrong.
      
      4. When calling mv88e6390_serdes_irq_enable() we use the lane value
         belonging to the old cmode. Get the lane belonging to the new cmode
         before calling this function.
      
      It's hard to provide a good "Fixes" tag because quite a few smaller
      changes have been done to the code in question recently.
      
      Fixes: d235c48b ("net: dsa: mv88e6xxx: power serdes on/off for 10G interfaces on 6390X")
      Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5ceaeb99
    • H
      net: dsa: mv88e6xxx: remove unneeded cmode initialization · 863d1a8d
      Heiner Kallweit 提交于
      This partially reverts ed8fe202 ("net: dsa: mv88e6xxx: prevent
      interrupt storm caused by mv88e6390x_port_set_cmode"). I missed
      that chip->ports[].cmode is overwritten anyway by the cmode
      caching in mv88e6xxx_setup().
      Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      863d1a8d
  6. 27 3月, 2019 2 次提交
  7. 22 3月, 2019 1 次提交
  8. 09 3月, 2019 1 次提交
  9. 05 3月, 2019 2 次提交
  10. 04 3月, 2019 3 次提交
  11. 02 3月, 2019 3 次提交
    • A
      net: dsa: mv88e6xxx: Fix statistics on mv88e6161 · a6da21bb
      Andrew Lunn 提交于
      Despite what the datesheet says, the silicon implements the older way
      of snapshoting the statistics. Change the op.
      
      Reported-by: Chris.Healy@zii.aero
      Tested-by: Chris.Healy@zii.aero
      Fixes: 0ac64c39 ("net: dsa: mv88e6xxx: mv88e6161 uses mv88e6320 stats snapshot")
      Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a6da21bb
    • Y
      drivers: net: Remove unnecessary semicolon · f819cd92
      YueHaibing 提交于
      drivers/net/dsa/mt7530.c:649:3-4: Unneeded semicolon
      drivers/net/ethernet/cisco/enic/enic_clsf.c:35:2-3: Unneeded semicolon
      drivers/net/ethernet/faraday/ftgmac100.c:1640:2-3: Unneeded semicolon
      drivers/net/ethernet/mediatek/mtk_eth_soc.c:229:2-3: Unneeded semicolon
      drivers/net/usb/sr9700.c:437:2-3: Unneeded semicolon
      
      Remove unneeded semicolon.
      
      Generated by: scripts/coccinelle/misc/semicolon.cocci
      Signed-off-by: NYueHaibing <yuehaibing@huawei.com>
      Acked-by: Sean Wang <sean.wang@mediatek.com> for mt7530 and mtk_eth_soc
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f819cd92
    • H
      net: dsa: mv88e6xxx: prevent interrupt storm caused by mv88e6390x_port_set_cmode · ed8fe202
      Heiner Kallweit 提交于
      When debugging another issue I faced an interrupt storm in this
      driver (88E6390, port 9 in SGMII mode), consisting of alternating
      link-up / link-down interrupts. Analysis showed that the driver
      wanted to set a cmode that was set already. But so far
      mv88e6390x_port_set_cmode() doesn't check this and powers down
      SERDES, what causes the link to break, and eventually results in
      the described interrupt storm.
      
      Fix this by checking whether the cmode actually changes. We want
      that the very first call to mv88e6390x_port_set_cmode() always
      configures the registers, therefore initialize port.cmode with
      a value that is different from any supported cmode value.
      We have to take care that we only init the ports cmode once
      chip->info->num_ports is set.
      
      v2:
      - add small helper and init the number of actual ports only
      
      Fixes: 364e9d77 ("net: dsa: mv88e6xxx: Power on/off SERDES on cmode change")
      Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ed8fe202
  12. 01 3月, 2019 2 次提交
  13. 26 2月, 2019 2 次提交
  14. 25 2月, 2019 9 次提交
  15. 24 2月, 2019 1 次提交
    • F
      net: dsa: mv88e6xxx: Fix -Wformat-security warnings · 3f8b8696
      Florian Fainelli 提交于
      We are not specifying an explicit format argument but instead passing a
      string litteral which causes these two warnings to show up:
      
      drivers/net/dsa/mv88e6xxx/chip.c: In function
      'mv88e6xxx_irq_poll_setup':
      drivers/net/dsa/mv88e6xxx/chip.c:483:2: warning: format not a string
      literal and no format arguments [-Wformat-security]
        chip->kworker = kthread_create_worker(0, dev_name(chip->dev));
        ^~~~
      drivers/net/dsa/mv88e6xxx/ptp.c: In function 'mv88e6xxx_ptp_setup':
      drivers/net/dsa/mv88e6xxx/ptp.c:403:4: warning: format not a string
      literal and no format arguments [-Wformat-security]
          dev_name(chip->dev));
          ^~~~~~~~
        LD [M]  drivers/net/dsa/mv88e6xxx/mv88e6xxx.o
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3f8b8696
  16. 22 2月, 2019 1 次提交