Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp95457pxf; Wed, 10 Mar 2021 01:07:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJx1kslwLBorLnSRAFrfJqoatJB5r37vi0lrq8CJAqaSb62QxgdFqV9SBNm7GmdjT32c4h89 X-Received: by 2002:a17:906:3388:: with SMTP id v8mr2617925eja.278.1615367246504; Wed, 10 Mar 2021 01:07:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615367246; cv=none; d=google.com; s=arc-20160816; b=mHojduiuA0i3zP/od6fY/ZCSPoBzKtgdA6SLiAe7ID+8lnnbMivLCOTK26Y9+tGBHy mZwqfnOhwAHyGDpjxri9/Lwn5IEojdw8O1J21eIu7j6CtrXnhDWPyuFIKdVWJY9WrvTA qY5ViyLwlbOYowojBSOaCgdNyNr5BIfAqpngfjsqS1gU3D77hlJLlik3qmkqBcDpgnfw 6NOe2BJ2Khj1KaZHdi7JFlSchOdYV81REYcYPubMaCNXzf3VXDNEhIOPhq7QRiBYHdXj 3aspnFNwi1QoaiDxayud5cjFWG2WpLPrqTU1/Pj87V18BS/d/ay+6Nz23nrZxAQ0S/T/ C+/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=uqvY6AZhleb8cx1idegvYcwTPxW1bxjLl5PnapcvjuA=; b=hzbsKbtiMMPkF/QKWhV0Vx0Q1P1Et3mC6AqvaJe8WOlse0AStbYM9ovIjZMdnkzF/x jtMvqVH9CPXGE6ZZQjal1ZSsYOlIq6IAq0vOpK6+Q8iHhyhh6OlZ6SLEdIiahBcLLEPS 7XI+30CqN4toeLKAxg5TfnXv+Y+1V9bdRtz1VE7LZ2Tw+o4RUuy4bMdai44Wn+K6nPjj 4b4AV6vpE1vu2o5pgjhm6LvXoYGtiX/h7OoTPGoB9PAhgKLdFTvHLXaiQHWuJowRCokf OWME/fsUmcI9ngcOIA8WjatTeftTkgY3GzR8qr10DZuSaw7Ni9m8sruyBuICDVyRLfi1 HriA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e24si10964083ejc.739.2021.03.10.01.07.01; Wed, 10 Mar 2021 01:07:26 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232532AbhCJJGE (ORCPT + 99 others); Wed, 10 Mar 2021 04:06:04 -0500 Received: from mga03.intel.com ([134.134.136.65]:64352 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230156AbhCJJGC (ORCPT ); Wed, 10 Mar 2021 04:06:02 -0500 IronPort-SDR: WvL3AhV9FgVx/hoshrlyhd91I235PLsrdaksrnIS19+GN3URZLZ4hfPpmRUYHLTnxJNaOW8NFL prDO9HYfdvxQ== X-IronPort-AV: E=McAfee;i="6000,8403,9917"; a="188461255" X-IronPort-AV: E=Sophos;i="5.81,237,1610438400"; d="scan'208";a="188461255" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Mar 2021 01:06:02 -0800 IronPort-SDR: T85nlmfwjxlaXG2m59tn8p4maoCvmhmQd7FB1coXIb4ARwEeWrdJ9rWgpFVopgmyCaROAlbsEa XWKyrHMlHHbQ== X-IronPort-AV: E=Sophos;i="5.81,237,1610438400"; d="scan'208";a="410110283" Received: from unknown (HELO localhost.localdomain.bj.intel.com) ([10.240.193.73]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Mar 2021 01:06:00 -0800 From: Zhu Lingshan To: jasowang@redhat.com, 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, Zhu Lingshan Subject: [PATCH V3 1/6] vDPA/ifcvf: get_vendor_id returns a device specific vendor id Date: Wed, 10 Mar 2021 17:00:47 +0800 Message-Id: <20210310090052.4762-2-lingshan.zhu@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210310090052.4762-1-lingshan.zhu@intel.com> References: <20210310090052.4762-1-lingshan.zhu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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) -- 2.27.0