1. 28 4月, 2019 17 次提交
  2. 27 4月, 2019 12 次提交
  3. 26 4月, 2019 11 次提交
    • H
      net: phy: improve genphy_soft_reset · 8c90b795
      Heiner Kallweit 提交于
      PHY's behave differently when being reset. Some reset registers to
      defaults, some don't. Some trigger an autoneg restart, some don't.
      
      So let's also set the autoneg restart bit when resetting. Then PHY
      behavior should be more consistent. Clearing BMCR_ISOLATE serves the
      same purpose and is borrowed from genphy_restart_aneg.
      
      BMCR holds the speed / duplex settings in fixed mode. Therefore
      we may have an issue if a soft reset resets BMCR to its default.
      So better call genphy_setup_forced() afterwards in fixed mode.
      We've seen no related complaint in the last >10 yrs, so let's
      treat it as an improvement.
      Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8c90b795
    • G
      usbnet: ipheth: Simplify device detection · f7abc061
      Guenter Roeck 提交于
      All Apple products use the same protocol for tethering over USB.
      To simplify the code and make it future proof, use
      USB_VENDOR_AND_INTERFACE_INFO() instead of
      USB_DEVICE_AND_INTERFACE_INFO() to automatically detect and support
      all existing and future Apple products using the same interface.
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f7abc061
    • G
      cnic: Refactor code and mark expected switch fall-through · 950347f5
      Gustavo A. R. Silva 提交于
      In preparation to enabling -Wimplicit-fallthrough, refactor code a
      bit and mark switch cases where we are expecting to fall through.
      
      This patch fixes the following warning:
      
      drivers/net/ethernet/broadcom/cnic.c: In function ‘cnic_cm_process_kcqe’:
      drivers/net/ethernet/broadcom/cnic.c:4044:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
          opcode = L4_KCQE_OPCODE_VALUE_CLOSE_COMP;
      drivers/net/ethernet/broadcom/cnic.c:4050:2: note: here
        case L4_KCQE_OPCODE_VALUE_RESET_RECEIVED:
        ^~~~
      
      Warning level 3 was used: -Wimplicit-fallthrough=3
      
      Notice that, in this particular case, the code comment is modified
      in accordance with what GCC is expecting to find.
      
      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>
      950347f5
    • G
      cxgb4/cxgb4vf_main: Mark expected switch fall-through · 05dd2645
      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/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c: In function ‘fwevtq_handler’:
      drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c:520:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
         cpl = (void *)p;
         ~~~~^~~~~~~~~~~
      drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c:524:2: note: here
        case CPL_SGE_EGR_UPDATE: {
        ^~~~
      
      Warning level 3 was used: -Wimplicit-fallthrough=3
      
      Notice that, in this particular case, the code comment is modified
      in accordance with what GCC is expecting to find.
      
      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>
      05dd2645
    • G
      wimax/i2400m/control: Mark expected switch fall-through · 9b8221d4
      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:
      
      In file included from drivers/net/wimax/i2400m/debug-levels.h:30,
                       from drivers/net/wimax/i2400m/control.c:86:
      drivers/net/wimax/i2400m/control.c: In function ‘i2400m_report_tlv_system_state’:
      ./include/linux/wimax/debug.h:200:4: warning: this statement may fall through [-Wimplicit-fallthrough=]
       do {         \
          ^
      ./include/linux/wimax/debug.h:404:36: note: in expansion of macro ‘_d_printf’
       #define d_printf(l, _dev, f, a...) _d_printf(l, "", _dev, f, ## a)
                                          ^~~~~~~~~
      drivers/net/wimax/i2400m/control.c:354:3: note: in expansion of macro ‘d_printf’
         d_printf(1, dev, "entering BS-negotiated idle mode\n");
         ^~~~~~~~
      drivers/net/wimax/i2400m/control.c:355:2: note: here
        case I2400M_SS_DISCONNECTING:
        ^~~~
      
      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>
      9b8221d4
    • G
      amd-xgbe: Mark expected switch fall-throughs · a36de5b7
      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 warnings:
      
      In file included from drivers/net/ethernet/amd/xgbe/xgbe-drv.c:129:
      drivers/net/ethernet/amd/xgbe/xgbe-drv.c: In function ‘xgbe_set_hwtstamp_settings’:
      drivers/net/ethernet/amd/xgbe/xgbe-common.h:1392:9: warning: this statement may fall through [-Wimplicit-fallthrough=]
        (_var) |= (((_val) & ((0x1 << (_width)) - 1)) << (_index)); \
        ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      drivers/net/ethernet/amd/xgbe/xgbe-common.h:1419:2: note: in expansion of macro ‘SET_BITS’
        SET_BITS((_var),      \
        ^~~~~~~~
      drivers/net/ethernet/amd/xgbe/xgbe-drv.c:1614:3: note: in expansion of macro ‘XGMAC_SET_BITS’
         XGMAC_SET_BITS(mac_tscr, MAC_TSCR, TSVER2ENA, 1);
         ^~~~~~~~~~~~~~
      drivers/net/ethernet/amd/xgbe/xgbe-drv.c:1616:2: note: here
        case HWTSTAMP_FILTER_PTP_V1_L4_EVENT:
        ^~~~
      In file included from drivers/net/ethernet/amd/xgbe/xgbe-drv.c:129:
      drivers/net/ethernet/amd/xgbe/xgbe-common.h:1392:9: warning: this statement may fall through [-Wimplicit-fallthrough=]
        (_var) |= (((_val) & ((0x1 << (_width)) - 1)) << (_index)); \
        ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      drivers/net/ethernet/amd/xgbe/xgbe-common.h:1419:2: note: in expansion of macro ‘SET_BITS’
        SET_BITS((_var),      \
        ^~~~~~~~
      drivers/net/ethernet/amd/xgbe/xgbe-drv.c:1625:3: note: in expansion of macro ‘XGMAC_SET_BITS’
         XGMAC_SET_BITS(mac_tscr, MAC_TSCR, TSVER2ENA, 1);
         ^~~~~~~~~~~~~~
      drivers/net/ethernet/amd/xgbe/xgbe-drv.c:1627:2: note: here
        case HWTSTAMP_FILTER_PTP_V1_L4_SYNC:
        ^~~~
      In file included from drivers/net/ethernet/amd/xgbe/xgbe-drv.c:129:
      drivers/net/ethernet/amd/xgbe/xgbe-common.h:1392:9: warning: this statement may fall through [-Wimplicit-fallthrough=]
        (_var) |= (((_val) & ((0x1 << (_width)) - 1)) << (_index)); \
        ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      drivers/net/ethernet/amd/xgbe/xgbe-common.h:1419:2: note: in expansion of macro ‘SET_BITS’
        SET_BITS((_var),      \
        ^~~~~~~~
      drivers/net/ethernet/amd/xgbe/xgbe-drv.c:1636:3: note: in expansion of macro ‘XGMAC_SET_BITS’
         XGMAC_SET_BITS(mac_tscr, MAC_TSCR, TSVER2ENA, 1);
         ^~~~~~~~~~~~~~
      drivers/net/ethernet/amd/xgbe/xgbe-drv.c:1638:2: note: here
        case HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ:
        ^~~~
      
      Warning level 3 was used: -Wimplicit-fallthrough=3
      
      Notice that, in this particular case, the code comments are modified
      in accordance with what GCC is expecting to find.
      
      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>
      a36de5b7
    • A
      mac80211_hwsim: Extended Key ID support · cfe7007a
      Alexander Wetzel 提交于
      Allow Extended Key ID to be used with hwsim.
      
      Hwsim can only communicate with other hwsim cards, allowing it to bypass
      creation of A-MPDUs in the first place.
      
      Mixing keyIDs in an A-MPDU is therefore impossible and can never cause
      interoperability issues with other cards.
      Signed-off-by: NAlexander Wetzel <alexander@wetzel-home.de>
      [reword comment slightly]
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      cfe7007a
    • A
      mac80211_hwsim: set p2p device interface support indication · 05383950
      Avraham Stern 提交于
      P2P device interface type was not indicated in the supported
      interface types even when hwsim was configured with p2p device
      support. Fix it.
      Signed-off-by: NAvraham Stern <avraham.stern@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      05383950
    • J
      netdevsim: implement ndo_get_devlink_port · a62fdbbe
      Jiri Pirko 提交于
      Implement ndo_get_devlink_port and allow switch_id and port_name to be
      handled by devlink.
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a62fdbbe
    • J
      netdevsim: move netdev creation/destruction to dev probe · e05b2d14
      Jiri Pirko 提交于
      Remove the existing way to create netdevsim over rtnetlink and move the
      netdev creation/destruction to dev probe, so for every probed port,
      a netdevsim-netdev instance is created.
      
      Adjust selftests to work with new interface.
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e05b2d14
    • J
      netdevsim: extend device attrs to support port addition and deletion · 794b2c05
      Jiri Pirko 提交于
      In order to test flows in core, it is beneficial to maintain previously
      supported possibility to add and delete ports during netdevsim lifetime.
      Do it by extending device sysfs attrs by "new_port" and "del_port".
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      794b2c05