Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4111373pxf; Tue, 16 Mar 2021 06:09:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjCMY3K4xauTFgX54vygimeeXszFLAS0hVa+FmUKsxY+NGxUYUYr6ootWQhPi7mu/FxbNU X-Received: by 2002:a50:ed96:: with SMTP id h22mr24756507edr.39.1615900152569; Tue, 16 Mar 2021 06:09:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615900152; cv=none; d=google.com; s=arc-20160816; b=jJUZRx1NxfAs3uHZUibPTnw9IqbsmwUQNWHpgQBQm6ihPe8aqyvABKYeg/C8y/1GT/ YZuMs1lsTxV9DWDpCvNLUssChmZQYT65l4yJWXCLJW0k2WSw6IfzTgBiu9H/HA0BnV3g 2Xk6kBxZGZKcsLEDm3ApVWpHO5bYJZ2LtuRSHiRxzICJw98RkrCQdqqN58a/lC8IWHh6 sWZrJRmzJ5WiTszWqoCGbGAX1DQETs9ZWQ3o+h1WHRl9c8eh6qnCQ4hoYLYhqrbKuMvm fgyr8pZ6uEzxzOjH9Nxoy+q73Yhj1t5PJzHJ5E/k24/k5LZNGE9YgPYifdf7iKNQpB0T KKGA== 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 :mime-version:user-agent:date:message-id:from:references:cc:to :subject:dkim-signature; bh=2BW1sBItML7wtTpQapaMP53TtXuZoCkLLYqm0wfSE7A=; b=xtqbZaEWHqDghwIdY4YLJtOt2vIitXBHR1QPVsJR9ElqjUDkgUW/5yBmq4hekkhs3t Wy5zp6DdVhfJeVriKNZxFpDulvNZ/vB7A2SdJ//YiSq1DSUNo9wtc9J/FVfuMMfpejOX CVT8V7oPXEwpNdBIK83zJGj8XSbpcAKATUUy0zZv4EIInh5wvF7lVYFwXTQK520Bw4A8 o7kQv+fIBrsOSN92DemQazxSidlW+Dcv2TbWAOiO94Fg0wvAH9yDQMdtzbWW7FClqC6D M5S3dpNARJ7qRKSahgqa8dZq+iVFVG10yUAqB7SK7n6ic9VZe3fM0u0P8rewCUH+MMU0 Rozg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=aeALjptf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s9si14145569edc.296.2021.03.16.06.08.48; Tue, 16 Mar 2021 06:09:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=aeALjptf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235627AbhCPGJo (ORCPT + 99 others); Tue, 16 Mar 2021 02:09:44 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:35341 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232718AbhCPGJM (ORCPT ); Tue, 16 Mar 2021 02:09:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615874951; 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=2BW1sBItML7wtTpQapaMP53TtXuZoCkLLYqm0wfSE7A=; b=aeALjptf0D1GZe1rynXJlkji7xAp5HutG/t8kbwHHMDU1Dzv5gYlSUnEogUZoPm5Mc081+ QcYWjyuPP7o8h5RipsEnOwHzJzSx2J8SAKXn/lEF4McwSmZc4HCfrbtVRu/5hvSx4RQoSH Ela4T9l1YWekJHGOur0bvsysnJfachc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-153-VChqBI0RMoW8WQp27xjQ-g-1; Tue, 16 Mar 2021 02:09:09 -0400 X-MC-Unique: VChqBI0RMoW8WQp27xjQ-g-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 94237801817; Tue, 16 Mar 2021 06:09:07 +0000 (UTC) Received: from wangxiaodeMacBook-Air.local (ovpn-12-216.pek2.redhat.com [10.72.12.216]) by smtp.corp.redhat.com (Postfix) with ESMTP id 746CF60C0F; Tue, 16 Mar 2021 06:09:01 +0000 (UTC) Subject: Re: [PATCH V4 1/7] vDPA/ifcvf: get_vendor_id returns a device specific vendor id To: Zhu Lingshan , mst@redhat.com, lulu@redhat.com, leonro@nvidia.com Cc: virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210315074501.15868-1-lingshan.zhu@intel.com> <20210315074501.15868-2-lingshan.zhu@intel.com> From: Jason Wang Message-ID: <7ad48606-1ed1-0b96-a236-ecdb0b01e560@redhat.com> Date: Tue, 16 Mar 2021 14:09:00 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20210315074501.15868-2-lingshan.zhu@intel.com> Content-Type: text/plain; charset=gbk; format=flowed Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ?? 2021/3/15 ????3:44, Zhu Lingshan ะด??: > In this commit, ifcvf_get_vendor_id() will return > a device specific vendor id of the probed pci device > than a hard code. > > Signed-off-by: Zhu Lingshan Acked-by: Jason Wang > --- > drivers/vdpa/ifcvf/ifcvf_main.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf_main.c > index fa1af301cf55..e501ee07de17 100644 > --- a/drivers/vdpa/ifcvf/ifcvf_main.c > +++ b/drivers/vdpa/ifcvf/ifcvf_main.c > @@ -324,7 +324,10 @@ static u32 ifcvf_vdpa_get_device_id(struct vdpa_device *vdpa_dev) > > static u32 ifcvf_vdpa_get_vendor_id(struct vdpa_device *vdpa_dev) > { > - return IFCVF_SUBSYS_VENDOR_ID; > + struct ifcvf_adapter *adapter = vdpa_to_adapter(vdpa_dev); > + struct pci_dev *pdev = adapter->pdev; > + > + return pdev->subsystem_vendor; > } > > static u32 ifcvf_vdpa_get_vq_align(struct vdpa_device *vdpa_dev)