{"id":811721,"url":"http://patchwork.ozlabs.org/api/1.2/patches/811721/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/patch/a60db90ffdd51a20db1a160bd16eeea6d38bf3b6.1504891631.git-series.maxime.ripard@free-electrons.com/","project":{"id":18,"url":"http://patchwork.ozlabs.org/api/1.2/projects/18/?format=json","name":"U-Boot","link_name":"uboot","list_id":"u-boot.lists.denx.de","list_email":"u-boot@lists.denx.de","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<a60db90ffdd51a20db1a160bd16eeea6d38bf3b6.1504891631.git-series.maxime.ripard@free-electrons.com>","list_archive_url":null,"date":"2017-09-08T17:34:17","name":"[U-Boot,06/13] usb: gadget: usb_ether: Move settings to common","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"d879e0eb09dccede8a2673e500710431c2d265bc","submitter":{"id":12916,"url":"http://patchwork.ozlabs.org/api/1.2/people/12916/?format=json","name":"Maxime Ripard","email":"maxime.ripard@free-electrons.com"},"delegate":{"id":68827,"url":"http://patchwork.ozlabs.org/api/1.2/users/68827/?format=json","username":"lukma","first_name":"Lukasz","last_name":"Majewski","email":"lukma@denx.de"},"mbox":"http://patchwork.ozlabs.org/project/uboot/patch/a60db90ffdd51a20db1a160bd16eeea6d38bf3b6.1504891631.git-series.maxime.ripard@free-electrons.com/mbox/","series":[{"id":2256,"url":"http://patchwork.ozlabs.org/api/1.2/series/2256/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/list/?series=2256","date":"2017-09-08T17:34:11","name":"sunxi: convert musb to the device model and enable usb_ether","version":1,"mbox":"http://patchwork.ozlabs.org/series/2256/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/811721/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/811721/checks/","tags":{},"related":[],"headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xpl6M5N6Fz9s8J\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat,  9 Sep 2017 03:43:23 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid 5F393C21C93; Fri,  8 Sep 2017 17:43:21 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 8E259C21F56;\n\tFri,  8 Sep 2017 17:34:56 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid BA8D9C21F47; Fri,  8 Sep 2017 17:34:41 +0000 (UTC)","from mail.free-electrons.com (mail.free-electrons.com [62.4.15.54])\n\tby lists.denx.de (Postfix) with ESMTP id 0C546C21E42\n\tfor <u-boot@lists.denx.de>; Fri,  8 Sep 2017 17:34:36 +0000 (UTC)","by mail.free-electrons.com (Postfix, from userid 110)\n\tid 8246820882; Fri,  8 Sep 2017 19:34:34 +0200 (CEST)","from localhost (LFbn-TOU-1-209-191.w86-201.abo.wanadoo.fr\n\t[86.201.56.191])\n\tby mail.free-electrons.com (Postfix) with ESMTPSA id 5217320882;\n\tFri,  8 Sep 2017 19:34:34 +0200 (CEST)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=0.0 required=5.0 tests=none autolearn=unavailable\n\tautolearn_force=no version=3.4.0","From":"Maxime Ripard <maxime.ripard@free-electrons.com>","To":"Tom Rini <trini@konsulko.com>,\n\tJagan Teki <jagan@openedev.com>","Date":"Fri,  8 Sep 2017 19:34:17 +0200","Message-Id":"<a60db90ffdd51a20db1a160bd16eeea6d38bf3b6.1504891631.git-series.maxime.ripard@free-electrons.com>","X-Mailer":"git-send-email 2.13.5","In-Reply-To":["<cover.3b9463250a55d25afdf3b221b80a90b4e7811c1e.1504891631.git-series.maxime.ripard@free-electrons.com>","<cover.3b9463250a55d25afdf3b221b80a90b4e7811c1e.1504891631.git-series.maxime.ripard@free-electrons.com>"],"References":["<cover.3b9463250a55d25afdf3b221b80a90b4e7811c1e.1504891631.git-series.maxime.ripard@free-electrons.com>","<cover.3b9463250a55d25afdf3b221b80a90b4e7811c1e.1504891631.git-series.maxime.ripard@free-electrons.com>"],"Cc":"Thomas Petazzoni <thomas.petazzoni@free-electrons.com>, marex@denx.de,\n\tu-boot@lists.denx.de, Maxime Ripard <maxime.ripard@free-electrons.com>","Subject":"[U-Boot] [PATCH 06/13] usb: gadget: usb_ether: Move settings to\n\tcommon","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"},"content":"The usb_ether gadget duplicates the USB settings for the manufacturer,\nproduct ID and vendor ID.\n\nMake sure we use the common option so that we can expect a single VID/PID\ncouple for a single device.\n\nSigned-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>\n---\n configs/sama5d2_ptc_nandflash_defconfig |  1 +\n configs/sama5d2_ptc_spiflash_defconfig  |  1 +\n configs/vinco_defconfig                 |  1 +\n drivers/usb/gadget/ether.c              | 16 ++++++++--------\n include/configs/ma5d4evk.h              |  1 -\n include/configs/sama5d2_ptc.h           |  1 -\n include/configs/vinco.h                 |  1 -\n scripts/config_whitelist.txt            |  1 -\n 8 files changed, 11 insertions(+), 12 deletions(-)","diff":"diff --git a/configs/sama5d2_ptc_nandflash_defconfig b/configs/sama5d2_ptc_nandflash_defconfig\nindex 6672a5ce11f7..431056a50a8b 100644\n--- a/configs/sama5d2_ptc_nandflash_defconfig\n+++ b/configs/sama5d2_ptc_nandflash_defconfig\n@@ -29,5 +29,6 @@ CONFIG_USB=y\n CONFIG_USB_EHCI_HCD=y\n CONFIG_USB_STORAGE=y\n CONFIG_USB_GADGET=y\n+CONFIG_USB_GADGET_MANUFACTURER=\"Atmel SAMA5D2_PTC\"\n CONFIG_USB_GADGET_ATMEL_USBA=y\n CONFIG_USB_ETHER=y\ndiff --git a/configs/sama5d2_ptc_spiflash_defconfig b/configs/sama5d2_ptc_spiflash_defconfig\nindex 9a23a808f1b3..66bb671820a6 100644\n--- a/configs/sama5d2_ptc_spiflash_defconfig\n+++ b/configs/sama5d2_ptc_spiflash_defconfig\n@@ -30,5 +30,6 @@ CONFIG_USB=y\n CONFIG_USB_EHCI_HCD=y\n CONFIG_USB_STORAGE=y\n CONFIG_USB_GADGET=y\n+CONFIG_USB_GADGET_MANUFACTURER=\"Atmel SAMA5D2_PTC\"\n CONFIG_USB_GADGET_ATMEL_USBA=y\n CONFIG_USB_ETHER=y\ndiff --git a/configs/vinco_defconfig b/configs/vinco_defconfig\nindex b0df6b3c7805..8d7f9f99ab81 100644\n--- a/configs/vinco_defconfig\n+++ b/configs/vinco_defconfig\n@@ -33,3 +33,4 @@ CONFIG_USB_STORAGE=y\n CONFIG_USB_GADGET=y\n CONFIG_USB_GADGET_ATMEL_USBA=y\n CONFIG_USB_ETHER=y\n+CONFIG_USB_GADGET_MANUFACTURER=\"L+G VInCo\"\ndiff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c\nindex 2cf5c8d31e25..dbb578258f96 100644\n--- a/drivers/usb/gadget/ether.c\n+++ b/drivers/usb/gadget/ether.c\n@@ -273,8 +273,8 @@ static inline int BITRATE(struct usb_gadget *g)\n  * static ushort idProduct;\n  */\n \n-#if defined(CONFIG_USBNET_MANUFACTURER)\n-static char *iManufacturer = CONFIG_USBNET_MANUFACTURER;\n+#if defined(CONFIG_USB_GADGET_MANUFACTURER)\n+static char *iManufacturer = CONFIG_USB_GADGET_MANUFACTURER;\n #else\n static char *iManufacturer = \"U-Boot\";\n #endif\n@@ -2073,11 +2073,11 @@ static int eth_bind(struct usb_gadget *gadget)\n \t * to choose the right configuration otherwise.\n \t */\n \tif (rndis) {\n-#if defined(CONFIG_USB_RNDIS_VENDOR_ID) && defined(CONFIG_USB_RNDIS_PRODUCT_ID)\n+#if defined(CONFIG_USB_GADGET_VENDOR_NUM) && defined(CONFIG_USB_GADGET_PRODUCT_NUM)\n \t\tdevice_desc.idVendor =\n-\t\t\t__constant_cpu_to_le16(CONFIG_USB_RNDIS_VENDOR_ID);\n+\t\t\t__constant_cpu_to_le16(CONFIG_USB_GADGET_VENDOR_NUM);\n \t\tdevice_desc.idProduct =\n-\t\t\t__constant_cpu_to_le16(CONFIG_USB_RNDIS_PRODUCT_ID);\n+\t\t\t__constant_cpu_to_le16(CONFIG_USB_GADGET_PRODUCT_NUM);\n #else\n \t\tdevice_desc.idVendor =\n \t\t\t__constant_cpu_to_le16(RNDIS_VENDOR_NUM);\n@@ -2092,9 +2092,9 @@ static int eth_bind(struct usb_gadget *gadget)\n \t * supporting one submode of the \"SAFE\" variant of MDLM.)\n \t */\n \t} else {\n-#if defined(CONFIG_USB_CDC_VENDOR_ID) && defined(CONFIG_USB_CDC_PRODUCT_ID)\n-\t\tdevice_desc.idVendor = cpu_to_le16(CONFIG_USB_CDC_VENDOR_ID);\n-\t\tdevice_desc.idProduct = cpu_to_le16(CONFIG_USB_CDC_PRODUCT_ID);\n+#if defined(CONFIG_USB_GADGET_VENDOR_NUM) && defined(CONFIG_USB_GADGET_PRODUCT_NUM)\n+\t\tdevice_desc.idVendor = cpu_to_le16(CONFIG_USB_GADGET_VENDOR_NUM);\n+\t\tdevice_desc.idProduct = cpu_to_le16(CONFIG_USB_GADGET_PRODUCT_NUM);\n #else\n \t\tif (!cdc) {\n \t\t\tdevice_desc.idVendor =\ndiff --git a/include/configs/ma5d4evk.h b/include/configs/ma5d4evk.h\nindex 6d25d84c6eb6..3aeb7e6ef136 100644\n--- a/include/configs/ma5d4evk.h\n+++ b/include/configs/ma5d4evk.h\n@@ -97,7 +97,6 @@\n #ifdef CONFIG_CMD_USB\n \n /* USB device */\n-#define CONFIG_USBNET_MANUFACTURER      \"AriesEmbedded\"\n #define CONFIG_USB_FUNCTION_MASS_STORAGE\n #define CONFIG_SYS_DFU_DATA_BUF_SIZE\t(1 * 1024 * 1024)\n #define DFU_DEFAULT_POLL_TIMEOUT\t300\ndiff --git a/include/configs/sama5d2_ptc.h b/include/configs/sama5d2_ptc.h\nindex 543592e3a574..2328c7614ed7 100644\n--- a/include/configs/sama5d2_ptc.h\n+++ b/include/configs/sama5d2_ptc.h\n@@ -60,7 +60,6 @@\n #endif\n \n /* USB device */\n-#define CONFIG_USBNET_MANUFACTURER      \"Atmel SAMA5D2_PTC\"\n \n /* Ethernet Hardware */\n #define CONFIG_MACB\ndiff --git a/include/configs/vinco.h b/include/configs/vinco.h\nindex d3d5dc8f7732..265da84fc0cc 100644\n--- a/include/configs/vinco.h\n+++ b/include/configs/vinco.h\n@@ -64,7 +64,6 @@\n #endif\n \n /* USB device */\n-#define CONFIG_USBNET_MANUFACTURER      \"L+G VInCo\"\n \n /* Ethernet Hardware */\n #define CONFIG_PHY_SMSC\ndiff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt\nindex c1285ce27fec..1020d6db9f8c 100644\n--- a/scripts/config_whitelist.txt\n+++ b/scripts/config_whitelist.txt\n@@ -4993,7 +4993,6 @@ CONFIG_USBD_SERIAL_OUT_PKTSIZE\n CONFIG_USBD_VENDORID\n CONFIG_USBID_ADDR\n CONFIG_USBNET_DEV_ADDR\n-CONFIG_USBNET_MANUFACTURER\n CONFIG_USBTTY\n CONFIG_USB_AM35X\n CONFIG_USB_ATMEL\n","prefixes":["U-Boot","06/13"]}