From patchwork Thu Nov 11 16:09:23 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eli Cohen X-Patchwork-Id: 317682 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 oABG9Nta023751 for ; Thu, 11 Nov 2010 16:09:25 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754128Ab0KKQJW (ORCPT ); Thu, 11 Nov 2010 11:09:22 -0500 Received: from mail-ww0-f44.google.com ([74.125.82.44]:45521 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752984Ab0KKQJW (ORCPT ); Thu, 11 Nov 2010 11:09:22 -0500 Received: by wwb34 with SMTP id 34so19236wwb.1 for ; Thu, 11 Nov 2010 08:09:19 -0800 (PST) Received: by 10.227.152.9 with SMTP id e9mr1047037wbw.169.1289491759055; Thu, 11 Nov 2010 08:09:19 -0800 (PST) Received: from localhost ([82.166.227.17]) by mx.google.com with ESMTPS id ga16sm1838451wbb.1.2010.11.11.08.09.17 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 11 Nov 2010 08:09:18 -0800 (PST) Date: Thu, 11 Nov 2010 18:09:23 +0200 From: Eli Cohen To: Roland Dreier Cc: RDMA list Subject: [PATCH] mlx4: Fix IBoE link state Message-ID: <20101111160923.GA29383@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 16:09:25 +0000 (UTC) diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c index 018007c..ba871f8 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_carrier_ok && netif_oper_up(ndev) ? IB_PORT_ACTIVE : IB_PORT_DOWN; props->phys_state = state_to_phys_state(props->state);