Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp4222588rdb; Thu, 28 Dec 2023 14:41:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IFSYIPHbXy8Kix1hKnB7DhQST7vEj6Fm/g2VldLzJA7nluax3A/kZ6eyB8phEax9SXxqsnS X-Received: by 2002:a05:600c:3ac7:b0:40d:746b:9a3a with SMTP id d7-20020a05600c3ac700b0040d746b9a3amr145146wms.210.1703803306867; Thu, 28 Dec 2023 14:41:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703803306; cv=none; d=google.com; s=arc-20160816; b=ZIdy23dyvLsHOKm42blV9H+ChuxuNinujXr4aEYOmmNyhUNBDACWR23lQtOnp04wFL IFsWh8U8TGggTo6JaWxPQYYxXJBUS0OyxbNwPYfhNWtFePBMvJR3uP/hcltg0/pdWzKY 4YxPFzmfHFUutIdNHza8XMU+8NPlIsP6a1/0DRX8qqKllZB5ku/5DfVyj5qI4exNi+x7 wmpSxQ3M/m4qvyPibdaFMmX6yE90vikx0NMuw1bjgGG6qu3eonvEwIJV5Zrbo6xonZ6W rvEb0rftP9mQAkz+d91j5yd7VjwGIw4WLnA0jsnOxwsQXXS7TGXR49fg5f/sokqBMRz4 qPRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:autocrypt:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=1PueYTUazTPpHnwhQRzKwhjTYR9smLI63zbmqNDz8nQ=; fh=XRV8l/87ds9z8gPQ5r0tWhmzUybYkZ+Wl6SFxtF5jV0=; b=i7D4FZ8ibxoWkO+cyvCmffZTq0i+I3+txkj1uVIf7iEeHXxla/9+oD3uJXsiYvdm8f Tb0bYlrZw8vCv8y+r4r49dc4w0836pYnUxX2SMmaAS9V6u/2L/Dc8E4yRp13925xH6un J0ENPYks1+vDwsmpfPqZSQdZ5DzNLXTemdpLpjwJPp6MUAI01BZ5xQ/uJaZfYrtGs86G LGxleSRnWCwF6xD40SFk356u0M7NHnIV9BfYTWG7Ot/cTTqwXzo4x3E7QJO8YcrrxbE9 jQ2je6JUNj1i1UyFy3oRfXT0MaD4XK0LEEKMyizG9WXY8ywwP+EiW4gRphFCK7P9Lflm ZPSw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-12873-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12873-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id h2-20020a17090634c200b00a26adbd5c82si6750471ejb.29.2023.12.28.14.41.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Dec 2023 14:41:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-12873-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-12873-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12873-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 739DA1F22B12 for ; Thu, 28 Dec 2023 22:41:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 21FD310A05; Thu, 28 Dec 2023 22:41:35 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from mx.skole.hr (mx2.hosting.skole.hr [161.53.165.186]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ECECE107BC; Thu, 28 Dec 2023 22:41:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=skole.hr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=skole.hr Received: from mx2.hosting.skole.hr (localhost.localdomain [127.0.0.1]) by mx.skole.hr (mx.skole.hr) with ESMTP id 1DD4D84630; Thu, 28 Dec 2023 23:36:16 +0100 (CET) From: Duje =?utf-8?B?TWloYW5vdmnEhw==?= To: Greg Kroah-Hartman , Hardik Gajjar , Richard Acayan Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] usb: gadget: u_ether: Re-attach netif device to mirror detachment Date: Thu, 28 Dec 2023 23:36:02 +0100 Message-ID: <6019329.lOV4Wx5bFT@radijator> In-Reply-To: <20231218164532.411125-2-mailingradian@gmail.com> References: <20231218164532.411125-2-mailingradian@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Autocrypt: addr=duje.mihanovic@skole.hr; keydata= mQINBGBhuA8BEACtpIbYNfUtQkpVqgHMPlcQR/vZhB7VUh5S32uSyerG28gUxFs2be//GOhSHv+ DilYp3N3pnTdu1NPGD/D1bzxpSuCz6lylansMzpP21Idn3ydqFydDTduQlvY6nqR2p5hndQg6II pmVvNZXLyP2B3EE1ypdLIm6dJJIZzLm6uJywAePCyncRDJY0J7mn7q8Nwzd6LG74D8+6+fKptFS QYI8Ira7rLtGZHsbfO9MLQI/dSL6xe8ZTnEMjQMAmFvsd2M2rAm8YIV57h/B8oP5V0U4/CkHVho m+a2p0nGRmyDeluQ3rQmX1/m6M5W0yBnEcz5yWgVV63zoZp9EJu3NcZWs22LD6SQjTV1X8Eo999 LtviIj2rIeCliozdsHwv3lN0BzTg9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BhZOdGebRBdlBc pairvr/BWYns74sLvTbGXoCGOA0Wj1heRlphYWFOHvYARRucYRKCJTvnrbtZ0hNVCZPq5ryS9tL ijVD54V0yWkE8wAqQNf9hag5zlFMfKjmKphzJRbstqlIf0B0oY3NgLZ4ExWa8wJxs+p4pUZd9m+ 6fDfimjuLtlBphjsHfwrgs69g8RqJlEsgsDrWu7zsWraK/jTyuPK6GuNe4AWemRUaZZmhMYnCxU p8AXRgtzZw2vsqERylx1Ug35G/xRIVrjf9bU2fersVWLR3JZ/rJwdjev4cJqzqJ9nBzblHky3K1 cqiNEM/CU+JLBsZMc4jti/3tDv8VKfZiwLMIsVrfPgTM/97CCW3QDwVcreUGx81kemiAweXENWk MGQfJ+8rfAdLHf7iECLWLtrqyfYFQCZGhA5rPPr27TjOLaLV5ObMMBsUY= Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" On Monday, December 18, 2023 17:45:33 CET, Richard Acayan wrote: > In 6.7-rc1, there was a netif_device_detach call added to the > gether_disconnect function. This clears the __LINK_STATE_PRESENT bit of > the netif device and suppresses pings (ICMP messages) and TCP connection > requests from the connected host. If userspace temporarily disconnects > the gadget, such as by temporarily removing configuration in the gadget > configfs interface, network activity should continue to be processed > when the gadget is re-connected. Mirror the netif_device_detach call > with a netif_device_attach call in gether_connect to fix re-connecting > gadgets. This fixes the NCM gadget on the PXA1908 phone Luca mentioned on v6.7-rc7. Tested-by: Duje Mihanovi=C4=87 Regards, Duje