Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1668633pxb; Wed, 9 Feb 2022 01:42:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJx11NhYmNf1elszPgctm87NfpqNSg8kZIXRthJup55GPB1NeocVDmYnNjFGvz2Rn/iJWbFu X-Received: by 2002:a17:902:e74d:: with SMTP id p13mr1325920plf.42.1644399764201; Wed, 09 Feb 2022 01:42:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644399764; cv=none; d=google.com; s=arc-20160816; b=WQvZ2I2RtpRKDR0UsGIoKZpoxKtoNkyNKeTOXhoypd+GXOexdm0UMTZcTgeKIiNBe5 yULszPUT3gAoMuBeBPwS8pUKYxq1w7n/odRznlwL0dZXPXciDoPuUc/xrrlWQCK4ArCO X6R5ZyHIMLbx+Qvt4K3QUYq+SvV1fMAMw0zKUMWWVD8LXoXvNksyT2Fmj0naLMWtnL+a 628XIPGrvxU32KNFa9BV+qorRjrzBbEHPovcmsO3dyLN+P3ur+PUmXe2H8LnrnMJrgoB CP+zwHt66wsr4rzAJMPfHRqmmpMOcHYzlP35kfDMRldTR3ZOGiLADuK0Kt9d3LhIJw+F G36Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=K3GYDllQkEHCgu/jYem6N0rZhKa5SO23hod5D76ZhP0=; b=CDjRTsmqRGGgpNjRP26xhzlAg5/jWSfLAT8xVTnccpntIimzaW95LcIJdtD7OEu2qd 8z4ot3ZUJ5Tvaf113xHA/qoHEZ7+h+MC140PjvjmnGfh+AGeZVugd1KSR6+axzkIgi6v 5cKMcHozYEjZaXUXU9dYALV+DdTNGJkUa+iZftY8ArZubuOJ5iO0aHKxGL5+1gLZFM9K N2nn4zKZcBvfIaTpxtGOi+7TvvhVAj1DuWYmjUrMm/cpHA1wg4pXTidDi2CrEbPcKY3u UdU+OeNCM6JAHNBks82V6EclxnPFShYVjLXAMCOwDI/zbees3gABXEY2xAQgKr02QA7t EAEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VKy28vKS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id k11si16568511pff.339.2022.02.09.01.42.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 01:42:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VKy28vKS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 52583E019270; Wed, 9 Feb 2022 01:05:34 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347438AbiBHImS (ORCPT + 99 others); Tue, 8 Feb 2022 03:42:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231542AbiBHImI (ORCPT ); Tue, 8 Feb 2022 03:42:08 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F937C03FECC; Tue, 8 Feb 2022 00:42:07 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 37DF5B81884; Tue, 8 Feb 2022 08:42:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 584EFC004E1; Tue, 8 Feb 2022 08:42:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1644309724; bh=sAeco6xgxqRwjb0iDifRLfjcvvAG94ttN6jFbAjdq4g=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VKy28vKSsxSfOorEu59O9ozNaCmVobA6oiAQfsc3SNbif0ZaJ3aNHb0cEivAtrfXK 0iylLNzah58dMoMr6hqFJyJun5fPVXnl8D6FY/RInPa3geORWcvXavP+kGtGE6HP86 HPJSJhR4t0smUhqJmn1ovN7cK0+/ziAZfE66f2Yk= Date: Tue, 8 Feb 2022 09:41:57 +0100 From: Greg Kroah-Hartman To: Neal Liu Cc: Alan Stern , Bjorn Helgaas , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-pci@vger.kernel.org" , Tao Ren , BMC-SW Subject: Re: [PATCH] usb: ehci: add pci device support for Aspeed platforms Message-ID: References: <20220208062927.3527137-1-neal_liu@aspeedtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE 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 On Tue, Feb 08, 2022 at 08:20:07AM +0000, Neal Liu wrote: > > -----Original Message----- > > From: Greg Kroah-Hartman > > Sent: Tuesday, February 8, 2022 3:38 PM > > To: Neal Liu > > Cc: Alan Stern ; Bjorn Helgaas > > ; linux-usb@vger.kernel.org; > > linux-kernel@vger.kernel.org; linux-pci@vger.kernel.org; Tao Ren > > ; BMC-SW > > Subject: Re: [PATCH] usb: ehci: add pci device support for Aspeed platforms > > > > On Tue, Feb 08, 2022 at 02:29:27PM +0800, Neal Liu wrote: > > > Enable Aspeed quirks in commit 7f2d73788d90 ("usb: ehci: > > > handshake CMD_RUN instead of STS_HALT") to support Aspeed ehci-pci > > > device. > > > > > > Signed-off-by: Neal Liu > > > --- > > > drivers/usb/host/ehci-pci.c | 6 ++++++ > > > include/linux/pci_ids.h | 3 +++ > > > 2 files changed, 9 insertions(+) > > > > > > diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c > > > index e87cf3a00fa4..a91b25d216ae 100644 > > > --- a/drivers/usb/host/ehci-pci.c > > > +++ b/drivers/usb/host/ehci-pci.c > > > @@ -222,6 +222,12 @@ static int ehci_pci_setup(struct usb_hcd *hcd) > > > ehci->has_synopsys_hc_bug = 1; > > > } > > > break; > > > + case PCI_VENDOR_ID_ASPEED: > > > + if (pdev->device == PCI_DEVICE_ID_ASPEED_EHCI) { > > > + ehci_info(ehci, "applying Aspeed HC workaround\n"); > > > + ehci->is_aspeed = 1; > > > + } > > > + break; > > > } > > > > > > /* optional debug port, normally in the first BAR */ diff --git > > > a/include/linux/pci_ids.h b/include/linux/pci_ids.h index > > > aad54c666407..410b395fe56c 100644 > > > --- a/include/linux/pci_ids.h > > > +++ b/include/linux/pci_ids.h > > > @@ -3096,4 +3096,7 @@ > > > > > > #define PCI_VENDOR_ID_NCUBE 0x10ff > > > > > > +#define PCI_VENDOR_ID_ASPEED 0x1a03 > > > +#define PCI_DEVICE_ID_ASPEED_EHCI 0x2603 > > > > Please read the top of this file, this does not need to be added here. > > > > thanks, > > > > greg k-h > > Are you suggesting to hard code vendor/device ID in driver instead? Or put the define in the ehci-pci.c file like other drivers do. Only add to the pci_ids.h file if your define is needed in multiple drivers, otherwise it is a merge nightmare. thanks, greg k-h