From patchwork Thu Dec 13 06:49:52 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wen-chien Jesse Sung X-Patchwork-Id: 205761 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 3902A2C0082 for ; Thu, 13 Dec 2012 17:51:19 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1Tj2dT-0001fs-Ij; Thu, 13 Dec 2012 06:51:11 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1Tj2dE-0001X3-Gv for kernel-team@lists.ubuntu.com; Thu, 13 Dec 2012 06:50:56 +0000 Received: from [112.104.135.12] (helo=localhost.localdomain) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1Tj2dD-0000NG-Sz; Thu, 13 Dec 2012 06:50:56 +0000 From: Jesse Sung To: kernel-team@lists.ubuntu.com Subject: [Quantal][PATCH 19/29] be2net: Ignore physical link async event for Lancer Date: Thu, 13 Dec 2012 14:49:52 +0800 Message-Id: <1355381402-10497-19-git-send-email-jesse.sung@canonical.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1355381402-10497-1-git-send-email-jesse.sung@canonical.com> References: <1355381402-10497-1-git-send-email-jesse.sung@canonical.com> Cc: Padmanabh Ratnakar , Sarveshwar Bandi X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com From: Padmanabh Ratnakar BugLink: https://launchpad.net/bugs/1083088 The ability of driver to transmit packets depends on logical state of the link. Ignore physical link status. Signed-off-by: Padmanabh Ratnakar Signed-off-by: David S. Miller (cherry picked from commit 2e177a5c6cc52d8a422c69ba87b8a7e00ecb6eac) Signed-off-by: Wen-chien Jesse Sung --- drivers/net/ethernet/emulex/benet/be_cmds.c | 5 +++++ drivers/net/ethernet/emulex/benet/be_cmds.h | 1 + 2 files changed, 6 insertions(+) diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.c b/drivers/net/ethernet/emulex/benet/be_cmds.c index c78551b..b6748da 100644 --- a/drivers/net/ethernet/emulex/benet/be_cmds.c +++ b/drivers/net/ethernet/emulex/benet/be_cmds.c @@ -141,6 +141,11 @@ static void be_async_link_state_process(struct be_adapter *adapter, /* When link status changes, link speed must be re-queried from FW */ adapter->phy.link_speed = -1; + /* Ignore physical link event */ + if (lancer_chip(adapter) && + !(evt->port_link_status & LOGICAL_LINK_STATUS_MASK)) + return; + /* For the initial link status do not rely on the ASYNC event as * it may not be received in some cases. */ diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.h b/drivers/net/ethernet/emulex/benet/be_cmds.h index 600e8d6..e1e919c 100644 --- a/drivers/net/ethernet/emulex/benet/be_cmds.h +++ b/drivers/net/ethernet/emulex/benet/be_cmds.h @@ -93,6 +93,7 @@ enum { LINK_UP = 0x1 }; #define LINK_STATUS_MASK 0x1 +#define LOGICAL_LINK_STATUS_MASK 0x2 /* When the event code of an async trailer is link-state, the mcc_compl * must be interpreted as follows