From patchwork Thu Nov 11 21:05:58 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eli Cohen X-Patchwork-Id: 318182 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oABL61po028333 for ; Thu, 11 Nov 2010 21:06:01 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754449Ab0KKVF7 (ORCPT ); Thu, 11 Nov 2010 16:05:59 -0500 Received: from mail-ww0-f44.google.com ([74.125.82.44]:53291 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753944Ab0KKVF6 (ORCPT ); Thu, 11 Nov 2010 16:05:58 -0500 Received: by wwb34 with SMTP id 34so327794wwb.1 for ; Thu, 11 Nov 2010 13:05:56 -0800 (PST) Received: by 10.216.242.78 with SMTP id h56mr1211551wer.47.1289509556419; Thu, 11 Nov 2010 13:05:56 -0800 (PST) Received: from localhost ([82.166.227.17]) by mx.google.com with ESMTPS id p4sm1607608wer.29.2010.11.11.13.05.53 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 11 Nov 2010 13:05:53 -0800 (PST) Date: Thu, 11 Nov 2010 23:05:58 +0200 From: Eli Cohen To: Roland Dreier Cc: RDMA list Subject: [PATCH v2] mlx4: Fix IBoE link state Message-ID: <20101111210558.GA30436@mtldesk30> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Thu, 11 Nov 2010 21:06:01 +0000 (UTC) diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c index 018007c..f200b96 100644 --- a/drivers/infiniband/hw/mlx4/main.c +++ b/drivers/infiniband/hw/mlx4/main.c @@ -242,7 +242,7 @@ static int eth_link_query_port(struct ib_device *ibdev, u8 port, tmp = iboe_get_mtu(ndev->mtu); props->active_mtu = tmp ? min(props->max_mtu, tmp) : IB_MTU_256; - props->state = netif_running(ndev) && netif_oper_up(ndev) ? + props->state = (netif_running(ndev) && netif_carrier_ok(ndev)) ? IB_PORT_ACTIVE : IB_PORT_DOWN; props->phys_state = state_to_phys_state(props->state);