]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 16 Dec 2009 18:32:31 +0000 (10:32 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 16 Dec 2009 18:32:31 +0000 (10:32 -0800)
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: (45 commits)
  RDMA/cxgb3: Fix error paths in post_send and post_recv
  RDMA/nes: Fix stale ARP issue
  RDMA/nes: FIN during MPA startup causes timeout
  RDMA/nes: Free kmap() resources
  RDMA/nes: Check for zero STag
  RDMA/nes: Fix Xansation test crash on cm_node ref_count
  RDMA/nes: Abnormal listener exit causes loopback node crash
  RDMA/nes: Fix crash in nes_accept()
  RDMA/nes: Resource not freed for REJECTed connections
  RDMA/nes: MPA request/response error checking
  RDMA/nes: Fix query of ORD values
  RDMA/nes: Fix MAX_CM_BUFFER define
  RDMA/nes: Pass correct size to ioremap_nocache()
  RDMA/nes: Update copyright and branding string
  RDMA/nes: Add max_cqe check to nes_create_cq()
  RDMA/nes: Clean up struct nes_qp
  RDMA/nes: Implement IB_SIGNAL_ALL_WR as an iWARP extension
  RDMA/nes: Add additional SFP+ PHY uC status check and PHY reset
  RDMA/nes: Correct fast memory registration implementation
  IB/ehca: Fix error paths in post_send and post_recv
  ...

1  2 
drivers/infiniband/hw/mlx4/qp.c
drivers/infiniband/hw/nes/nes_nic.c

index 256a00c6aeea4b5531db17e4ff1f5d718f1d9673,847030c89a8d8c56a934831c60839c0bed471629..989555cee8834dcf670e7d2d83c820d3cf3ef070
@@@ -54,7 -54,8 +54,8 @@@ enum 
        /*
         * Largest possible UD header: send with GRH and immediate data.
         */
-       MLX4_IB_UD_HEADER_SIZE          = 72
+       MLX4_IB_UD_HEADER_SIZE          = 72,
+       MLX4_IB_LSO_HEADER_SPARE        = 128,
  };
  
  struct mlx4_ib_sqp {
@@@ -67,7 -68,8 +68,8 @@@
  };
  
  enum {
-       MLX4_IB_MIN_SQ_STRIDE = 6
+       MLX4_IB_MIN_SQ_STRIDE   = 6,
+       MLX4_IB_CACHE_LINE_SIZE = 64,
  };
  
  static const __be32 mlx4_ib_opcode[] = {
@@@ -261,7 -263,7 +263,7 @@@ static int send_wqe_overhead(enum ib_qp
        case IB_QPT_UD:
                return sizeof (struct mlx4_wqe_ctrl_seg) +
                        sizeof (struct mlx4_wqe_datagram_seg) +
-                       ((flags & MLX4_IB_QP_LSO) ? 64 : 0);
+                       ((flags & MLX4_IB_QP_LSO) ? MLX4_IB_LSO_HEADER_SPARE : 0);
        case IB_QPT_UC:
                return sizeof (struct mlx4_wqe_ctrl_seg) +
                        sizeof (struct mlx4_wqe_raddr_seg);
@@@ -352,7 -354,7 +354,7 @@@ static int set_kernel_sq_size(struct ml
         * anymore, so we do this only if selective signaling is off.
         *
         * Further, on 32-bit platforms, we can't use vmap() to make
 -       * the QP buffer virtually contigious.  Thus we have to use
 +       * the QP buffer virtually contiguous.  Thus we have to use
         * constant-sized WRs to make sure a WR is always fully within
         * a single page-sized chunk.
         *
@@@ -897,7 -899,6 +899,6 @@@ static int __mlx4_ib_modify_qp(struct i
  
        context->flags = cpu_to_be32((to_mlx4_state(new_state) << 28) |
                                     (to_mlx4_st(ibqp->qp_type) << 16));
-       context->flags     |= cpu_to_be32(1 << 8); /* DE? */
  
        if (!(attr_mask & IB_QP_PATH_MIG_STATE))
                context->flags |= cpu_to_be32(MLX4_QP_PM_MIGRATED << 11);
@@@ -1467,16 -1468,12 +1468,12 @@@ static void __set_data_seg(struct mlx4_
  
  static int build_lso_seg(struct mlx4_wqe_lso_seg *wqe, struct ib_send_wr *wr,
                         struct mlx4_ib_qp *qp, unsigned *lso_seg_len,
-                        __be32 *lso_hdr_sz)
+                        __be32 *lso_hdr_sz, __be32 *blh)
  {
        unsigned halign = ALIGN(sizeof *wqe + wr->wr.ud.hlen, 16);
  
-       /*
-        * This is a temporary limitation and will be removed in
-        * a forthcoming FW release:
-        */
-       if (unlikely(halign > 64))
-               return -EINVAL;
+       if (unlikely(halign > MLX4_IB_CACHE_LINE_SIZE))
+               *blh = cpu_to_be32(1 << 6);
  
        if (unlikely(!(qp->flags & MLX4_IB_QP_LSO) &&
                     wr->num_sge > qp->sq.max_gs - (halign >> 4)))
@@@ -1522,6 -1519,7 +1519,7 @@@ int mlx4_ib_post_send(struct ib_qp *ibq
        __be32 dummy;
        __be32 *lso_wqe;
        __be32 uninitialized_var(lso_hdr_sz);
+       __be32 blh;
        int i;
  
        spin_lock_irqsave(&qp->sq.lock, flags);
  
        for (nreq = 0; wr; ++nreq, wr = wr->next) {
                lso_wqe = &dummy;
+               blh = 0;
  
                if (mlx4_wq_overflow(&qp->sq, nreq, qp->ibqp.send_cq)) {
                        err = -ENOMEM;
                        size += sizeof (struct mlx4_wqe_datagram_seg) / 16;
  
                        if (wr->opcode == IB_WR_LSO) {
-                               err = build_lso_seg(wqe, wr, qp, &seglen, &lso_hdr_sz);
+                               err = build_lso_seg(wqe, wr, qp, &seglen, &lso_hdr_sz, &blh);
                                if (unlikely(err)) {
                                        *bad_wr = wr;
                                        goto out;
                }
  
                ctrl->owner_opcode = mlx4_ib_opcode[wr->opcode] |
-                       (ind & qp->sq.wqe_cnt ? cpu_to_be32(1 << 31) : 0);
+                       (ind & qp->sq.wqe_cnt ? cpu_to_be32(1 << 31) : 0) | blh;
  
                stamp = ind + qp->sq_spare_wqes;
                ind += DIV_ROUND_UP(size * 16, 1U << qp->sq.wqe_shift);
index de18fdfdadf2d0280a20f4b3af0b864768c3b275,5a7b554f41136cec36eacbbfab8e212154e0d9a1..ab11027801862c59359f4d6129cfb54ac98bb768
@@@ -1,5 -1,5 +1,5 @@@
  /*
-  * Copyright (c) 2006 - 2009 Intel-NE, Inc.  All rights reserved.
+  * Copyright (c) 2006 - 2009 Intel Corporation.  All rights reserved.
   *
   * This software is available to you under a choice of one of two
   * licenses.  You may choose to be licensed under the terms of the GNU
@@@ -1080,14 -1080,11 +1080,14 @@@ static int nes_netdev_set_rx_csum(struc
  
  
  /**
 - * nes_netdev_get_stats_count
 + * nes_netdev_get_sset_count
   */
 -static int nes_netdev_get_stats_count(struct net_device *netdev)
 +static int nes_netdev_get_sset_count(struct net_device *netdev, int stringset)
  {
 -      return NES_ETHTOOL_STAT_COUNT;
 +      if (stringset == ETH_SS_STATS)
 +              return NES_ETHTOOL_STAT_COUNT;
 +      else
 +              return -EINVAL;
  }
  
  
@@@ -1267,6 -1264,7 +1267,6 @@@ static void nes_netdev_get_drvinfo(stru
        sprintf(drvinfo->fw_version, "%u.%u", nesadapter->firmware_version>>16,
                                nesadapter->firmware_version & 0x000000ff);
        strcpy(drvinfo->version, DRV_VERSION);
 -      drvinfo->n_stats = nes_netdev_get_stats_count(netdev);
        drvinfo->testinfo_len = 0;
        drvinfo->eedump_len = 0;
        drvinfo->regdump_len = 0;
@@@ -1518,7 -1516,7 +1518,7 @@@ static const struct ethtool_ops nes_eth
        .get_rx_csum = nes_netdev_get_rx_csum,
        .get_sg = ethtool_op_get_sg,
        .get_strings = nes_netdev_get_strings,
 -      .get_stats_count = nes_netdev_get_stats_count,
 +      .get_sset_count = nes_netdev_get_sset_count,
        .get_ethtool_stats = nes_netdev_get_ethtool_stats,
        .get_drvinfo = nes_netdev_get_drvinfo,
        .get_coalesce = nes_netdev_get_coalesce,