Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp820086ybn; Tue, 24 Sep 2019 10:00:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqyFSNVL9AAvM8lD8mb317SNJxPH3m0GiYUs7/vxfnu1qPnN/L0k+D75V5VSA2riSoNDQNt9 X-Received: by 2002:a1c:6143:: with SMTP id v64mr1173527wmb.79.1569344450661; Tue, 24 Sep 2019 10:00:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569344450; cv=none; d=google.com; s=arc-20160816; b=WCH9vQt2rp5pK1lFwD+fWgVDTCh2Vs7hv0NnrKwBJmPY4CxX9aK3hPsC9vlsu6ZAN3 yprL7cHJ+WbE/oDLJAYHDh6AjQEd8NpX5O1WzYBLQxtVpIUNcm/DZMQGXHCnsy1ahaj2 rEdjwCpKkysdo6mpEh1pI2QV7oaCtZ11q/ayyzCdnfIJEovSMB7oy8ei9VT02o/8nILc M0bIC7w3fZ4+YcZ53SfXySUtDGOdXJ7TfQXBNJUeo3fa+3KPfeMoj9A/hRf7PUZGl/q5 6/pchID6ISjm7GLmOIe4XN3XzY3WyB1momSsgTWy+QqxV9lC4uZ3xw+9qtTMb/eHZg9U 5QHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=a2xltFV/yf+3yt6wGE6/c4HDB+4BFdgb1II7sm+72iU=; b=c6q/3QP3YUsF7O2EgY7XSwkA6hpxf7CpXyPK7HDRmSmtN+O1w83mLAnlrJWIHVrpM7 FxJHMgLZEAZPOU77YSEpfW6S/Ef9/JY3hHwIa2KZ9OLOBaZEbojQI+lUBxxsELVw0me/ iLfqSPtMyI5KfVn2PhQ8vOsYXzOLWBAyb9hylDwTQAFFAL5Bf+W70mnJlO9CcfFv6C/s XrCAYo44Qmhn3Ox8ayGpPfo+DzYQLzkn+DWk45kIsZnVF6mIMP26iZn6rbprknIIoF3E 0EZGn+CKe3h/2LZkBegEFwvijInn7fuL1shYoxGtqOVezvNIwOam/cJeN39+tUrkRZiw snZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QKfhuDUP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j9si1439086edt.32.2019.09.24.10.00.27; Tue, 24 Sep 2019 10:00:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QKfhuDUP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2393559AbfIWLHP (ORCPT + 99 others); Mon, 23 Sep 2019 07:07:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:51146 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2393136AbfIWLHP (ORCPT ); Mon, 23 Sep 2019 07:07:15 -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 3E173206C2; Mon, 23 Sep 2019 11:07:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1569236834; bh=W0KNg5xYO1RpjuUgzP6+f9w0r6wSlpxmvibubDyLGNM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QKfhuDUP7h7hvtym8KIgPYGx1JBz6O6Es0ztrwChHx3yTuQQDgIxu2ueTFWKBj8E7 Ilh966pCG2d/hu6Mm7a5QFZxoF7HZaePPJfls1fHVjwFNRh0O5FoPG6ff9quWABy2V wTn6iW001Grrg/sIwvNnKd2Z2YwoP88e/iFdk0SY= Date: Mon, 23 Sep 2019 13:07:12 +0200 From: Greg Kroah-Hartman To: Ran Wang Cc: Kai-Heng Feng , Mathias Nyman , Alan Stern , Mathias Payer , Dennis Wassenberg , "open list:USB SUBSYSTEM" , open list Subject: Re: [PATCH] usb: hub add filter for device with specific VID&PID Message-ID: <20190923110712.GA2796979@kroah.com> References: <20190923105102.37413-1-ran.wang_1@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190923105102.37413-1-ran.wang_1@nxp.com> User-Agent: Mutt/1.12.2 (2019-09-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 23, 2019 at 06:51:02PM +0800, Ran Wang wrote: > USB 2.0 Embedded Host PET Automated Test (CH6) 6.7.23 A-UUT "Unsupported > Device" Message require to stop enumerating device with VID=0x1a0a PID=0x0201 > and pop message to declare this device is not supported. Why is this a requirement? And why those specific vid/pid values? What do they refer to? > > Signed-off-by: Ran Wang > --- > drivers/usb/core/hub.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c > index bbcfa63..3cda0da 100644 > --- a/drivers/usb/core/hub.c > +++ b/drivers/usb/core/hub.c > @@ -4982,6 +4982,18 @@ static void hub_port_connect(struct usb_hub *hub, int port1, u16 portstatus, > if (status < 0) > goto loop; > > + /* USB 2.0 Embedded Host PET Automated Test (CH6) > + * 6.7.23 A-UUT "Unsupported Device" Message > + * require to filter out below device when enumeration > + */ Nit, can you align your comment lines, to match the other multi-line comments in this file? Otherwise it starts to look bad over time. > + if ((udev->descriptor.idVendor == 0x1a0a) > + && (udev->descriptor.idProduct == 0x0201)) { Are you sure you don't have to convert this value into cpu endian before checking it? thanks, greg k-h