From nobody Thu Apr 9 12:50:37 2026 Received: from mail-pl1-f202.google.com (mail-pl1-f202.google.com [209.85.214.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6EC063A9D88 for ; Mon, 9 Mar 2026 12:05:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773057927; cv=none; b=sQS31jLYuboWRRFtBUifa3Zia2sZLUH9C7t7nrVGinyIK5enu33qjVxZv3c9f8gif0HJpf9UxfjfFmMJVzE4HM6fkLFDPBZ3Q6Iaj+FGN6ePIsHFZoLM9q3fjSBQUQnDGXcL+F3/H7JMixG5/rXma6ebnl3DWVjUHGoSB84msw4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773057927; c=relaxed/simple; bh=VjRaSPsUVE+x/Xi7XlDdoEy4TQXTYs9VwSowe6Il3dE=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=VLuL6lP+MoUPGvPFGmfiPgOdgfR9WOQrum08CxM8zHJH9LHcMQaLc3LWZu8AUhu9lqFthc9zzLiu4emDQUKcW7FFgloj4dIPQK+K8G42JrxIBLhNfui9UesYByr5eRrkMAyhWU/fYyoCCsw1Ur4hDsb5kR5BYTC1uxKnWbWWhv0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--khtsai.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=mtlORqIy; arc=none smtp.client-ip=209.85.214.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--khtsai.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="mtlORqIy" Received: by mail-pl1-f202.google.com with SMTP id d9443c01a7336-2ae3e462daeso42902325ad.0 for ; Mon, 09 Mar 2026 05:05:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1773057926; x=1773662726; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=ABqRA1fkx2Iasdc5RcVowDEiALyuzvn89TbSr3zsxLo=; b=mtlORqIydu3tyjgEfy7K++xJQi49Mg0jhI0yUW4yYgPtVCcS6hbx80qktKkOxVUtGz 5VUUafIDUkCZWBtFyJvWRc2iRzuwQPiy74s+nckd1cr7mB4rdOlUOHAKNGIvEdRH86PQ siu8Ho3TDo9JacVYFdz3IsEY941gAA+gjha5L0rQdjpViZQOJOHk7K8QS2f0mQIkTioF Sq+ctyXRxwJmBQX9aFl8NzC5D4CvVMJAhXTJcfp/QH9qWbi/5OYhcxARYbTTtS6vaaue yNL5LTBbu3sfPuKG1+FQ7olKGwdWL+oGHSP8KEBbpDXT4aa1a5ILt2+Gej6hCecmeoJ3 5oPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1773057926; x=1773662726; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ABqRA1fkx2Iasdc5RcVowDEiALyuzvn89TbSr3zsxLo=; b=L9cKiibrl9fvuEkj5tIeBtl5mtluMMjA3NmhS4JgJ0zX2LprK/ZdDXnhfYgXkNQlBn Ut4Z5bEIXkUFoXTgF9T4lXLAZBabdNO3HRnSIxVRj16qocVi58mAqmlcyw9I5Z0oWy0l oP4PYr4v5320J3HuiOsTDyyZZI111OuveuEIklBBr7xgCI+3j/o8O6KJupd94BL63w+R 4WPDVH/Gqy/f4bWb3AVcROhtXt6xPqqR08UlNN2E7WtE9/c+cGRZr51MNbyga3s1DIyY SrKmpZgYDdFVGF9dC9oLV6RtiZxJi4eN0oJXjrgALLwXCR45QvsLDBk7gh2HKPb1HCZE ymlw== X-Forwarded-Encrypted: i=1; AJvYcCVHY+a6SsYl5DbMHUbciq5zDOyB9GARr9n8UACnF9eEIvmDDtNzRnKBVL82giNOC9lSrPcoxc829lz35co=@vger.kernel.org X-Gm-Message-State: AOJu0Yx7MtyPCcFq04yNTqGoLSez9koY9jJn7JPEuWBX13bAXjWuMPMh mAPYRdnaNj6Sl6XGU3SfrBIIG8f4dIMhb7rbpPW5UnJ4mDLorFS651bmKHfDFh9YDyk8RC/nAfw TFi8aug== X-Received: from plbkh13.prod.google.com ([2002:a17:903:64d:b0:2ae:6338:73bd]) (user=khtsai job=prod-delivery.src-stubby-dispatcher) by 2002:a17:902:cf08:b0:2ae:4e20:9d05 with SMTP id d9443c01a7336-2ae824dd318mr105187195ad.35.1773057925753; Mon, 09 Mar 2026 05:05:25 -0700 (PDT) Date: Mon, 09 Mar 2026 20:04:50 +0800 In-Reply-To: <20260309-f-ncm-revert-v2-0-ea2afbc7d9b2@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260309-f-ncm-revert-v2-0-ea2afbc7d9b2@google.com> X-Developer-Key: i=khtsai@google.com; a=ed25519; pk=abA4Pw6dY2ZufSbSXW9mtp7xiv1AVPtgRhCFWJSEqLE= X-Developer-Signature: v=1; a=ed25519-sha256; t=1773057914; l=2006; i=khtsai@google.com; s=20250916; h=from:subject:message-id; bh=VjRaSPsUVE+x/Xi7XlDdoEy4TQXTYs9VwSowe6Il3dE=; b=eZH/YwaVqvhmkVfOaxIxfPQzVR1AH6vNtrWh1DD/LMuzoOAP4fCC+EE+cDPDdFgPpbK2hPNjR QCyHGW32ZULCZsHrLKMD7bwqa3JUv1CqztgOwj6EU41N3fGkEFxdl8V X-Mailer: b4 0.14.3 Message-ID: <20260309-f-ncm-revert-v2-5-ea2afbc7d9b2@google.com> Subject: [PATCH v2 5/7] Revert "usb: gadget: u_ether: use header file" From: Kuen-Han Tsai To: Greg Kroah-Hartman , Felipe Balbi , Kyungmin Park Cc: David Heidelberg , Ernest Van Hoecke , Jon Hunter , LI Qingwu , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Kuen-Han Tsai Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This reverts commit 7a7930c0f934fb0c46de6e7ca08e14e11df35dd6. This commit is being reverted as part of a series-wide revert. By deferring the net_device allocation to the bind() phase, a single function instance will spawn multiple network devices if it is symlinked to multiple USB configurations. This causes regressions for userspace tools (like the postmarketOS DHCP daemon) that rely on reading the interface name (e.g., "usb0") from configfs. Currently, configfs returns the template "usb%d", causing the userspace network setup to fail. Crucially, because this patch breaks the 1:1 mapping between the function instance and the network device, this naming issue cannot simply be patched. Configfs only exposes a single 'ifname' attribute per instance, making it impossible to accurately report the actual interface name when multiple underlying network devices can exist for that single instance. All configurations tied to the same function instance are meant to share a single network device. Revert this change to restore the 1:1 mapping by allocating the network device at the instance level (alloc_inst). Reported-by: David Heidelberg Closes: https://lore.kernel.org/linux-usb/70b558ea-a12e-4170-9b8e-c95113124= 9af@ixit.cz/ Fixes: 56a512a9b410 ("usb: gadget: f_ncm: align net_device lifecycle with b= ind/unbind") Signed-off-by: Kuen-Han Tsai --- drivers/usb/gadget/function/u_ether_configfs.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/gadget/function/u_ether_configfs.h b/drivers/usb/g= adget/function/u_ether_configfs.h index 217990a266b2..39d3a261496d 100644 --- a/drivers/usb/gadget/function/u_ether_configfs.h +++ b/drivers/usb/gadget/function/u_ether_configfs.h @@ -14,7 +14,6 @@ #define __U_ETHER_CONFIGFS_H =20 #include -#include #include #include #include --=20 2.53.0.473.g4a7958ca14-goog