From patchwork Tue Aug 30 14:30:43 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Schmidt X-Patchwork-Id: 112335 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 6242DB6F71 for ; Wed, 31 Aug 2011 00:31:29 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754559Ab1H3ObR (ORCPT ); Tue, 30 Aug 2011 10:31:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50827 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754535Ab1H3ObP (ORCPT ); Tue, 30 Aug 2011 10:31:15 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p7UEVESa020198 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 30 Aug 2011 10:31:14 -0400 Received: from dhcp-29-224.brq.redhat.com (dhcp-26-161.brq.redhat.com [10.34.26.161]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p7UEV0uc023949; Tue, 30 Aug 2011 10:31:12 -0400 From: Michal Schmidt To: netdev@vger.kernel.org Cc: vladz@broadcom.com, dmitry@broadcom.com, eilong@broadcom.com, Michal Schmidt Subject: [PATCH 4/7] bnx2x: simplify TPA sanity check Date: Tue, 30 Aug 2011 16:30:43 +0200 Message-Id: <1314714646-3642-5-git-send-email-mschmidt@redhat.com> In-Reply-To: <1314714646-3642-1-git-send-email-mschmidt@redhat.com> References: <1314714646-3642-1-git-send-email-mschmidt@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org In the TPA branch we already know the CQE type is either START or STOP. No need to test for that. Even if the type were to differ, we wouldn't want to suppress the error message. Signed-off-by: Michal Schmidt Acked-by: Vladislav Zolotarov --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c index f1fea58..fe5be0c 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c @@ -634,9 +634,7 @@ int bnx2x_rx_int(struct bnx2x_fastpath *fp, int budget) if (!CQE_TYPE_FAST(cqe_fp_type)) { #ifdef BNX2X_STOP_ON_ERROR /* sanity check */ - if (fp->disable_tpa && - (CQE_TYPE_START(cqe_fp_type) || - CQE_TYPE_STOP(cqe_fp_type))) + if (fp->disable_tpa) BNX2X_ERR("START/STOP packet while " "disable_tpa type %x\n", CQE_TYPE(cqe_fp_type));