ifcvf_main.c (0686082dbf7a204ca0fab326a820779e31666639) ifcvf_main.c (d8945ec411209272bcd4ae9e75ea1b078257e492)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Intel IFC VF NIC driver for virtio dataplane offloading
4 *
5 * Copyright (C) 2020 Intel Corporation.
6 *
7 * Author: Zhu Lingshan <lingshan.zhu@intel.com>
8 *

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

510
511 ifcvf_mgmt_dev = container_of(mdev, struct ifcvf_vdpa_mgmt_dev, mdev);
512 if (ifcvf_mgmt_dev->adapter)
513 return -EOPNOTSUPP;
514
515 pdev = ifcvf_mgmt_dev->pdev;
516 dev = &pdev->dev;
517 adapter = vdpa_alloc_device(struct ifcvf_adapter, vdpa,
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Intel IFC VF NIC driver for virtio dataplane offloading
4 *
5 * Copyright (C) 2020 Intel Corporation.
6 *
7 * Author: Zhu Lingshan <lingshan.zhu@intel.com>
8 *

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

510
511 ifcvf_mgmt_dev = container_of(mdev, struct ifcvf_vdpa_mgmt_dev, mdev);
512 if (ifcvf_mgmt_dev->adapter)
513 return -EOPNOTSUPP;
514
515 pdev = ifcvf_mgmt_dev->pdev;
516 dev = &pdev->dev;
517 adapter = vdpa_alloc_device(struct ifcvf_adapter, vdpa,
518 dev, &ifc_vdpa_ops, name);
518 dev, &ifc_vdpa_ops, name, false);
519 if (IS_ERR(adapter)) {
520 IFCVF_ERR(pdev, "Failed to allocate vDPA structure");
521 return PTR_ERR(adapter);
522 }
523
524 ifcvf_mgmt_dev->adapter = adapter;
525 pci_set_drvdata(pdev, ifcvf_mgmt_dev);
526

--- 159 unchanged lines hidden ---
519 if (IS_ERR(adapter)) {
520 IFCVF_ERR(pdev, "Failed to allocate vDPA structure");
521 return PTR_ERR(adapter);
522 }
523
524 ifcvf_mgmt_dev->adapter = adapter;
525 pci_set_drvdata(pdev, ifcvf_mgmt_dev);
526

--- 159 unchanged lines hidden ---