[From nobody Thu Jun 25 05:54:42 2020
Received: from mail-ve1eur01on0058.outbound.protection.outlook.com
 ([104.47.1.58] helo=EUR01-VE1-obe.outbound.protection.outlook.com)
 by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux))
 id 1fUq9p-0007I9-EL
 for openwrt-devel@lists.openwrt.org; Mon, 18 Jun 2018 09:09:07 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=darbyshire-bryant.me.uk; s=selector1;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=derpOsTKb2fsgTVe8ClwRYhHx9yAf+ekjs/WO7bcFCQ=;
 b=cdbacG7uZPrPi1V7fhTb1UVwus+XRX2jLKP0UW7AIYhiMICeaL5dqwU5YWtMT+gyP7ASftKTonGS90JiaYY+hU4zVEgM2GYTkr6ANchsuX0pNCnu0EfueWubsSGDSlBq6mDr+slnIHLZkspAiDqmat84PQd8XkQGm+Blr9bv0EI=
Received: from Kevins-MBP.lan.darbyshire-bryant.me.uk (151.229.94.10) by
 AM0PR07MB4242.eurprd07.prod.outlook.com (2603:10a6:208:b8::26) with Microsoft
 SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 15.20.863.6; Mon, 18 Jun 2018 09:08:52 +0000
From: Kevin Darbyshire-Bryant &lt;ldir@darbyshire-bryant.me.uk&gt;
To: openwrt-devel@lists.openwrt.org
Cc: Kevin Darbyshire-Bryant &lt;ldir@darbyshire-bryant.me.uk&gt;
Subject: [PATCH] lantiq: atm: fix ifx_atm driver integration
Date: Mon, 18 Jun 2018 10:08:46 +0100
Message-Id: &lt;20180618090846.11486-1-ldir@darbyshire-bryant.me.uk&gt;
X-Mailer: git-send-email 2.15.2 (Apple Git-101.1)
MIME-Version: 1.0
Content-Type: text/plain
X-Originating-IP: [151.229.94.10]
X-ClientProxiedBy: CWLP265CA0174.GBRP265.PROD.OUTLOOK.COM
 (2603:10a6:401:4d::18) To AM0PR07MB4242.eurprd07.prod.outlook.com
 (2603:10a6:208:b8::26)
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id: 53edba94-f28f-4ae3-7f3f-08d5d4fb1c73
X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0;
 RULEID:(7020095)(4652020)(7021125)(5600026)(711020)(4534165)(7022125)(4603075)(4627221)(201702281549075)(7048125)(7024125)(7027125)(7028125)(7023125)(2017052603328)(7153060)(7193020);
 SRVR:AM0PR07MB4242; 
X-Microsoft-Exchange-Diagnostics: 1; AM0PR07MB4242;
 3:26c8GjrTHGE419oh4QiU7tDC+UwuGcJlvHXuJFhqopj2X9ntcP1NBPr1W+oVddrP6HyPB5Xw9LOjnnqWkxCw+dytVPxEhbe8yA+PfLHgaWu2z4qJpz1UrQ9xrgFm1GqNmG4PodUxqQKReMc+ycQmLQPFFEfKEweVq4/Sfocf5MLkj/C5neChW9M0Iscc6T+jTZp2K0y0VZVDf3rIvPnt+QZpyZeQzsGTb52Q7eiOcry/glN71gnJQMgAU8sWIslM;
 25:3H7tsh75MRZzwVWEHb52RhndVpBP8/kaAxluw0CGRREkgA+jP3ijStMY+5ZanbwbHpYq4wxJeAIzM/K/qNQbBsa26IStXYlzJqZTKzgREqzLR59CLKQFihuRKLmIaZSU6x+AnNkyDn96JdufkbGz3AR6T/CJOVS+rasTpcxz8/0PJAiBh2LIXk3Mw3xK8HFIuKylbQ+DOlXHMIU9pbxNLf8snQY9dBqKv5Dv72D6mCxky/RS0Rp1WqOo3FMVO2I6R8/8XLCAuTjgWBdEBZ+D+sc58JDp8T9Yk3IEi23lYD7nfsmVzR9nvQJZyWaUzH6Fk0nxo8kMs4k/KHybvdC3PA==;
 31:PUBgjtKGwVkIp3HsBwCbeoaJMhNWTtOVYighAiEdglOaCM8PC44m7M9nRHZN5vraNJp7bnABT/1iwZI+mu9qWBSwIRJP9T862os5UfdjLubJAuFiRpEThfkwNCHKApRnBMrOx8PjZaWOJCG4LejAyA+gAHARVTrJP584HBedadTKH2k3QBiZdP6DrApZ8LqC/jVZOE2qrz3ZCJKpu4PMLq3BaLjsZ0ggmWjCJPmT3ig=
X-MS-TrafficTypeDiagnostic: AM0PR07MB4242:
Authentication-Results: spf=none (sender IP is )
 smtp.mailfrom=kevin@darbyshire-bryant.me.uk; 
X-Microsoft-Antispam-PRVS: &lt;AM0PR07MB4242A94DC4CA0C2F737DED06A5710@AM0PR07MB4242.eurprd07.prod.outlook.com&gt;
X-Exchange-Antispam-Report-Test: UriScan:;
X-MS-Exchange-SenderADCheck: 1
X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0;
 RULEID:(6040522)(2401047)(8121501046)(5005006)(3002001)(3231254)(944501410)(52105095)(10201501046)(93006095)(93001095)(149027)(150027)(6041310)(20161123560045)(20161123562045)(20161123564045)(20161123558120)(2016111802025)(6043046)(6072148)(201708071742011)(7699016);
 SRVR:AM0PR07MB4242; BCL:0; PCL:0; RULEID:; SRVR:AM0PR07MB4242; 
X-Microsoft-Exchange-Diagnostics: 1; AM0PR07MB4242;
 4:yqQGVTHNOH6dRgGQb9NmyNkIQUTzXHRPrzZtS8NQu87Ytt1umQElUK2FHOFZxZFlcW0oV6Xi51sUES7DZR/2dwwG7JfP9B36IiqjJk2TQMFtv66Pi16tExdjxXWWOrI/Xq08m66Mn9DbV6tjfmqbYAIStIczYDtFMZmTZcqy98vIhix8vGzRjLoIK0mJ/bpey8N64llw1bKFa/NcqK4uKrpO3mIryZBwgE9v1BfgAjBG9NtHaSs8Vi3vSnVqCwC2IbQbEX3HOHhnmo74zDvreA==
X-Forefront-PRVS: 0707248B64
X-Forefront-Antispam-Report: SFV:NSPM;
 SFS:(10009020)(39380400002)(346002)(396003)(366004)(376002)(39830400003)(199004)(189003)(74482002)(2361001)(59450400001)(47776003)(8936002)(50226002)(81166006)(478600001)(52116002)(48376002)(3846002)(81156014)(1076002)(8676002)(66066001)(2351001)(7696005)(7736002)(105586002)(51416003)(50466002)(97736004)(6116002)(106356001)(68736007)(25786009)(305945005)(4326008)(6666003)(476003)(6486002)(486006)(316002)(2616005)(16586007)(1857600001)(186003)(6916009)(386003)(26005)(107886003)(5660300001)(956004)(16526019)(53936002)(2906002)(36756003)(169013001);
 DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR07MB4242;
 H:Kevins-MBP.lan.darbyshire-bryant.me.uk; FPR:; SPF:None; LANG:en;
 PTR:InfoNoRecords; A:1; MX:1; 
Received-SPF: None (protection.outlook.com: darbyshire-bryant.me.uk does not
 designate permitted sender hosts)
X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM0PR07MB4242;
 23:Ndc8LvxP48gP2FCzQVDM83olqV/yNzbnWb2xttnim?=
 =?us-ascii?Q?T7OGLJQbU1xBRebz6aZMSLfr8MybseC3wU+EzLVon9xF/mRyj5xa1Srv+dwi?=
 =?us-ascii?Q?bsSLxkNdw/wg5vxrWpAJcYsrf/LvXeRN2UErIMZNF6t+1RC0a0KGASX2xg23?=
 =?us-ascii?Q?xldPXWL8kxHhBQOqqvZrowcBgSb5cRl92QHw2B2V8Fehfw35eKZWZfXe0UoZ?=
 =?us-ascii?Q?Yx6rtHZJi5p9wgFk9GytCxE3Sx/xkSttgkfmZ50uTOv86eVB1bvO7QAlND4j?=
 =?us-ascii?Q?bizPJWIVuMxK+7qQuwRuidyrwC9oSXX53ljFJISD/x7Fu3MMvEGbmBxXu/kC?=
 =?us-ascii?Q?3S/CB6jLcYTijxTTe23Sff2D+iWO+CbXjUmP/ve5BDaaal2hh677BHf6888m?=
 =?us-ascii?Q?+xbksHll7BRmlw8R2qghNNJnhX/k6DV09zMK9Nvp2wkoK45MXzcc5+DoUnZM?=
 =?us-ascii?Q?NENt0ICTdbeSq+oN9f1qIQ3xdpHegS5QoM7aihyqAgi6/8l5bCJw/iCpxYAh?=
 =?us-ascii?Q?6e80F6xAYPDW81UJFUtyXA1FliWxZwhzT0jvQtXU384K6gdBEcn3wmJ5/f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z6FLN8wMCc1FnBORwgqwf+tBv/g/ZW6WqKkx3knkAGCB3XuXgNShZ1644/ShCVUa9EzEIQjfTI0jVQ
X-OriginatorOrg: darbyshire-bryant.me.uk
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jun 2018 09:08:52.0983 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: 53edba94-f28f-4ae3-7f3f-08d5d4fb1c73
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 9151708b-c553-406f-8e56-694f435154a4
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR07MB4242
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 
X-CRM114-CacheID: sfid-20180618_020905_670726_E8F82F6C 
X-CRM114-Status: UNSURE (   8.66  )
X-CRM114-Notice: Please train this message.
X-Spam-Score: -0.1 (/)
X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary:
 Content analysis details:   (-0.1 points)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at http://www.dnswl.org/, no
 trust [104.47.1.58 listed in list.dnswl.org]
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
 -0.0 SPF_PASS               SPF: sender matches SPF record
 -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
 -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's
 domain
 0.1 DKIM_SIGNED            Message has a DKIM or DK signature,
 not necessarily valid

When upstream kernel introduced commit c55fa3cccbc2c672e7f118be8f7484e53a8e9e77
we incorrectly updated our hack integration patch that updates atm/common.c

+++ b/net/atm/common.c
@@ -62,10 +62,16 @@ static void vcc_remove_socket(struct soc
        write_unlock_irq(&amp;vcc_sklist_lock);
 }

+struct sk_buff* (*ifx_atm_alloc_tx)(struct atm_vcc *, unsigned int) = NULL;
+EXPORT_SYMBOL(ifx_atm_alloc_tx);
+
 static bool vcc_tx_ready(struct atm_vcc *vcc, unsigned int size)
 {
        struct sock *sk = sk_atm(vcc);

+       if (ifx_atm_alloc_tx != NULL)
+               return ifx_atm_alloc_tx(vcc, size)

The correct solution is to drop our ifx_atm_alloc_tx replacement hack
entirely and let the kernel do its thing.

In reality neither pppoatm or BR2684 interfaces actually hit this code,
so the incorrect integration would only be noticed with direct socket
calls which we are unaware of a use-case.

This is not the solution to pppoatm vc-mux failing to work which started
the whole investigation, but let's fix it up anyway.

With sincerest thanks to David Woodhouse &lt;dwmw2@infradead.org&gt; &amp;
Mathias Kresin &lt;dev@kresin.me&gt;.

Tested-on: lantiq, BT HomeHub 5a

Signed-off-by: Kevin Darbyshire-Bryant &lt;ldir@darbyshire-bryant.me.uk&gt;
---
 .../patches-4.14/0004-MIPS-lantiq-add-atm-hack.patch  | 19 -------------------
 1 file changed, 19 deletions(-)

diff --git a/target/linux/lantiq/patches-4.14/0004-MIPS-lantiq-add-atm-hack.patch b/target/linux/lantiq/patches-4.14/0004-MIPS-lantiq-add-atm-hack.patch
index 2c73cec55c..66ca2fd5ac 100644
--- a/target/linux/lantiq/patches-4.14/0004-MIPS-lantiq-add-atm-hack.patch
+++ b/target/linux/lantiq/patches-4.14/0004-MIPS-lantiq-add-atm-hack.patch
@@ -467,25 +467,6 @@ Signed-off-by: John Crispin &lt;blogic@openwrt.org&gt;
  struct atm_trafprm {
  	unsigned char	traffic_class;	/* traffic class (ATM_UBR, ...) */
  	int		max_pcr;	/* maximum PCR in cells per second */
---- a/net/atm/common.c
-+++ b/net/atm/common.c
-@@ -62,10 +62,16 @@ static void vcc_remove_socket(struct soc
- 	write_unlock_irq(&amp;vcc_sklist_lock);
- }
- 
-+struct sk_buff* (*ifx_atm_alloc_tx)(struct atm_vcc *, unsigned int) = NULL;
-+EXPORT_SYMBOL(ifx_atm_alloc_tx);
-+
- static bool vcc_tx_ready(struct atm_vcc *vcc, unsigned int size)
- {
- 	struct sock *sk = sk_atm(vcc);
- 
-+	if (ifx_atm_alloc_tx != NULL)
-+		return ifx_atm_alloc_tx(vcc, size);
-+
- 	if (sk_wmem_alloc_get(sk) &amp;&amp; !atm_may_send(vcc, size)) {
- 		pr_debug(&quot;Sorry: wmem_alloc = %d, size = %d, sndbuf = %d\n&quot;,
- 			 sk_wmem_alloc_get(sk), size, sk-&gt;sk_sndbuf);
 --- a/net/atm/proc.c
 +++ b/net/atm/proc.c
 @@ -155,7 +155,7 @@ static void *vcc_seq_next(struct seq_fil
-- 
2.15.2 (Apple Git-101.1)


]