Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
authorDavid S. Miller <davem@davemloft.net>
Tue, 15 Jan 2013 20:05:59 +0000 (15:05 -0500)
committerDavid S. Miller <davem@davemloft.net>
Tue, 15 Jan 2013 20:05:59 +0000 (15:05 -0500)
Conflicts:
Documentation/networking/ip-sysctl.txt
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c

Both conflicts were simply overlapping context.

A build fix for qlcnic is in here too, simply removing the added
devinit annotations which no longer exist.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 files changed:
1  2 
Documentation/networking/ip-sysctl.txt
drivers/infiniband/hw/nes/nes.c
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
drivers/net/ethernet/broadcom/tg3.c
drivers/net/ethernet/nvidia/forcedeth.c
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
drivers/net/ethernet/qlogic/qlge/qlge_main.c
drivers/net/ethernet/xilinx/xilinx_axienet_main.c
drivers/net/wireless/mwifiex/cfg80211.c
include/linux/netdevice.h
net/bridge/br_netlink.c
net/core/dev.c
net/ipv4/tcp_input.c
net/ipv6/netfilter/ip6t_REJECT.c

Simple merge
@@@ -85,33 -87,30 +85,58 @@@ static inline void bnx2x_move_fp(struc
  }
  
  /**
 + * bnx2x_fill_fw_str - Fill buffer with FW version string.
 + *
 + * @bp:        driver handle
 + * @buf:       character buffer to fill with the fw name
 + * @buf_len:   length of the above buffer
 + *
 + */
 +void bnx2x_fill_fw_str(struct bnx2x *bp, char *buf, size_t buf_len)
 +{
 +      if (IS_PF(bp)) {
 +              u8 phy_fw_ver[PHY_FW_VER_LEN];
 +
 +              phy_fw_ver[0] = '\0';
 +              bnx2x_get_ext_phy_fw_version(&bp->link_params,
 +                                           phy_fw_ver, PHY_FW_VER_LEN);
 +              strlcpy(buf, bp->fw_ver, buf_len);
 +              snprintf(buf + strlen(bp->fw_ver), 32 - strlen(bp->fw_ver),
 +                       "bc %d.%d.%d%s%s",
 +                       (bp->common.bc_ver & 0xff0000) >> 16,
 +                       (bp->common.bc_ver & 0xff00) >> 8,
 +                       (bp->common.bc_ver & 0xff),
 +                       ((phy_fw_ver[0] != '\0') ? " phy " : ""), phy_fw_ver);
 +      } else {
 +              bnx2x_vf_fill_fw_str(bp, buf, buf_len);
 +      }
 +}
 +
++/**
+  * bnx2x_shrink_eth_fp - guarantees fastpath structures stay intact
+  *
+  * @bp:       driver handle
+  * @delta:    number of eth queues which were not allocated
+  */
+ static void bnx2x_shrink_eth_fp(struct bnx2x *bp, int delta)
+ {
+       int i, cos, old_eth_num = BNX2X_NUM_ETH_QUEUES(bp);
+       /* Queue pointer cannot be re-set on an fp-basis, as moving pointer
+        * backward along the array could cause memory to be overriden
+        */
+       for (cos = 1; cos < bp->max_cos; cos++) {
+               for (i = 0; i < old_eth_num - delta; i++) {
+                       struct bnx2x_fastpath *fp = &bp->fp[i];
+                       int new_idx = cos * (old_eth_num - delta) + i;
+                       memcpy(&bp->bnx2x_txq[new_idx], fp->txdata_ptr[cos],
+                              sizeof(struct bnx2x_fp_txdata));
+                       fp->txdata_ptr[cos] = &bp->bnx2x_txq[new_idx];
+               }
+       }
+ }
  int load_count[2][3] = { {0} }; /* per-path: 0-common, 1-port0, 2-port1 */
  
  /* free skb in the packet ring at pos idx
Simple merge
@@@ -1657,67 -1480,20 +1657,67 @@@ static int qlcnic_set_dma_mask(struct p
        return 0;
  }
  
 -static int
 -qlcnic_alloc_msix_entries(struct qlcnic_adapter *adapter, u16 count)
 +void qlcnic_free_tx_rings(struct qlcnic_adapter *adapter)
  {
 -      adapter->msix_entries = kcalloc(count, sizeof(struct msix_entry),
 -                                      GFP_KERNEL);
 +      int ring;
 +      struct qlcnic_host_tx_ring *tx_ring;
  
 -      if (adapter->msix_entries)
 -              return 0;
 +      for (ring = 0; ring < adapter->max_drv_tx_rings; ring++) {
 +              tx_ring = &adapter->tx_ring[ring];
 +              if (tx_ring && tx_ring->cmd_buf_arr != NULL) {
 +                      vfree(tx_ring->cmd_buf_arr);
 +                      tx_ring->cmd_buf_arr = NULL;
 +              }
 +      }
 +      if (adapter->tx_ring != NULL)
 +              kfree(adapter->tx_ring);
 +}
 +
 +int qlcnic_alloc_tx_rings(struct qlcnic_adapter *adapter,
 +                        struct net_device *netdev)
 +{
 +      int ring, size, vector, index;
 +      struct qlcnic_host_tx_ring *tx_ring;
 +      struct qlcnic_cmd_buffer *cmd_buf_arr;
 +
 +      size = adapter->max_drv_tx_rings * sizeof(struct qlcnic_host_tx_ring);
 +      tx_ring = kzalloc(size, GFP_KERNEL);
 +      if (tx_ring == NULL) {
 +              dev_err(&netdev->dev, "failed to allocate tx rings\n");
 +              return -ENOMEM;
 +      }
 +      adapter->tx_ring = tx_ring;
  
 -      dev_err(&adapter->pdev->dev, "failed allocating msix_entries\n");
 -      return -ENOMEM;
 +      for (ring = 0; ring < adapter->max_drv_tx_rings; ring++) {
 +              tx_ring = &adapter->tx_ring[ring];
 +              tx_ring->num_desc = adapter->num_txd;
 +              tx_ring->txq = netdev_get_tx_queue(netdev, ring);
 +              cmd_buf_arr = vzalloc(TX_BUFF_RINGSIZE(tx_ring));
 +              if (cmd_buf_arr == NULL) {
 +                      dev_err(&netdev->dev,
 +                              "failed to allocate cmd buffer ring\n");
 +                      qlcnic_free_tx_rings(adapter);
 +                      return -ENOMEM;
 +              }
 +              memset(cmd_buf_arr, 0, TX_BUFF_RINGSIZE(tx_ring));
 +              tx_ring->cmd_buf_arr = cmd_buf_arr;
 +      }
 +
 +      if (qlcnic_83xx_check(adapter)) {
 +              for (ring = 0; ring < adapter->max_drv_tx_rings; ring++) {
 +                      tx_ring = &adapter->tx_ring[ring];
 +                      tx_ring->adapter = adapter;
 +                      if (adapter->flags & QLCNIC_MSIX_ENABLED) {
 +                              index = adapter->max_sds_rings + ring;
 +                              vector = adapter->msix_entries[index].vector;
 +                              tx_ring->irq = vector;
 +                      }
 +              }
 +      }
 +      return 0;
  }
  
- static int __devinit
+ static int
  qlcnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
  {
        struct net_device *netdev = NULL;
@@@ -1907,9 -1645,21 +1907,9 @@@ err_out_disable_pdev
        pci_set_drvdata(pdev, NULL);
        pci_disable_device(pdev);
        return err;
 -
 -err_out_maintenance_mode:
 -      netdev->netdev_ops = &qlcnic_netdev_failed_ops;
 -      SET_ETHTOOL_OPS(netdev, &qlcnic_ethtool_failed_ops);
 -      err = register_netdev(netdev);
 -      if (err) {
 -              dev_err(&pdev->dev, "failed to register net device\n");
 -              goto err_out_decr_ref;
 -      }
 -      pci_set_drvdata(pdev, adapter);
 -      qlcnic_create_diag_entries(adapter);
 -      return 0;
  }
  
- static void __devexit qlcnic_remove(struct pci_dev *pdev)
+ static void qlcnic_remove(struct pci_dev *pdev)
  {
        struct qlcnic_adapter *adapter;
        struct net_device *netdev;
Simple merge
Simple merge
diff --cc net/core/dev.c
Simple merge
Simple merge
Simple merge