Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp10783469rwl; Thu, 12 Jan 2023 02:28:26 -0800 (PST) X-Google-Smtp-Source: AMrXdXvUUzaVvGQeg5cqlqw73io/zgL9+niu/FLLTubrLsnxTvDRHOQP+sXEtsQ483yd8BaJQyQg X-Received: by 2002:a17:906:3ac6:b0:84d:3928:66b6 with SMTP id z6-20020a1709063ac600b0084d392866b6mr15344616ejd.40.1673519306566; Thu, 12 Jan 2023 02:28:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673519306; cv=none; d=google.com; s=arc-20160816; b=nHV6ia9fkW7BlygdTp4o4uzr2aZIBqqmMx4kA7He8j8hlfL8PaPVrl6gUaZFXwnIEd S8aC/vtekdU3eMC/Arq9/rLUwTs+/UzO53lWkc5p33z/XuBStnehfVnQUOulHdWbbikq UgbidQIBiUE5arWVxVLKbfLneOtePBlSk6NPBb/Q95oU0IytWH6D24AW3abYS5g1TWcK 9TeID+wQ81lD5LliWt+L2LccbDy2a0dOD5Ul0AIK3Sv43MkZXTRmXzsvH7al+QDMTOSV jJeACXn2yu7Qb1BJ/55hVxIIPXnwekK6klu89ufzIzEpcZTE2rcsn5gEQJT05xc3OryQ 9r8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=tOuAEvT9QbZA1yHsnnoh3aX1wkDxXxd0nH+tePPAzec=; b=LQidynS2lWGHN+Zxv2LMGEYQdl9llgDWBOKwPxFrXEVCHPbGcQXY8CHYV/gxgYyHw3 AXRraxXsKzYs8xvxZ3B5xFI0JVxC8hEDYNXpuiA1pGzYwwD0fSuydBKyJign04iNIANI uD5EhQCQgR4B6QFN7SVeU/hAu6A4FvvzP5rRQCJ+sfCniJye0MQTv3V7sia5fb9BpInl eaXhCGTCdvd4/vo+ZklxsLfwH9Nq7HZi4dYjXeRE8cNGOe/yK0JtM/M2O4pei13y5pCs O2siR4dHxqHJJ4d/qjCkDp1AuPkmtcj0O8gN00InKmO49WzMl3vSYnitjFvhVoxFjTER y7Lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mork.no header.s=b header.b=D4qUMaDi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mork.no Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gb12-20020a170907960c00b007c1633cea0csi19011472ejc.513.2023.01.12.02.28.13; Thu, 12 Jan 2023 02:28:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@mork.no header.s=b header.b=D4qUMaDi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mork.no Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233143AbjALKGE (ORCPT + 51 others); Thu, 12 Jan 2023 05:06:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231699AbjALKFL (ORCPT ); Thu, 12 Jan 2023 05:05:11 -0500 Received: from dilbert.mork.no (dilbert.mork.no [IPv6:2a01:4f9:c010:a439::d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FEE7186E0; Thu, 12 Jan 2023 02:01:42 -0800 (PST) Received: from canardo.dyn.mork.no ([IPv6:2a01:799:c9a:3200:0:0:0:1]) (authenticated bits=0) by dilbert.mork.no (8.15.2/8.15.2) with ESMTPSA id 30CA1Jc81795562 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=OK); Thu, 12 Jan 2023 10:01:20 GMT Received: from miraculix.mork.no ([IPv6:2a01:799:c9a:3202:549f:9f7a:c9d8:875b]) (authenticated bits=0) by canardo.dyn.mork.no (8.15.2/8.15.2) with ESMTPSA id 30CA1EsE3816905 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=OK); Thu, 12 Jan 2023 11:01:14 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mork.no; s=b; t=1673517674; bh=tOuAEvT9QbZA1yHsnnoh3aX1wkDxXxd0nH+tePPAzec=; h=From:To:Cc:Subject:Date:Message-Id:References:From; b=D4qUMaDiDGLhc9I4tmGuj8L3KNMLwXM4vwFWO4WpQtC3IkvvZ/qKcwb3dfys8pWhc MrgVFDfmLtwIKmEv13erZtM8Oj816aelJL17cD9mOOC6M6fp0BYncMIqkJGEBmSzh6 +JjEW6ptBjbZKD7UNQtpvm26FEliRJsIAzbPiFnA= Received: (nullmailer pid 180761 invoked by uid 1000); Thu, 12 Jan 2023 10:01:14 -0000 From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= To: Jakub Kicinski Cc: Andre Przywara , Paolo Abeni , "David S . Miller" , Eric Dumazet , linux-usb@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Bj=C3=B8rn=20Mork?= Subject: [PATCH net-next] r8152; preserve device list format Date: Thu, 12 Jan 2023 11:01:00 +0100 Message-Id: <20230112100100.180708-1-bjorn@mork.no> X-Mailer: git-send-email 2.30.2 In-Reply-To: <87k01s6tkr.fsf@miraculix.mork.no> References: <87k01s6tkr.fsf@miraculix.mork.no> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Virus-Scanned: clamav-milter 0.103.7 at canardo X-Virus-Status: Clean X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, UPPERCASE_50_75 autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is a partial revert of commit ec51fbd1b8a2 ("r8152: add USB device driver for config selection") Keep a simplified version of the REALTEK_USB_DEVICE macro to avoid unnecessary reformatting of the device list. This makes new device ID additions apply cleanly across driver versions. Fixes: ec51fbd1b8a2 ("r8152: add USB device driver for config selection") Signed-off-by: Bjørn Mork --- The patch in https://lore.kernel.org/lkml/20230111133228.190801-1-andre.przywara@arm.com/ will apply cleanly on top of this. This fix will also prevent a lot of stable backporting hassle. Sorry for not thinking the change completely through before submitting. I should never have touched the rtl8152_table. Bjørn drivers/net/usb/r8152.c | 48 +++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 66e70b5f8417..3d4631dae00f 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c @@ -9817,34 +9817,36 @@ static void rtl8152_disconnect(struct usb_interface *intf) } } +#define REALTEK_USB_DEVICE(vend, prod) { USB_DEVICE(vend, prod) } + /* table of devices that work with this driver */ static const struct usb_device_id rtl8152_table[] = { /* Realtek */ - { USB_DEVICE(VENDOR_ID_REALTEK, 0x8050) }, - { USB_DEVICE(VENDOR_ID_REALTEK, 0x8053) }, - { USB_DEVICE(VENDOR_ID_REALTEK, 0x8152) }, - { USB_DEVICE(VENDOR_ID_REALTEK, 0x8153) }, - { USB_DEVICE(VENDOR_ID_REALTEK, 0x8155) }, - { USB_DEVICE(VENDOR_ID_REALTEK, 0x8156) }, + REALTEK_USB_DEVICE(VENDOR_ID_REALTEK, 0x8050), + REALTEK_USB_DEVICE(VENDOR_ID_REALTEK, 0x8053), + REALTEK_USB_DEVICE(VENDOR_ID_REALTEK, 0x8152), + REALTEK_USB_DEVICE(VENDOR_ID_REALTEK, 0x8153), + REALTEK_USB_DEVICE(VENDOR_ID_REALTEK, 0x8155), + REALTEK_USB_DEVICE(VENDOR_ID_REALTEK, 0x8156), /* Microsoft */ - { USB_DEVICE(VENDOR_ID_MICROSOFT, 0x07ab) }, - { USB_DEVICE(VENDOR_ID_MICROSOFT, 0x07c6) }, - { USB_DEVICE(VENDOR_ID_MICROSOFT, 0x0927) }, - { USB_DEVICE(VENDOR_ID_SAMSUNG, 0xa101) }, - { USB_DEVICE(VENDOR_ID_LENOVO, 0x304f) }, - { USB_DEVICE(VENDOR_ID_LENOVO, 0x3054) }, - { USB_DEVICE(VENDOR_ID_LENOVO, 0x3062) }, - { USB_DEVICE(VENDOR_ID_LENOVO, 0x3069) }, - { USB_DEVICE(VENDOR_ID_LENOVO, 0x3082) }, - { USB_DEVICE(VENDOR_ID_LENOVO, 0x7205) }, - { USB_DEVICE(VENDOR_ID_LENOVO, 0x720c) }, - { USB_DEVICE(VENDOR_ID_LENOVO, 0x7214) }, - { USB_DEVICE(VENDOR_ID_LENOVO, 0x721e) }, - { USB_DEVICE(VENDOR_ID_LENOVO, 0xa387) }, - { USB_DEVICE(VENDOR_ID_LINKSYS, 0x0041) }, - { USB_DEVICE(VENDOR_ID_NVIDIA, 0x09ff) }, - { USB_DEVICE(VENDOR_ID_TPLINK, 0x0601) }, + REALTEK_USB_DEVICE(VENDOR_ID_MICROSOFT, 0x07ab), + REALTEK_USB_DEVICE(VENDOR_ID_MICROSOFT, 0x07c6), + REALTEK_USB_DEVICE(VENDOR_ID_MICROSOFT, 0x0927), + REALTEK_USB_DEVICE(VENDOR_ID_SAMSUNG, 0xa101), + REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x304f), + REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x3054), + REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x3062), + REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x3069), + REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x3082), + REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x7205), + REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x720c), + REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x7214), + REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0x721e), + REALTEK_USB_DEVICE(VENDOR_ID_LENOVO, 0xa387), + REALTEK_USB_DEVICE(VENDOR_ID_LINKSYS, 0x0041), + REALTEK_USB_DEVICE(VENDOR_ID_NVIDIA, 0x09ff), + REALTEK_USB_DEVICE(VENDOR_ID_TPLINK, 0x0601), {} }; -- 2.30.2