Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 25 May 2010 19:05:17 +0000 (12:05 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 25 May 2010 19:05:17 +0000 (12:05 -0700)
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  RDMA/nes: Fix incorrect unlock in nes_process_mac_intr()
  RDMA/nes: Async event for closed QP causes crash
  RDMA/nes: Have ethtool read hardware registers for rx/tx stats
  RDMA/cxgb4: Only insert sq qid in lookup table
  RDMA/cxgb4: Support IB_WR_READ_WITH_INV opcode
  RDMA/cxgb4: Set fence flag for inv-local-stag work requests
  RDMA/cxgb4: Update some HW limits
  RDMA/cxgb4: Don't limit fastreg page list depth
  RDMA/cxgb4: Return proper errors in fastreg mr/pbl allocation
  RDMA/cxgb4: Fix overflow bug in CQ arm
  RDMA/cxgb4: Optimize CQ overflow detection
  RDMA/cxgb4: CQ size must be IQ size - 2
  RDMA/cxgb4: Register RDMA provider based on LLD state_change events
  RDMA/cxgb4: Detach from the LLD after unregistering RDMA device
  IB/ipath: Remove support for QLogic PCIe QLE devices
  IB/qib: Add new qib driver for QLogic PCIe InfiniBand adapters
  IB/mad: Make needlessly global mad_sendq_size/mad_recvq_size static
  IB/core: Allow device-specific per-port sysfs files
  mlx4_core: Clean up mlx4_alloc_icm() a bit
  mlx4_core: Fix possible chunk sg list overflow in mlx4_alloc_icm()

1  2 
drivers/infiniband/hw/ehca/ehca_main.c
drivers/infiniband/hw/nes/nes_nic.c

@@@ -291,9 -291,8 +291,9 @@@ static int ehca_sense_attributes(struc
        };
  
        ehca_gen_dbg("Probing adapter %s...",
 -                   shca->ofdev->node->full_name);
 -      loc_code = of_get_property(shca->ofdev->node, "ibm,loc-code", NULL);
 +                   shca->ofdev->dev.of_node->full_name);
 +      loc_code = of_get_property(shca->ofdev->dev.of_node, "ibm,loc-code",
 +                                 NULL);
        if (loc_code)
                ehca_gen_dbg(" ... location lode=%s", loc_code);
  
@@@ -721,16 -720,16 +721,16 @@@ static int __devinit ehca_probe(struct 
        int ret, i, eq_size;
        unsigned long flags;
  
 -      handle = of_get_property(dev->node, "ibm,hca-handle", NULL);
 +      handle = of_get_property(dev->dev.of_node, "ibm,hca-handle", NULL);
        if (!handle) {
                ehca_gen_err("Cannot get eHCA handle for adapter: %s.",
 -                           dev->node->full_name);
 +                           dev->dev.of_node->full_name);
                return -ENODEV;
        }
  
        if (!(*handle)) {
                ehca_gen_err("Wrong eHCA handle for adapter: %s.",
 -                           dev->node->full_name);
 +                           dev->dev.of_node->full_name);
                return -ENODEV;
        }
  
                goto probe5;
        }
  
-       ret = ib_register_device(&shca->ib_device);
+       ret = ib_register_device(&shca->ib_device, NULL);
        if (ret) {
                ehca_err(&shca->ib_device,
                         "ib_register_device() failed ret=%i", ret);
@@@ -937,13 -936,12 +937,13 @@@ static struct of_device_id ehca_device_
  MODULE_DEVICE_TABLE(of, ehca_device_table);
  
  static struct of_platform_driver ehca_driver = {
 -      .name        = "ehca",
 -      .match_table = ehca_device_table,
        .probe       = ehca_probe,
        .remove      = ehca_remove,
 -      .driver      = {
 +      .driver = {
 +              .name = "ehca",
 +              .owner = THIS_MODULE,
                .groups = ehca_drv_attr_groups,
 +              .of_match_table = ehca_device_table,
        },
  };
  
@@@ -877,7 -877,7 +877,7 @@@ static void nes_netdev_set_multicast_li
        if (!mc_all_on) {
                char *addrs;
                int i;
 -              struct dev_mc_list *mcaddr;
 +              struct netdev_hw_addr *ha;
  
                addrs = kmalloc(ETH_ALEN * mc_count, GFP_ATOMIC);
                if (!addrs) {
                        goto unlock;
                }
                i = 0;
 -              netdev_for_each_mc_addr(mcaddr, netdev)
 -                      memcpy(get_addr(addrs, i++),
 -                             mcaddr->dmi_addr, ETH_ALEN);
 +              netdev_for_each_mc_addr(ha, netdev)
 +                      memcpy(get_addr(addrs, i++), ha->addr, ETH_ALEN);
  
                perfect_filter_register_address = NES_IDX_PERFECT_FILTER_LOW +
                                                pft_entries_preallocated * 0x8;
@@@ -1001,6 -1002,7 +1001,7 @@@ static int nes_netdev_change_mtu(struc
        return ret;
  }
  
  static const char nes_ethtool_stringset[][ETH_GSTRING_LEN] = {
        "Link Change Interrupts",
        "Linearized SKBs",
        "Rx Jabber Errors",
        "Rx Oversized Frames",
        "Rx Short Frames",
+       "Rx Length Errors",
+       "Rx CRC Errors",
+       "Rx Port Discard",
        "Endnode Rx Discards",
        "Endnode Rx Octets",
        "Endnode Rx Frames",
        "Endnode Tx Octets",
        "Endnode Tx Frames",
+       "Tx Errors",
        "mh detected",
        "mh pauses",
        "Retransmission Count",
        "CM Nodes Destroyed",
        "CM Accel Drops",
        "CM Resets Received",
+       "Free 4Kpbls",
+       "Free 256pbls",
        "Timer Inits",
-       "CQ Depth 1",
-       "CQ Depth 4",
-       "CQ Depth 16",
-       "CQ Depth 24",
-       "CQ Depth 32",
-       "CQ Depth 128",
-       "CQ Depth 256",
        "LRO aggregated",
        "LRO flushed",
        "LRO no_desc",
  };
  #define NES_ETHTOOL_STAT_COUNT  ARRAY_SIZE(nes_ethtool_stringset)
  
  /**
@@@ -1120,12 -1120,14 +1119,14 @@@ static void nes_netdev_get_strings(stru
  /**
   * nes_netdev_get_ethtool_stats
   */
  static void nes_netdev_get_ethtool_stats(struct net_device *netdev,
                struct ethtool_stats *target_ethtool_stats, u64 *target_stat_values)
  {
        u64 u64temp;
        struct nes_vnic *nesvnic = netdev_priv(netdev);
        struct nes_device *nesdev = nesvnic->nesdev;
+       struct nes_adapter *nesadapter = nesdev->nesadapter;
        u32 nic_count;
        u32 u32temp;
        u32 index = 0;
        nesvnic->nesdev->port_tx_discards += u32temp;
        nesvnic->netstats.tx_dropped += u32temp;
  
+       u32temp = nes_read_indexed(nesdev,
+                       NES_IDX_MAC_RX_SHORT_FRAMES + (nesvnic->nesdev->mac_index*0x200));
+       nesvnic->netstats.rx_dropped += u32temp;
+       nesvnic->nesdev->mac_rx_errors += u32temp;
+       nesvnic->nesdev->mac_rx_short_frames += u32temp;
+       u32temp = nes_read_indexed(nesdev,
+                       NES_IDX_MAC_RX_OVERSIZED_FRAMES + (nesvnic->nesdev->mac_index*0x200));
+       nesvnic->netstats.rx_dropped += u32temp;
+       nesvnic->nesdev->mac_rx_errors += u32temp;
+       nesvnic->nesdev->mac_rx_oversized_frames += u32temp;
+       u32temp = nes_read_indexed(nesdev,
+                       NES_IDX_MAC_RX_JABBER_FRAMES + (nesvnic->nesdev->mac_index*0x200));
+       nesvnic->netstats.rx_dropped += u32temp;
+       nesvnic->nesdev->mac_rx_errors += u32temp;
+       nesvnic->nesdev->mac_rx_jabber_frames += u32temp;
+       u32temp = nes_read_indexed(nesdev,
+                       NES_IDX_MAC_RX_SYMBOL_ERR_FRAMES + (nesvnic->nesdev->mac_index*0x200));
+       nesvnic->netstats.rx_dropped += u32temp;
+       nesvnic->nesdev->mac_rx_errors += u32temp;
+       nesvnic->nesdev->mac_rx_symbol_err_frames += u32temp;
+       u32temp = nes_read_indexed(nesdev,
+                       NES_IDX_MAC_RX_LENGTH_ERR_FRAMES + (nesvnic->nesdev->mac_index*0x200));
+       nesvnic->netstats.rx_length_errors += u32temp;
+       nesvnic->nesdev->mac_rx_errors += u32temp;
+       u32temp = nes_read_indexed(nesdev,
+                       NES_IDX_MAC_RX_CRC_ERR_FRAMES + (nesvnic->nesdev->mac_index*0x200));
+       nesvnic->nesdev->mac_rx_errors += u32temp;
+       nesvnic->nesdev->mac_rx_crc_errors += u32temp;
+       nesvnic->netstats.rx_crc_errors += u32temp;
+       u32temp = nes_read_indexed(nesdev,
+                       NES_IDX_MAC_TX_ERRORS + (nesvnic->nesdev->mac_index*0x200));
+       nesvnic->nesdev->mac_tx_errors += u32temp;
+       nesvnic->netstats.tx_errors += u32temp;
        for (nic_count = 0; nic_count < NES_MAX_PORT_COUNT; nic_count++) {
                if (nesvnic->qp_nic_index[nic_count] == 0xf)
                        break;
        target_stat_values[++index] = nesvnic->nesdev->mac_rx_jabber_frames;
        target_stat_values[++index] = nesvnic->nesdev->mac_rx_oversized_frames;
        target_stat_values[++index] = nesvnic->nesdev->mac_rx_short_frames;
+       target_stat_values[++index] = nesvnic->netstats.rx_length_errors;
+       target_stat_values[++index] = nesvnic->nesdev->mac_rx_crc_errors;
+       target_stat_values[++index] = nesvnic->nesdev->port_rx_discards;
        target_stat_values[++index] = nesvnic->endnode_nstat_rx_discard;
        target_stat_values[++index] = nesvnic->endnode_nstat_rx_octets;
        target_stat_values[++index] = nesvnic->endnode_nstat_rx_frames;
        target_stat_values[++index] = nesvnic->endnode_nstat_tx_octets;
        target_stat_values[++index] = nesvnic->endnode_nstat_tx_frames;
+       target_stat_values[++index] = nesvnic->nesdev->mac_tx_errors;
        target_stat_values[++index] = mh_detected;
        target_stat_values[++index] = mh_pauses_sent;
        target_stat_values[++index] = nesvnic->endnode_ipv4_tcp_retransmits;
        target_stat_values[++index] = atomic_read(&cm_nodes_destroyed);
        target_stat_values[++index] = atomic_read(&cm_accel_dropped_pkts);
        target_stat_values[++index] = atomic_read(&cm_resets_recvd);
+       target_stat_values[++index] = nesadapter->free_4kpbl;
+       target_stat_values[++index] = nesadapter->free_256pbl;
        target_stat_values[++index] = int_mod_timer_init;
-       target_stat_values[++index] = int_mod_cq_depth_1;
-       target_stat_values[++index] = int_mod_cq_depth_4;
-       target_stat_values[++index] = int_mod_cq_depth_16;
-       target_stat_values[++index] = int_mod_cq_depth_24;
-       target_stat_values[++index] = int_mod_cq_depth_32;
-       target_stat_values[++index] = int_mod_cq_depth_128;
-       target_stat_values[++index] = int_mod_cq_depth_256;
        target_stat_values[++index] = nesvnic->lro_mgr.stats.aggregated;
        target_stat_values[++index] = nesvnic->lro_mgr.stats.flushed;
        target_stat_values[++index] = nesvnic->lro_mgr.stats.no_desc;
  }
  
  /**
   * nes_netdev_get_drvinfo
   */