Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4766505iob; Mon, 9 May 2022 00:43:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJED1gtuS0mx03SV1emetCg+aXNvtTmPWFoQ64eQt1AS/AUvRWdOxB+QhJf/3R9Cw+npCw X-Received: by 2002:a17:902:b703:b0:158:2667:7447 with SMTP id d3-20020a170902b70300b0015826677447mr15088278pls.92.1652082213786; Mon, 09 May 2022 00:43:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652082213; cv=none; d=google.com; s=arc-20160816; b=xt8k0QOL2zq6twyjqRy5AQShNAE6kU0ppQ6wgXiF+SBK/8VYm8BJMCCJKmHXOihHZ9 SbLCE88AhCCeGVRBQFYUaEX6pEnQF1WoU1lE6GCqIhiLB4f1inry8gpTBoX13aD1+oXH /jq1AqQlnh0Gest6Ceew3fXCm+8Ta2hyJ6FmyVVggew/GznX7jn2ra38dFTSSAO4g7at Z7paZrINh6zQsInGPll4b/mzcRlEW7liNHdl6F2NloXqTgx3/xHDu0DvWqdJw0cDT9ai ZZGTvGtfC4GTIfgWGEaKnnfpa6A3kN/VsZO5tU4O9dNgTy0KftNmYMBDj8kM2IkbX5O8 c91A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :from:references:cc:to:content-language:user-agent:mime-version:date :message-id; bh=lc/wNH4fLWGjJs5zHGhT/kbwKSFU6+2/5LD6rv5pHyo=; b=tVqMoBWPBGkGb/9yz3UkaspNh6erBdnSOM8ABLbckdCWPdfFHGNOtZOshUkQAiZCN7 42raat3kdFxlsAVgu/bh0d7p2dmBskrmrfycW0qf2i4bguFjQ6gI3a9O431mSMjQehUI llRBsShNDoUVU6AAt65CnoDBg2X4h1BTCR6vxtE9LI1oTCsCgSuEOgLM7vTGTKiutApC 7b66WqG8rhM4jqTFiG9Twwef7YxRjGoFchin+TccUvX3CucDOGf6j+oU/tF2kJI7BDBp +IjGIe9qaDmmzoHzePRI477zY1F8+lZ/vDAKVy05HazPtV2hr6u2szj3WYzZaWYx5uX+ 0w/A== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=marcan.st Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id rm4-20020a17090b3ec400b001d75bbdf9f9si14060311pjb.152.2022.05.09.00.43.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 00:43:33 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=marcan.st Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DA88914CDF9; Mon, 9 May 2022 00:37:26 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238478AbiEEMJZ (ORCPT + 99 others); Thu, 5 May 2022 08:09:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359765AbiEEMJS (ORCPT ); Thu, 5 May 2022 08:09:18 -0400 Received: from mail.marcansoft.com (marcansoft.com [IPv6:2a01:298:fe:f::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE96D1A066; Thu, 5 May 2022 05:05:36 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (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) (Authenticated sender: marcan@marcan.st) by mail.marcansoft.com (Postfix) with ESMTPSA id 44F9E41F5D; Thu, 5 May 2022 12:05:32 +0000 (UTC) Message-ID: <1e04603d-5fb2-9c39-4c68-7bcb7428f667@marcan.st> Date: Thu, 5 May 2022 21:05:29 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Content-Language: es-ES To: Jakub Kicinski Cc: Jacky Chou , "David S. Miller" , Eric Dumazet , Paolo Abeni , linux-usb@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220502110644.167179-1-marcan@marcan.st> <20220504193047.1e4b97b7@kernel.org> From: Hector Martin Subject: Re: [PATCH v2] net: usb: ax88179_178a: Bind only to vendor-specific interface In-Reply-To: <20220504193047.1e4b97b7@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 On 05/05/2022 11.30, Jakub Kicinski wrote: > On Mon, 2 May 2022 20:06:44 +0900 Hector Martin wrote: >> The Anker PowerExpand USB-C to Gigabit Ethernet adapter uses this >> chipset, but exposes CDC Ethernet configurations as well as the >> vendor specific one. > > And we have reasons to believe all dongle vendors may have a similar > problem? Given this is a vendor-specific driver it seems correct to have it only bind to vendor-specific interfaces. That shouldn't break anything as long as nobody is implementing this interface with the wrong protocol IDs (which seems like quite a weird thing to do and fairly unlikely). FWIW, the one I have has the generic VID/PID, not a custom vendor one. If you prefer I can change just that one or both of the generic ones. >> diff --git a/drivers/net/usb/ax88179_178a.c b/drivers/net/usb/ax88179_178a.c >> index e2fa56b92685..7c7c2f31d9f1 100644 >> --- a/drivers/net/usb/ax88179_178a.c >> +++ b/drivers/net/usb/ax88179_178a.c >> @@ -1914,55 +1914,55 @@ static const struct driver_info at_umc2000sp_info = { >> static const struct usb_device_id products[] = { >> { >> /* ASIX AX88179 10/100/1000 */ >> - USB_DEVICE(0x0b95, 0x1790), >> + USB_DEVICE_AND_INTERFACE_INFO(0x0b95, 0x1790, 0xff, 0xff, 0), >> .driver_info = (unsigned long)&ax88179_info, >> }, > > Should we use USB_CLASS_VENDOR_SPEC and USB_SUBCLASS_VENDOR_SPEC ? > Maybe define a local macro wrapper for USB_DEVICE_AND.. which will > fill those in to avoid long lines? Sure, I'll do that! -- Hector Martin (marcan@marcan.st) Public Key: https://mrcn.st/pub