From patchwork Thu Oct 1 17:11:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julian Wiedmann X-Patchwork-Id: 267170 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6E101C4727E for ; Thu, 1 Oct 2020 17:12:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EB84820872 for ; Thu, 1 Oct 2020 17:12:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="C5wsEupW" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733010AbgJARMM (ORCPT ); Thu, 1 Oct 2020 13:12:12 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:51138 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732910AbgJARMA (ORCPT ); Thu, 1 Oct 2020 13:12:00 -0400 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 091H21qe089515; Thu, 1 Oct 2020 13:11:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=pp1; bh=bi4Lyk6A+kPts/aPlMZRuCO3qZtamJS10WCbkTjTENk=; b=C5wsEupWjfo8pRogtEqhcNm6QPIl5gEhAcgrRjdqiip7yH5jPTF7KvvDMNw5wuBS1DCi D0mfgedPCrYPgLiKWe/Nvg/rnErXGb08U9DsTXx6LkgtG5IAePacW8T7BsH44oEeWrbj oqo20XnKq+iYV63weZCifOcZgjgzObGophA30gjvUrpZRQ5yXplGbj6dTR+oIxal4PpN Sfwmp1cTu5gf52C7a8TDi7jUhwKU6dCgjns2W8O7AsiD4PZfTu3v0roc6DdYl1mHQh3H y/qGidUaobIPXIOzYeoeOsL8edtYTF2jA5oRZz2hoN7J+K99yVneFW/5teBidU3psh/R qg== Received: from ppma06fra.de.ibm.com (48.49.7a9f.ip4.static.sl-reverse.com [159.122.73.72]) by mx0a-001b2d01.pphosted.com with ESMTP id 33wg4cr3ga-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 01 Oct 2020 13:11:50 -0400 Received: from pps.filterd (ppma06fra.de.ibm.com [127.0.0.1]) by ppma06fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 091H2LWA014293; Thu, 1 Oct 2020 17:11:45 GMT Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by ppma06fra.de.ibm.com with ESMTP id 33svwgu1ma-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 01 Oct 2020 17:11:45 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 091HBgB424052198 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 1 Oct 2020 17:11:42 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5AC6AA404D; Thu, 1 Oct 2020 17:11:42 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1471DA4055; Thu, 1 Oct 2020 17:11:42 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 1 Oct 2020 17:11:42 +0000 (GMT) From: Julian Wiedmann To: David Miller , Jakub Kicinski Cc: netdev , linux-s390 , Heiko Carstens , Ursula Braun , Karsten Graul , Julian Wiedmann Subject: [PATCH net-next 1/7] s390/qeth: keep track of wanted TX queues Date: Thu, 1 Oct 2020 19:11:30 +0200 Message-Id: <20201001171136.46830-2-jwi@linux.ibm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201001171136.46830-1-jwi@linux.ibm.com> References: <20201001171136.46830-1-jwi@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-10-01_05:2020-10-01,2020-10-01 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 spamscore=0 clxscore=1015 suspectscore=2 mlxlogscore=999 lowpriorityscore=0 adultscore=0 bulkscore=0 phishscore=0 mlxscore=0 malwarescore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2010010139 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org When re-initializing a device, we can hit a situation where qeth_osa_set_output_queues() detects that it supports more or less HW TX queues than before. Right now we adjust dev->real_num_tx_queues from right there, but 1. it's getting more & more complicated to cover all cases, and 2. we can't re-enable the actually expected number of TX queues later because we lost the needed information. So keep track of the wanted TX queues (on initial setup, and whenever its changed via .set_channels), and later use that information when re-enabling the netdevice. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_core.h | 11 ++++- drivers/s390/net/qeth_core_main.c | 70 +++++++++++++------------------ drivers/s390/net/qeth_ethtool.c | 8 +++- drivers/s390/net/qeth_l2_main.c | 14 ++++--- drivers/s390/net/qeth_l3_main.c | 12 ++++-- 5 files changed, 61 insertions(+), 54 deletions(-) diff --git a/drivers/s390/net/qeth_core.h b/drivers/s390/net/qeth_core.h index f321eabefbe4..f1c9a694873e 100644 --- a/drivers/s390/net/qeth_core.h +++ b/drivers/s390/net/qeth_core.h @@ -538,7 +538,7 @@ struct qeth_qdio_info { int in_buf_size; /* output */ - int no_out_queues; + unsigned int no_out_queues; struct qeth_qdio_out_q *out_qs[QETH_MAX_OUT_QUEUES]; struct qdio_outbuf_state *out_bufstates; @@ -788,6 +788,7 @@ struct qeth_switch_info { struct qeth_priv { unsigned int rx_copybreak; + unsigned int tx_wanted_queues; u32 brport_hw_features; u32 brport_features; }; @@ -873,6 +874,13 @@ struct qeth_trap_id { /*some helper functions*/ #define QETH_CARD_IFNAME(card) (((card)->dev)? (card)->dev->name : "") +static inline unsigned int qeth_tx_actual_queues(struct qeth_card *card) +{ + struct qeth_priv *priv = netdev_priv(card->dev); + + return min(priv->tx_wanted_queues, card->qdio.no_out_queues); +} + static inline u16 qeth_iqd_translate_txq(struct net_device *dev, u16 txq) { if (txq == QETH_IQD_MCAST_TXQ) @@ -1087,7 +1095,6 @@ void qeth_dbf_longtext(debug_info_t *id, int level, char *text, ...); int qeth_configure_cq(struct qeth_card *, enum qeth_cq); int qeth_hw_trap(struct qeth_card *, enum qeth_diags_trap_action); int qeth_setassparms_cb(struct qeth_card *, struct qeth_reply *, unsigned long); -int qeth_setup_netdev(struct qeth_card *card); int qeth_set_features(struct net_device *, netdev_features_t); void qeth_enable_hw_features(struct net_device *dev); netdev_features_t qeth_fix_features(struct net_device *, netdev_features_t); diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c index fc2c3db9259f..b61078b27562 100644 --- a/drivers/s390/net/qeth_core_main.c +++ b/drivers/s390/net/qeth_core_main.c @@ -1511,23 +1511,12 @@ static void qeth_drain_output_queues(struct qeth_card *card) } } -static int qeth_osa_set_output_queues(struct qeth_card *card, bool single) +static void qeth_osa_set_output_queues(struct qeth_card *card, bool single) { unsigned int max = single ? 1 : card->dev->num_tx_queues; - unsigned int count; - int rc; - - count = IS_VM_NIC(card) ? min(max, card->dev->real_num_tx_queues) : max; - - rtnl_lock(); - rc = netif_set_real_num_tx_queues(card->dev, count); - rtnl_unlock(); - - if (rc) - return rc; if (card->qdio.no_out_queues == max) - return 0; + return; if (atomic_read(&card->qdio.state) != QETH_QDIO_UNINITIALIZED) qeth_free_qdio_queues(card); @@ -1536,14 +1525,12 @@ static int qeth_osa_set_output_queues(struct qeth_card *card, bool single) dev_info(&card->gdev->dev, "Priority Queueing not supported\n"); card->qdio.no_out_queues = max; - return 0; } static int qeth_update_from_chp_desc(struct qeth_card *card) { struct ccw_device *ccwdev; struct channel_path_desc_fmt0 *chp_dsc; - int rc = 0; QETH_CARD_TEXT(card, 2, "chp_desc"); @@ -1556,12 +1543,12 @@ static int qeth_update_from_chp_desc(struct qeth_card *card) if (IS_OSD(card) || IS_OSX(card)) /* CHPP field bit 6 == 1 -> single queue */ - rc = qeth_osa_set_output_queues(card, chp_dsc->chpp & 0x02); + qeth_osa_set_output_queues(card, chp_dsc->chpp & 0x02); kfree(chp_dsc); QETH_CARD_TEXT_(card, 2, "nr:%x", card->qdio.no_out_queues); QETH_CARD_TEXT_(card, 2, "lvl:%02x", card->info.func_level); - return rc; + return 0; } static void qeth_init_qdio_info(struct qeth_card *card) @@ -5316,6 +5303,20 @@ static int qeth_set_online(struct qeth_card *card) qeth_print_status_message(card); + if (card->dev->reg_state != NETREG_REGISTERED) { + struct qeth_priv *priv = netdev_priv(card->dev); + + if (IS_IQD(card)) + priv->tx_wanted_queues = QETH_IQD_MIN_TXQ; + else if (IS_VM_NIC(card)) + priv->tx_wanted_queues = 1; + else + priv->tx_wanted_queues = card->dev->num_tx_queues; + + /* no need for locking / error handling at this early stage: */ + qeth_set_real_num_tx_queues(card, qeth_tx_actual_queues(card)); + } + rc = card->discipline->set_online(card, carrier_ok); if (rc) goto err_online; @@ -6250,8 +6251,16 @@ static struct net_device *qeth_alloc_netdev(struct qeth_card *card) SET_NETDEV_DEV(dev, &card->gdev->dev); netif_carrier_off(dev); - dev->ethtool_ops = IS_OSN(card) ? &qeth_osn_ethtool_ops : - &qeth_ethtool_ops; + if (IS_OSN(card)) { + dev->ethtool_ops = &qeth_osn_ethtool_ops; + } else { + dev->ethtool_ops = &qeth_ethtool_ops; + dev->priv_flags &= ~IFF_TX_SKB_SHARING; + dev->hw_features |= NETIF_F_SG; + dev->vlan_features |= NETIF_F_SG; + if (IS_IQD(card)) + dev->features |= NETIF_F_SG; + } return dev; } @@ -6267,28 +6276,6 @@ struct net_device *qeth_clone_netdev(struct net_device *orig) return clone; } -int qeth_setup_netdev(struct qeth_card *card) -{ - struct net_device *dev = card->dev; - unsigned int num_tx_queues; - - dev->priv_flags &= ~IFF_TX_SKB_SHARING; - dev->hw_features |= NETIF_F_SG; - dev->vlan_features |= NETIF_F_SG; - - if (IS_IQD(card)) { - dev->features |= NETIF_F_SG; - num_tx_queues = QETH_IQD_MIN_TXQ; - } else if (IS_VM_NIC(card)) { - num_tx_queues = 1; - } else { - num_tx_queues = dev->real_num_tx_queues; - } - - return qeth_set_real_num_tx_queues(card, num_tx_queues); -} -EXPORT_SYMBOL_GPL(qeth_setup_netdev); - static int qeth_core_probe_device(struct ccwgroup_device *gdev) { struct qeth_card *card; @@ -6959,6 +6946,7 @@ int qeth_set_real_num_tx_queues(struct qeth_card *card, unsigned int count) return rc; } +EXPORT_SYMBOL_GPL(qeth_set_real_num_tx_queues); u16 qeth_iqd_select_queue(struct net_device *dev, struct sk_buff *skb, u8 cast_type, struct net_device *sb_dev) diff --git a/drivers/s390/net/qeth_ethtool.c b/drivers/s390/net/qeth_ethtool.c index f870c5322bfe..bc3ea0efb58b 100644 --- a/drivers/s390/net/qeth_ethtool.c +++ b/drivers/s390/net/qeth_ethtool.c @@ -211,7 +211,9 @@ static void qeth_get_channels(struct net_device *dev, static int qeth_set_channels(struct net_device *dev, struct ethtool_channels *channels) { + struct qeth_priv *priv = netdev_priv(dev); struct qeth_card *card = dev->ml_priv; + int rc; if (channels->rx_count == 0 || channels->tx_count == 0) return -EINVAL; @@ -234,7 +236,11 @@ static int qeth_set_channels(struct net_device *dev, return -EOPNOTSUPP; } - return qeth_set_real_num_tx_queues(card, channels->tx_count); + rc = qeth_set_real_num_tx_queues(card, channels->tx_count); + if (!rc) + priv->tx_wanted_queues = channels->tx_count; + + return rc; } static int qeth_get_ts_info(struct net_device *dev, diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c index 1852d0a3c10a..290389fc7e79 100644 --- a/drivers/s390/net/qeth_l2_main.c +++ b/drivers/s390/net/qeth_l2_main.c @@ -894,18 +894,12 @@ static const struct net_device_ops qeth_osn_netdev_ops = { static int qeth_l2_setup_netdev(struct qeth_card *card) { - int rc; - if (IS_OSN(card)) { card->dev->netdev_ops = &qeth_osn_netdev_ops; card->dev->flags |= IFF_NOARP; goto add_napi; } - rc = qeth_setup_netdev(card); - if (rc) - return rc; - card->dev->needed_headroom = sizeof(struct qeth_hdr); card->dev->netdev_ops = &qeth_l2_netdev_ops; card->dev->priv_flags |= IFF_UNICAST_FLT; @@ -2274,6 +2268,13 @@ static int qeth_l2_set_online(struct qeth_card *card, bool carrier_ok) netif_carrier_on(dev); } else { rtnl_lock(); + rc = qeth_set_real_num_tx_queues(card, + qeth_tx_actual_queues(card)); + if (rc) { + rtnl_unlock(); + goto err_set_queues; + } + if (carrier_ok) netif_carrier_on(dev); else @@ -2291,6 +2292,7 @@ static int qeth_l2_set_online(struct qeth_card *card, bool carrier_ok) } return 0; +err_set_queues: err_setup: qeth_set_allowed_threads(card, 0, 1); card->state = CARD_STATE_DOWN; diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c index a6f8878b55c6..ea5f25857aff 100644 --- a/drivers/s390/net/qeth_l3_main.c +++ b/drivers/s390/net/qeth_l3_main.c @@ -1875,10 +1875,6 @@ static int qeth_l3_setup_netdev(struct qeth_card *card) unsigned int headroom; int rc; - rc = qeth_setup_netdev(card); - if (rc) - return rc; - if (IS_OSD(card) || IS_OSX(card)) { card->dev->netdev_ops = &qeth_l3_osa_netdev_ops; @@ -2022,6 +2018,13 @@ static int qeth_l3_set_online(struct qeth_card *card, bool carrier_ok) netif_carrier_on(dev); } else { rtnl_lock(); + rc = qeth_set_real_num_tx_queues(card, + qeth_tx_actual_queues(card)); + if (rc) { + rtnl_unlock(); + goto err_set_queues; + } + if (carrier_ok) netif_carrier_on(dev); else @@ -2038,6 +2041,7 @@ static int qeth_l3_set_online(struct qeth_card *card, bool carrier_ok) } return 0; +err_set_queues: err_setup: qeth_set_allowed_threads(card, 0, 1); card->state = CARD_STATE_DOWN; From patchwork Thu Oct 1 17:11:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julian Wiedmann X-Patchwork-Id: 267173 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B3B26C4741F for ; Thu, 1 Oct 2020 17:11:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 62BAD20872 for ; Thu, 1 Oct 2020 17:11:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="G2aPRTMz" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732864AbgJARLw (ORCPT ); Thu, 1 Oct 2020 13:11:52 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:24450 "EHLO mx0b-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732609AbgJARLv (ORCPT ); Thu, 1 Oct 2020 13:11:51 -0400 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 091H4QTh164103; Thu, 1 Oct 2020 13:11:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=pp1; bh=I2HwpNbU0h4cP2rBJCFmlN3QBFLkzOeD1/X6xuUPmXk=; b=G2aPRTMzTA6dwrwi2ppbjzdsaVaNyrZ7lfxTBFUGOJz5NAvq5FyJGGDcPYcxqUnBsU// V0cEs0NvCQ9bMUFveum/vxKyAksDhMqfMx469zCrcsslqAT9lcoj+Tjr7+tTaqZb/uLW 65iqa0NJ8vKdCp6Pf5bWA78oS56+umMdQBaAij5E3vZrqpyKtApAumSDywQmLRt9NUoV W6gpZXytYJhpusd29vfzqQuwQg7WmI/iK5KDiEpmZbyY7T8xdCgb07NRVJDXWgPDUk4C fu15itT+9y2JO4flq0rMTcTvKw32qkuS6o7qO/oaHx8A/MqSDoFIIUICpskwCN4saj3w hw== Received: from ppma04fra.de.ibm.com (6a.4a.5195.ip4.static.sl-reverse.com [149.81.74.106]) by mx0a-001b2d01.pphosted.com with ESMTP id 33wh4andfs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 01 Oct 2020 13:11:47 -0400 Received: from pps.filterd (ppma04fra.de.ibm.com [127.0.0.1]) by ppma04fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 091H2jGe015175; Thu, 1 Oct 2020 17:11:45 GMT Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by ppma04fra.de.ibm.com with ESMTP id 33wgcu02wb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 01 Oct 2020 17:11:45 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 091HBg6f22282542 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 1 Oct 2020 17:11:42 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A60B8A4040; Thu, 1 Oct 2020 17:11:42 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 66044A4051; Thu, 1 Oct 2020 17:11:42 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 1 Oct 2020 17:11:42 +0000 (GMT) From: Julian Wiedmann To: David Miller , Jakub Kicinski Cc: netdev , linux-s390 , Heiko Carstens , Ursula Braun , Karsten Graul , Julian Wiedmann Subject: [PATCH net-next 2/7] s390/qeth: de-magic the QIB parm area Date: Thu, 1 Oct 2020 19:11:31 +0200 Message-Id: <20201001171136.46830-3-jwi@linux.ibm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201001171136.46830-1-jwi@linux.ibm.com> References: <20201001171136.46830-1-jwi@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-10-01_06:2020-10-01,2020-10-01 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 priorityscore=1501 phishscore=0 suspectscore=2 bulkscore=0 clxscore=1015 mlxscore=0 lowpriorityscore=0 malwarescore=0 spamscore=0 impostorscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2010010144 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Use a proper struct, and only program the QIB extensions for devices where they are supported. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_core.h | 11 ++++++ drivers/s390/net/qeth_core_main.c | 65 ++++++++++++++----------------- 2 files changed, 41 insertions(+), 35 deletions(-) diff --git a/drivers/s390/net/qeth_core.h b/drivers/s390/net/qeth_core.h index f1c9a694873e..1e1e7104dade 100644 --- a/drivers/s390/net/qeth_core.h +++ b/drivers/s390/net/qeth_core.h @@ -278,6 +278,17 @@ struct qeth_hdr { } hdr; } __attribute__ ((packed)); +struct qeth_qib_parms { + char pcit_magic[4]; + u32 pcit_a; + u32 pcit_b; + u32 pcit_c; + char blkt_magic[4]; + u32 blkt_total; + u32 blkt_inter_packet; + u32 blkt_inter_packet_jumbo; +}; + /*TCP Segmentation Offload header*/ struct qeth_hdr_ext_tso { __u16 hdr_tot_len; diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c index b61078b27562..81f02a70680e 100644 --- a/drivers/s390/net/qeth_core_main.c +++ b/drivers/s390/net/qeth_core_main.c @@ -2743,30 +2743,26 @@ static void qeth_free_qdio_queues(struct qeth_card *card) } } -static void qeth_create_qib_param_field(struct qeth_card *card, - char *param_field) -{ - - param_field[0] = _ascebc['P']; - param_field[1] = _ascebc['C']; - param_field[2] = _ascebc['I']; - param_field[3] = _ascebc['T']; - *((unsigned int *) (¶m_field[4])) = QETH_PCI_THRESHOLD_A(card); - *((unsigned int *) (¶m_field[8])) = QETH_PCI_THRESHOLD_B(card); - *((unsigned int *) (¶m_field[12])) = QETH_PCI_TIMER_VALUE(card); -} - -static void qeth_create_qib_param_field_blkt(struct qeth_card *card, - char *param_field) -{ - param_field[16] = _ascebc['B']; - param_field[17] = _ascebc['L']; - param_field[18] = _ascebc['K']; - param_field[19] = _ascebc['T']; - *((unsigned int *) (¶m_field[20])) = card->info.blkt.time_total; - *((unsigned int *) (¶m_field[24])) = card->info.blkt.inter_packet; - *((unsigned int *) (¶m_field[28])) = - card->info.blkt.inter_packet_jumbo; +static void qeth_fill_qib_parms(struct qeth_card *card, + struct qeth_qib_parms *parms) +{ + parms->pcit_magic[0] = 'P'; + parms->pcit_magic[1] = 'C'; + parms->pcit_magic[2] = 'I'; + parms->pcit_magic[3] = 'T'; + ASCEBC(parms->pcit_magic, sizeof(parms->pcit_magic)); + parms->pcit_a = QETH_PCI_THRESHOLD_A(card); + parms->pcit_b = QETH_PCI_THRESHOLD_B(card); + parms->pcit_c = QETH_PCI_TIMER_VALUE(card); + + parms->blkt_magic[0] = 'B'; + parms->blkt_magic[1] = 'L'; + parms->blkt_magic[2] = 'K'; + parms->blkt_magic[3] = 'T'; + ASCEBC(parms->blkt_magic, sizeof(parms->blkt_magic)); + parms->blkt_total = card->info.blkt.time_total; + parms->blkt_inter_packet = card->info.blkt.inter_packet; + parms->blkt_inter_packet_jumbo = card->info.blkt.inter_packet_jumbo; } static int qeth_qdio_activate(struct qeth_card *card) @@ -5022,21 +5018,20 @@ static int qeth_qdio_establish(struct qeth_card *card) { struct qdio_buffer **out_sbal_ptrs[QETH_MAX_OUT_QUEUES]; struct qdio_buffer **in_sbal_ptrs[QETH_MAX_IN_QUEUES]; + struct qeth_qib_parms *qib_parms = NULL; struct qdio_initialize init_data; - char *qib_param_field; unsigned int i; int rc = 0; QETH_CARD_TEXT(card, 2, "qdioest"); - qib_param_field = kzalloc(sizeof_field(struct qib, parm), GFP_KERNEL); - if (!qib_param_field) { - rc = -ENOMEM; - goto out_free_nothing; - } + if (!IS_IQD(card) && !IS_VM_NIC(card)) { + qib_parms = kzalloc(sizeof_field(struct qib, parm), GFP_KERNEL); + if (!qib_parms) + return -ENOMEM; - qeth_create_qib_param_field(card, qib_param_field); - qeth_create_qib_param_field_blkt(card, qib_param_field); + qeth_fill_qib_parms(card, qib_parms); + } in_sbal_ptrs[0] = card->qdio.in_q->qdio_bufs; if (card->options.cq == QETH_CQ_ENABLED) @@ -5049,7 +5044,7 @@ static int qeth_qdio_establish(struct qeth_card *card) init_data.q_format = IS_IQD(card) ? QDIO_IQDIO_QFMT : QDIO_QETH_QFMT; init_data.qib_param_field_format = 0; - init_data.qib_param_field = qib_param_field; + init_data.qib_param_field = (void *)qib_parms; init_data.no_input_qs = card->qdio.no_in_queues; init_data.no_output_qs = card->qdio.no_out_queues; init_data.input_handler = qeth_qdio_input_handler; @@ -5086,9 +5081,9 @@ static int qeth_qdio_establish(struct qeth_card *card) default: break; } + out: - kfree(qib_param_field); -out_free_nothing: + kfree(qib_parms); return rc; } From patchwork Thu Oct 1 17:11:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julian Wiedmann X-Patchwork-Id: 267774 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 97058C47420 for ; Thu, 1 Oct 2020 17:12:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 305572085B for ; Thu, 1 Oct 2020 17:12:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="saRPyUa2" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732894AbgJARL6 (ORCPT ); Thu, 1 Oct 2020 13:11:58 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:40302 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732867AbgJARLz (ORCPT ); Thu, 1 Oct 2020 13:11:55 -0400 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 091H3M5m108036; Thu, 1 Oct 2020 13:11:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=pp1; bh=VpVZjLuzKfjVnICP31LL1nUCKHJcP7OerSmNfsTAgHU=; b=saRPyUa2vmzfEpzHA8L8vJz1otraALYb5sPfoNqLkCxm7kfON5FdTdymOSfYeBnwQaGB SgClLDuNIC9/cD1CEOVMaJ6W45yDVQwWXMEy9ralgKIJwEFlzzttvrrDMvOdPLz5qcBw Fcel7L3rkombAUrBwoJiaXHrMvYhHBwpxyVA3e5Bix1KbQEhT3lmBK1CJ9te3/iDcmjH /H+GD2dhf/Xr6WGm5a3GFcyQ7ElWdEjh7bajnZEza8ZO4m9/A19fz6/b1hZki4EdkZzC KojnLrJP8zl7lztE16S8fL69oqAxAQSALnY6f65KtiWcaZqOopHJUyd2NypTXmh2Y5ox vg== Received: from ppma04fra.de.ibm.com (6a.4a.5195.ip4.static.sl-reverse.com [149.81.74.106]) by mx0b-001b2d01.pphosted.com with ESMTP id 33wjepspwh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 01 Oct 2020 13:11:48 -0400 Received: from pps.filterd (ppma04fra.de.ibm.com [127.0.0.1]) by ppma04fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 091H3tJh016657; Thu, 1 Oct 2020 17:11:46 GMT Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by ppma04fra.de.ibm.com with ESMTP id 33wgcu02wc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 01 Oct 2020 17:11:45 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 091HBhfG29950454 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 1 Oct 2020 17:11:43 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 071DAA404D; Thu, 1 Oct 2020 17:11:43 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B11BBA4055; Thu, 1 Oct 2020 17:11:42 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 1 Oct 2020 17:11:42 +0000 (GMT) From: Julian Wiedmann To: David Miller , Jakub Kicinski Cc: netdev , linux-s390 , Heiko Carstens , Ursula Braun , Karsten Graul , Julian Wiedmann Subject: [PATCH net-next 3/7] s390/qeth: allow configuration of TX queues for OSA devices Date: Thu, 1 Oct 2020 19:11:32 +0200 Message-Id: <20201001171136.46830-4-jwi@linux.ibm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201001171136.46830-1-jwi@linux.ibm.com> References: <20201001171136.46830-1-jwi@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-10-01_06:2020-10-01,2020-10-01 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 impostorscore=0 suspectscore=2 mlxlogscore=984 adultscore=0 priorityscore=1501 malwarescore=0 bulkscore=0 phishscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2010010144 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org For OSA devices that are _not_ configured in prio-queue mode, give users the option of selecting the number of active TX queues. This requires setting up the HW queues with a reasonable default QoS value in the QIB's PQUE parm area. As with the other device types, we bring up the device with a minimal number of TX queues for compatibility reasons. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_core.h | 18 +++++++++++++++++ drivers/s390/net/qeth_core_main.c | 32 ++++++++++++++++++++----------- drivers/s390/net/qeth_core_sys.c | 4 +++- drivers/s390/net/qeth_ethtool.c | 8 ++++---- drivers/s390/net/qeth_l2_main.c | 5 +++-- drivers/s390/net/qeth_l3_main.c | 6 ++++-- 6 files changed, 53 insertions(+), 20 deletions(-) diff --git a/drivers/s390/net/qeth_core.h b/drivers/s390/net/qeth_core.h index 1e1e7104dade..707a1634f621 100644 --- a/drivers/s390/net/qeth_core.h +++ b/drivers/s390/net/qeth_core.h @@ -278,6 +278,10 @@ struct qeth_hdr { } hdr; } __attribute__ ((packed)); +#define QETH_QIB_PQUE_ORDER_RR 0 +#define QETH_QIB_PQUE_UNITS_SBAL 2 +#define QETH_QIB_PQUE_PRIO_DEFAULT 4 + struct qeth_qib_parms { char pcit_magic[4]; u32 pcit_a; @@ -287,6 +291,11 @@ struct qeth_qib_parms { u32 blkt_total; u32 blkt_inter_packet; u32 blkt_inter_packet_jumbo; + char pque_magic[4]; + u8 pque_order; + u8 pque_units; + u16 reserved; + u32 pque_priority[4]; }; /*TCP Segmentation Offload header*/ @@ -492,6 +501,7 @@ struct qeth_qdio_out_q { struct qdio_outbuf_state *bufstates; /* convenience pointer */ struct qeth_out_q_stats stats; spinlock_t lock; + unsigned int priority; u8 next_buf_to_fill; u8 max_elements; u8 queue_no; @@ -885,10 +895,18 @@ struct qeth_trap_id { /*some helper functions*/ #define QETH_CARD_IFNAME(card) (((card)->dev)? (card)->dev->name : "") +static inline bool qeth_uses_tx_prio_queueing(struct qeth_card *card) +{ + return card->qdio.do_prio_queueing != QETH_NO_PRIO_QUEUEING; +} + static inline unsigned int qeth_tx_actual_queues(struct qeth_card *card) { struct qeth_priv *priv = netdev_priv(card->dev); + if (qeth_uses_tx_prio_queueing(card)) + return min(card->dev->num_tx_queues, card->qdio.no_out_queues); + return min(priv->tx_wanted_queues, card->qdio.no_out_queues); } diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c index 81f02a70680e..9e9c229e2780 100644 --- a/drivers/s390/net/qeth_core_main.c +++ b/drivers/s390/net/qeth_core_main.c @@ -2683,6 +2683,7 @@ static int qeth_alloc_qdio_queues(struct qeth_card *card) timer_setup(&queue->timer, qeth_tx_completion_timer, 0); queue->coalesce_usecs = QETH_TX_COALESCE_USECS; queue->max_coalesced_frames = QETH_TX_MAX_COALESCED_FRAMES; + queue->priority = QETH_QIB_PQUE_PRIO_DEFAULT; /* give outbound qeth_qdio_buffers their qdio_buffers */ for (j = 0; j < QDIO_MAX_BUFFERS_PER_Q; ++j) { @@ -2746,6 +2747,9 @@ static void qeth_free_qdio_queues(struct qeth_card *card) static void qeth_fill_qib_parms(struct qeth_card *card, struct qeth_qib_parms *parms) { + struct qeth_qdio_out_q *queue; + unsigned int i; + parms->pcit_magic[0] = 'P'; parms->pcit_magic[1] = 'C'; parms->pcit_magic[2] = 'I'; @@ -2763,6 +2767,21 @@ static void qeth_fill_qib_parms(struct qeth_card *card, parms->blkt_total = card->info.blkt.time_total; parms->blkt_inter_packet = card->info.blkt.inter_packet; parms->blkt_inter_packet_jumbo = card->info.blkt.inter_packet_jumbo; + + /* Prio-queueing implicitly uses the default priorities: */ + if (qeth_uses_tx_prio_queueing(card) || card->qdio.no_out_queues == 1) + return; + + parms->pque_magic[0] = 'P'; + parms->pque_magic[1] = 'Q'; + parms->pque_magic[2] = 'U'; + parms->pque_magic[3] = 'E'; + ASCEBC(parms->pque_magic, sizeof(parms->pque_magic)); + parms->pque_order = QETH_QIB_PQUE_ORDER_RR; + parms->pque_units = QETH_QIB_PQUE_UNITS_SBAL; + + qeth_for_each_output_queue(card, queue, i) + parms->pque_priority[i] = queue->priority; } static int qeth_qdio_activate(struct qeth_card *card) @@ -5298,19 +5317,9 @@ static int qeth_set_online(struct qeth_card *card) qeth_print_status_message(card); - if (card->dev->reg_state != NETREG_REGISTERED) { - struct qeth_priv *priv = netdev_priv(card->dev); - - if (IS_IQD(card)) - priv->tx_wanted_queues = QETH_IQD_MIN_TXQ; - else if (IS_VM_NIC(card)) - priv->tx_wanted_queues = 1; - else - priv->tx_wanted_queues = card->dev->num_tx_queues; - + if (card->dev->reg_state != NETREG_REGISTERED) /* no need for locking / error handling at this early stage: */ qeth_set_real_num_tx_queues(card, qeth_tx_actual_queues(card)); - } rc = card->discipline->set_online(card, carrier_ok); if (rc) @@ -6236,6 +6245,7 @@ static struct net_device *qeth_alloc_netdev(struct qeth_card *card) priv = netdev_priv(dev); priv->rx_copybreak = QETH_RX_COPYBREAK; + priv->tx_wanted_queues = IS_IQD(card) ? QETH_IQD_MIN_TXQ : 1; dev->ml_priv = card; dev->watchdog_timeo = QETH_TX_TIMEOUT; diff --git a/drivers/s390/net/qeth_core_sys.c b/drivers/s390/net/qeth_core_sys.c index 74c70364edc1..7cc5649dfffe 100644 --- a/drivers/s390/net/qeth_core_sys.c +++ b/drivers/s390/net/qeth_core_sys.c @@ -164,9 +164,11 @@ static ssize_t qeth_dev_prioqing_show(struct device *dev, return sprintf(buf, "%s\n", "by skb-priority"); case QETH_PRIO_Q_ING_VLAN: return sprintf(buf, "%s\n", "by VLAN headers"); - default: + case QETH_PRIO_Q_ING_FIXED: return sprintf(buf, "always queue %i\n", card->qdio.default_out_queue); + default: + return sprintf(buf, "disabled\n"); } } diff --git a/drivers/s390/net/qeth_ethtool.c b/drivers/s390/net/qeth_ethtool.c index bc3ea0efb58b..b5caa723326e 100644 --- a/drivers/s390/net/qeth_ethtool.c +++ b/drivers/s390/net/qeth_ethtool.c @@ -220,6 +220,10 @@ static int qeth_set_channels(struct net_device *dev, if (channels->tx_count > card->qdio.no_out_queues) return -EINVAL; + /* Prio-queueing needs all TX queues: */ + if (qeth_uses_tx_prio_queueing(card)) + return -EPERM; + if (IS_IQD(card)) { if (channels->tx_count < QETH_IQD_MIN_TXQ) return -EINVAL; @@ -230,10 +234,6 @@ static int qeth_set_channels(struct net_device *dev, if (netif_running(dev) && channels->tx_count < dev->real_num_tx_queues) return -EPERM; - } else { - /* OSA still uses the legacy prio-queue mechanism: */ - if (!IS_VM_NIC(card)) - return -EOPNOTSUPP; } rc = qeth_set_real_num_tx_queues(card, channels->tx_count); diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c index 290389fc7e79..c0ceeddd1549 100644 --- a/drivers/s390/net/qeth_l2_main.c +++ b/drivers/s390/net/qeth_l2_main.c @@ -571,9 +571,10 @@ static u16 qeth_l2_select_queue(struct net_device *dev, struct sk_buff *skb, return qeth_iqd_select_queue(dev, skb, qeth_get_ether_cast_type(skb), sb_dev); + if (qeth_uses_tx_prio_queueing(card)) + return qeth_get_priority_queue(card, skb); - return IS_VM_NIC(card) ? netdev_pick_tx(dev, skb, sb_dev) : - qeth_get_priority_queue(card, skb); + return netdev_pick_tx(dev, skb, sb_dev); } static void qeth_l2_set_rx_mode(struct net_device *dev) diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c index ea5f25857aff..803ccbcf3511 100644 --- a/drivers/s390/net/qeth_l3_main.c +++ b/drivers/s390/net/qeth_l3_main.c @@ -1831,8 +1831,10 @@ static u16 qeth_l3_osa_select_queue(struct net_device *dev, struct sk_buff *skb, { struct qeth_card *card = dev->ml_priv; - return IS_VM_NIC(card) ? netdev_pick_tx(dev, skb, sb_dev) : - qeth_get_priority_queue(card, skb); + if (qeth_uses_tx_prio_queueing(card)) + return qeth_get_priority_queue(card, skb); + + return netdev_pick_tx(dev, skb, sb_dev); } static const struct net_device_ops qeth_l3_netdev_ops = { From patchwork Thu Oct 1 17:11:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julian Wiedmann X-Patchwork-Id: 267171 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B59A0C4727E for ; Thu, 1 Oct 2020 17:12:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6D0EE2085B for ; Thu, 1 Oct 2020 17:12:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="JqPawCcq" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732845AbgJARMD (ORCPT ); Thu, 1 Oct 2020 13:12:03 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:47600 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732867AbgJARL7 (ORCPT ); Thu, 1 Oct 2020 13:11:59 -0400 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 091H1PhF104246; Thu, 1 Oct 2020 13:11:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=pp1; bh=dKve+i1khI7AxYHFR+g9kWGeVX6QMyEXVDbKGoQaF6o=; b=JqPawCcqudCjDSei1arQewUwiDdv/98J6Ko6qLChCqT5I2cqKqsQ9tSrTUAAJ7zdHS7y TbpqbJ4DL5KA60ivlnYcXMgAe9ugHWZRdWpe2OP5jphCZ38KGS7C58nCWAfBcpSBqj/d QVPr6XOz5eyjszt5Tb+aplStatlomYkUncowMlkLAocSxIUWO2p4/EQ9cMVeWQTo69xM vRfzIklDxZ8Ogdmky9FkGVbMTr0p3QohKuyZiz5fEiv2ADSn8r8m50+AQdsnpd5CI5BX Ss/69TykB7//gegIWaKQ+ZVN9LxkHNO6CFxCVfRwhBxQoEdQ7vXITQG/jPy6A1uMmSqS qg== Received: from ppma02fra.de.ibm.com (47.49.7a9f.ip4.static.sl-reverse.com [159.122.73.71]) by mx0b-001b2d01.pphosted.com with ESMTP id 33wjkehecg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 01 Oct 2020 13:11:52 -0400 Received: from pps.filterd (ppma02fra.de.ibm.com [127.0.0.1]) by ppma02fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 091H3XrJ022841; Thu, 1 Oct 2020 17:11:46 GMT Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by ppma02fra.de.ibm.com with ESMTP id 33sw983121-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 01 Oct 2020 17:11:46 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 091HBhY213697426 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 1 Oct 2020 17:11:43 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 52B82A4040; Thu, 1 Oct 2020 17:11:43 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1289EA4057; Thu, 1 Oct 2020 17:11:43 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 1 Oct 2020 17:11:43 +0000 (GMT) From: Julian Wiedmann To: David Miller , Jakub Kicinski Cc: netdev , linux-s390 , Heiko Carstens , Ursula Braun , Karsten Graul , Julian Wiedmann Subject: [PATCH net-next 4/7] s390/qeth: constify the disciplines Date: Thu, 1 Oct 2020 19:11:33 +0200 Message-Id: <20201001171136.46830-5-jwi@linux.ibm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201001171136.46830-1-jwi@linux.ibm.com> References: <20201001171136.46830-1-jwi@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-10-01_05:2020-10-01,2020-10-01 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 suspectscore=0 malwarescore=0 spamscore=0 priorityscore=1501 clxscore=1015 bulkscore=0 phishscore=0 mlxlogscore=999 adultscore=0 impostorscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2010010139 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The discipline struct is a fixed group of function pointers. So declare the L2 and L3 disciplines as constant. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_core.h | 6 +++--- drivers/s390/net/qeth_l2_main.c | 2 +- drivers/s390/net/qeth_l3_main.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/s390/net/qeth_core.h b/drivers/s390/net/qeth_core.h index 707a1634f621..e5f47a823a11 100644 --- a/drivers/s390/net/qeth_core.h +++ b/drivers/s390/net/qeth_core.h @@ -858,7 +858,7 @@ struct qeth_card { struct qeth_qdio_info qdio; int read_or_write_problem; struct qeth_osn_info osn_info; - struct qeth_discipline *discipline; + const struct qeth_discipline *discipline; atomic_t force_alloc_skb; struct service_level qeth_service_level; struct qdio_ssqd_desc ssqd; @@ -1051,8 +1051,8 @@ static inline int qeth_send_simple_setassparms_v6(struct qeth_card *card, int qeth_get_priority_queue(struct qeth_card *card, struct sk_buff *skb); -extern struct qeth_discipline qeth_l2_discipline; -extern struct qeth_discipline qeth_l3_discipline; +extern const struct qeth_discipline qeth_l2_discipline; +extern const struct qeth_discipline qeth_l3_discipline; extern const struct ethtool_ops qeth_ethtool_ops; extern const struct ethtool_ops qeth_osn_ethtool_ops; extern const struct attribute_group *qeth_generic_attr_groups[]; diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c index c0ceeddd1549..2e9d3fea60e6 100644 --- a/drivers/s390/net/qeth_l2_main.c +++ b/drivers/s390/net/qeth_l2_main.c @@ -2340,7 +2340,7 @@ static int qeth_l2_control_event(struct qeth_card *card, } } -struct qeth_discipline qeth_l2_discipline = { +const struct qeth_discipline qeth_l2_discipline = { .devtype = &qeth_l2_devtype, .setup = qeth_l2_probe_device, .remove = qeth_l2_remove_device, diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c index 803ccbcf3511..4db7ded88fc8 100644 --- a/drivers/s390/net/qeth_l3_main.c +++ b/drivers/s390/net/qeth_l3_main.c @@ -2073,7 +2073,7 @@ static int qeth_l3_control_event(struct qeth_card *card, return 1; } -struct qeth_discipline qeth_l3_discipline = { +const struct qeth_discipline qeth_l3_discipline = { .devtype = &qeth_l3_devtype, .setup = qeth_l3_probe_device, .remove = qeth_l3_remove_device, From patchwork Thu Oct 1 17:11:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julian Wiedmann X-Patchwork-Id: 267776 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4CFE7C4727E for ; Thu, 1 Oct 2020 17:12:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EDB77208C7 for ; Thu, 1 Oct 2020 17:11:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="C7hovV2K" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732922AbgJARL7 (ORCPT ); Thu, 1 Oct 2020 13:11:59 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:38692 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732609AbgJARLz (ORCPT ); Thu, 1 Oct 2020 13:11:55 -0400 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 091H3Jxr107865; Thu, 1 Oct 2020 13:11:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=pp1; bh=YIvrOLdWDKYnN6NrdsvG5ferNh/l0ApIQMdkdQHbOhQ=; b=C7hovV2K1W5rPMbfl5Dqen6b+PlJPLAeOo/i8IYuzyqCklBByhOMYrjVXajzoZBEAM7b cFzUm+Ig66mFsZxmAqoHvfMgw0pxtt08ftU5mtvaIXYW9vgYlD+eqOS05M0IbXY8oGPU oNeyi/vpaXZ83cKdBj/qv14aqzZ7+DkYIBgCNZkj5ZdC6IYf/SOXpRUPWf1aGrNuVuDR l3yT6xMf3YzRftCl0a0ELyAp+rVfiTBhKRqilH1KukLHY5heRIqBiC/cQkRpAo8wNRzO EPTuMLC0BAmDQOIWTPAu0qNpf3Ug3q1bFpcGIZLV7nkWWuMUGNCMOhAzUkBxb5L0rqta lw== Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0b-001b2d01.pphosted.com with ESMTP id 33wjepspx1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 01 Oct 2020 13:11:48 -0400 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 091H3fZe001832; Thu, 1 Oct 2020 17:11:46 GMT Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by ppma03ams.nl.ibm.com with ESMTP id 33sw985r8a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 01 Oct 2020 17:11:46 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 091HBhiQ31785398 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 1 Oct 2020 17:11:43 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A2A59A4057; Thu, 1 Oct 2020 17:11:43 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5DD40A4053; Thu, 1 Oct 2020 17:11:43 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 1 Oct 2020 17:11:43 +0000 (GMT) From: Julian Wiedmann To: David Miller , Jakub Kicinski Cc: netdev , linux-s390 , Heiko Carstens , Ursula Braun , Karsten Graul , Julian Wiedmann Subject: [PATCH net-next 5/7] s390/qeth: use netdev_name() Date: Thu, 1 Oct 2020 19:11:34 +0200 Message-Id: <20201001171136.46830-6-jwi@linux.ibm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201001171136.46830-1-jwi@linux.ibm.com> References: <20201001171136.46830-1-jwi@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-10-01_06:2020-10-01,2020-10-01 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 impostorscore=0 suspectscore=0 mlxlogscore=999 adultscore=0 priorityscore=1501 malwarescore=0 bulkscore=0 phishscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2010010144 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Replace our custom version of netdev_name(). Once we started to allocate the netdev at probe time with commit d3d1b205e89f ("s390/qeth: allocate netdevice early"), this stopped working as intended anyway. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_core.h | 3 -- drivers/s390/net/qeth_core_main.c | 6 ++-- drivers/s390/net/qeth_core_sys.c | 2 +- drivers/s390/net/qeth_l2_main.c | 2 +- drivers/s390/net/qeth_l3_main.c | 58 ++++++++++++++++--------------- 5 files changed, 35 insertions(+), 36 deletions(-) diff --git a/drivers/s390/net/qeth_core.h b/drivers/s390/net/qeth_core.h index e5f47a823a11..39d17ea2eb78 100644 --- a/drivers/s390/net/qeth_core.h +++ b/drivers/s390/net/qeth_core.h @@ -892,9 +892,6 @@ struct qeth_trap_id { __u16 devno; } __packed; -/*some helper functions*/ -#define QETH_CARD_IFNAME(card) (((card)->dev)? (card)->dev->name : "") - static inline bool qeth_uses_tx_prio_queueing(struct qeth_card *card) { return card->qdio.do_prio_queueing != QETH_NO_PRIO_QUEUEING; diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c index 9e9c229e2780..5fd614278f30 100644 --- a/drivers/s390/net/qeth_core_main.c +++ b/drivers/s390/net/qeth_core_main.c @@ -915,12 +915,12 @@ static struct qeth_ipa_cmd *qeth_check_ipa_data(struct qeth_card *card, if (cmd->hdr.return_code == IPA_RC_VEPA_TO_VEB_TRANSITION) { dev_err(&card->gdev->dev, "Interface %s is down because the adjacent port is no longer in reflective relay mode\n", - QETH_CARD_IFNAME(card)); + netdev_name(card->dev)); schedule_work(&card->close_dev_work); } else { dev_warn(&card->gdev->dev, "The link for interface %s on CHPID 0x%X failed\n", - QETH_CARD_IFNAME(card), card->info.chpid); + netdev_name(card->dev), card->info.chpid); qeth_issue_ipa_msg(cmd, cmd->hdr.return_code, card); netif_carrier_off(card->dev); } @@ -928,7 +928,7 @@ static struct qeth_ipa_cmd *qeth_check_ipa_data(struct qeth_card *card, case IPA_CMD_STARTLAN: dev_info(&card->gdev->dev, "The link for %s on CHPID 0x%X has been restored\n", - QETH_CARD_IFNAME(card), card->info.chpid); + netdev_name(card->dev), card->info.chpid); if (card->info.hwtrap) card->info.hwtrap = 2; qeth_schedule_recovery(card); diff --git a/drivers/s390/net/qeth_core_sys.c b/drivers/s390/net/qeth_core_sys.c index 7cc5649dfffe..4441b3393eaf 100644 --- a/drivers/s390/net/qeth_core_sys.c +++ b/drivers/s390/net/qeth_core_sys.c @@ -52,7 +52,7 @@ static ssize_t qeth_dev_if_name_show(struct device *dev, { struct qeth_card *card = dev_get_drvdata(dev); - return sprintf(buf, "%s\n", QETH_CARD_IFNAME(card)); + return sprintf(buf, "%s\n", netdev_name(card->dev)); } static DEVICE_ATTR(if_name, 0444, qeth_dev_if_name_show, NULL); diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c index 2e9d3fea60e6..a88d0a01e9a5 100644 --- a/drivers/s390/net/qeth_l2_main.c +++ b/drivers/s390/net/qeth_l2_main.c @@ -1372,7 +1372,7 @@ static void qeth_addr_change_event_worker(struct work_struct *work) dev_info(&data->card->gdev->dev, "Address change notification stopped on %s (%s)\n", - data->card->dev->name, + netdev_name(card->dev), (data->ac_event.lost_event_mask == 0x01) ? "Overflow" : (data->ac_event.lost_event_mask == 0x02) diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c index 4db7ded88fc8..e7244aa4d191 100644 --- a/drivers/s390/net/qeth_l3_main.c +++ b/drivers/s390/net/qeth_l3_main.c @@ -706,16 +706,16 @@ static int qeth_l3_start_ipa_arp_processing(struct qeth_card *card) if (!qeth_is_supported(card, IPA_ARP_PROCESSING)) { dev_info(&card->gdev->dev, - "ARP processing not supported on %s!\n", - QETH_CARD_IFNAME(card)); + "ARP processing not supported on %s!\n", + netdev_name(card->dev)); return 0; } rc = qeth_send_simple_setassparms(card, IPA_ARP_PROCESSING, IPA_CMD_ASS_START, NULL); if (rc) { dev_warn(&card->gdev->dev, - "Starting ARP processing support for %s failed\n", - QETH_CARD_IFNAME(card)); + "Starting ARP processing support for %s failed\n", + netdev_name(card->dev)); } return rc; } @@ -728,8 +728,8 @@ static int qeth_l3_start_ipa_source_mac(struct qeth_card *card) if (!qeth_is_supported(card, IPA_SOURCE_MAC)) { dev_info(&card->gdev->dev, - "Inbound source MAC-address not supported on %s\n", - QETH_CARD_IFNAME(card)); + "Inbound source MAC-address not supported on %s\n", + netdev_name(card->dev)); return -EOPNOTSUPP; } @@ -737,8 +737,8 @@ static int qeth_l3_start_ipa_source_mac(struct qeth_card *card) IPA_CMD_ASS_START, NULL); if (rc) dev_warn(&card->gdev->dev, - "Starting source MAC-address support for %s failed\n", - QETH_CARD_IFNAME(card)); + "Starting source MAC-address support for %s failed\n", + netdev_name(card->dev)); return rc; } @@ -750,7 +750,7 @@ static int qeth_l3_start_ipa_vlan(struct qeth_card *card) if (!qeth_is_supported(card, IPA_FULL_VLAN)) { dev_info(&card->gdev->dev, - "VLAN not supported on %s\n", QETH_CARD_IFNAME(card)); + "VLAN not supported on %s\n", netdev_name(card->dev)); return -EOPNOTSUPP; } @@ -758,8 +758,8 @@ static int qeth_l3_start_ipa_vlan(struct qeth_card *card) IPA_CMD_ASS_START, NULL); if (rc) { dev_warn(&card->gdev->dev, - "Starting VLAN support for %s failed\n", - QETH_CARD_IFNAME(card)); + "Starting VLAN support for %s failed\n", + netdev_name(card->dev)); } else { dev_info(&card->gdev->dev, "VLAN enabled\n"); } @@ -774,8 +774,8 @@ static int qeth_l3_start_ipa_multicast(struct qeth_card *card) if (!qeth_is_supported(card, IPA_MULTICASTING)) { dev_info(&card->gdev->dev, - "Multicast not supported on %s\n", - QETH_CARD_IFNAME(card)); + "Multicast not supported on %s\n", + netdev_name(card->dev)); return -EOPNOTSUPP; } @@ -783,8 +783,8 @@ static int qeth_l3_start_ipa_multicast(struct qeth_card *card) IPA_CMD_ASS_START, NULL); if (rc) { dev_warn(&card->gdev->dev, - "Starting multicast support for %s failed\n", - QETH_CARD_IFNAME(card)); + "Starting multicast support for %s failed\n", + netdev_name(card->dev)); } else { dev_info(&card->gdev->dev, "Multicast enabled\n"); card->dev->flags |= IFF_MULTICAST; @@ -807,7 +807,7 @@ static int qeth_l3_softsetup_ipv6(struct qeth_card *card) if (rc) { dev_err(&card->gdev->dev, "Activating IPv6 support for %s failed\n", - QETH_CARD_IFNAME(card)); + netdev_name(card->dev)); return rc; } rc = qeth_send_simple_setassparms_v6(card, IPA_IPV6, IPA_CMD_ASS_START, @@ -815,15 +815,15 @@ static int qeth_l3_softsetup_ipv6(struct qeth_card *card) if (rc) { dev_err(&card->gdev->dev, "Activating IPv6 support for %s failed\n", - QETH_CARD_IFNAME(card)); + netdev_name(card->dev)); return rc; } rc = qeth_send_simple_setassparms_v6(card, IPA_PASSTHRU, IPA_CMD_ASS_START, NULL); if (rc) { dev_warn(&card->gdev->dev, - "Enabling the passthrough mode for %s failed\n", - QETH_CARD_IFNAME(card)); + "Enabling the passthrough mode for %s failed\n", + netdev_name(card->dev)); return rc; } out: @@ -837,7 +837,7 @@ static int qeth_l3_start_ipa_ipv6(struct qeth_card *card) if (!qeth_is_supported(card, IPA_IPV6)) { dev_info(&card->gdev->dev, - "IPv6 not supported on %s\n", QETH_CARD_IFNAME(card)); + "IPv6 not supported on %s\n", netdev_name(card->dev)); return 0; } return qeth_l3_softsetup_ipv6(card); @@ -852,16 +852,17 @@ static int qeth_l3_start_ipa_broadcast(struct qeth_card *card) card->info.broadcast_capable = 0; if (!qeth_is_supported(card, IPA_FILTERING)) { dev_info(&card->gdev->dev, - "Broadcast not supported on %s\n", - QETH_CARD_IFNAME(card)); + "Broadcast not supported on %s\n", + netdev_name(card->dev)); rc = -EOPNOTSUPP; goto out; } rc = qeth_send_simple_setassparms(card, IPA_FILTERING, IPA_CMD_ASS_START, NULL); if (rc) { - dev_warn(&card->gdev->dev, "Enabling broadcast filtering for " - "%s failed\n", QETH_CARD_IFNAME(card)); + dev_warn(&card->gdev->dev, + "Enabling broadcast filtering for %s failed\n", + netdev_name(card->dev)); goto out; } @@ -869,8 +870,8 @@ static int qeth_l3_start_ipa_broadcast(struct qeth_card *card) IPA_CMD_ASS_CONFIGURE, &filter_data); if (rc) { dev_warn(&card->gdev->dev, - "Setting up broadcast filtering for %s failed\n", - QETH_CARD_IFNAME(card)); + "Setting up broadcast filtering for %s failed\n", + netdev_name(card->dev)); goto out; } card->info.broadcast_capable = QETH_BROADCAST_WITH_ECHO; @@ -878,8 +879,9 @@ static int qeth_l3_start_ipa_broadcast(struct qeth_card *card) rc = qeth_send_simple_setassparms(card, IPA_FILTERING, IPA_CMD_ASS_ENABLE, &filter_data); if (rc) { - dev_warn(&card->gdev->dev, "Setting up broadcast echo " - "filtering for %s failed\n", QETH_CARD_IFNAME(card)); + dev_warn(&card->gdev->dev, + "Setting up broadcast echo filtering for %s failed\n", + netdev_name(card->dev)); goto out; } card->info.broadcast_capable = QETH_BROADCAST_WITHOUT_ECHO; From patchwork Thu Oct 1 17:11:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julian Wiedmann X-Patchwork-Id: 267172 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4EEF7C4741F for ; Thu, 1 Oct 2020 17:12:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0003720872 for ; Thu, 1 Oct 2020 17:12:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="lXXqlJ1k" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732933AbgJARMA (ORCPT ); Thu, 1 Oct 2020 13:12:00 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:48998 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732213AbgJARLx (ORCPT ); Thu, 1 Oct 2020 13:11:53 -0400 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 091H3ukt056364; Thu, 1 Oct 2020 13:11:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=pp1; bh=GHmI2UthygvcfnHvuF13yT+zX9lcgIC9ZcKx7EbsE4g=; b=lXXqlJ1kT02wd9Y5Cs7Wpnexij9s1dwAf9RsqmAzqXqL9zHduOu3ebzMSMM6S13E2mhK h0YGGpq4q5NDqXrRPDa1f340p6aJQD+wiOQzcju7aLsXGJJOsB4apnbVrRRwpT/HlUZc jf9iQpkwpAOAHRodhQ73a4mRzShHQhmqzUYxUvs23JA1YyzsWA2v4D3o20zQKrHZcDwv qCy5I4F/LOSu0XneNwRLhHOeQLXZst1ZSeTlQ1ImHZxd0aPo9GDOZ3mwlc5j4MX3Ollm oARSSYeUFjfTfvBu8RsBVszk0AkKubaj4C/SwnTHbr9UPCU2zOIPi2Y+u8fXkILIKOKn iA== Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 33wg81fva9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 01 Oct 2020 13:11:50 -0400 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 091H49LT018554; Thu, 1 Oct 2020 17:11:46 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma04ams.nl.ibm.com with ESMTP id 33sw97wrt8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 01 Oct 2020 17:11:46 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 091HBi8912583310 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 1 Oct 2020 17:11:44 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 023C4A4053; Thu, 1 Oct 2020 17:11:44 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AF316A4059; Thu, 1 Oct 2020 17:11:43 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 1 Oct 2020 17:11:43 +0000 (GMT) From: Julian Wiedmann To: David Miller , Jakub Kicinski Cc: netdev , linux-s390 , Heiko Carstens , Ursula Braun , Karsten Graul , Julian Wiedmann Subject: [PATCH net-next 6/7] s390/qeth: static checker cleanups Date: Thu, 1 Oct 2020 19:11:35 +0200 Message-Id: <20201001171136.46830-7-jwi@linux.ibm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201001171136.46830-1-jwi@linux.ibm.com> References: <20201001171136.46830-1-jwi@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-10-01_05:2020-10-01,2020-10-01 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 phishscore=0 mlxlogscore=999 clxscore=1015 lowpriorityscore=0 priorityscore=1501 spamscore=0 impostorscore=0 suspectscore=2 bulkscore=0 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2010010139 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org - Add/delete some blanks, white spaces and braces. - Fix misindentations. - Adjust a deprecated header include, and htons() conversion. - Remove extra 'return' statements. Signed-off-by: Julian Wiedmann --- drivers/s390/net/qeth_core.h | 7 ++++--- drivers/s390/net/qeth_core_main.c | 18 +++++++++--------- drivers/s390/net/qeth_l2_main.c | 5 ++--- drivers/s390/net/qeth_l3_main.c | 7 +++---- drivers/s390/net/qeth_l3_sys.c | 8 ++++---- 5 files changed, 22 insertions(+), 23 deletions(-) diff --git a/drivers/s390/net/qeth_core.h b/drivers/s390/net/qeth_core.h index 39d17ea2eb78..f73b4756ed5e 100644 --- a/drivers/s390/net/qeth_core.h +++ b/drivers/s390/net/qeth_core.h @@ -177,8 +177,8 @@ struct qeth_vnicc_info { /** * some more defs */ -#define QETH_TX_TIMEOUT 100 * HZ -#define QETH_RCD_TIMEOUT 60 * HZ +#define QETH_TX_TIMEOUT (100 * HZ) +#define QETH_RCD_TIMEOUT (60 * HZ) #define QETH_RECLAIM_WORK_TIME HZ #define QETH_MAX_PORTNO 15 @@ -1069,7 +1069,8 @@ extern struct qeth_dbf_info qeth_dbf[QETH_DBF_INFOS]; struct net_device *qeth_clone_netdev(struct net_device *orig); struct qeth_card *qeth_get_card_by_busid(char *bus_id); -void qeth_set_allowed_threads(struct qeth_card *, unsigned long , int); +void qeth_set_allowed_threads(struct qeth_card *card, unsigned long threads, + int clear_start_mask); int qeth_threads_running(struct qeth_card *, unsigned long); int qeth_set_offline(struct qeth_card *card, bool resetting); diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c index 5fd614278f30..93c9b30ab17a 100644 --- a/drivers/s390/net/qeth_core_main.c +++ b/drivers/s390/net/qeth_core_main.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -35,7 +36,6 @@ #include #include -#include #include #include #include @@ -209,9 +209,8 @@ static void qeth_clear_working_pool_list(struct qeth_card *card) QETH_CARD_TEXT(card, 5, "clwrklst"); list_for_each_entry_safe(pool_entry, tmp, - &card->qdio.in_buf_pool.entry_list, list){ - list_del(&pool_entry->list); - } + &card->qdio.in_buf_pool.entry_list, list) + list_del(&pool_entry->list); for (i = 0; i < ARRAY_SIZE(queue->bufs); i++) queue->bufs[i].pool_entry = NULL; @@ -481,6 +480,7 @@ static void qeth_cleanup_handled_pending(struct qeth_qdio_out_q *q, int bidx, atomic_read(&c->state) == QETH_QDIO_BUF_HANDLED_DELAYED) { struct qeth_qdio_out_buffer *f = c; + QETH_CARD_TEXT(f->q->card, 5, "fp"); QETH_CARD_TEXT_(f->q->card, 5, "%lx", (long) f); /* release here to avoid interleaving between @@ -507,7 +507,6 @@ static void qeth_cleanup_handled_pending(struct qeth_qdio_out_q *q, int bidx, } } - static void qeth_qdio_handle_aob(struct qeth_card *card, unsigned long phys_aob_addr) { @@ -884,6 +883,7 @@ static void qeth_issue_ipa_msg(struct qeth_ipa_cmd *cmd, int rc, { const char *ipa_name; int com = cmd->hdr.command; + ipa_name = qeth_get_ipa_cmd_name(com); if (rc) @@ -1253,7 +1253,7 @@ static int qeth_get_problem(struct qeth_card *card, struct ccw_device *cdev, return 0; } QETH_CARD_TEXT(card, 2, "DGENCHK"); - return -EIO; + return -EIO; } return 0; } @@ -1600,7 +1600,7 @@ static void qeth_start_kernel_thread(struct work_struct *work) struct task_struct *ts; struct qeth_card *card = container_of(work, struct qeth_card, kernel_thread_starter); - QETH_CARD_TEXT(card , 2, "strthrd"); + QETH_CARD_TEXT(card, 2, "strthrd"); if (card->read.state != CH_STATE_UP && card->write.state != CH_STATE_UP) @@ -3416,7 +3416,6 @@ static void qeth_get_trap_id(struct qeth_card *card, struct qeth_trap_id *tid) memcpy(tid->vmname, info322->vm[0].name, sizeof(tid->vmname)); } free_page(info); - return; } static int qeth_hw_trap_cb(struct qeth_card *card, @@ -4998,7 +4997,6 @@ static void qeth_determine_capabilities(struct qeth_card *card) card->options.cq = QETH_CQ_NOTAVAILABLE; } - out_offline: if (ddev_offline == 1) qeth_stop_channel(channel); @@ -6050,6 +6048,7 @@ EXPORT_SYMBOL_GPL(qeth_send_simple_setassparms_prot); static void qeth_unregister_dbf_views(void) { int x; + for (x = 0; x < QETH_DBF_INFOS; x++) { debug_unregister(qeth_dbf[x].id); qeth_dbf[x].id = NULL; @@ -6413,6 +6412,7 @@ static int qeth_core_set_offline(struct ccwgroup_device *gdev) static void qeth_core_shutdown(struct ccwgroup_device *gdev) { struct qeth_card *card = dev_get_drvdata(&gdev->dev); + qeth_set_allowed_threads(card, 0, 1); if ((gdev->state == CCWGROUP_ONLINE) && card->info.hwtrap) qeth_hw_trap(card, QETH_DIAGS_TRAP_DISARM); diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c index a88d0a01e9a5..28f6dda95736 100644 --- a/drivers/s390/net/qeth_l2_main.c +++ b/drivers/s390/net/qeth_l2_main.c @@ -183,7 +183,7 @@ static void qeth_l2_fill_header(struct qeth_qdio_out_q *queue, /* VSWITCH relies on the VLAN * information to be present in * the QDIO header */ - if (veth->h_vlan_proto == __constant_htons(ETH_P_8021Q)) { + if (veth->h_vlan_proto == htons(ETH_P_8021Q)) { hdr->hdr.l2.flags[2] |= QETH_LAYER2_FLAG_VLAN; hdr->hdr.l2.vlan_id = ntohs(veth->h_vlan_TCI); } @@ -877,7 +877,7 @@ static const struct net_device_ops qeth_l2_netdev_ops = { .ndo_set_mac_address = qeth_l2_set_mac_address, .ndo_vlan_rx_add_vid = qeth_l2_vlan_rx_add_vid, .ndo_vlan_rx_kill_vid = qeth_l2_vlan_rx_kill_vid, - .ndo_tx_timeout = qeth_tx_timeout, + .ndo_tx_timeout = qeth_tx_timeout, .ndo_fix_features = qeth_fix_features, .ndo_set_features = qeth_set_features, .ndo_bridge_getlink = qeth_l2_bridge_getlink, @@ -1125,7 +1125,6 @@ void qeth_osn_deregister(struct net_device *dev) QETH_CARD_TEXT(card, 2, "osndereg"); card->osn_info.assist_cb = NULL; card->osn_info.data_cb = NULL; - return; } EXPORT_SYMBOL(qeth_osn_deregister); #endif diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c index e7244aa4d191..b1c1d2510d55 100644 --- a/drivers/s390/net/qeth_l3_main.c +++ b/drivers/s390/net/qeth_l3_main.c @@ -97,7 +97,7 @@ static bool qeth_l3_is_addr_covered_by_ipato(struct qeth_card *card, return false; qeth_l3_convert_addr_to_bits((u8 *) &addr->u, addr_bits, - (addr->proto == QETH_PROT_IPV4)? 4:16); + (addr->proto == QETH_PROT_IPV4) ? 4 : 16); list_for_each_entry(ipatoe, &card->ipato.entries, entry) { if (addr->proto != ipatoe->proto) continue; @@ -540,7 +540,7 @@ int qeth_l3_add_ipato_entry(struct qeth_card *card, if (ipatoe->proto != new->proto) continue; if (!memcmp(ipatoe->addr, new->addr, - (ipatoe->proto == QETH_PROT_IPV4)? 4:16) && + (ipatoe->proto == QETH_PROT_IPV4) ? 4 : 16) && (ipatoe->mask_bits == new->mask_bits)) { rc = -EEXIST; break; @@ -572,7 +572,7 @@ int qeth_l3_del_ipato_entry(struct qeth_card *card, if (ipatoe->proto != proto) continue; if (!memcmp(ipatoe->addr, addr, - (proto == QETH_PROT_IPV4)? 4:16) && + (proto == QETH_PROT_IPV4) ? 4 : 16) && (ipatoe->mask_bits == mask_bits)) { list_del(&ipatoe->entry); qeth_l3_update_ipato(card); @@ -2139,7 +2139,6 @@ static struct qeth_card *qeth_l3_get_card_from_dev(struct net_device *dev) static int qeth_l3_ip_event(struct notifier_block *this, unsigned long event, void *ptr) { - struct in_ifaddr *ifa = (struct in_ifaddr *)ptr; struct net_device *dev = ifa->ifa_dev->dev; struct qeth_ipaddr addr; diff --git a/drivers/s390/net/qeth_l3_sys.c b/drivers/s390/net/qeth_l3_sys.c index 351763ae9b9c..997fbb7006a7 100644 --- a/drivers/s390/net/qeth_l3_sys.c +++ b/drivers/s390/net/qeth_l3_sys.c @@ -285,7 +285,7 @@ static ssize_t qeth_l3_dev_ipato_enable_show(struct device *dev, { struct qeth_card *card = dev_get_drvdata(dev); - return sprintf(buf, "%i\n", card->ipato.enabled? 1:0); + return sprintf(buf, "%u\n", card->ipato.enabled ? 1 : 0); } static ssize_t qeth_l3_dev_ipato_enable_store(struct device *dev, @@ -330,7 +330,7 @@ static ssize_t qeth_l3_dev_ipato_invert4_show(struct device *dev, { struct qeth_card *card = dev_get_drvdata(dev); - return sprintf(buf, "%i\n", card->ipato.invert4? 1:0); + return sprintf(buf, "%u\n", card->ipato.invert4 ? 1 : 0); } static ssize_t qeth_l3_dev_ipato_invert4_store(struct device *dev, @@ -450,7 +450,7 @@ static ssize_t qeth_l3_dev_ipato_add_store(const char *buf, size_t count, return -ENOMEM; ipatoe->proto = proto; - memcpy(ipatoe->addr, addr, (proto == QETH_PROT_IPV4)? 4:16); + memcpy(ipatoe->addr, addr, (proto == QETH_PROT_IPV4) ? 4 : 16); ipatoe->mask_bits = mask_bits; rc = qeth_l3_add_ipato_entry(card, ipatoe); @@ -501,7 +501,7 @@ static ssize_t qeth_l3_dev_ipato_invert6_show(struct device *dev, { struct qeth_card *card = dev_get_drvdata(dev); - return sprintf(buf, "%i\n", card->ipato.invert6? 1:0); + return sprintf(buf, "%u\n", card->ipato.invert6 ? 1 : 0); } static ssize_t qeth_l3_dev_ipato_invert6_store(struct device *dev, From patchwork Thu Oct 1 17:11:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julian Wiedmann X-Patchwork-Id: 267775 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2BC74C47420 for ; Thu, 1 Oct 2020 17:12:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C652D2085B for ; Thu, 1 Oct 2020 17:12:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="MghEvdl4" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732952AbgJARMB (ORCPT ); Thu, 1 Oct 2020 13:12:01 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:4229 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732866AbgJARLx (ORCPT ); Thu, 1 Oct 2020 13:11:53 -0400 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 091H200O031039; Thu, 1 Oct 2020 13:11:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=pp1; bh=yYEcyPP/wqQVm7ClXdu9ltR5ZqDVzWOkv6YMVtwzdo8=; b=MghEvdl4kTGbQMJ8UE2ReCcp+/egt50d75ZRL9XpBAUIPMWKvPEb44wM0yu5fJy5oMjT hjqvjWYFiv6XSuihDmiuEErCT7Yp/oCbzxfZPFzz2/lLeDq+EXCMuZsAKHksnCwdW3mG tpJ8J1vws2vZOLg/vPuFrb241Bmv2G1kgfRE1vhfFCQ5H45VfOW00fRWfdZi8i0vrf/X bICy++LDzFuDdGWnCNj1knIvwgsWjhU8DnJofsdGFraRle9Ll0PmLtH1jGJdNsuqGheQ KZFBuTcS7tyCTwml5ums/9aIopZtOGc1R0RJNa9IWSPU7paapcfyT4cJInj/rLofKciZ Nw== Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0b-001b2d01.pphosted.com with ESMTP id 33wjtbgx9a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 01 Oct 2020 13:11:50 -0400 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 091H2EbU019619; Thu, 1 Oct 2020 17:11:47 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma06ams.nl.ibm.com with ESMTP id 33v6mgta9r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 01 Oct 2020 17:11:47 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 091HBi6x12583312 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 1 Oct 2020 17:11:44 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 535D3A405D; Thu, 1 Oct 2020 17:11:44 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0D7FBA405B; Thu, 1 Oct 2020 17:11:44 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 1 Oct 2020 17:11:43 +0000 (GMT) From: Julian Wiedmann To: David Miller , Jakub Kicinski Cc: netdev , linux-s390 , Heiko Carstens , Ursula Braun , Karsten Graul , Julian Wiedmann , Vasily Gorbik Subject: [PATCH net-next 7/7] s390/ctcm: remove orphaned function declarations Date: Thu, 1 Oct 2020 19:11:36 +0200 Message-Id: <20201001171136.46830-8-jwi@linux.ibm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201001171136.46830-1-jwi@linux.ibm.com> References: <20201001171136.46830-1-jwi@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-10-01_05:2020-10-01,2020-10-01 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 phishscore=0 clxscore=1015 mlxscore=0 malwarescore=0 bulkscore=0 lowpriorityscore=0 priorityscore=1501 mlxlogscore=999 suspectscore=0 spamscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2010010139 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Vasily Gorbik drivers/s390/net/ctcm_fsms.h: fsm_action_nop - only declaration left after commit 04885948b101 ("ctc: removal of the old ctc driver") drivers/s390/net/ctcm_mpc.h: ctcmpc_open - only declaration left after commit 293d984f0e36 ("ctcm: infrastructure for replaced ctc driver") Reviewed-by: Julian Wiedmann Signed-off-by: Vasily Gorbik Signed-off-by: Julian Wiedmann --- drivers/s390/net/ctcm_fsms.h | 1 - drivers/s390/net/ctcm_mpc.h | 1 - 2 files changed, 2 deletions(-) diff --git a/drivers/s390/net/ctcm_fsms.h b/drivers/s390/net/ctcm_fsms.h index 225737295cb4..d98c486724d4 100644 --- a/drivers/s390/net/ctcm_fsms.h +++ b/drivers/s390/net/ctcm_fsms.h @@ -159,7 +159,6 @@ extern const char *ctc_ch_state_names[]; void ctcm_ccw_check_rc(struct channel *ch, int rc, char *msg); void ctcm_purge_skb_queue(struct sk_buff_head *q); -void fsm_action_nop(fsm_instance *fi, int event, void *arg); /* * ----- non-static actions for ctcm channel statemachine ----- diff --git a/drivers/s390/net/ctcm_mpc.h b/drivers/s390/net/ctcm_mpc.h index 441d7b211f0f..da41b26f76d1 100644 --- a/drivers/s390/net/ctcm_mpc.h +++ b/drivers/s390/net/ctcm_mpc.h @@ -228,7 +228,6 @@ static inline void ctcmpc_dump32(char *buf, int len) ctcmpc_dumpit(buf, 32); } -int ctcmpc_open(struct net_device *); void ctcm_ccw_check_rc(struct channel *, int, char *); void mpc_group_ready(unsigned long adev); void mpc_channel_action(struct channel *ch, int direction, int action);