From patchwork Tue Apr 29 04:15:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Byungho An X-Patchwork-Id: 4084521 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B91A7C0ACC for ; Tue, 29 Apr 2014 04:15:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E6ABD201F7 for ; Tue, 29 Apr 2014 04:15:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E0606201F4 for ; Tue, 29 Apr 2014 04:15:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754076AbaD2EP3 (ORCPT ); Tue, 29 Apr 2014 00:15:29 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:54820 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752777AbaD2EP3 (ORCPT ); Tue, 29 Apr 2014 00:15:29 -0400 Received: from epcpsbgr3.samsung.com (u143.gpu120.samsung.co.kr [203.254.230.143]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N4R00EWMYHR1FB0@mailout2.samsung.com>; Tue, 29 Apr 2014 13:15:27 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [203.254.230.50]) by epcpsbgr3.samsung.com (EPCPMTA) with SMTP id 0F.0E.11120.F572F535; Tue, 29 Apr 2014 13:15:27 +0900 (KST) X-AuditID: cbfee68f-b7eff6d000002b70-33-535f275fc08a Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 04.E8.27725.F572F535; Tue, 29 Apr 2014 13:15:27 +0900 (KST) Received: from DObh74an01 ([12.36.166.149]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N4R00464YHRF090@mmp2.samsung.com>; Tue, 29 Apr 2014 13:15:27 +0900 (KST) From: Byungho An To: netdev@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: davem@davemloft.net, ks.giri@samsung.com, vipul.pandya@samsung.com Subject: [PATCH] net: sxgbe: Added set function for interrupt on complete Date: Tue, 29 Apr 2014 13:15:27 +0900 Message-id: <001d01cf6361$a675f6c0$f361e440$%an@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-index: Ac9jYaZe5XQU4wR+Q9yebuidaUPPcg== Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrJIsWRmVeSWpSXmKPExsVy+t8zI9149fhgg91tOhZzzrewWPQuuMpm Mf/oDiaLGef3MVkcWyBmsW3BBWYHNo8tK28yefRtWcXo8XmTXABzFJdNSmpOZllqkb5dAlfG tXMb2Qt+CVdMO3CItYGxX7CLkZNDQsBEYsrrN8wQtpjEhXvr2boYuTiEBJYxSkw+2skOU/T6 /yN2iMR0Rokl718wgiSEBH4zSjz55Q5iswmoSTTPvMwGYosI2EosOfIZrJlZwE1i/+XbrCC2 sICnxKrLi8FqWARUJRZ93w+2mVfARmLNyUssELagxI/J91ggerUkNm9rYoWw5SU2r3kLVM8B dJC6xKO/uhCr9CS2rTwDVS4ise/FO0aQOyUEdrFLHLs6kwVil4DEt8mHWCB6ZSU2HYB6WFLi 4IobLBMYxWYh2TwLyeZZSDbPQrJiASPLKkbR1ILkguKk9CJjveLE3OLSvHS95PzcTYyQaOvf wXj3gPUhxmSg9ROZpUST84HRmlcSb2hsZmRhamJqbGRuaUaasJI47/2HSUFCAumJJanZqakF qUXxRaU5qcW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hnf9/88oaZ/dl 31NiKc5INNRiLipOBABsymcfKQMAAA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 This patch adds set_rx_int_on_com function for interrupt when dma is completed. Signed-off-by: Byungho An --- drivers/net/ethernet/samsung/sxgbe/sxgbe_desc.c | 7 +++++++ drivers/net/ethernet/samsung/sxgbe/sxgbe_desc.h | 3 +++ drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c | 1 + 3 files changed, 11 insertions(+) diff --git a/drivers/net/ethernet/samsung/sxgbe/sxgbe_desc.c b/drivers/net/ethernet/samsung/sxgbe/sxgbe_desc.c index d71691b..2686bb5 100644 --- a/drivers/net/ethernet/samsung/sxgbe/sxgbe_desc.c +++ b/drivers/net/ethernet/samsung/sxgbe/sxgbe_desc.c @@ -233,6 +233,12 @@ static void sxgbe_set_rx_owner(struct sxgbe_rx_norm_desc *p) p->rdes23.rx_rd_des23.own_bit = 1; } +/* Set Interrupt on completion bit */ +static void sxgbe_set_rx_int_on_com(struct sxgbe_rx_norm_desc *p) +{ + p->rdes23.rx_rd_des23.int_on_com = 1; +} + /* Get the receive frame size */ static int sxgbe_get_rx_frame_len(struct sxgbe_rx_norm_desc *p) { @@ -498,6 +504,7 @@ static const struct sxgbe_desc_ops desc_ops = { .init_rx_desc = sxgbe_init_rx_desc, .get_rx_owner = sxgbe_get_rx_owner, .set_rx_owner = sxgbe_set_rx_owner, + .set_rx_int_on_com = sxgbe_set_rx_int_on_com, .get_rx_frame_len = sxgbe_get_rx_frame_len, .get_rx_fd_status = sxgbe_get_rx_fd_status, .get_rx_ld_status = sxgbe_get_rx_ld_status, diff --git a/drivers/net/ethernet/samsung/sxgbe/sxgbe_desc.h b/drivers/net/ethernet/samsung/sxgbe/sxgbe_desc.h index 0226300..1860932 100644 --- a/drivers/net/ethernet/samsung/sxgbe/sxgbe_desc.h +++ b/drivers/net/ethernet/samsung/sxgbe/sxgbe_desc.h @@ -258,6 +258,9 @@ struct sxgbe_desc_ops { /* Set own bit */ void (*set_rx_owner)(struct sxgbe_rx_norm_desc *p); + /* Set Interrupt on completion bit */ + void (*set_rx_int_on_com)(struct sxgbe_rx_norm_desc *p); + /* Get the receive frame size */ int (*get_rx_frame_len)(struct sxgbe_rx_norm_desc *p); diff --git a/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c b/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c index fd5c428..82a9a98 100644 --- a/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c +++ b/drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c @@ -1456,6 +1456,7 @@ static void sxgbe_rx_refill(struct sxgbe_priv_data *priv) /* Added memory barrier for RX descriptor modification */ wmb(); priv->hw->desc->set_rx_owner(p); + priv->hw->desc->set_rx_int_on_com(p); /* Added memory barrier for RX descriptor modification */ wmb(); }