From patchwork Thu Jun 18 09:42:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 11611693 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7BA0C138C for ; Thu, 18 Jun 2020 09:44:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6593321D7F for ; Thu, 18 Jun 2020 09:44:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592473442; bh=i9JeJIALNjzTrIEVjDmpg7b8gg3dE54NRITDfTxUC7c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=lJwx+Q4DzCANbCVn8swKUohfTQBobX0c73150EyPQzcIO5Da+tZI3j5LGn8fZATF0 zH3W31lI0ZwY0kVlniweOCKF+JJ3rEiCeZbnNSLEBFsco9PpEq34G6HwUmT9t5Dw8s Ry+SE75Q7NvyOoKAubabLIWJG75Jy6+GC9VdgCe0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729171AbgFRJnM (ORCPT ); Thu, 18 Jun 2020 05:43:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:43514 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728568AbgFRJnK (ORCPT ); Thu, 18 Jun 2020 05:43:10 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AC0DA21548; Thu, 18 Jun 2020 09:43:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592473389; bh=i9JeJIALNjzTrIEVjDmpg7b8gg3dE54NRITDfTxUC7c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=S+rW7gFjAnZDhzVV5EeTL2h4bim5p831/I8lqdr9sK4UzwRsUSd31pNW0raTblHH5 EJemjIGPptDv5Tn8O/arGpXtKtO1g7GiYFaprYbxJuFRJ4FzLi1jCHEbejwGRyuxXv 2R0SbLO+ivz1L0sRe1p/nhAjmK7FmL1ON+8D1PTE= From: Greg Kroah-Hartman To: linux-usb@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Johan Hovold , Alan Stern , Richard Dodd , Hans de Goede , Jonathan Cox , Bastien Nocera , =?utf-8?q?Thi=C3=A9baud_Weksteen?= , Nishad Kamdar Subject: [PATCH 1/8] USB: rename USB quirk to USB_QUIRK_ENDPOINT_IGNORE Date: Thu, 18 Jun 2020 11:42:53 +0200 Message-Id: <20200618094300.1887727-2-gregkh@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200618094300.1887727-1-gregkh@linuxfoundation.org> References: <20200618094300.1887727-1-gregkh@linuxfoundation.org> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org The USB core has a quirk flag to ignore specific endpoints, so rename it to be more obvious what this quirk does. Cc: Johan Hovold Cc: Alan Stern Cc: Richard Dodd Cc: Hans de Goede Cc: Jonathan Cox Cc: Bastien Nocera Cc: "Thiébaud Weksteen" Cc: Nishad Kamdar Signed-off-by: Greg Kroah-Hartman Reviewed-by: Bastien Nocera --- drivers/usb/core/config.c | 8 ++++---- drivers/usb/core/quirks.c | 18 +++++++++--------- drivers/usb/core/usb.h | 2 +- include/linux/usb/quirks.h | 4 ++-- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c index b7918f695434..37442f423a41 100644 --- a/drivers/usb/core/config.c +++ b/drivers/usb/core/config.c @@ -298,10 +298,10 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno, goto skip_to_next_endpoint_or_interface_descriptor; } - /* Ignore blacklisted endpoints */ - if (udev->quirks & USB_QUIRK_ENDPOINT_BLACKLIST) { - if (usb_endpoint_is_blacklisted(udev, ifp, d)) { - dev_warn(ddev, "config %d interface %d altsetting %d has a blacklisted endpoint with address 0x%X, skipping\n", + /* Ignore some endpoints */ + if (udev->quirks & USB_QUIRK_ENDPOINT_IGNORE) { + if (usb_endpoint_is_ignored(udev, ifp, d)) { + dev_warn(ddev, "config %d interface %d altsetting %d has an ignored endpoint with address 0x%X, skipping\n", cfgno, inum, asnum, d->bEndpointAddress); goto skip_to_next_endpoint_or_interface_descriptor; diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c index 3e8efe759c3e..20dccf34182d 100644 --- a/drivers/usb/core/quirks.c +++ b/drivers/usb/core/quirks.c @@ -359,7 +359,7 @@ static const struct usb_device_id usb_quirk_list[] = { /* Sound Devices USBPre2 */ { USB_DEVICE(0x0926, 0x0202), .driver_info = - USB_QUIRK_ENDPOINT_BLACKLIST }, + USB_QUIRK_ENDPOINT_IGNORE }, /* Keytouch QWERTY Panel keyboard */ { USB_DEVICE(0x0926, 0x3333), .driver_info = @@ -493,24 +493,24 @@ static const struct usb_device_id usb_amd_resume_quirk_list[] = { }; /* - * Entries for blacklisted endpoints that should be ignored when parsing - * configuration descriptors. + * Entries for endpoints that should be ignored when parsing configuration + * descriptors. * - * Matched for devices with USB_QUIRK_ENDPOINT_BLACKLIST. + * Matched for devices with USB_QUIRK_ENDPOINT_IGNORE. */ -static const struct usb_device_id usb_endpoint_blacklist[] = { +static const struct usb_device_id usb_endpoint_ignore[] = { { USB_DEVICE_INTERFACE_NUMBER(0x0926, 0x0202, 1), .driver_info = 0x85 }, { } }; -bool usb_endpoint_is_blacklisted(struct usb_device *udev, - struct usb_host_interface *intf, - struct usb_endpoint_descriptor *epd) +bool usb_endpoint_is_ignored(struct usb_device *udev, + struct usb_host_interface *intf, + struct usb_endpoint_descriptor *epd) { const struct usb_device_id *id; unsigned int address; - for (id = usb_endpoint_blacklist; id->match_flags; ++id) { + for (id = usb_endpoint_ignore; id->match_flags; ++id) { if (!usb_match_device(udev, id)) continue; diff --git a/drivers/usb/core/usb.h b/drivers/usb/core/usb.h index 19e4c550bc73..98e7d1ee63dc 100644 --- a/drivers/usb/core/usb.h +++ b/drivers/usb/core/usb.h @@ -37,7 +37,7 @@ extern void usb_authorize_interface(struct usb_interface *); extern void usb_detect_quirks(struct usb_device *udev); extern void usb_detect_interface_quirks(struct usb_device *udev); extern void usb_release_quirk_list(void); -extern bool usb_endpoint_is_blacklisted(struct usb_device *udev, +extern bool usb_endpoint_is_ignored(struct usb_device *udev, struct usb_host_interface *intf, struct usb_endpoint_descriptor *epd); extern int usb_remove_device(struct usb_device *udev); diff --git a/include/linux/usb/quirks.h b/include/linux/usb/quirks.h index 22c1f579afe3..5e4c497f54d6 100644 --- a/include/linux/usb/quirks.h +++ b/include/linux/usb/quirks.h @@ -69,7 +69,7 @@ /* Hub needs extra delay after resetting its port. */ #define USB_QUIRK_HUB_SLOW_RESET BIT(14) -/* device has blacklisted endpoints */ -#define USB_QUIRK_ENDPOINT_BLACKLIST BIT(15) +/* device has endpoints that should be ignored */ +#define USB_QUIRK_ENDPOINT_IGNORE BIT(15) #endif /* __LINUX_USB_QUIRKS_H */ From patchwork Thu Jun 18 09:42:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 11611689 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6C18C14B7 for ; Thu, 18 Jun 2020 09:43:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5517121D94 for ; Thu, 18 Jun 2020 09:43:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592473439; bh=vjhHAtX89dp52fJGjMBaXCx1opCt0jlVamfjql7G9Lo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=y+rVbXZGNjny6vnDh3+zwLkj1B7WU+elQOmmf38wb8juvuX8ZL5nHaj4DslTu0+yq 24InOttOsToSZSTecEeI4g1wEv3DthJPWRwYdycR8LRnGuvYkuQOv43SYW91jerVv2 +xLeXU7tPGDwzqM1adC+MCeNm7IomQQMrweAhwXA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729344AbgFRJnw (ORCPT ); Thu, 18 Jun 2020 05:43:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:43628 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728568AbgFRJnR (ORCPT ); Thu, 18 Jun 2020 05:43:17 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 614A721548; Thu, 18 Jun 2020 09:43:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592473396; bh=vjhHAtX89dp52fJGjMBaXCx1opCt0jlVamfjql7G9Lo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DE/EtOgB0MLEK0vpt1l55jo6m76nx5qJ/UzQM6X0TCKLWK/8qUizlPV5w4J3Tdy6y VM6y5jnruykVnFtZmoGDjuBKxZIOTzA5yxtWLD2LOccsOR/GynlvCRgWHU5p4FJ9CQ 1rABQZ/SPgutE3LSZ6yJsfIgsAOahiZ6MKm5JPU4= From: Greg Kroah-Hartman To: linux-usb@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Thomas Bogendoerfer , Bin Liu , Paul Cercueil , Alan Stern , Eugeniu Rosca , Kai-Heng Feng , David Heinzelmann , "Lee, Chiasheng" , Keiya Nobuta , Hardik Gajjar Subject: [PATCH 2/8] USB: rename USB OTG hub configuration option Date: Thu, 18 Jun 2020 11:42:54 +0200 Message-Id: <20200618094300.1887727-3-gregkh@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200618094300.1887727-1-gregkh@linuxfoundation.org> References: <20200618094300.1887727-1-gregkh@linuxfoundation.org> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org The USB OTG code has the ability to disable external hubs, but the configuration option for it is oddly named. Rename it to be more obvious as to what it does. Cc: Thomas Bogendoerfer Cc: Bin Liu Cc: Paul Cercueil Cc: Alan Stern Cc: Eugeniu Rosca Cc: Kai-Heng Feng Cc: David Heinzelmann Cc: "Lee, Chiasheng" Cc: Keiya Nobuta Cc: Hardik Gajjar Signed-off-by: Greg Kroah-Hartman --- arch/mips/configs/gcw0_defconfig | 2 +- drivers/usb/core/Kconfig | 2 +- drivers/usb/core/hub.c | 2 +- drivers/usb/musb/Kconfig | 2 +- drivers/usb/musb/musb_core.c | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/mips/configs/gcw0_defconfig b/arch/mips/configs/gcw0_defconfig index 48131cb47e66..4994749b9eaa 100644 --- a/arch/mips/configs/gcw0_defconfig +++ b/arch/mips/configs/gcw0_defconfig @@ -96,7 +96,7 @@ CONFIG_SND_SIMPLE_CARD=y CONFIG_USB_CONN_GPIO=y CONFIG_USB=y CONFIG_USB_OTG=y -CONFIG_USB_OTG_BLACKLIST_HUB=y +CONFIG_USB_OTG_DISABLE_EXTERNAL_HUB=y CONFIG_USB_OHCI_HCD=y CONFIG_USB_OHCI_HCD_PLATFORM=y CONFIG_USB_MUSB_HDRC=y diff --git a/drivers/usb/core/Kconfig b/drivers/usb/core/Kconfig index ecaacc8ed311..06bae55860e4 100644 --- a/drivers/usb/core/Kconfig +++ b/drivers/usb/core/Kconfig @@ -66,7 +66,7 @@ config USB_OTG_WHITELIST "Targeted Peripherals List". "Embedded Hosts" are likewise allowed to support only a limited number of peripherals. -config USB_OTG_BLACKLIST_HUB +config USB_OTG_DISABLE_EXTERNAL_HUB bool "Disable external hubs" depends on USB_OTG || EXPERT help diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index b1e14beaac5f..ab26ac0147f7 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -1834,7 +1834,7 @@ static int hub_probe(struct usb_interface *intf, const struct usb_device_id *id) return -E2BIG; } -#ifdef CONFIG_USB_OTG_BLACKLIST_HUB +#ifdef CONFIG_USB_OTG_DISABLE_EXTERNAL_HUB if (hdev->parent) { dev_warn(&intf->dev, "ignoring external hub\n"); return -ENODEV; diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig index 3b0d1c20ebe6..8de143807c1a 100644 --- a/drivers/usb/musb/Kconfig +++ b/drivers/usb/musb/Kconfig @@ -113,7 +113,7 @@ config USB_MUSB_JZ4740 depends on OF depends on MIPS || COMPILE_TEST depends on USB_MUSB_GADGET - depends on USB=n || USB_OTG_BLACKLIST_HUB + depends on USB=n || USB_OTG_DISABLE_EXTERNAL_HUB select USB_ROLE_SWITCH config USB_MUSB_MEDIATEK diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 384a8039a7fd..5a56a03996b1 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c @@ -1637,8 +1637,8 @@ static int musb_core_init(u16 musb_type, struct musb *musb) musb->is_multipoint = 0; type = ""; if (IS_ENABLED(CONFIG_USB) && - !IS_ENABLED(CONFIG_USB_OTG_BLACKLIST_HUB)) { - pr_err("%s: kernel must blacklist external hubs\n", + !IS_ENABLED(CONFIG_USB_OTG_DISABLE_EXTERNAL_HUB)) { + pr_err("%s: kernel must disable external hubs, please fix the configuration\n", musb_driver_name); } } From patchwork Thu Jun 18 09:42:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 11611687 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 762C9138C for ; Thu, 18 Jun 2020 09:43:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5D2F121D7E for ; Thu, 18 Jun 2020 09:43:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592473430; bh=yKNoE9kIz+SpmVfbwoez1KYAhJZiTDr3kGLoGFMOyAY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=A0HAdqVnOmNrsOchliMlSVXUwBhwYyH7k/7TzbIpMjMCXj9/Fz8nPuoLZ4o/7uzHn xF9mCP8J3paabKCXATgIrQ/HEpA2eAGkSsMRmwSaoYWhLH9+AOngEB2ybiPgBTLyQ1 w2GBNE7rsidPHg5U3IZIs19YpeCtG3arX+r5C6sw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729271AbgFRJnY (ORCPT ); Thu, 18 Jun 2020 05:43:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:43714 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729060AbgFRJnV (ORCPT ); Thu, 18 Jun 2020 05:43:21 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1B79B21D6C; Thu, 18 Jun 2020 09:43:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592473399; bh=yKNoE9kIz+SpmVfbwoez1KYAhJZiTDr3kGLoGFMOyAY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CU/a0QcrGcik6KJE+PyYEk7ySyjV3ZfqT4YwCswKU86Eg1mPGtu2yFtV1lSzotLrW pCOMTzGJraB5FmFD8P0jvg0rvaV5zJjqq5XyQPX5jOtek7gYFQR7FcEbz4PTfOHhM7 9gAulS8qujtJhXFuMOQW0yQZv9ZjAj548IGNWT4M= From: Greg Kroah-Hartman To: linux-usb@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Alan Stern Subject: [PATCH 3/8] USB: OHCI: remove obsolete FIXME comment Date: Thu, 18 Jun 2020 11:42:55 +0200 Message-Id: <20200618094300.1887727-4-gregkh@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200618094300.1887727-1-gregkh@linuxfoundation.org> References: <20200618094300.1887727-1-gregkh@linuxfoundation.org> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org This comment has been present since the start of git. Since no one is going to do anything about it, and all seems to work well, just drop the thing entirely. Cc: Alan Stern Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/ohci-pci.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/usb/host/ohci-pci.c b/drivers/usb/host/ohci-pci.c index 585222af24ff..41efe927d8f3 100644 --- a/drivers/usb/host/ohci-pci.c +++ b/drivers/usb/host/ohci-pci.c @@ -232,10 +232,6 @@ static const struct pci_device_id ohci_pci_quirks[] = { .driver_data = (unsigned long)ohci_quirk_qemu, }, - /* FIXME for some of the early AMD 760 southbridges, OHCI - * won't work at all. blacklist them. - */ - {}, }; From patchwork Thu Jun 18 09:42:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 11611691 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C442D138C for ; Thu, 18 Jun 2020 09:44:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A487221D7E for ; Thu, 18 Jun 2020 09:44:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592473440; bh=Wy9ApHk7lhW5ubr5Fi337sJMoRNgbw7hh2p3KGOQabI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=qXyn1q9K21yFX0zY6yNxAtBtLqPbEUQxdLBqZ1dtH8qI1ObpBTMnuLBLpdJpHVYG/ 2/BD1Zfi0d0FifDFapNmkHEytHImlrHxRxElq8YZ8KkIsfV6sSSn/1FPKNNk3ueiFR g4vIg8TC5lH5sOmnZd6zbd+E3c0k/ZV/qkowgxBo= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729323AbgFRJnv (ORCPT ); Thu, 18 Jun 2020 05:43:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:43782 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729266AbgFRJnW (ORCPT ); Thu, 18 Jun 2020 05:43:22 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9FAC621548; Thu, 18 Jun 2020 09:43:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592473402; bh=Wy9ApHk7lhW5ubr5Fi337sJMoRNgbw7hh2p3KGOQabI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gyjR7KH+cdc7/MGMLakGNRVrBmXHVIhGogIxqzMsMTzwXMIUfSurmVkfeKXV+EUiC 9eZDl1Pcpcv+7VM9s+ywT00spmVFHnwezYUxXQdKVr48UE5B8TZvvkJUU4ZzaPGjQt yb62QSdDWwGoQ5uZz7soAzDjnInyb3okzu6JZkdE= From: Greg Kroah-Hartman To: linux-usb@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Johan Hovold Subject: [PATCH 4/8] USB: serial: qcserial: fix up wording in a comment Date: Thu, 18 Jun 2020 11:42:56 +0200 Message-Id: <20200618094300.1887727-5-gregkh@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200618094300.1887727-1-gregkh@linuxfoundation.org> References: <20200618094300.1887727-1-gregkh@linuxfoundation.org> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Better describe what is happening with a list of devices that are being ignored by the driver. Cc: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/qcserial.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/usb/serial/qcserial.c b/drivers/usb/serial/qcserial.c index d147feae83e6..5dfbbaef38bb 100644 --- a/drivers/usb/serial/qcserial.c +++ b/drivers/usb/serial/qcserial.c @@ -365,9 +365,8 @@ static int qcprobe(struct usb_serial *serial, const struct usb_device_id *id) * a specific function, while the subclass indicate a * specific firmware source * - * This is a blacklist of functions known to be - * non-serial. The rest are assumed to be serial and - * will be handled by this driver + * This is a list of functions known to be non-serial. The rest + * are assumed to be serial and will be handled by this driver */ switch (intf->desc.bInterfaceProtocol) { /* QMI combined (qmi_wwan) */ From patchwork Thu Jun 18 09:42:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 11611679 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 19927138C for ; Thu, 18 Jun 2020 09:43:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 022EE21548 for ; Thu, 18 Jun 2020 09:43:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592473409; bh=EUL5EpWmg/P73fVYKwEbU1keTjpnVeTCNmlbj41nbss=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=Gx8DqTFuRx6DBUjmc5lYOqaYWIkxNsc5GpRYeqlDOhwLGI6zYnSbqO9czCbH97smg TsMEWpYN8oFNDuWBCQmW+PEyaiqu3FmDkkIYqgZG8NNEZ6e+G7e9PZfa7WubWk6x1e LcM2tDNNMcaEipdfhWu13RwBWqoEpYYNMD+5FvrM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729283AbgFRJn2 (ORCPT ); Thu, 18 Jun 2020 05:43:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:43800 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729060AbgFRJn0 (ORCPT ); Thu, 18 Jun 2020 05:43:26 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 05F2421D6C; Thu, 18 Jun 2020 09:43:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592473404; bh=EUL5EpWmg/P73fVYKwEbU1keTjpnVeTCNmlbj41nbss=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bYBFVWTB1XuqG0yqh/PlJireakJ6pml4VyoKrdKqu+j8gx7+IcOB7l11+IYfmdzjw sshdVBdPggGguppX+cd3FtJ6hrbz4QptES50Io1Ac52N2Xs6DJPToMFxnpKa1wmbhp WLF5LyGNb22AXxZSDuyhfk2DLs1ElTRr5IA5B3hk= From: Greg Kroah-Hartman To: linux-usb@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Johan Hovold Subject: [PATCH 5/8] USB: serial: sierra: unify quirk handling logic Date: Thu, 18 Jun 2020 11:42:57 +0200 Message-Id: <20200618094300.1887727-6-gregkh@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200618094300.1887727-1-gregkh@linuxfoundation.org> References: <20200618094300.1887727-1-gregkh@linuxfoundation.org> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org The sierra driver had two different functions for trying to determine different quirks that did the same exact thing. Remove one and rename things to make it more obvious exactly what the different lists do. Cc: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/sierra.c | 57 +++++++++++++------------------------ 1 file changed, 19 insertions(+), 38 deletions(-) diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c index a43263a0edd8..e8b130157b57 100644 --- a/drivers/usb/serial/sierra.c +++ b/drivers/usb/serial/sierra.c @@ -45,9 +45,9 @@ static bool nmea; -/* Used in interface blacklisting */ -struct sierra_iface_info { - const u32 infolen; /* number of interface numbers on blacklist */ +/* Used in interface quirks */ +struct sierra_iface_quirk { + const u32 infolen; /* number of interface numbers on the list */ const u8 *ifaceinfo; /* pointer to the array holding the numbers */ }; @@ -101,33 +101,15 @@ static int sierra_calc_num_ports(struct usb_serial *serial, return num_ports; } -static int is_blacklisted(const u8 ifnum, - const struct sierra_iface_info *blacklist) +static int is_quirk(const u8 ifnum, const struct sierra_iface_quirk *quirk) { const u8 *info; int i; - if (blacklist) { - info = blacklist->ifaceinfo; + if (quirk) { + info = quirk->ifaceinfo; - for (i = 0; i < blacklist->infolen; i++) { - if (info[i] == ifnum) - return 1; - } - } - return 0; -} - -static int is_himemory(const u8 ifnum, - const struct sierra_iface_info *himemorylist) -{ - const u8 *info; - int i; - - if (himemorylist) { - info = himemorylist->ifaceinfo; - - for (i=0; i < himemorylist->infolen; i++) { + for (i = 0; i < quirk->infolen; i++) { if (info[i] == ifnum) return 1; } @@ -161,10 +143,9 @@ static int sierra_probe(struct usb_serial *serial, usb_set_interface(udev, ifnum, 1); } - if (is_blacklisted(ifnum, - (struct sierra_iface_info *)id->driver_info)) { + if (is_quirk(ifnum, (struct sierra_iface_quirk *)id->driver_info)) { dev_dbg(&serial->dev->dev, - "Ignoring blacklisted interface #%d\n", ifnum); + "Ignoring interface #%d\n", ifnum); return -ENODEV; } @@ -173,20 +154,20 @@ static int sierra_probe(struct usb_serial *serial, /* interfaces with higher memory requirements */ static const u8 hi_memory_typeA_ifaces[] = { 0, 2 }; -static const struct sierra_iface_info typeA_interface_list = { +static const struct sierra_iface_quirk typeA_interface_list = { .infolen = ARRAY_SIZE(hi_memory_typeA_ifaces), .ifaceinfo = hi_memory_typeA_ifaces, }; static const u8 hi_memory_typeB_ifaces[] = { 3, 4, 5, 6 }; -static const struct sierra_iface_info typeB_interface_list = { +static const struct sierra_iface_quirk typeB_interface_list = { .infolen = ARRAY_SIZE(hi_memory_typeB_ifaces), .ifaceinfo = hi_memory_typeB_ifaces, }; -/* 'blacklist' of interfaces not served by this driver */ +/* 'ignorelist' of interfaces not served by this driver */ static const u8 direct_ip_non_serial_ifaces[] = { 7, 8, 9, 10, 11, 19, 20 }; -static const struct sierra_iface_info direct_ip_interface_blacklist = { +static const struct sierra_iface_quirk direct_ip_interface_ignore = { .infolen = ARRAY_SIZE(direct_ip_non_serial_ifaces), .ifaceinfo = direct_ip_non_serial_ifaces, }; @@ -264,19 +245,19 @@ static const struct usb_device_id id_table[] = { { USB_DEVICE(0x1199, 0x6893) }, /* Sierra Wireless Device */ /* Sierra Wireless Direct IP modems */ { USB_DEVICE_AND_INTERFACE_INFO(0x1199, 0x68A3, 0xFF, 0xFF, 0xFF), - .driver_info = (kernel_ulong_t)&direct_ip_interface_blacklist + .driver_info = (kernel_ulong_t)&direct_ip_interface_ignore }, { USB_DEVICE_AND_INTERFACE_INFO(0x1199, 0x68AA, 0xFF, 0xFF, 0xFF), - .driver_info = (kernel_ulong_t)&direct_ip_interface_blacklist + .driver_info = (kernel_ulong_t)&direct_ip_interface_ignore }, { USB_DEVICE(0x1199, 0x68AB) }, /* Sierra Wireless AR8550 */ /* AT&T Direct IP LTE modems */ { USB_DEVICE_AND_INTERFACE_INFO(0x0F3D, 0x68AA, 0xFF, 0xFF, 0xFF), - .driver_info = (kernel_ulong_t)&direct_ip_interface_blacklist + .driver_info = (kernel_ulong_t)&direct_ip_interface_ignore }, /* Airprime/Sierra Wireless Direct IP modems */ { USB_DEVICE_AND_INTERFACE_INFO(0x0F3D, 0x68A3, 0xFF, 0xFF, 0xFF), - .driver_info = (kernel_ulong_t)&direct_ip_interface_blacklist + .driver_info = (kernel_ulong_t)&direct_ip_interface_ignore }, { } @@ -879,7 +860,7 @@ static int sierra_port_probe(struct usb_serial_port *port) { struct usb_serial *serial = port->serial; struct sierra_port_private *portdata; - const struct sierra_iface_info *himemoryp; + const struct sierra_iface_quirk *himemoryp; u8 ifnum; portdata = kzalloc(sizeof(*portdata), GFP_KERNEL); @@ -907,7 +888,7 @@ static int sierra_port_probe(struct usb_serial_port *port) himemoryp = &typeA_interface_list; } - if (is_himemory(ifnum, himemoryp)) { + if (is_quirk(ifnum, himemoryp)) { portdata->num_out_urbs = N_OUT_URB_HM; portdata->num_in_urbs = N_IN_URB_HM; } From patchwork Thu Jun 18 09:42:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 11611685 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E647F138C for ; Thu, 18 Jun 2020 09:43:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CEE5E21D93 for ; Thu, 18 Jun 2020 09:43:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592473427; bh=iuQKCiWXc9wM8xeOmmKjRhno6rEFdv12AJl4+8sTOs4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=HcBNW1ld9ucWAD8QY0uuZ8453MYSbs+VXSLYGIpUd6hk0gKa1yDOGBZmJMGk5AOAU W/8O+ImFDW8gaH9wONcipEC5g88psOlr3LSb96BF43pr0LMxiBSIDquoSu1sjaX6H/ Pbyq/CUbx8SSusZRUBRjt0A0jUJwnGyvVqm6OKFo= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729291AbgFRJn2 (ORCPT ); Thu, 18 Jun 2020 05:43:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:43854 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729164AbgFRJn1 (ORCPT ); Thu, 18 Jun 2020 05:43:27 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A68E721548; Thu, 18 Jun 2020 09:43:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592473407; bh=iuQKCiWXc9wM8xeOmmKjRhno6rEFdv12AJl4+8sTOs4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WeKdyWB0MIZRtQV51OmrspXojZTSUJf2p+fDnmTbv5wSyyfHyrHHBPsOWKBQnNzhg bdatqSOGa9QSIzDZ/UIPGaQ3F/fK6P7W8+COTbpOYCJb9dqeEbybdWVodOqmJlv2+o 4PRvelSrjQSYocUwIyCAzdh7mQKm+YJWP3zhwLD4= From: Greg Kroah-Hartman To: linux-usb@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Alan Stern Subject: [PATCH 6/8] USB: storage: fix wording in error message Date: Thu, 18 Jun 2020 11:42:58 +0200 Message-Id: <20200618094300.1887727-7-gregkh@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200618094300.1887727-1-gregkh@linuxfoundation.org> References: <20200618094300.1887727-1-gregkh@linuxfoundation.org> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Make it obvious that the UAS driver is being ignored for a specific device by fixing up the wording to be more clear. Cc: Alan Stern Signed-off-by: Greg Kroah-Hartman --- drivers/usb/storage/uas-detect.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/storage/uas-detect.h b/drivers/usb/storage/uas-detect.h index 3734a25e09e5..3f720faa6f97 100644 --- a/drivers/usb/storage/uas-detect.h +++ b/drivers/usb/storage/uas-detect.h @@ -120,7 +120,7 @@ static int uas_use_uas_driver(struct usb_interface *intf, if (flags & US_FL_IGNORE_UAS) { dev_warn(&udev->dev, - "UAS is blacklisted for this device, using usb-storage instead\n"); + "UAS is ignored for this device, using usb-storage instead\n"); return 0; } From patchwork Thu Jun 18 09:42:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 11611681 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5C47114B7 for ; Thu, 18 Jun 2020 09:43:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4527B21D93 for ; Thu, 18 Jun 2020 09:43:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592473420; bh=WtYNzP9++iS9aInYNLIZ+WR+4J+U8x7eD9R49QihPrc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=HL3R/2kcC1zkIVucQ6NfI4OIFNpm1DhUNUsgEpSdG6TtxpwRwxD4u8PwkH0z47R6N FsS6Hdzev4tFg72FKs/EXYPTifC07n3uojuiZn9Z/oBxExE09ILnRLAUnRup/yZbjL vvsCMrcc7L1jC/ZmNQuUV14ZEgBhgwajzPqLLZZ4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729316AbgFRJne (ORCPT ); Thu, 18 Jun 2020 05:43:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:43884 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729305AbgFRJna (ORCPT ); Thu, 18 Jun 2020 05:43:30 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3A26D21548; Thu, 18 Jun 2020 09:43:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592473409; bh=WtYNzP9++iS9aInYNLIZ+WR+4J+U8x7eD9R49QihPrc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0thFW9dcN9kmGCGc/Mx2AvXObVEG47RtUhq0ofk7b23OFO8goK5Rtq7AmJZqWaMl1 MTS4g/7nKuj3PcP8g21LluWWSkxfmsrajiuv+wJTCYCurSaqgSeNOf0UhFhZFzwZjT y1c53WNvBUFPAE2TdFaFfSAt+eZ4bpigsQPqT204= From: Greg Kroah-Hartman To: linux-usb@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Alan Stern Subject: [PATCH 7/8] USB: storage: scsi: fix up comment to be more specific Date: Thu, 18 Jun 2020 11:42:59 +0200 Message-Id: <20200618094300.1887727-8-gregkh@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200618094300.1887727-1-gregkh@linuxfoundation.org> References: <20200618094300.1887727-1-gregkh@linuxfoundation.org> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Fix up the wording in a comment for the scsi driver saying what it does using better terminology. Cc: Alan Stern Signed-off-by: Greg Kroah-Hartman --- drivers/usb/storage/scsiglue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c index f4c2359abb1b..e5a971b83e3f 100644 --- a/drivers/usb/storage/scsiglue.c +++ b/drivers/usb/storage/scsiglue.c @@ -298,7 +298,7 @@ static int slave_configure(struct scsi_device *sdev) } else { /* - * Non-disk-type devices don't need to blacklist any pages + * Non-disk-type devices don't need to ignore any pages * or to force 192-byte transfer lengths for MODE SENSE. * But they do need to use MODE SENSE(10). */ From patchwork Thu Jun 18 09:43:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 11611683 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 11F37138C for ; Thu, 18 Jun 2020 09:43:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E918021D7F for ; Thu, 18 Jun 2020 09:43:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592473422; bh=wjyYT4RLyVR3OeGS5l2kxDYeJIyFGOP2unCtzYh4VRM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=ZoYrP6QznNjA55myJ2PmfGUsG/NjM0MAjJAehTtxBh9RZOW8cWKaSOtAuf8WqGS4K 5wtG33FQgUINbrncRvB84kDGPpuQiQtm11o/AHD3V6zOsKPDy9asaU7L/8/7S6Aa2G 5dnxYYyMYhNvK74AS6/l8ut6e7bfhnW1ukspwCgM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729285AbgFRJnl (ORCPT ); Thu, 18 Jun 2020 05:43:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:43926 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729310AbgFRJnd (ORCPT ); Thu, 18 Jun 2020 05:43:33 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id ABE0C21548; Thu, 18 Jun 2020 09:43:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592473412; bh=wjyYT4RLyVR3OeGS5l2kxDYeJIyFGOP2unCtzYh4VRM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kOD5HnGtJ1cJtguIkNRuNWdncr3BnjzK1Gw2MgwXadB9lZzZDDcLJrzSWxUUpH+OM SNiKcRE7v5TLiOsw//CVMk5Gi91KPMpZyDwN3c/VSGgrszEubrqq71dydLfCde/SO8 eDtw6Wd51CEaMVYDiz4X8WS4VTft365/gW3J4qMg= From: Greg Kroah-Hartman To: linux-usb@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Thomas Bogendoerfer , Paul Burton , =?utf-8?q?Diego_Elio_Petten=C3=B2?= , "Martin K. Petersen" , Jens Axboe , Jiaxun Yang , Krzysztof Kozlowski , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Alan Stern , Eugeniu Rosca , Qi Zhou , Andrey Konovalov , Hardik Gajjar , Harry Pan , David Heinzelmann , Nishad Kamdar Subject: [PATCH 8/8] USB: OTG: rename product list of devices Date: Thu, 18 Jun 2020 11:43:00 +0200 Message-Id: <20200618094300.1887727-9-gregkh@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200618094300.1887727-1-gregkh@linuxfoundation.org> References: <20200618094300.1887727-1-gregkh@linuxfoundation.org> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Rename the list of specific devices that an OTG device could support to make it more obvious as to what this list is for and what it is doing. Also rename the configuration option to make it more obvious as well. Cc: Thomas Bogendoerfer Cc: Paul Burton Cc: "Diego Elio Pettenò" Cc: "Martin K. Petersen" Cc: Jens Axboe Cc: Jiaxun Yang Cc: Krzysztof Kozlowski Cc: "Philippe Mathieu-Daudé" Cc: Alan Stern Cc: Eugeniu Rosca Cc: Qi Zhou Cc: Andrey Konovalov Cc: Hardik Gajjar Cc: Harry Pan Cc: David Heinzelmann Cc: Nishad Kamdar Signed-off-by: Greg Kroah-Hartman --- arch/mips/configs/fuloong2e_defconfig | 2 +- arch/mips/configs/lemote2f_defconfig | 2 +- drivers/usb/core/Kconfig | 6 +++--- drivers/usb/core/hub.c | 4 ++-- .../core/{otg_whitelist.h => otg_productlist.h} | 14 +++++--------- 5 files changed, 12 insertions(+), 16 deletions(-) rename drivers/usb/core/{otg_whitelist.h => otg_productlist.h} (90%) diff --git a/arch/mips/configs/fuloong2e_defconfig b/arch/mips/configs/fuloong2e_defconfig index 6466e83067b4..023b4e644b1c 100644 --- a/arch/mips/configs/fuloong2e_defconfig +++ b/arch/mips/configs/fuloong2e_defconfig @@ -159,7 +159,7 @@ CONFIG_USB_KBD=y CONFIG_USB_MOUSE=y CONFIG_USB=y CONFIG_USB_ANNOUNCE_NEW_DEVICES=y -CONFIG_USB_OTG_WHITELIST=y +CONFIG_USB_OTG_PRODUCTLIST=y CONFIG_USB_WUSB_CBAF=m CONFIG_USB_C67X00_HCD=m CONFIG_USB_EHCI_HCD=y diff --git a/arch/mips/configs/lemote2f_defconfig b/arch/mips/configs/lemote2f_defconfig index 8254d7d1396f..3a9a453b1264 100644 --- a/arch/mips/configs/lemote2f_defconfig +++ b/arch/mips/configs/lemote2f_defconfig @@ -207,7 +207,7 @@ CONFIG_ZEROPLUS_FF=y CONFIG_USB_HIDDEV=y CONFIG_USB=y CONFIG_USB_DYNAMIC_MINORS=y -CONFIG_USB_OTG_WHITELIST=y +CONFIG_USB_OTG_PRODUCTLIST=y CONFIG_USB_MON=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_ROOT_HUB_TT=y diff --git a/drivers/usb/core/Kconfig b/drivers/usb/core/Kconfig index 06bae55860e4..dfacc478a8fc 100644 --- a/drivers/usb/core/Kconfig +++ b/drivers/usb/core/Kconfig @@ -55,12 +55,12 @@ config USB_OTG Select this only if your board has Mini-AB/Micro-AB connector. -config USB_OTG_WHITELIST +config USB_OTG_PRODUCTLIST bool "Rely on OTG and EH Targeted Peripherals List" depends on USB help - If you say Y here, the "otg_whitelist.h" file will be used as a - product whitelist, so USB peripherals not listed there will be + If you say Y here, the "otg_productlist.h" file will be used as a + product list, so USB peripherals not listed there will be rejected during enumeration. This behavior is required by the USB OTG and EH specification for all devices not on your product's "Targeted Peripherals List". "Embedded Hosts" are likewise diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index ab26ac0147f7..71bbd2eed7c6 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -35,7 +35,7 @@ #include #include "hub.h" -#include "otg_whitelist.h" +#include "otg_productlist.h" #define USB_VENDOR_GENESYS_LOGIC 0x05e3 #define USB_VENDOR_SMSC 0x0424 @@ -2403,7 +2403,7 @@ static int usb_enumerate_device(struct usb_device *udev) if (err < 0) return err; - if (IS_ENABLED(CONFIG_USB_OTG_WHITELIST) && hcd->tpl_support && + if (IS_ENABLED(CONFIG_USB_OTG_PRODUCTLIST) && hcd->tpl_support && !is_targeted(udev)) { /* Maybe it can talk to us, though we can't talk to it. * (Includes HNP test device.) diff --git a/drivers/usb/core/otg_whitelist.h b/drivers/usb/core/otg_productlist.h similarity index 90% rename from drivers/usb/core/otg_whitelist.h rename to drivers/usb/core/otg_productlist.h index fdd4897401e2..db67df29fb2b 100644 --- a/drivers/usb/core/otg_whitelist.h +++ b/drivers/usb/core/otg_productlist.h @@ -1,18 +1,14 @@ /* SPDX-License-Identifier: GPL-2.0+ */ -/* - * drivers/usb/core/otg_whitelist.h - * - * Copyright (C) 2004 Texas Instruments - */ +/* Copyright (C) 2004 Texas Instruments */ /* - * This OTG and Embedded Host Whitelist is "Targeted Peripheral List". + * This OTG and Embedded Host list is "Targeted Peripheral List". * It should mostly use of USB_DEVICE() or USB_DEVICE_VER() entries.. * * YOU _SHOULD_ CHANGE THIS LIST TO MATCH YOUR PRODUCT AND ITS TESTING! */ -static struct usb_device_id whitelist_table[] = { +static struct usb_device_id productlist_table[] = { /* hubs are optional in OTG, but very handy ... */ { USB_DEVICE_INFO(USB_CLASS_HUB, 0, 0), }, @@ -44,7 +40,7 @@ static struct usb_device_id whitelist_table[] = { static int is_targeted(struct usb_device *dev) { - struct usb_device_id *id = whitelist_table; + struct usb_device_id *id = productlist_table; /* HNP test device is _never_ targeted (see OTG spec 6.6.6) */ if ((le16_to_cpu(dev->descriptor.idVendor) == 0x1a0a && @@ -59,7 +55,7 @@ static int is_targeted(struct usb_device *dev) /* NOTE: can't use usb_match_id() since interface caches * aren't set up yet. this is cut/paste from that code. */ - for (id = whitelist_table; id->match_flags; id++) { + for (id = productlist_table; id->match_flags; id++) { if ((id->match_flags & USB_DEVICE_ID_MATCH_VENDOR) && id->idVendor != le16_to_cpu(dev->descriptor.idVendor)) continue;