From patchwork Mon Apr 13 14:04:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Varun Prakash X-Patchwork-Id: 6209701 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id EC07A9F1C4 for ; Mon, 13 Apr 2015 14:05:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0B40120340 for ; Mon, 13 Apr 2015 14:05:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 77BF32021F for ; Mon, 13 Apr 2015 14:05:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932469AbbDMOFj (ORCPT ); Mon, 13 Apr 2015 10:05:39 -0400 Received: from stargate.chelsio.com ([67.207.112.58]:24105 "EHLO stargate3.asicdesigners.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754086AbbDMOF1 (ORCPT ); Mon, 13 Apr 2015 10:05:27 -0400 Received: from fcoe-test11.localdomain (fcoe-test11.blr.asicdesigners.com [10.193.185.180]) by stargate3.asicdesigners.com (8.13.8/8.13.8) with ESMTP id t3DE1UNB027994; Mon, 13 Apr 2015 07:02:01 -0700 From: Varun Prakash To: netdev@vger.kernel.org, linux-scsi@vger.kernel.org, linux-rdma@vger.kernel.org Cc: davem@davemloft.net, JBottomley@parallels.com, roland@purestorage.com, leedom@chelsio.com, anish@chelsio.com, hariprasad@chelsio.com, swise@opengridcomputing.com, kxie@chelsio.com, praveenm@chelsio.com, kumaras@chelsio.com, varun@chelsio.com Subject: [PATCH net-next v2 4/4] cxgb4: enable RSS for FCoE frames Date: Mon, 13 Apr 2015 19:34:26 +0530 Message-Id: <2d7fba63fc47db25362b3f255d3acd1ae340f7f7.1428930614.git.varun@chelsio.com> X-Mailer: git-send-email 2.0.2 In-Reply-To: References: In-Reply-To: References: Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Varun Prakash --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 8 ++++++++ drivers/net/ethernet/chelsio/cxgb4/t4_regs.h | 8 ++++++++ 2 files changed, 16 insertions(+), 0 deletions(-) diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c index 95e7527..606aa5a 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c @@ -910,6 +910,9 @@ int cxgb4_write_rss(const struct port_info *pi, const u16 *queues) static int setup_rss(struct adapter *adap) { int i, err; +#ifdef CONFIG_CHELSIO_T4_FCOE + u32 rss_config; +#endif for_each_port(adap, i) { const struct port_info *pi = adap2pinfo(adap, i); @@ -918,6 +921,11 @@ static int setup_rss(struct adapter *adap) if (err) return err; } +#ifdef CONFIG_CHELSIO_T4_FCOE + rss_config = t4_read_reg(adap, TP_RSS_CONFIG_A); + rss_config |= TNLFCOEEN_F | TNLFCOEMODE_F; + t4_write_reg(adap, TP_RSS_CONFIG_A, rss_config); +#endif return 0; } diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_regs.h b/drivers/net/ethernet/chelsio/cxgb4/t4_regs.h index 326674b..3e10c99 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/t4_regs.h +++ b/drivers/net/ethernet/chelsio/cxgb4/t4_regs.h @@ -1856,6 +1856,14 @@ #define DISABLE_V(x) ((x) << DISABLE_S) #define DISABLE_F DISABLE_V(1U) +#define TNLFCOEMODE_S 23 +#define TNLFCOEMODE_V(x) ((x) << TNLFCOEMODE_S) +#define TNLFCOEMODE_F TNLFCOEMODE_V(1U) + +#define TNLFCOEEN_S 21 +#define TNLFCOEEN_V(x) ((x) << TNLFCOEEN_S) +#define TNLFCOEEN_F TNLFCOEEN_V(1U) + #define TP_RSS_CONFIG_TNL_A 0x7df4 #define MASKSIZE_S 28