Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
authorDavid S. Miller <davem@davemloft.net>
Wed, 3 Jul 2013 21:50:41 +0000 (14:50 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 3 Jul 2013 21:55:13 +0000 (14:55 -0700)
Conflicts:
drivers/net/ethernet/freescale/fec_main.c
drivers/net/ethernet/renesas/sh_eth.c
net/ipv4/gre.c

The GRE conflict is between a bug fix (kfree_skb --> kfree_skb_list)
and the splitting of the gre.c code into seperate files.

The FEC conflict was two sets of changes adding ethtool support code
in an "!CONFIG_M5272" CPP protected block.

Finally the sh_eth.c conflict was between one commit add bits set
in the .eesr_err_check mask whilst another commit removed the
.tx_error_check member and assignments.

Signed-off-by: David S. Miller <davem@davemloft.net>
35 files changed:
1  2 
Documentation/networking/ip-sysctl.txt
MAINTAINERS
drivers/net/bonding/bond_main.c
drivers/net/ethernet/broadcom/tg3.c
drivers/net/ethernet/freescale/fec_main.c
drivers/net/ethernet/marvell/mv643xx_eth.c
drivers/net/ethernet/marvell/pxa168_eth.c
drivers/net/ethernet/mellanox/mlx4/main.c
drivers/net/ethernet/octeon/octeon_mgmt.c
drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c
drivers/net/ethernet/renesas/sh_eth.c
drivers/net/ethernet/renesas/sh_eth.h
drivers/net/ethernet/sfc/efx.c
drivers/net/ethernet/stmicro/stmmac/common.h
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
drivers/net/ethernet/ti/cpsw.c
drivers/net/ethernet/ti/davinci_cpdma.c
drivers/net/macvtap.c
drivers/net/tun.c
drivers/net/usb/qmi_wwan.c
drivers/net/wan/dlci.c
drivers/scsi/fcoe/fcoe.c
include/linux/if_vlan.h
include/linux/netdevice.h
include/linux/skbuff.h
net/core/dev.c
net/core/skbuff.c
net/core/sock.c
net/ipv4/gre_offload.c
net/ipv4/netfilter/ipt_ULOG.c
net/ipv4/tcp_ipv4.c
net/ipv6/addrconf.c
net/ipv6/ip6_output.c
net/netfilter/ipvs/ip_vs_core.c
net/netfilter/nf_conntrack_netlink.c

diff --cc MAINTAINERS
Simple merge
Simple merge
Simple merge
@@@ -1442,121 -1444,13 +1450,122 @@@ static int fec_enet_set_pauseparam(stru
        return 0;
  }
  
- #ifndef CONFIG_M5272
 +static const struct fec_stat {
 +      char name[ETH_GSTRING_LEN];
 +      u16 offset;
 +} fec_stats[] = {
 +      /* RMON TX */
 +      { "tx_dropped", RMON_T_DROP },
 +      { "tx_packets", RMON_T_PACKETS },
 +      { "tx_broadcast", RMON_T_BC_PKT },
 +      { "tx_multicast", RMON_T_MC_PKT },
 +      { "tx_crc_errors", RMON_T_CRC_ALIGN },
 +      { "tx_undersize", RMON_T_UNDERSIZE },
 +      { "tx_oversize", RMON_T_OVERSIZE },
 +      { "tx_fragment", RMON_T_FRAG },
 +      { "tx_jabber", RMON_T_JAB },
 +      { "tx_collision", RMON_T_COL },
 +      { "tx_64byte", RMON_T_P64 },
 +      { "tx_65to127byte", RMON_T_P65TO127 },
 +      { "tx_128to255byte", RMON_T_P128TO255 },
 +      { "tx_256to511byte", RMON_T_P256TO511 },
 +      { "tx_512to1023byte", RMON_T_P512TO1023 },
 +      { "tx_1024to2047byte", RMON_T_P1024TO2047 },
 +      { "tx_GTE2048byte", RMON_T_P_GTE2048 },
 +      { "tx_octets", RMON_T_OCTETS },
 +
 +      /* IEEE TX */
 +      { "IEEE_tx_drop", IEEE_T_DROP },
 +      { "IEEE_tx_frame_ok", IEEE_T_FRAME_OK },
 +      { "IEEE_tx_1col", IEEE_T_1COL },
 +      { "IEEE_tx_mcol", IEEE_T_MCOL },
 +      { "IEEE_tx_def", IEEE_T_DEF },
 +      { "IEEE_tx_lcol", IEEE_T_LCOL },
 +      { "IEEE_tx_excol", IEEE_T_EXCOL },
 +      { "IEEE_tx_macerr", IEEE_T_MACERR },
 +      { "IEEE_tx_cserr", IEEE_T_CSERR },
 +      { "IEEE_tx_sqe", IEEE_T_SQE },
 +      { "IEEE_tx_fdxfc", IEEE_T_FDXFC },
 +      { "IEEE_tx_octets_ok", IEEE_T_OCTETS_OK },
 +
 +      /* RMON RX */
 +      { "rx_packets", RMON_R_PACKETS },
 +      { "rx_broadcast", RMON_R_BC_PKT },
 +      { "rx_multicast", RMON_R_MC_PKT },
 +      { "rx_crc_errors", RMON_R_CRC_ALIGN },
 +      { "rx_undersize", RMON_R_UNDERSIZE },
 +      { "rx_oversize", RMON_R_OVERSIZE },
 +      { "rx_fragment", RMON_R_FRAG },
 +      { "rx_jabber", RMON_R_JAB },
 +      { "rx_64byte", RMON_R_P64 },
 +      { "rx_65to127byte", RMON_R_P65TO127 },
 +      { "rx_128to255byte", RMON_R_P128TO255 },
 +      { "rx_256to511byte", RMON_R_P256TO511 },
 +      { "rx_512to1023byte", RMON_R_P512TO1023 },
 +      { "rx_1024to2047byte", RMON_R_P1024TO2047 },
 +      { "rx_GTE2048byte", RMON_R_P_GTE2048 },
 +      { "rx_octets", RMON_R_OCTETS },
 +
 +      /* IEEE RX */
 +      { "IEEE_rx_drop", IEEE_R_DROP },
 +      { "IEEE_rx_frame_ok", IEEE_R_FRAME_OK },
 +      { "IEEE_rx_crc", IEEE_R_CRC },
 +      { "IEEE_rx_align", IEEE_R_ALIGN },
 +      { "IEEE_rx_macerr", IEEE_R_MACERR },
 +      { "IEEE_rx_fdxfc", IEEE_R_FDXFC },
 +      { "IEEE_rx_octets_ok", IEEE_R_OCTETS_OK },
 +};
 +
 +static void fec_enet_get_ethtool_stats(struct net_device *dev,
 +      struct ethtool_stats *stats, u64 *data)
 +{
 +      struct fec_enet_private *fep = netdev_priv(dev);
 +      int i;
 +
 +      for (i = 0; i < ARRAY_SIZE(fec_stats); i++)
 +              data[i] = readl(fep->hwp + fec_stats[i].offset);
 +}
 +
 +static void fec_enet_get_strings(struct net_device *netdev,
 +      u32 stringset, u8 *data)
 +{
 +      int i;
 +      switch (stringset) {
 +      case ETH_SS_STATS:
 +              for (i = 0; i < ARRAY_SIZE(fec_stats); i++)
 +                      memcpy(data + i * ETH_GSTRING_LEN,
 +                              fec_stats[i].name, ETH_GSTRING_LEN);
 +              break;
 +      }
 +}
 +
 +static int fec_enet_get_sset_count(struct net_device *dev, int sset)
 +{
 +      switch (sset) {
 +      case ETH_SS_STATS:
 +              return ARRAY_SIZE(fec_stats);
 +      default:
 +              return -EOPNOTSUPP;
 +      }
 +}
- #endif
+ #endif /* !defined(CONFIG_M5272) */
  
 +static int fec_enet_nway_reset(struct net_device *dev)
 +{
 +      struct fec_enet_private *fep = netdev_priv(dev);
 +      struct phy_device *phydev = fep->phy_dev;
 +
 +      if (!phydev)
 +              return -ENODEV;
 +
 +      return genphy_restart_aneg(phydev);
 +}
 +
  static const struct ethtool_ops fec_enet_ethtool_ops = {
+ #if !defined(CONFIG_M5272)
        .get_pauseparam         = fec_enet_get_pauseparam,
        .set_pauseparam         = fec_enet_set_pauseparam,
+ #endif
        .get_settings           = fec_enet_get_settings,
        .set_settings           = fec_enet_set_settings,
        .get_drvinfo            = fec_enet_get_drvinfo,
@@@ -2000,13 -1891,9 +2010,14 @@@ fec_probe(struct platform_device *pdev
        if (pdev->id_entry &&
            (pdev->id_entry->driver_data & FEC_QUIRK_HAS_GBIT))
                fep->pause_flag |= FEC_PAUSE_FLAG_AUTONEG;
+ #endif
  
 -      fep->hwp = devm_request_and_ioremap(&pdev->dev, r);
 +      fep->hwp = devm_ioremap_resource(&pdev->dev, r);
 +      if (IS_ERR(fep->hwp)) {
 +              ret = PTR_ERR(fep->hwp);
 +              goto failed_ioremap;
 +      }
 +
        fep->pdev = pdev;
        fep->dev_id = dev_id++;
  
@@@ -382,8 -380,10 +382,9 @@@ static struct sh_eth_cpu_data r8a777x_d
        .eesipr_value   = 0x01ff009f,
  
        .tx_check       = EESR_FTC | EESR_CND | EESR_DLC | EESR_CD | EESR_RTO,
-       .eesr_err_check = EESR_TWB | EESR_TABT | EESR_RABT | EESR_RDE |
-                         EESR_RFRMER | EESR_TFE | EESR_TDE | EESR_ECI,
+       .eesr_err_check = EESR_TWB | EESR_TABT | EESR_RABT | EESR_RFE |
+                         EESR_RDE | EESR_RFRMER | EESR_TFE | EESR_TDE |
+                         EESR_ECI,
 -      .tx_error_check = EESR_TWB | EESR_TABT | EESR_TDE | EESR_TFE,
  
        .apr            = 1,
        .mpr            = 1,
@@@ -414,11 -425,13 +415,12 @@@ static struct sh_eth_cpu_data sh7724_da
  
        .ecsr_value     = ECSR_PSRTO | ECSR_LCHNG | ECSR_ICD,
        .ecsipr_value   = ECSIPR_PSRTOIP | ECSIPR_LCHNGIP | ECSIPR_ICDIP,
 -      .eesipr_value   = DMAC_M_RFRMER | DMAC_M_ECI | 0x01ff009f,
 +      .eesipr_value   = 0x01ff009f,
  
        .tx_check       = EESR_FTC | EESR_CND | EESR_DLC | EESR_CD | EESR_RTO,
-       .eesr_err_check = EESR_TWB | EESR_TABT | EESR_RABT | EESR_RDE |
-                         EESR_RFRMER | EESR_TFE | EESR_TDE | EESR_ECI,
+       .eesr_err_check = EESR_TWB | EESR_TABT | EESR_RABT | EESR_RFE |
+                         EESR_RDE | EESR_RFRMER | EESR_TFE | EESR_TDE |
+                         EESR_ECI,
 -      .tx_error_check = EESR_TWB | EESR_TABT | EESR_TDE | EESR_TFE,
  
        .apr            = 1,
        .mpr            = 1,
@@@ -453,10 -480,11 +455,11 @@@ static struct sh_eth_cpu_data sh7757_da
        .rmcr_value     = 0x00000001,
  
        .tx_check       = EESR_FTC | EESR_CND | EESR_DLC | EESR_CD | EESR_RTO,
-       .eesr_err_check = EESR_TWB | EESR_TABT | EESR_RABT | EESR_RDE |
-                         EESR_RFRMER | EESR_TFE | EESR_TDE | EESR_ECI,
+       .eesr_err_check = EESR_TWB | EESR_TABT | EESR_RABT | EESR_RFE |
+                         EESR_RDE | EESR_RFRMER | EESR_TFE | EESR_TDE |
+                         EESR_ECI,
 -      .tx_error_check = EESR_TWB | EESR_TABT | EESR_TDE | EESR_TFE,
  
 +      .irq_flags      = IRQF_SHARED,
        .apr            = 1,
        .mpr            = 1,
        .tpauser        = 1,
@@@ -521,9 -595,11 +524,9 @@@ static struct sh_eth_cpu_data sh7757_da
        .eesipr_value   = DMAC_M_RFRMER | DMAC_M_ECI | 0x003fffff,
  
        .tx_check       = EESR_TC1 | EESR_FTC,
-       .eesr_err_check = EESR_TWB1 | EESR_TWB | EESR_TABT | EESR_RABT | \
-                         EESR_RDE | EESR_RFRMER | EESR_TFE | EESR_TDE | \
-                         EESR_ECI,
+       .eesr_err_check = EESR_TWB1 | EESR_TWB | EESR_TABT | EESR_RABT |
+                         EESR_RFE | EESR_RDE | EESR_RFRMER | EESR_TFE |
+                         EESR_TDE | EESR_ECI,
 -      .tx_error_check = EESR_TWB1 | EESR_TWB | EESR_TABT | EESR_TDE | \
 -                        EESR_TFE,
        .fdr_value      = 0x0000072f,
        .rmcr_value     = 0x00000001,
  
@@@ -579,9 -677,11 +582,9 @@@ static struct sh_eth_cpu_data sh7734_da
        .eesipr_value   = DMAC_M_RFRMER | DMAC_M_ECI | 0x003fffff,
  
        .tx_check       = EESR_TC1 | EESR_FTC,
-       .eesr_err_check = EESR_TWB1 | EESR_TWB | EESR_TABT | EESR_RABT | \
-                         EESR_RDE | EESR_RFRMER | EESR_TFE | EESR_TDE | \
-                         EESR_ECI,
+       .eesr_err_check = EESR_TWB1 | EESR_TWB | EESR_TABT | EESR_RABT |
+                         EESR_RFE | EESR_RDE | EESR_RFRMER | EESR_TFE |
+                         EESR_TDE | EESR_ECI,
 -      .tx_error_check = EESR_TWB1 | EESR_TWB | EESR_TABT | EESR_TDE | \
 -                        EESR_TFE,
  
        .apr            = 1,
        .mpr            = 1,
@@@ -643,9 -814,11 +646,9 @@@ static struct sh_eth_cpu_data r8a7740_d
        .eesipr_value   = DMAC_M_RFRMER | DMAC_M_ECI | 0x003fffff,
  
        .tx_check       = EESR_TC1 | EESR_FTC,
-       .eesr_err_check = EESR_TWB1 | EESR_TWB | EESR_TABT | EESR_RABT | \
-                         EESR_RDE | EESR_RFRMER | EESR_TFE | EESR_TDE | \
-                         EESR_ECI,
+       .eesr_err_check = EESR_TWB1 | EESR_TWB | EESR_TABT | EESR_RABT |
+                         EESR_RFE | EESR_RDE | EESR_RFRMER | EESR_TFE |
+                         EESR_TDE | EESR_ECI,
 -      .tx_error_check = EESR_TWB1 | EESR_TWB | EESR_TABT | EESR_TDE | \
 -                        EESR_TFE,
  
        .apr            = 1,
        .mpr            = 1,
@@@ -248,19 -251,13 +248,19 @@@ enum EESR_BIT 
        EESR_CERF       = 0x00000001,
  };
  
 +#define EESR_RX_CHECK         (EESR_FRC  | /* Frame recv */           \
 +                               EESR_RMAF | /* Multicast address recv */ \
 +                               EESR_RRF  | /* Bit frame recv */       \
 +                               EESR_RTLF | /* Long frame recv */      \
 +                               EESR_RTSF | /* Short frame recv */     \
 +                               EESR_PRE  | /* PHY-LSI recv error */   \
 +                               EESR_CERF)  /* Recv frame CRC error */
 +
  #define DEFAULT_TX_CHECK      (EESR_FTC | EESR_CND | EESR_DLC | EESR_CD | \
                                 EESR_RTO)
- #define DEFAULT_EESR_ERR_CHECK        (EESR_TWB | EESR_TABT | EESR_RABT | \
+ #define DEFAULT_EESR_ERR_CHECK        (EESR_TWB | EESR_TABT | EESR_RABT | EESR_RFE | \
                                 EESR_RDE | EESR_RFRMER | EESR_ADE | \
                                 EESR_TFE | EESR_TDE | EESR_ECI)
 -#define DEFAULT_TX_ERROR_CHECK        (EESR_TWB | EESR_TABT | EESR_ADE | EESR_TDE | \
 -                               EESR_TFE)
  
  /* EESIPR */
  enum DMAC_IM_BIT {
Simple merge
@@@ -738,9 -767,14 +736,12 @@@ static void stmmac_adjust_link(struct n
        if (new_state && netif_msg_link(priv))
                phy_print_status(phydev);
  
-       stmmac_eee_adjust(priv);
+       /* At this stage, it could be needed to setup the EEE or adjust some
+        * MAC related HW registers.
+        */
+       priv->eee_enabled = stmmac_eee_init(priv);
  
        spin_unlock_irqrestore(&priv->lock, flags);
 -
 -      DBG(probe, DEBUG, "stmmac_adjust_link: exiting\n");
  }
  
  /**
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc net/core/dev.c
Simple merge
Simple merge
diff --cc net/core/sock.c
Simple merge
index a9d8cd2,0000000..775d5b5
mode 100644,000000..100644
--- /dev/null
@@@ -1,127 -1,0 +1,127 @@@
-                                       kfree_skb(segs);
 +/*
 + *    IPV4 GSO/GRO offload support
 + *    Linux INET implementation
 + *
 + *    This program is free software; you can redistribute it and/or
 + *    modify it under the terms of the GNU General Public License
 + *    as published by the Free Software Foundation; either version
 + *    2 of the License, or (at your option) any later version.
 + *
 + *    GRE GSO support
 + */
 +
 +#include <linux/skbuff.h>
 +#include <net/protocol.h>
 +#include <net/gre.h>
 +
 +static int gre_gso_send_check(struct sk_buff *skb)
 +{
 +      if (!skb->encapsulation)
 +              return -EINVAL;
 +      return 0;
 +}
 +
 +static struct sk_buff *gre_gso_segment(struct sk_buff *skb,
 +                                     netdev_features_t features)
 +{
 +      struct sk_buff *segs = ERR_PTR(-EINVAL);
 +      netdev_features_t enc_features;
 +      int ghl = GRE_HEADER_SECTION;
 +      struct gre_base_hdr *greh;
 +      int mac_len = skb->mac_len;
 +      __be16 protocol = skb->protocol;
 +      int tnl_hlen;
 +      bool csum;
 +
 +      if (unlikely(skb_shinfo(skb)->gso_type &
 +                              ~(SKB_GSO_TCPV4 |
 +                                SKB_GSO_TCPV6 |
 +                                SKB_GSO_UDP |
 +                                SKB_GSO_DODGY |
 +                                SKB_GSO_TCP_ECN |
 +                                SKB_GSO_GRE)))
 +              goto out;
 +
 +      if (unlikely(!pskb_may_pull(skb, sizeof(*greh))))
 +              goto out;
 +
 +      greh = (struct gre_base_hdr *)skb_transport_header(skb);
 +
 +      if (greh->flags & GRE_KEY)
 +              ghl += GRE_HEADER_SECTION;
 +      if (greh->flags & GRE_SEQ)
 +              ghl += GRE_HEADER_SECTION;
 +      if (greh->flags & GRE_CSUM) {
 +              ghl += GRE_HEADER_SECTION;
 +              csum = true;
 +      } else
 +              csum = false;
 +
 +      /* setup inner skb. */
 +      skb->protocol = greh->protocol;
 +      skb->encapsulation = 0;
 +
 +      if (unlikely(!pskb_may_pull(skb, ghl)))
 +              goto out;
 +
 +      __skb_pull(skb, ghl);
 +      skb_reset_mac_header(skb);
 +      skb_set_network_header(skb, skb_inner_network_offset(skb));
 +      skb->mac_len = skb_inner_network_offset(skb);
 +
 +      /* segment inner packet. */
 +      enc_features = skb->dev->hw_enc_features & netif_skb_features(skb);
 +      segs = skb_mac_gso_segment(skb, enc_features);
 +      if (!segs || IS_ERR(segs))
 +              goto out;
 +
 +      skb = segs;
 +      tnl_hlen = skb_tnl_header_len(skb);
 +      do {
 +              __skb_push(skb, ghl);
 +              if (csum) {
 +                      __be32 *pcsum;
 +
 +                      if (skb_has_shared_frag(skb)) {
 +                              int err;
 +
 +                              err = __skb_linearize(skb);
 +                              if (err) {
++                                      kfree_skb_list(segs);
 +                                      segs = ERR_PTR(err);
 +                                      goto out;
 +                              }
 +                      }
 +
 +                      greh = (struct gre_base_hdr *)(skb->data);
 +                      pcsum = (__be32 *)(greh + 1);
 +                      *pcsum = 0;
 +                      *(__sum16 *)pcsum = csum_fold(skb_checksum(skb, 0, skb->len, 0));
 +              }
 +              __skb_push(skb, tnl_hlen - ghl);
 +
 +              skb_reset_mac_header(skb);
 +              skb_set_network_header(skb, mac_len);
 +              skb->mac_len = mac_len;
 +              skb->protocol = protocol;
 +      } while ((skb = skb->next));
 +out:
 +      return segs;
 +}
 +
 +static const struct net_offload gre_offload = {
 +      .callbacks = {
 +              .gso_send_check = gre_gso_send_check,
 +              .gso_segment = gre_gso_segment,
 +      },
 +};
 +
 +int __init gre_offload_init(void)
 +{
 +      return inet_add_offload(&gre_offload, IPPROTO_GRE);
 +}
 +
 +void __exit gre_offload_exit(void)
 +{
 +      inet_del_offload(&gre_offload, IPPROTO_GRE);
 +}
Simple merge
@@@ -1027,9 -1044,11 +1027,9 @@@ EXPORT_SYMBOL(tcp_md5_do_add)
  
  int tcp_md5_do_del(struct sock *sk, const union tcp_md5_addr *addr, int family)
  {
 -      struct tcp_sock *tp = tcp_sk(sk);
        struct tcp_md5sig_key *key;
 -      struct tcp_md5sig_info *md5sig;
  
-       key = tcp_md5_do_lookup(sk, (union tcp_md5_addr *)&addr, AF_INET);
+       key = tcp_md5_do_lookup(sk, addr, family);
        if (!key)
                return -ENOENT;
        hlist_del_rcu(&key->node);
Simple merge
Simple merge
Simple merge
Simple merge