Displaying 20 results from an estimated 149 matches for "get_device_id".
2020 Feb 18
2
[PATCH] vhost: introduce vDPA based backend
...)
> +{
> +	struct vdpa_device *vdpa = dev_to_vdpa(dev);
> +	const struct vdpa_config_ops *ops = vdpa->config;
> +	struct vhost_vdpa *v;
> +	struct device *d;
> +	int minor, nvqs;
> +	int r;
> +
> +	/* Currently, we only accept the network devices. */
> +	if (ops->get_device_id(vdpa) != VIRTIO_ID_NET) {
> +		r = -ENOTSUPP;
> +		goto err;
> +	}
> +
> +	v = kzalloc(sizeof(*v), GFP_KERNEL | __GFP_RETRY_MAYFAIL);
> +	if (!v) {
> +		r = -ENOMEM;
> +		goto err;
> +	}
> +
> +	nvqs = VHOST_VDPA_VQ_MAX;
> +
> +	v->vqs = kmalloc_array(nvqs,...
2020 Feb 18
2
[PATCH] vhost: introduce vDPA based backend
...)
> +{
> +	struct vdpa_device *vdpa = dev_to_vdpa(dev);
> +	const struct vdpa_config_ops *ops = vdpa->config;
> +	struct vhost_vdpa *v;
> +	struct device *d;
> +	int minor, nvqs;
> +	int r;
> +
> +	/* Currently, we only accept the network devices. */
> +	if (ops->get_device_id(vdpa) != VIRTIO_ID_NET) {
> +		r = -ENOTSUPP;
> +		goto err;
> +	}
> +
> +	v = kzalloc(sizeof(*v), GFP_KERNEL | __GFP_RETRY_MAYFAIL);
> +	if (!v) {
> +		r = -ENOMEM;
> +		goto err;
> +	}
> +
> +	nvqs = VHOST_VDPA_VQ_MAX;
> +
> +	v->vqs = kmalloc_array(nvqs,...
2019 Sep 25
3
[PATCH V2 6/8] mdev: introduce virtio device and its device ops
...ev: mediated device
> + *				@features: feature support by the driver
> + *				Returns integer: success (0) or error (< 0)
> + * @set_config_cb:		Set the config interrupt callback
> + *				@mdev: mediated device
> + *				@cb: virtio-mdev interrupt callback
> structure
> + * @get_device_id:		Get virtio device id
> + *				@mdev: mediated device
> + *				Returns u32: virtio device id
> + * @get_vendor_id:		Get virtio vendor id
> + *				@mdev: mediated device
> + *				Returns u32: virtio vendor id
> + * @get_status:		Get the device status
> + *				@mdev: mediated de...
2019 Sep 25
3
[PATCH V2 6/8] mdev: introduce virtio device and its device ops
...ev: mediated device
> + *				@features: feature support by the driver
> + *				Returns integer: success (0) or error (< 0)
> + * @set_config_cb:		Set the config interrupt callback
> + *				@mdev: mediated device
> + *				@cb: virtio-mdev interrupt callback
> structure
> + * @get_device_id:		Get virtio device id
> + *				@mdev: mediated device
> + *				Returns u32: virtio device id
> + * @get_vendor_id:		Get virtio vendor id
> + *				@mdev: mediated device
> + *				Returns u32: virtio vendor id
> + * @get_status:		Get the device status
> + *				@mdev: mediated de...
2019 Sep 25
2
[PATCH V2 6/8] mdev: introduce virtio device and its device ops
...y the driver
> > > + *				Returns integer: success (0) or error (< 0)
> > > + * @set_config_cb:		Set the config interrupt callback
> > > + *				@mdev: mediated device
> > > + *				@cb: virtio-mdev interrupt callback
> > > structure
> > > + * @get_device_id:		Get virtio device id
> > > + *				@mdev: mediated device
> > > + *				Returns u32: virtio device id
> > > + * @get_vendor_id:		Get virtio vendor id
> > > + *				@mdev: mediated device
> > > + *				Returns u32: virtio vendor id
> > > + * @get_s...
2019 Sep 25
2
[PATCH V2 6/8] mdev: introduce virtio device and its device ops
...y the driver
> > > + *				Returns integer: success (0) or error (< 0)
> > > + * @set_config_cb:		Set the config interrupt callback
> > > + *				@mdev: mediated device
> > > + *				@cb: virtio-mdev interrupt callback
> > > structure
> > > + * @get_device_id:		Get virtio device id
> > > + *				@mdev: mediated device
> > > + *				Returns u32: virtio device id
> > > + * @get_vendor_id:		Get virtio vendor id
> > > + *				@mdev: mediated device
> > > + *				Returns u32: virtio vendor id
> > > + * @get_s...
2020 Feb 19
0
[PATCH] vhost: introduce vDPA based backend
...a = dev_to_vdpa(dev);
> > +	const struct vdpa_config_ops *ops = vdpa->config;
> > +	struct vhost_vdpa *v;
> > +	struct device *d;
> > +	int minor, nvqs;
> > +	int r;
> > +
> > +	/* Currently, we only accept the network devices. */
> > +	if (ops->get_device_id(vdpa) != VIRTIO_ID_NET) {
> > +		r = -ENOTSUPP;
> > +		goto err;
> > +	}
> > +
> > +	v = kzalloc(sizeof(*v), GFP_KERNEL | __GFP_RETRY_MAYFAIL);
> > +	if (!v) {
> > +		r = -ENOMEM;
> > +		goto err;
> > +	}
> > +
> > +	nvqs = VHOST_VDP...
2019 Sep 24
3
[PATCH V2 6/8] mdev: introduce virtio device and its device ops
...@mdev: mediated device
> + *				@features: feature support by the driver
> + *				Returns integer: success (0) or error (< 0)
> + * @set_config_cb:		Set the config interrupt callback
> + *				@mdev: mediated device
> + *				@cb: virtio-mdev interrupt callback structure
> + * @get_device_id:		Get virtio device id
> + *				@mdev: mediated device
> + *				Returns u32: virtio device id
> + * @get_vendor_id:		Get virtio vendor id
> + *				@mdev: mediated device
> + *				Returns u32: virtio vendor id
> + * @get_status:		Get the device status
> + *				@mdev: mediated de...
2014 Aug 20
1
[RFC PATCH 11/11] x86/MSI: Refactor x86 MSI code
...irq, int nvec)
>  {
>  	struct irq_cfg *cfg;
>  	int index;
>  	u16 devid;
> +	struct pci_dev *dev = msi->data;
> 
> -	if (!pdev)
> +	if (!dev)
>  		return -EINVAL;
> 
>  	cfg = irq_get_chip_data(irq);
>  	if (!cfg)
>  		return -EINVAL;
> 
> -	devid = get_device_id(&pdev->dev);
> +	devid = get_device_id(&dev->dev);
>  	index = alloc_irq_index(cfg, devid, nvec);
> 
>  	return index < 0 ? MAX_IRQS_PER_TABLE : index;
>  }
> 
> -static int msi_setup_irq(struct pci_dev *pdev, unsigned int irq,
> +static int msi_setup_irq(st...
2014 Aug 20
1
[RFC PATCH 11/11] x86/MSI: Refactor x86 MSI code
...irq, int nvec)
>  {
>  	struct irq_cfg *cfg;
>  	int index;
>  	u16 devid;
> +	struct pci_dev *dev = msi->data;
> 
> -	if (!pdev)
> +	if (!dev)
>  		return -EINVAL;
> 
>  	cfg = irq_get_chip_data(irq);
>  	if (!cfg)
>  		return -EINVAL;
> 
> -	devid = get_device_id(&pdev->dev);
> +	devid = get_device_id(&dev->dev);
>  	index = alloc_irq_index(cfg, devid, nvec);
> 
>  	return index < 0 ? MAX_IRQS_PER_TABLE : index;
>  }
> 
> -static int msi_setup_irq(struct pci_dev *pdev, unsigned int irq,
> +static int msi_setup_irq(st...
2014 Jul 26
0
[RFC PATCH 11/11] x86/MSI: Refactor x86 MSI code
...int irq, int nvec)
+static int msi_alloc_irq(struct msi_irqs *msi, int irq, int nvec)
 {
 	struct irq_cfg *cfg;
 	int index;
 	u16 devid;
+	struct pci_dev *dev = msi->data;
 
-	if (!pdev)
+	if (!dev)
 		return -EINVAL;
 
 	cfg = irq_get_chip_data(irq);
 	if (!cfg)
 		return -EINVAL;
 
-	devid = get_device_id(&pdev->dev);
+	devid = get_device_id(&dev->dev);
 	index = alloc_irq_index(cfg, devid, nvec);
 
 	return index < 0 ? MAX_IRQS_PER_TABLE : index;
 }
 
-static int msi_setup_irq(struct pci_dev *pdev, unsigned int irq,
+static int msi_setup_irq(struct msi_irqs *msi, unsigned int irq,...
2019 Oct 18
2
[PATCH V4 4/6] mdev: introduce virtio device and its device ops
...t; + * @set_config_cb:		Set the config interrupt callback
> + *				@mdev: mediated device
> + *				@cb: virtio-mdev interrupt callback structure
> + * @get_vq_num_max:		Get the max size of virtqueue
> + *				@mdev: mediated device
> + *				Returns u16: max size of virtqueue
> + * @get_device_id:		Get virtio device id
> + *				@mdev: mediated device
> + *				Returns u32: virtio device id
> + * @get_vendor_id:		Get virtio vendor id
> + *				@mdev: mediated device
> + *				Returns u32: virtio vendor id
How is the vendor id defined? As for normal virtio-pci devices?
> + *...
2019 Oct 18
2
[PATCH V4 4/6] mdev: introduce virtio device and its device ops
...t; + * @set_config_cb:		Set the config interrupt callback
> + *				@mdev: mediated device
> + *				@cb: virtio-mdev interrupt callback structure
> + * @get_vq_num_max:		Get the max size of virtqueue
> + *				@mdev: mediated device
> + *				Returns u16: max size of virtqueue
> + * @get_device_id:		Get virtio device id
> + *				@mdev: mediated device
> + *				Returns u32: virtio device id
> + * @get_vendor_id:		Get virtio vendor id
> + *				@mdev: mediated device
> + *				Returns u32: virtio vendor id
How is the vendor id defined? As for normal virtio-pci devices?
> + *...
2019 Oct 23
2
[PATCH V5 4/6] mdev: introduce virtio device and its device ops
...t; + * @set_config_cb:		Set the config interrupt callback
> + *				@mdev: mediated device
> + *				@cb: virtio-mdev interrupt callback structure
> + * @get_vq_num_max:		Get the max size of virtqueue
> + *				@mdev: mediated device
> + *				Returns u16: max size of virtqueue
> + * @get_device_id:		Get virtio device id
> + *				@mdev: mediated device
> + *				Returns u32: virtio device id
> + * @get_vendor_id:		Get id for the vendor that provides this device
> + *				@mdev: mediated device
> + *				Returns u32: virtio vendor id
> + * @get_status:			Get the device status
&g...
2019 Oct 23
2
[PATCH V5 4/6] mdev: introduce virtio device and its device ops
...t; + * @set_config_cb:		Set the config interrupt callback
> + *				@mdev: mediated device
> + *				@cb: virtio-mdev interrupt callback structure
> + * @get_vq_num_max:		Get the max size of virtqueue
> + *				@mdev: mediated device
> + *				Returns u16: max size of virtqueue
> + * @get_device_id:		Get virtio device id
> + *				@mdev: mediated device
> + *				Returns u32: virtio device id
> + * @get_vendor_id:		Get id for the vendor that provides this device
> + *				@mdev: mediated device
> + *				Returns u32: virtio vendor id
> + * @get_status:			Get the device status
&g...
2019 Oct 18
1
[PATCH V4 4/6] mdev: introduce virtio device and its device ops
...ev);
> +	u64 (*get_features)(struct mdev_device *mdev);
> +	int (*set_features)(struct mdev_device *mdev, u64 features);
> +	void (*set_config_cb)(struct mdev_device *mdev,
> +			      struct virtio_mdev_callback *cb);
> +	u16 (*get_vq_num_max)(struct mdev_device *mdev);
> +	u32 (*get_device_id)(struct mdev_device *mdev);
> +	u32 (*get_vendor_id)(struct mdev_device *mdev);
> +	u8 (*get_status)(struct mdev_device *mdev);
> +	void (*set_status)(struct mdev_device *mdev, u8 status);
> +	void (*get_config)(struct mdev_device *mdev, unsigned int offset,
> +			   void *buf, unsig...
2019 Sep 24
0
[PATCH V2 6/8] mdev: introduce virtio device and its device ops
...supported by the driver
+ *				@mdev: mediated device
+ *				@features: feature support by the driver
+ *				Returns integer: success (0) or error (< 0)
+ * @set_config_cb:		Set the config interrupt callback
+ *				@mdev: mediated device
+ *				@cb: virtio-mdev interrupt callback structure
+ * @get_device_id:		Get virtio device id
+ *				@mdev: mediated device
+ *				Returns u32: virtio device id
+ * @get_vendor_id:		Get virtio vendor id
+ *				@mdev: mediated device
+ *				Returns u32: virtio vendor id
+ * @get_status:		Get the device status
+ *				@mdev: mediated device
+ *				Returns u8: virtio devi...
2019 Oct 11
0
[PATCH V3 5/7] mdev: introduce virtio device and its device ops
...r: success (0) or error (< 0)
+ * @set_config_cb:		Set the config interrupt callback
+ *				@mdev: mediated device
+ *				@cb: virtio-mdev interrupt callback structure
+ * @get_vq_num_max:		Get the max size of virtqueue
+ *				@mdev: mediated device
+ *				Returns u16: max size of virtqueue
+ * @get_device_id:		Get virtio device id
+ *				@mdev: mediated device
+ *				Returns u32: virtio device id
+ * @get_vendor_id:		Get virtio vendor id
+ *				@mdev: mediated device
+ *				Returns u32: virtio vendor id
+ * @get_status: 		Get the device status
+ *				@mdev: mediated device
+ *				Returns u8: virtio dev...
2019 Sep 26
0
[PATCH V2 6/8] mdev: introduce virtio device and its device ops
...>>>> + *				Returns integer: success (0) or error (< 0)
>>>> + * @set_config_cb:		Set the config interrupt callback
>>>> + *				@mdev: mediated device
>>>> + *				@cb: virtio-mdev interrupt callback
>>>> structure
>>>> + * @get_device_id:		Get virtio device id
>>>> + *				@mdev: mediated device
>>>> + *				Returns u32: virtio device id
>>>> + * @get_vendor_id:		Get virtio vendor id
>>>> + *				@mdev: mediated device
>>>> + *				Returns u32: virtio vendor id
>>>>...
2019 Sep 25
0
[PATCH V2 6/8] mdev: introduce virtio device and its device ops
...+ *				@features: feature support by the driver
>> + *				Returns integer: success (0) or error (< 0)
>> + * @set_config_cb:		Set the config interrupt callback
>> + *				@mdev: mediated device
>> + *				@cb: virtio-mdev interrupt callback
>> structure
>> + * @get_device_id:		Get virtio device id
>> + *				@mdev: mediated device
>> + *				Returns u32: virtio device id
>> + * @get_vendor_id:		Get virtio vendor id
>> + *				@mdev: mediated device
>> + *				Returns u32: virtio vendor id
>> + * @get_status:		Get the device status
>&g...