From patchwork Thu Apr 19 08:01:21 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Huang, Xiong" X-Patchwork-Id: 153679 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 5D392B6FBC for ; Thu, 19 Apr 2012 18:06:41 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753857Ab2DSICI (ORCPT ); Thu, 19 Apr 2012 04:02:08 -0400 Received: from wolverine01.qualcomm.com ([199.106.114.254]:5661 "EHLO wolverine01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753339Ab2DSIBr (ORCPT ); Thu, 19 Apr 2012 04:01:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qca.qualcomm.com; i=xiong@qca.qualcomm.com; q=dns/txt; s=qcdkim; t=1334822507; x=1366358507; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=/qakJGlI+QzMGrckwfxpNZffNT80Dz4DmztJkLS3PnY=; b=Kdu39TJ419z1Jzpb8cN0Q3rOkBY9kp/8khvgFYNxYgONbRoAJdkNRjVW 8uv01LnjnCbBOUaEbuUYHY5PW24L6/CSHic3usnQUKQRs+Y0/H/30V/QJ 6WOqnqxXMfNCvCX0ripK0S89HasY0bVcjusIvEbq4sdub/EowLApj3Xgm k=; X-IronPort-AV: E=McAfee;i="5400,1158,6685"; a="183042221" Received: from ironmsg02-r.qualcomm.com ([172.30.46.16]) by wolverine01.qualcomm.com with ESMTP; 19 Apr 2012 01:01:47 -0700 X-IronPort-AV: E=Sophos;i="4.75,445,1330934400"; d="scan'208";a="158757017" Received: from nasanexhc04.na.qualcomm.com ([172.30.48.17]) by ironmsg02-R.qualcomm.com with ESMTP/TLS/AES128-SHA; 19 Apr 2012 01:01:47 -0700 Received: from qcmail1.qualcomm.com (172.30.48.1) by qcmail1.qualcomm.com (172.30.48.17) with Microsoft SMTP Server (TLS) id 14.2.283.3; Thu, 19 Apr 2012 01:01:44 -0700 Received: by qcmail1.qualcomm.com (sSMTP sendmail emulation); Thu, 19 Apr 2012 16:01:40 +0800 From: xiong To: , , CC: , , xiong Subject: [PATCH 01/11] atl1c: threshold for ASPM is changed based on chip capability Date: Thu, 19 Apr 2012 16:01:21 +0800 Message-ID: <1334822491-30129-2-git-send-email-xiong@qca.qualcomm.com> X-Mailer: git-send-email 1.7.7 In-Reply-To: <1334822491-30129-1-git-send-email-xiong@qca.qualcomm.com> References: <1334822491-30129-1-git-send-email-xiong@qca.qualcomm.com> MIME-Version: 1.0 X-Originating-IP: [172.30.48.1] Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org threshold setting to control ASPM for diff chips are different. currently, all gigabit-capability chips have limited-ASPM under 100M throughput. Signed-off-by: xiong Tested-by: Liu David --- drivers/net/ethernet/atheros/atl1c/atl1c_main.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c index 02754ac..2e1c9f3 100644 --- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c +++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c @@ -1080,9 +1080,10 @@ static void atl1c_configure_rx(struct atl1c_adapter *adapter) if (hw->ctrl_flags & ATL1C_RX_IPV6_CHKSUM) rxq_ctrl_data |= IPV6_CHKSUM_CTRL_EN; - if (hw->ctrl_flags & ATL1C_ASPM_CTRL_MON) - rxq_ctrl_data |= (ASPM_THRUPUT_LIMIT_1M & - ASPM_THRUPUT_LIMIT_MASK) << ASPM_THRUPUT_LIMIT_SHIFT; + /* aspm for gigabit */ + if (hw->nic_type != athr_l1d_2 && (hw->device_id & 1) != 0) + rxq_ctrl_data = FIELD_SETX(rxq_ctrl_data, ASPM_THRUPUT_LIMIT, + ASPM_THRUPUT_LIMIT_100M); AT_WRITE_REG(hw, REG_RXQ_CTRL, rxq_ctrl_data); }