From patchwork Fri Aug 21 08:29:30 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taku Izumi X-Patchwork-Id: 7049891 Return-Path: X-Original-To: patchwork-linux-acpi@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 64C9B9F373 for ; Fri, 21 Aug 2015 08:35:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9A1E520620 for ; Fri, 21 Aug 2015 08:35:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 17F4020618 for ; Fri, 21 Aug 2015 08:35:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753497AbbHUIfP (ORCPT ); Fri, 21 Aug 2015 04:35:15 -0400 Received: from mgwkm04.jp.fujitsu.com ([202.219.69.171]:58096 "EHLO mgwkm04.jp.fujitsu.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752461AbbHUIfM (ORCPT ); Fri, 21 Aug 2015 04:35:12 -0400 Received: from kw-mxq.gw.nic.fujitsu.com (unknown [192.168.231.130]) by mgwkm04.jp.fujitsu.com with smtp id 49e5_4eb8_3ab71577_2ebd_4ce2_ac2c_23e94837997f; Fri, 21 Aug 2015 17:35:09 +0900 Received: from m3051.s.css.fujitsu.com (m3051.s.css.fujitsu.com [10.134.21.209]) by kw-mxq.gw.nic.fujitsu.com (Postfix) with ESMTP id 68D4CAC0478; Fri, 21 Aug 2015 17:35:09 +0900 (JST) Received: from RX300S6 (unknown [10.124.196.197]) by m3051.s.css.fujitsu.com (Postfix) with SMTP id 1A1EBD7; Fri, 21 Aug 2015 17:35:08 +0900 (JST) Received: by RX300S6 (sSMTP sendmail emulation); Fri, 21 Aug 2015 17:30:15 +0900 From: Taku Izumi To: netdev@vger.kernel.org, davem@davemloft.net Cc: platform-driver-x86@vger.kernel.org, dvhart@infradead.org, rkhan@redhat.com, alexander.h.duyck@redhat.com, linux-acpi@vger.kernel.org, joe@perches.com, sergei.shtylyov@cogentembedded.com, stephen@networkplumber.org, yasu.isimatu@gmail.com, Taku Izumi Subject: [PATCH v3 14/22] fjes: net_device_ops.ndo_tx_timeout Date: Fri, 21 Aug 2015 17:29:30 +0900 Message-Id: <1440145778-15941-14-git-send-email-izumi.taku@jp.fujitsu.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1440145778-15941-1-git-send-email-izumi.taku@jp.fujitsu.com> References: <1440145680-15851-1-git-send-email-izumi.taku@jp.fujitsu.com> <1440145778-15941-1-git-send-email-izumi.taku@jp.fujitsu.com> X-TM-AS-MML: disable Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-7.7 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 net_device_ops.ndo_tx_timeout callback. Signed-off-by: Taku Izumi --- drivers/net/fjes/fjes_main.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/net/fjes/fjes_main.c b/drivers/net/fjes/fjes_main.c index 519976c..94ccc11 100644 --- a/drivers/net/fjes/fjes_main.c +++ b/drivers/net/fjes/fjes_main.c @@ -58,6 +58,7 @@ static irqreturn_t fjes_intr(int, void*); static struct rtnl_link_stats64 * fjes_get_stats64(struct net_device *, struct rtnl_link_stats64 *); static int fjes_change_mtu(struct net_device *, int); +static void fjes_tx_retry(struct net_device *); static int fjes_acpi_add(struct acpi_device *); static int fjes_acpi_remove(struct acpi_device *); @@ -224,6 +225,7 @@ static const struct net_device_ops fjes_netdev_ops = { .ndo_start_xmit = fjes_xmit_frame, .ndo_get_stats64 = fjes_get_stats64, .ndo_change_mtu = fjes_change_mtu, + .ndo_tx_timeout = fjes_tx_retry, }; /* fjes_open - Called when a network interface is made active */ @@ -705,6 +707,13 @@ fjes_xmit_frame(struct sk_buff *skb, struct net_device *netdev) return ret; } +static void fjes_tx_retry(struct net_device *netdev) +{ + struct netdev_queue *queue = netdev_get_tx_queue(netdev, 0); + + netif_tx_wake_queue(queue); +} + static struct rtnl_link_stats64 * fjes_get_stats64(struct net_device *netdev, struct rtnl_link_stats64 *stats) {