Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

USB: OTG: rename product list of devices

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 <tsbogend@alpha.franken.de>
Cc: Paul Burton <paulburton@kernel.org>
Cc: "Diego Elio Pettenò" <flameeyes@flameeyes.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Jiaxun Yang <jiaxun.yang@flygoat.com>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Eugeniu Rosca <erosca@de.adit-jv.com>
Cc: Qi Zhou <atmgnd@outlook.com>
Cc: Andrey Konovalov <andreyknvl@google.com>
Cc: Hardik Gajjar <hgajjar@de.adit-jv.com>
Cc: Harry Pan <harry.pan@intel.com>
Cc: David Heinzelmann <heinzelmann.david@gmail.com>
Cc: Nishad Kamdar <nishadkamdar@gmail.com>
Link: https://lore.kernel.org/r/20200618094300.1887727-9-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

+12 -16
+1 -1
arch/mips/configs/fuloong2e_defconfig
··· 159 159 CONFIG_USB_MOUSE=y 160 160 CONFIG_USB=y 161 161 CONFIG_USB_ANNOUNCE_NEW_DEVICES=y 162 - CONFIG_USB_OTG_WHITELIST=y 162 + CONFIG_USB_OTG_PRODUCTLIST=y 163 163 CONFIG_USB_WUSB_CBAF=m 164 164 CONFIG_USB_C67X00_HCD=m 165 165 CONFIG_USB_EHCI_HCD=y
+1 -1
arch/mips/configs/lemote2f_defconfig
··· 207 207 CONFIG_USB_HIDDEV=y 208 208 CONFIG_USB=y 209 209 CONFIG_USB_DYNAMIC_MINORS=y 210 - CONFIG_USB_OTG_WHITELIST=y 210 + CONFIG_USB_OTG_PRODUCTLIST=y 211 211 CONFIG_USB_MON=y 212 212 CONFIG_USB_EHCI_HCD=y 213 213 CONFIG_USB_EHCI_ROOT_HUB_TT=y
+3 -3
drivers/usb/core/Kconfig
··· 55 55 Select this only if your board has Mini-AB/Micro-AB 56 56 connector. 57 57 58 - config USB_OTG_WHITELIST 58 + config USB_OTG_PRODUCTLIST 59 59 bool "Rely on OTG and EH Targeted Peripherals List" 60 60 depends on USB 61 61 help 62 - If you say Y here, the "otg_whitelist.h" file will be used as a 63 - product whitelist, so USB peripherals not listed there will be 62 + If you say Y here, the "otg_productlist.h" file will be used as a 63 + product list, so USB peripherals not listed there will be 64 64 rejected during enumeration. This behavior is required by the 65 65 USB OTG and EH specification for all devices not on your product's 66 66 "Targeted Peripherals List". "Embedded Hosts" are likewise
+2 -2
drivers/usb/core/hub.c
··· 35 35 #include <asm/byteorder.h> 36 36 37 37 #include "hub.h" 38 - #include "otg_whitelist.h" 38 + #include "otg_productlist.h" 39 39 40 40 #define USB_VENDOR_GENESYS_LOGIC 0x05e3 41 41 #define USB_VENDOR_SMSC 0x0424 ··· 2403 2403 if (err < 0) 2404 2404 return err; 2405 2405 2406 - if (IS_ENABLED(CONFIG_USB_OTG_WHITELIST) && hcd->tpl_support && 2406 + if (IS_ENABLED(CONFIG_USB_OTG_PRODUCTLIST) && hcd->tpl_support && 2407 2407 !is_targeted(udev)) { 2408 2408 /* Maybe it can talk to us, though we can't talk to it. 2409 2409 * (Includes HNP test device.)
+5 -9
drivers/usb/core/otg_whitelist.h drivers/usb/core/otg_productlist.h
··· 1 1 /* SPDX-License-Identifier: GPL-2.0+ */ 2 - /* 3 - * drivers/usb/core/otg_whitelist.h 4 - * 5 - * Copyright (C) 2004 Texas Instruments 6 - */ 2 + /* Copyright (C) 2004 Texas Instruments */ 7 3 8 4 /* 9 - * This OTG and Embedded Host Whitelist is "Targeted Peripheral List". 5 + * This OTG and Embedded Host list is "Targeted Peripheral List". 10 6 * It should mostly use of USB_DEVICE() or USB_DEVICE_VER() entries.. 11 7 * 12 8 * YOU _SHOULD_ CHANGE THIS LIST TO MATCH YOUR PRODUCT AND ITS TESTING! 13 9 */ 14 10 15 - static struct usb_device_id whitelist_table[] = { 11 + static struct usb_device_id productlist_table[] = { 16 12 17 13 /* hubs are optional in OTG, but very handy ... */ 18 14 { USB_DEVICE_INFO(USB_CLASS_HUB, 0, 0), }, ··· 40 44 41 45 static int is_targeted(struct usb_device *dev) 42 46 { 43 - struct usb_device_id *id = whitelist_table; 47 + struct usb_device_id *id = productlist_table; 44 48 45 49 /* HNP test device is _never_ targeted (see OTG spec 6.6.6) */ 46 50 if ((le16_to_cpu(dev->descriptor.idVendor) == 0x1a0a && ··· 55 59 /* NOTE: can't use usb_match_id() since interface caches 56 60 * aren't set up yet. this is cut/paste from that code. 57 61 */ 58 - for (id = whitelist_table; id->match_flags; id++) { 62 + for (id = productlist_table; id->match_flags; id++) { 59 63 if ((id->match_flags & USB_DEVICE_ID_MATCH_VENDOR) && 60 64 id->idVendor != le16_to_cpu(dev->descriptor.idVendor)) 61 65 continue;