init.c (9d4d8572a539ef807e21c196f145aa365fd52f0e) init.c (89e3becd8f821e507052e012d2559dcda59f538e)
1// SPDX-License-Identifier: GPL-2.0
2/* Copyright(c) 2019 Intel Corporation. All rights rsvd. */
3#include <linux/init.h>
4#include <linux/kernel.h>
5#include <linux/module.h>
6#include <linux/slab.h>
7#include <linux/pci.h>
8#include <linux/interrupt.h>

--- 321 unchanged lines hidden (view full) ---

330
331static int idxd_probe(struct idxd_device *idxd)
332{
333 struct pci_dev *pdev = idxd->pdev;
334 struct device *dev = &pdev->dev;
335 int rc;
336
337 dev_dbg(dev, "%s entered and resetting device\n", __func__);
1// SPDX-License-Identifier: GPL-2.0
2/* Copyright(c) 2019 Intel Corporation. All rights rsvd. */
3#include <linux/init.h>
4#include <linux/kernel.h>
5#include <linux/module.h>
6#include <linux/slab.h>
7#include <linux/pci.h>
8#include <linux/interrupt.h>

--- 321 unchanged lines hidden (view full) ---

330
331static int idxd_probe(struct idxd_device *idxd)
332{
333 struct pci_dev *pdev = idxd->pdev;
334 struct device *dev = &pdev->dev;
335 int rc;
336
337 dev_dbg(dev, "%s entered and resetting device\n", __func__);
338 idxd_device_init_reset(idxd);
338 rc = idxd_device_init_reset(idxd);
339 if (rc < 0)
340 return rc;
341
339 dev_dbg(dev, "IDXD reset complete\n");
340
341 if (IS_ENABLED(CONFIG_INTEL_IDXD_SVM)) {
342 rc = idxd_enable_system_pasid(idxd);
343 if (rc < 0)
344 dev_warn(dev, "Failed to enable PASID. No SVA support: %d\n", rc);
345 else
346 set_bit(IDXD_FLAG_PASID_ENABLED, &idxd->flags);

--- 239 unchanged lines hidden ---
342 dev_dbg(dev, "IDXD reset complete\n");
343
344 if (IS_ENABLED(CONFIG_INTEL_IDXD_SVM)) {
345 rc = idxd_enable_system_pasid(idxd);
346 if (rc < 0)
347 dev_warn(dev, "Failed to enable PASID. No SVA support: %d\n", rc);
348 else
349 set_bit(IDXD_FLAG_PASID_ENABLED, &idxd->flags);

--- 239 unchanged lines hidden ---