From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 09830C433EF for ; Tue, 8 Feb 2022 08:42:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233772AbiBHImR (ORCPT ); Tue, 8 Feb 2022 03:42:17 -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: Precedence: bulk List-ID: X-Mailing-List: linux-pci@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