From patchwork Mon Jan 11 12:13:20 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Or Gerlitz X-Patchwork-Id: 72134 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o0BCDCav025730 for ; Mon, 11 Jan 2010 12:13:12 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753280Ab0AKMNL (ORCPT ); Mon, 11 Jan 2010 07:13:11 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753304Ab0AKMNL (ORCPT ); Mon, 11 Jan 2010 07:13:11 -0500 Received: from fwil.voltaire.com ([193.47.165.2]:33443 "EHLO exil.voltaire.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753280Ab0AKMNK (ORCPT ); Mon, 11 Jan 2010 07:13:10 -0500 Received: from zuben.voltaire.com ([172.25.5.15]) by exil.voltaire.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 11 Jan 2010 14:13:07 +0200 Date: Mon, 11 Jan 2010 14:13:20 +0200 (IST) From: Or Gerlitz To: Vladimir Sokolovsky cc: linux-rdma Subject: upstream mlx4/ib/4K mtu support Message-ID: MIME-Version: 1.0 X-OriginalArrivalTime: 11 Jan 2010 12:13:07.0124 (UTC) FILETIME=[6EEDF740:01CA92B7] Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Index: ofed_kernel-fixes/drivers/net/mlx4/port.c =================================================================== --- ofed_kernel-fixes.orig/drivers/net/mlx4/port.c 2009-11-09 02:20:06.000000000 +0200 +++ ofed_kernel-fixes/drivers/net/mlx4/port.c 2009-11-09 02:21:46.000000000 +0200 @@ -37,6 +37,10 @@ #include "mlx4.h" +int mlx4_ib_set_4k_mtu = 0; +module_param_named(set_4k_mtu, mlx4_ib_set_4k_mtu, int, 0444); +MODULE_PARM_DESC(set_4k_mtu, "attempt to set 4K MTU to all ConnectX ports"); + #define MLX4_MAC_VALID (1ull << 63) #define MLX4_MAC_MASK 0xffffffffffffULL @@ -308,6 +312,9 @@ memset(mailbox->buf, 0, 256); + if (mlx4_ib_set_4k_mtu) + ((__be32 *) mailbox->buf)[0] |= cpu_to_be32((1 << 22) | (1 << 21) | (5 << 12) | (2 << 4)); + ((__be32 *) mailbox->buf)[1] = dev->caps.ib_port_def_cap[port]; err = mlx4_cmd(dev, mailbox->dma, port, 0, MLX4_CMD_SET_PORT, MLX4_CMD_TIME_CLASS_B);