1. 21 Dec, 2013 6 commits
    • Hauke Mehrtens's avatar
      b44: activate PHY when MAC is off · bea69c47
      Hauke Mehrtens authored
      Without this patch we can not access the PHY when the MAC is switched
      off. This PHY access is needed to configure the switch, which is done
      through PHY registers.
      Signed-off-by: default avatarHauke Mehrtens <hauke@hauke-m.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bea69c47
    • Hauke Mehrtens's avatar
      b44: add phylib support · 86f4ea63
      Hauke Mehrtens authored
      Most of the older home routers based on the Broadcom BCM47XX SoC series
      are using a MAC that is supported by b44. On most of these routers not
      the internal PHY of this MAC core is used, but a switch sometimes on an
      external chip or integrated into the same SoC as the Ethernet core.
      For this switch a special PHY driver is needed which should not be
      integrated into b44 as the same switches are also used by other
      Broadcom home networking SoCs which are using different Ethernet MAC
      drivers. This was tested with the b53 switch driver which is currently
      on its way to mainline.
      
      If the internal PHY is not used, b44 will now search on the MDIO bus
      for a phy and use the Linux phylib subsystem to register a driver.
      Support for the internal PHY must stay here, because there are some
      device which are suing the internal phy.
      
      With this patch we scan the mdio bus when the sprom or nvram says that
      the PHY address is 30, if a PHY was found at this address b44 uses it.
      
      This was tested with a BCM4704, BCM4712 and BCM5354.
      Signed-off-by: default avatarHauke Mehrtens <hauke@hauke-m.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      86f4ea63
    • Hauke Mehrtens's avatar
      b44: rename b44_mii_{read, write} to b44_mdio_{read, write}_mii · 348baa6c
      Hauke Mehrtens authored
      The next patch will add these functions for phylib, and we should
      rename the old ones before. This now indicates that these functions are
      used for the mdio registers and on the mii interface.
      Signed-off-by: default avatarHauke Mehrtens <hauke@hauke-m.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      348baa6c
    • Hauke Mehrtens's avatar
      b44: abort when no PHY is available at all · 7befa6ab
      Hauke Mehrtens authored
      When the phy address is 31, this means that there is no PHY connected
      to this MAC at all, no internal and no external PHY. Reading these PHY
      registers causes a system reset on some routers.
      Signed-off-by: default avatarHauke Mehrtens <hauke@hauke-m.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7befa6ab
    • Hauke Mehrtens's avatar
      b44: rename B44_PHY_ADDR_NO_PHY to B44_PHY_ADDR_NO_LOCAL_PHY · 5ab6329c
      Hauke Mehrtens authored
      The PHY address 30 means there is no local PHY, but there could be an
      external PHY like a switch connected via MII. This is the case on most
      embedded home routers where this driver is used.
      Signed-off-by: default avatarHauke Mehrtens <hauke@hauke-m.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5ab6329c
    • Hauke Mehrtens's avatar
      b44: check register instead of PHY address to detect external PHY · d6194195
      Hauke Mehrtens authored
      The Ethernet core supported by b44 supports an internal PHY integrated
      into the mac core, which is supported by the b44 driver and an external
      PHY to which the mac core is connected. This external PHY could be a
      switch connected through MII, which is often the case when this core is
      used on home routers. The usage of an external PHY was assumed when the
      PHY address 30 was used and an internal PHY was assumed when the PHY
      address was different. To verify that b44_phy_reset() was called and
      checked if it worked, otherwise PHY address 30 was assumed, an external
      PHY. It is better to check the register which says which PHY is
      connected to the MAC instead of checking the PHY address.
      The interface to an external PHY was only activated when this register
      was set.
      
      This also changes B44_FLAG_INTERNAL_PHY to B44_FLAG_EXTERNAL_PHY, it is
      easier to check.
      Signed-off-by: default avatarHauke Mehrtens <hauke@hauke-m.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d6194195
  2. 20 Dec, 2013 26 commits
  3. 19 Dec, 2013 8 commits
    • Rashika Kheria's avatar
      drivers: net: Mark functions as static in debug.c · c5036813
      Rashika Kheria authored
      This patch marks the function il_clear_traffic_stats() in debug.c as
      static because they are not used outside this file.
      
      Thus, it also removes the following warnings in
      wireless/iwlegacy/debug.c:
      
      drivers/net/wireless/iwlegacy/debug.c:35:1: warning: no previous prototype for ‘il_clear_traffic_stats’ [-Wmissing-prototypes]
      Signed-off-by: default avatarRashika Kheria <rashika.kheria@gmail.com>
      Reviewed-by: default avatarJosh Triplett <josh@joshtriplett.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c5036813
    • Rashika Kheria's avatar
      drivers: net: Mark functions as static in 4965-debug.c · 44468f5b
      Rashika Kheria authored
      This patch marks the function il4965_ucode_rx_stats_read(),
      il4965_ucode_tx_stats_read() and il4965_ucode_general_stats_read() in
      4965-debug.c as static because they are not used outside this file.
      
      Thus, it also removes the following warnings in
      wireless/iwlegacy/4965-debug.c:
      
      drivers/net/wireless/iwlegacy/4965-debug.c:59:1: warning: no previous prototype for ‘il4965_ucode_rx_stats_read’ [-Wmissing-prototypes]
      drivers/net/wireless/iwlegacy/4965-debug.c:471:1: warning: no previous prototype for ‘il4965_ucode_tx_stats_read’ [-Wmissing-prototypes]
      drivers/net/wireless/iwlegacy/4965-debug.c:637:1: warning: no previous prototype for ‘il4965_ucode_general_stats_read’ [-Wmissing-prototypes]
      Signed-off-by: default avatarRashika Kheria <rashika.kheria@gmail.com>
      Reviewed-by: default avatarJosh Triplett <josh@joshtriplett.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      44468f5b
    • Rashika Kheria's avatar
      drivers: net: Mark functions as static in 3945-debug.c · 9b0124d8
      Rashika Kheria authored
      This patch marks the function il3945_ucode_rx_stats_read(),
      il3945_ucode_tx_stats_read() and il3945_ucode_general_stats_read() in
      3945-debug.c as static because they are not used outside this file.
      
      Thus, it also removes the following warnings in
      wireless/iwlegacy/3945-debug.c:
      
      drivers/net/wireless/iwlegacy/3945-debug.c:52:1: warning: no previous prototype for ‘il3945_ucode_rx_stats_read’ [-Wmissing-prototypes]
      drivers/net/wireless/iwlegacy/3945-debug.c:317:1: warning: no previous prototype for ‘il3945_ucode_tx_stats_read’ [-Wmissing-prototypes]
      drivers/net/wireless/iwlegacy/3945-debug.c:407:1: warning: no previous prototype for ‘il3945_ucode_general_stats_read’ [-Wmissing-prototypes]
      Signed-off-by: default avatarRashika Kheria <rashika.kheria@gmail.com>
      Reviewed-by: default avatarJosh Triplett <josh@joshtriplett.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9b0124d8
    • Rashika Kheria's avatar
      drivers: net: Include new header file in sbni.c · b6835f9c
      Rashika Kheria authored
      Create a new header file include/net/Space.h which contains
      prototype declaration of sbni_probe().
      
      Include the new header file in drivers/net/Space.c and
      drivers/net/wan/sbni.c because they use this function.
      
      This eliminates the following warning in wan/sbni.c:
      drivers/net/wan/sbni.c:224:12: warning: no previous prototype for ‘sbni_probe’ [-Wmissing-prototypes]
      Signed-off-by: default avatarRashika Kheria <rashika.kheria@gmail.com>
      Reviewed-by: default avatarJosh Triplett <josh@joshtriplett.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b6835f9c
    • Rashika Kheria's avatar
      drivers: net: Mark functions as static in stmmac_platform.c · 33ba4079
      Rashika Kheria authored
      This patch marks the function stmmac_pltfr_freeze() and
      stmmac_pltfr_restore() in stmmac_platform.c as static because they are
      not used outside this file.
      
      Thus, it also removes the following warnings in
      ethernet/stmicro/stmmac/stmmac_platform.c:
      
      drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:222:5: warning: no previous prototype for ‘stmmac_pltfr_freeze’ [-Wmissing-prototypes]
      drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:236:5: warning: no previous prototype for ‘stmmac_pltfr_restore’ [-Wmissing-prototypes]
      Signed-off-by: default avatarRashika Kheria <rashika.kheria@gmail.com>
      Reviewed-by: default avatarJosh Triplett <josh@joshtriplett.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      33ba4079
    • Rashika Kheria's avatar
      drivers: net: Mark functions as static in qlcnic_83xx_hw.c · 49fef742
      Rashika Kheria authored
      This patch marks the function qlcnic_83xx_clear_legacy_intr_mask(),
      qlcnic_83xx_set_legacy_intr_mask() and
      qlcnic_83xx_enable_legacy_msix_mbx_intr() in qlcnic_83xx_hw.c as static
      because they are not used outside this file.
      
      Thus, it also removes the following warnings
      in ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c:
      
      drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c:318:13: warning: no previous prototype for ‘qlcnic_83xx_clear_legacy_intr_mask’ [-Wmissing-prototypes]
      drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c:323:13: warning: no previous prototype for ‘qlcnic_83xx_set_legacy_intr_mask’ [-Wmissing-prototypes]
      drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c:343:13: warning: no previous prototype for ‘qlcnic_83xx_enable_legacy_msix_mbx_intr’ [-Wmissing-prototypes]
      Signed-off-by: default avatarRashika Kheria <rashika.kheria@gmail.com>
      Reviewed-by: default avatarJosh Triplett <josh@joshtriplett.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      49fef742
    • Rashika Kheria's avatar
      drivers: net: Mark functions as static in qlcnic_io.c · 8e3fb2ce
      Rashika Kheria authored
      This patch marks the function qlcnic_enable_tx_intr(),
      qlcnic_83xx_enable_tx_intr() and qlcnic_83xx_disable_tx_intr() in
      qlcnic_io.c as static because they are not used outside this file.
      
      Thus, it also removes the following warnings in
      ethernet/qlogic/qlcnic/qlcnic_io.c:
      
      drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c:130:13: warning: no previous prototype for ‘qlcnic_enable_tx_intr’ [-Wmissing-prototypes]
      drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c:147:13: warning: no previous prototype for ‘qlcnic_83xx_enable_tx_intr’ [-Wmissing-prototypes]
      drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c:153:13: warning: no previous prototype for ‘qlcnic_83xx_disable_tx_intr’ [-Wmissing-prototypes]
      Signed-off-by: default avatarRashika Kheria <rashika.kheria@gmail.com>
      Reviewed-by: default avatarJosh Triplett <josh@joshtriplett.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8e3fb2ce
    • David S. Miller's avatar
      Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next · 1669cb98
      David S. Miller authored
      Steffen Klassert says:
      
      ====================
      pull request (net-next): ipsec-next 2013-12-19
      
      1) Use the user supplied policy index instead of a generated one
         if present. From Fan Du.
      
      2) Make xfrm migration namespace aware. From Fan Du.
      
      3) Make the xfrm state and policy locks namespace aware. From Fan Du.
      
      4) Remove ancient sleeping when the SA is in acquire state,
         we now queue packets to the policy instead. This replaces the
         sleeping code.
      
      5) Remove FLOWI_FLAG_CAN_SLEEP. This was used to notify xfrm about the
         posibility to sleep. The sleeping code is gone, so remove it.
      
      6) Check user specified spi for IPComp. Thr spi for IPcomp is only
         16 bit wide, so check for a valid value. From Fan Du.
      
      7) Export verify_userspi_info to check for valid user supplied spi ranges
         with pfkey and netlink. From Fan Du.
      
      8) RFC3173 states that if the total size of a compressed payload and the IPComp
         header is not smaller than the size of the original payload, the IP datagram
         must be sent in the original non-compressed form. These packets are dropped
         by the inbound policy check because they are not transformed. Document the need
         to set 'level use' for IPcomp to receive such packets anyway. From Fan Du.
      
      Please pull or let me know if there are problems.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1669cb98