Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp4395474pxb; Mon, 21 Feb 2022 20:11:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJzW5MlKE2nmheqjEyoGfpPUp7fleWoiw9+evYYjbpjqjtk7hfibRSs7UbCK848N8oj8RQ3b X-Received: by 2002:a65:49c7:0:b0:374:4ee8:ab5e with SMTP id t7-20020a6549c7000000b003744ee8ab5emr5737003pgs.344.1645503070290; Mon, 21 Feb 2022 20:11:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645503070; cv=none; d=google.com; s=arc-20160816; b=SE7qtyj915iNYAcgap5Ul+C3k5OLo0eOiV/j2Imq6oPihZtoly8lvOJXsfWsNS4yWs PIGloXqf++/NZAef6qClNFchhfZU/x1QnKgQGZu4SqbascMNOs6d7Pz6SH8mUGcaGKtk IzqUWeWqutiNzsg4P7PvOHTgmooU8LjYabbIIuZkH+7hBKP4VVVgU3atOppDF+OMbkMK sHeL8hdMWeiqjyMjZnlVltcc9nhAvmctzfCv4C4mTBE849lHpxAyovnKcKZN8tpTDF50 fMZChAjipVNg5OQq7NaCFwFMR91qHIyQztJfUlLWiNAM5zUEcRN63rsUxZRJJ6CIkImk C+Tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=QOSDSgS25PuGDC+NGKfa0oAA8l6jTmg9zjUlxbJquUg=; b=G5BefsGO+il6H2Y9q8jvSE/Em76+TYRO/tWfGazS8D09thNVAEIqV+dyb72bw7s6ny m5cWH0DLC0Jc8qVnS+JmjqRVtuYwZ/PGt1DQXIaM+bQkOzIkATV6uz/AmuYNSnKfF9Mb NDhB1RQgxba6HI2v1gdVxiPxt0+fsBEkq0ONI+snIncCBe965PcGIhVM3dmrd+5saiIU 3gHk7sW8f7lZKNFLL5Z/bRwW7eu1qlwiObFWRRUp/ZBphXYCuSWxnvdiIsalwfxkA1Ht uoP5Dbag6n90rzpbKkCzfA0sY42UjHhk53/z48qK4gkCrI0gL9T2O1B7rFG/x9PyoIKW ywcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XOO+X7Eb; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id b12si35587071plh.474.2022.02.21.20.11.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Feb 2022 20:11:10 -0800 (PST) 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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XOO+X7Eb; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A97B37486D; Mon, 21 Feb 2022 20:10:59 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230389AbiBUSVW (ORCPT + 99 others); Mon, 21 Feb 2022 13:21:22 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:42690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232728AbiBUSSl (ORCPT ); Mon, 21 Feb 2022 13:18:41 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8169AE01C for ; Mon, 21 Feb 2022 10:09:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645466995; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QOSDSgS25PuGDC+NGKfa0oAA8l6jTmg9zjUlxbJquUg=; b=XOO+X7EbNx+0uJohmDqSdXtcA0MgQA5tqisbn8yOtP7wz+wDc7IreCKF4wlPHIMvAWFRpM N3765rLu9zrCo1I3iEuz6Rriu5u4F5MOY0JQEGQMAmkztQtB3zGpAToIEUQo9YbatSeuHZ 74vuvatMM+/ad2JGzySgWFs1uX1M6h0= Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-533-5yLqs4KhMyi_GdrvDPQLRQ-1; Mon, 21 Feb 2022 13:09:54 -0500 X-MC-Unique: 5yLqs4KhMyi_GdrvDPQLRQ-1 Received: by mail-qk1-f200.google.com with SMTP id q5-20020a05620a0d8500b004738c1b48beso15063766qkl.7 for ; Mon, 21 Feb 2022 10:09:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=QOSDSgS25PuGDC+NGKfa0oAA8l6jTmg9zjUlxbJquUg=; b=cwtLx42ckPB7MCUojnM4gRmidggHLUMLw4xs2ARPS1fcsRTChfwodnUQF5IcQFbayS 9YTsj/H+hqHWMmw7RM7xwSzfZvfmr5OOHI9i39RANyDRgxJKjI/BZ4mGS6I8tbHHPb0n mYf8+em6OXd5ai7ED4vEHyO9BRC1d/EfyKLVqTgMVMF9+Epwiyegm0y78PchlqYy8obm dlpDNAv4xPTw5aSb/q0vpWKOqKOHZujADiyJD9uOiHcnT9fMyd5QvEAZLe2dD4Ld0BcD GI63fWgGe5SWo4LeS5jdQ92488wx3PVFUPcEYZbuzetEJoQa6KWBPJKjS/Vll8ogikpg AQVg== X-Gm-Message-State: AOAM530X/FEqanRFzP0kXu7HSZQWwiM5IHJ6o/pSnLcF6mQrTHmzW1XO YZw5U4kD6mVzglVEa4MffEbIopMn7QEQUOkArHKosy6WbYyk6LMGhazxslOXB0VKukh6BqibA26 /nUY7Repli2s/SdyfCxDMAJZZ X-Received: by 2002:a37:917:0:b0:62c:e550:bc3e with SMTP id 23-20020a370917000000b0062ce550bc3emr9286087qkj.677.1645466994010; Mon, 21 Feb 2022 10:09:54 -0800 (PST) X-Received: by 2002:a37:917:0:b0:62c:e550:bc3e with SMTP id 23-20020a370917000000b0062ce550bc3emr9286067qkj.677.1645466993785; Mon, 21 Feb 2022 10:09:53 -0800 (PST) Received: from localhost.localdomain (024-205-208-113.res.spectrum.com. [24.205.208.113]) by smtp.gmail.com with ESMTPSA id s11sm31054348qtk.82.2022.02.21.10.09.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 21 Feb 2022 10:09:53 -0800 (PST) Subject: Re: [PATCH v1 7/7] fpga: dfl: pci: Add generic OFS PCI PID To: matthew.gerlach@linux.intel.com Cc: "Zhang, Tianfei" , "Wu, Hao" , "mdf@kernel.org" , "Xu, Yilun" , "linux-fpga@vger.kernel.org" , "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "corbet@lwn.net" References: <20220214112619.219761-1-tianfei.zhang@intel.com> <20220214112619.219761-8-tianfei.zhang@intel.com> <3c9fce03-ef29-d80f-6639-0c237c28cf58@redhat.com> From: Tom Rix Message-ID: Date: Mon, 21 Feb 2022 10:09:50 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US 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,NICE_REPLY_A,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 2/21/22 9:50 AM, matthew.gerlach@linux.intel.com wrote: > > > On Fri, 18 Feb 2022, Tom Rix wrote: > >> >> On 2/18/22 1:03 AM, Zhang, Tianfei wrote: >>> >>>> -----Original Message----- >>>> From: Tom Rix >>>> Sent: Wednesday, February 16, 2022 12:16 AM >>>> To: Zhang, Tianfei ; Wu, Hao >>>> ; >>>> mdf@kernel.org; Xu, Yilun ; >>>> linux-fpga@vger.kernel.org; >>>> linux-doc@vger.kernel.org; linux-kernel@vger.kernel.org >>>> Cc: corbet@lwn.net; Matthew Gerlach >>>> Subject: Re: [PATCH v1 7/7] fpga: dfl: pci: Add generic OFS PCI PID >>>> >>>> >>>> On 2/14/22 3:26 AM, Tianfei zhang wrote: >>>>> From: Matthew Gerlach >>>>> >>>>> Add the PCI product id for an Open FPGA Stack PCI card. >>>> Is there a URL to the card ? >>> This PCIe Device IDs have registered by Intel. >> A URL is useful to introduce the board, Is there one ? >>> >>>>> Signed-off-by: Matthew Gerlach >>>>> Signed-off-by: Tianfei Zhang >>>>> --- >>>>>    drivers/fpga/dfl-pci.c | 4 ++++ >>>>>    1 file changed, 4 insertions(+) >>>>> >>>>> diff --git a/drivers/fpga/dfl-pci.c b/drivers/fpga/dfl-pci.c index >>>>> 83b604d6dbe6..cb2fbf3eb918 100644 >>>>> --- a/drivers/fpga/dfl-pci.c >>>>> +++ b/drivers/fpga/dfl-pci.c >>>>> @@ -76,12 +76,14 @@ static void cci_pci_free_irq(struct pci_dev >>>>> *pcidev) >>>>>    #define PCIE_DEVICE_ID_INTEL_PAC_D5005        0x0B2B >>>>>    #define PCIE_DEVICE_ID_SILICOM_PAC_N5010    0x1000 >>>>>    #define PCIE_DEVICE_ID_SILICOM_PAC_N5011    0x1001 >>>>> +#define PCIE_DEVICE_ID_INTEL_OFS        0xbcce >>>> INTEL_OFS is a generic name, pci id's map to specific cards >>>> >>>> Is there a more specific name for this card ? >>> I think using INTEL_OFS is better, because INTEL_OFS is the Generic >>> development platform can support multiple cards which using OFS >>> specification, >>> like Intel PAC N6000 card. >> >> I would prefer something like PCIE_DEVICE_ID_INTEL_PAC_N6000 because >> it follows an existing pattern.  Make it easy on a developer, they >> will look at their board or box, see X and try to find something >> similar in the driver source. >> >> To use OSF_ * the name needs a suffix to differentiate it from future >> cards that will also use ofs. >> >> If this really is a generic id please explain in the doc patch how >> every future board with use this single id and how a driver could >> work around a hw problem in a specific board with a pci id covering >> multiple boards. >> >> Tom > > Hi Tom, > > The intent is to have a generic device id that can be used with many > different boards.  Currently, we have FPGA implementations for 3 > different boards using this generic id.  We may need a better name for > device id than OFS.  More precisely this generic device id means a PCI > function that is described by a Device Feature List (DFL).  How about > PCIE_DEVICE_ID_INTEL_DFL? > > With a DFL device id, the functionality of the PF/VF is determined by > the contents of the DFL.  Each Device Feature Header (DFH) in the DFL > has a revision field that can be used identify "broken" hw, or new > functionality added to a feature.  Additionally, since the DFL is > typically used in a FPGA, the broken hardware, can and should be fixed > in most cases. How is lspci supposed to work ? A dfl set can change with fw updates and in theory different boards could have the same set. Tom > > Matthew >> >>> >>>> Tom >>>> >>>>>    /* VF Device */ >>>>>    #define PCIE_DEVICE_ID_VF_INT_5_X        0xBCBF >>>>>    #define PCIE_DEVICE_ID_VF_INT_6_X        0xBCC1 >>>>>    #define PCIE_DEVICE_ID_VF_DSC_1_X        0x09C5 >>>>>    #define PCIE_DEVICE_ID_INTEL_PAC_D5005_VF    0x0B2C >>>>> +#define PCIE_DEVICE_ID_INTEL_OFS_VF        0xbccf >>>>> >>>>>    static struct pci_device_id cci_pcie_id_tbl[] = { >>>>>        {PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCIE_DEVICE_ID_PF_INT_5_X),}, >>>> @@ >>>>> -95,6 +97,8 @@ static struct pci_device_id cci_pcie_id_tbl[] = { >>>>>        {PCI_DEVICE(PCI_VENDOR_ID_INTEL, >>>> PCIE_DEVICE_ID_INTEL_PAC_D5005_VF),}, >>>>> {PCI_DEVICE(PCI_VENDOR_ID_SILICOM_DENMARK, >>>> PCIE_DEVICE_ID_SILICOM_PAC_N5010),}, >>>>> {PCI_DEVICE(PCI_VENDOR_ID_SILICOM_DENMARK, >>>>> PCIE_DEVICE_ID_SILICOM_PAC_N5011),}, >>>>> +    {PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCIE_DEVICE_ID_INTEL_OFS),}, >>>>> +    {PCI_DEVICE(PCI_VENDOR_ID_INTEL, >>>> PCIE_DEVICE_ID_INTEL_OFS_VF),}, >>>>>        {0,} >>>>>    }; >>>>>    MODULE_DEVICE_TABLE(pci, cci_pcie_id_tbl); >> >>