From patchwork Sat Mar 6 02:06:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Lipnitskiy X-Patchwork-Id: 1448332 X-Patchwork-Delegate: daniel@makrotopia.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1:d65d:64ff:fe57:4e05; helo=desiato.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=desiato.20200630 header.b=IwEhIRsL; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=kDYzvyqb; dkim-atps=neutral Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Dsp1r5GsPz9sW1 for ; Sat, 6 Mar 2021 13:09:03 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=OR4IylZQXUIOVhP9077xtJrKh06rQpGUhffCzuZuJU0=; b=IwEhIRsLDoESMHjxy2JQhpwoOI GaQRuXZG4gwGV1nRr7JUkvAG/74AWFg1x870UxnphOZXw2rJGlCMh19N8ZeUiDIsNwYBzY8/1Eo46 YKJ83guQ2sMen308n2sOlchTVtoorYmYKyHXNvT5ItAy2bbv5QT2iTepTTqDsCqS96v1sbaOWkPMw X9DdIHVk1Ue04lWDs7I4Upkc7ILiqf9zMXhRx+3vkh8q+jtU+VPaewicj7uh4vBTeylIPN1g11pEY Zzqw6AEv9uRVnJP5ofmkfVZjCu+Pxq2+26IWlQmqMs911ubcJPnxoBRR+1Fky49iwF05NdCDT3a1b PgmmnijQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lIMKh-000LYc-Df; Sat, 06 Mar 2021 02:06:19 +0000 Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lIMKc-000LX6-6K for openwrt-devel@lists.openwrt.org; Sat, 06 Mar 2021 02:06:16 +0000 Received: by mail-pg1-x529.google.com with SMTP id o38so2556727pgm.9 for ; Fri, 05 Mar 2021 18:06:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=JoP/ecKqdiWriHEY0rX15VKayP7VNcFUpOq5yzLT/FE=; b=kDYzvyqbpCkaMz7JKLsqrXkOM+nDEUzqwIkbjbVesqYqYDBZNm0oJzqVVF7+1M+yQd p38f9mYN6eXSNbNv9JdLpTuVMnVc5GtBA4v2xBUFQ1YigooLpRwMyuuWpoC90KJEghMB c55Z0MBvZoufWGfj/j8mYyFxoqdN0de3u8JTZJSh8O5QooYgnCt4+eiLqyMxlphjJqPD aHKUylIa3gfhxykGtEFSSgoCE2sAROz+ZwipnKqeExV7SiFUg3Mkt09bLL00ib+/LVwL jir5Nt6vPFXtcnA29/C1eda1RosFjbY7iqs8lZibpPlFEQr4AUF/viLY4ZQ0OQ5X4Iv8 rxPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=JoP/ecKqdiWriHEY0rX15VKayP7VNcFUpOq5yzLT/FE=; b=qlIVbol4PrlwAI1wvbIirKfk/OisETOwKKD3yIvTVY/nIPo0V7uP3f/xepuY3LJme4 NUZ1dH+HKgqSyBBRFCRO6p7ywUJ2MFbfAGBYZptPBkawu5goKPL8qdmRhb2bF/m6V0eX 3cyPgzNyIMrRP7NyP5jen60EIVOD/+1NK407r/m3Jfh/193JM10bYNOCugJ5YshehzM1 LH3tFcH2LmNh7XZtbAAuWzNj6zSCkglxrBygyNIaISP5EhTowvA3D1MOxOOFiBbsr/IA dj0jPLRltl5+Zobkni/1TuWDU4nA2w9S2E/ACR899BvQCRw/15jjqK7kqKoRCZs8N3xY zl2Q== X-Gm-Message-State: AOAM532+BcLo26OBNQmVIakwboQJ9aXmiHMFz058ITBdEHHcbNPZ0WBi 56yI8kgXY/f8zgs56tqv70i86xjNXTHllhJQ X-Google-Smtp-Source: ABdhPJyo3V+H8u8TCXqFt9PlgstUvzTwfPMYvA8zJiKmNaNqXYcHRfU0MPaRIJwDc8ioEnVwNJauBw== X-Received: by 2002:a65:5bc5:: with SMTP id o5mr10851123pgr.17.1614996372182; Fri, 05 Mar 2021 18:06:12 -0800 (PST) Received: from ilya-fury.hpicorp.net ([2602:3f:e6a6:5d00::b87]) by smtp.gmail.com with ESMTPSA id w203sm163849pfc.188.2021.03.05.18.06.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Mar 2021 18:06:11 -0800 (PST) From: Ilya Lipnitskiy To: openwrt-devel@lists.openwrt.org Cc: Ilya Lipnitskiy , Christian Lamparter Subject: [PATCH] kernel: fix kmod-usb3 dependencies Date: Fri, 5 Mar 2021 18:06:02 -0800 Message-Id: <20210306020602.3016799-1-ilya.lipnitskiy@gmail.com> X-Mailer: git-send-email 2.30.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210306_020614_473412_4D068A06 X-CRM114-Status: GOOD ( 11.03 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "desiato.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Adding CONFIG_USB_XHCI_PCI_RENESAS to KCONFIG made it so it was set for all targets that included kmod-usb3, not just the intended apm821xx/nand. xhci-pci has a dependency on xhci-pci-renesas if CONFI [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:529 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [ilya.lipnitskiy[at]gmail.com] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Adding CONFIG_USB_XHCI_PCI_RENESAS to KCONFIG made it so it was set for all targets that included kmod-usb3, not just the intended apm821xx/nand. xhci-pci has a dependency on xhci-pci-renesas if CONFIG_USB_XHCI_PCI_RENESAS is set, breaking kmod-usb3 builds on Linux 5.10 on all other targets. Rework the dependencies by breaking out xhci-hcd, xhci-mtk, and xhci-pci-renesas into new hidden kernel modules and setting kmod-usb3 dependencies properly. Tested by building mt7621 and apm821xx/nand with kmod-usb3 on Linux 5.10 Fixes: be23f981 ("apm821xx: add support for kernel 5.10") Cc: Christian Lamparter Signed-off-by: Ilya Lipnitskiy --- package/kernel/linux/modules/usb.mk | 82 ++++++++++++++++++++++------- 1 file changed, 62 insertions(+), 20 deletions(-) diff --git a/package/kernel/linux/modules/usb.mk b/package/kernel/linux/modules/usb.mk index 1f72d89512..1a45fb3670 100644 --- a/package/kernel/linux/modules/usb.mk +++ b/package/kernel/linux/modules/usb.mk @@ -1649,34 +1649,22 @@ endef $(eval $(call KernelPackage,usbmon)) -XHCI_MODULES := xhci-hcd xhci-pci xhci-plat-hcd -ifdef CONFIG_TARGET_ramips_mt7621 - XHCI_MODULES += xhci-mtk -endif -ifndef CONFIG_LINUX_5_4 - ifdef CONFIG_TARGET_apm821xx_nand - XHCI_MODULES += xhci-pci-renesas - endif -endif -XHCI_FILES := $(wildcard $(patsubst %,$(LINUX_DIR)/drivers/usb/host/%.ko,$(XHCI_MODULES))) -XHCI_AUTOLOAD := $(patsubst $(LINUX_DIR)/drivers/usb/host/%.ko,%,$(XHCI_FILES)) - define KernelPackage/usb3 TITLE:=Support for USB3 controllers DEPENDS:= \ + +kmod-usb-xhci-hcd \ +TARGET_bcm53xx:kmod-usb-bcma \ - +TARGET_bcm53xx:kmod-phy-bcm-ns-usb3 + +TARGET_bcm53xx:kmod-phy-bcm-ns-usb3 \ + +TARGET_ramips_mt7621:kmod-usb-xhci-mtk \ + +(TARGET_apm821xx_nand&&LINUX_5_10):kmod-usb-xhci-pci-renesas KCONFIG:= \ CONFIG_USB_PCI=y \ - CONFIG_USB_XHCI_HCD \ CONFIG_USB_XHCI_PCI \ - CONFIG_USB_XHCI_PLATFORM \ - CONFIG_USB_XHCI_MTK \ - CONFIG_USB_XHCI_PCI_RENESAS \ - CONFIG_USB_XHCI_HCD_DEBUGGING=n + CONFIG_USB_XHCI_PLATFORM FILES:= \ - $(XHCI_FILES) - AUTOLOAD:=$(call AutoLoad,54,$(XHCI_AUTOLOAD),1) + $(LINUX_DIR)/drivers/usb/host/xhci-pci.ko \ + $(LINUX_DIR)/drivers/usb/host/xhci-plat-hcd.ko + AUTOLOAD:=$(call AutoLoad,54,xhci-pci xhci-plat-hcd,1) $(call AddDepends/usb) endef @@ -1719,6 +1707,60 @@ endef $(eval $(call KernelPackage,usb-roles)) +define KernelPackage/usb-xhci-hcd + TITLE:=xHCI HCD (USB 3.0) support + KCONFIG:= \ + CONFIG_USB_XHCI_HCD \ + CONFIG_USB_XHCI_HCD_DEBUGGING=n + HIDDEN:=1 + FILES:=$(LINUX_DIR)/drivers/usb/host/xhci-hcd.ko + AUTOLOAD:=$(call AutoLoad,54,xhci-hcd,1) + $(call AddDepends/usb) +endef + +define KernelPackage/usb-xhci-hcd/description + The eXtensible Host Controller Interface (xHCI) is standard for USB 3.0 + "SuperSpeed" host controller hardware. +endef + +$(eval $(call KernelPackage,usb-xhci-hcd)) + + +define KernelPackage/usb-xhci-mtk + TITLE:=xHCI support for MediaTek SoCs + DEPENDS:=+kmod-usb-xhci-hcd + KCONFIG:=CONFIG_USB_XHCI_MTK + HIDDEN:=1 + FILES:=$(LINUX_DIR)/drivers/usb/host/xhci-mtk.ko + AUTOLOAD:=$(call AutoLoad,54,xhci-mtk,1) + $(call AddDepends/usb) +endef + +define KernelPackage/usb-xhci-mtk/description + Kernel support for the xHCI host controller found in MediaTek SoCs. +endef + +$(eval $(call KernelPackage,usb-xhci-mtk)) + + +define KernelPackage/usb-xhci-pci-renesas + TITLE:=Support for additional Renesas xHCI controller with firmware + DEPENDS:=@LINUX_5_10 + KCONFIG:=CONFIG_USB_XHCI_PCI_RENESAS + HIDDEN:=1 + FILES:=$(LINUX_DIR)/drivers/usb/host/xhci-pci-renesas.ko + AUTOLOAD:=$(call AutoLoad,54,xhci-pci-renesas,1) + $(call AddDepends/usb) +endef + +define KernelPackage/usb-xhci-pci-renesas/description + Kernel support for the Renesas xHCI controller with firmware. Make sure you have + the firwmare for the device and installed on your system for this device to work. +endef + +$(eval $(call KernelPackage,usb-xhci-pci-renesas)) + + define KernelPackage/chaoskey SUBMENU:=$(USB_MENU) TITLE:=Chaoskey hardware RNG support