Displaying 20 results from an estimated 96 matches for "bus_regist".
Did you mean:
bus_register
2020 Feb 11
2
[PATCH V2 3/5] vDPA: introduce vDPA bus
...er
> + * @drv: the vdpa device driver to be unregistered
> + */
> +void vdpa_unregister_driver(struct vdpa_driver *drv)
> +{
> + driver_unregister(&drv->driver);
> +}
> +EXPORT_SYMBOL_GPL(vdpa_unregister_driver);
> +
> +static int vdpa_init(void)
> +{
> + if (bus_register(&vdpa_bus) != 0)
> + panic("virtio bus registration failed");
> + return 0;
> +}
Linus will tell you not to kill the kernel - return the error code and
propagate it up to the module init function.
> +/**
> + * vDPA device - representation of a vDPA device
> + *...
2020 Feb 11
2
[PATCH V2 3/5] vDPA: introduce vDPA bus
...er
> + * @drv: the vdpa device driver to be unregistered
> + */
> +void vdpa_unregister_driver(struct vdpa_driver *drv)
> +{
> + driver_unregister(&drv->driver);
> +}
> +EXPORT_SYMBOL_GPL(vdpa_unregister_driver);
> +
> +static int vdpa_init(void)
> +{
> + if (bus_register(&vdpa_bus) != 0)
> + panic("virtio bus registration failed");
> + return 0;
> +}
Linus will tell you not to kill the kernel - return the error code and
propagate it up to the module init function.
> +/**
> + * vDPA device - representation of a vDPA device
> + *...
2011 Mar 10
1
[PATCH 13/21] [PATCH 13/21] Staging: hv: Rename vmbus_driver_context structure
...mbus_on_msg_dpc,
+ tasklet_init(&hv_bus.msg_dpc, vmbus_on_msg_dpc,
(unsigned long)NULL);
- tasklet_init(&vmbus_drv_ctx->event_dpc, vmbus_on_event,
+ tasklet_init(&hv_bus.event_dpc, vmbus_on_event,
(unsigned long)NULL);
/* Now, register the bus with LDM */
- ret = bus_register(&vmbus_drv_ctx->bus);
+ ret = bus_register(&hv_bus.bus);
if (ret) {
ret = -1;
goto cleanup;
@@ -423,7 +420,7 @@ static int vmbus_bus_init(struct pci_dev *pdev)
DPRINT_ERR(VMBUS_DRV, "ERROR - Unable to request IRQ %d",
pdev->irq);
- bus_unregister(&...
2011 Mar 10
1
[PATCH 13/21] [PATCH 13/21] Staging: hv: Rename vmbus_driver_context structure
...mbus_on_msg_dpc,
+ tasklet_init(&hv_bus.msg_dpc, vmbus_on_msg_dpc,
(unsigned long)NULL);
- tasklet_init(&vmbus_drv_ctx->event_dpc, vmbus_on_event,
+ tasklet_init(&hv_bus.event_dpc, vmbus_on_event,
(unsigned long)NULL);
/* Now, register the bus with LDM */
- ret = bus_register(&vmbus_drv_ctx->bus);
+ ret = bus_register(&hv_bus.bus);
if (ret) {
ret = -1;
goto cleanup;
@@ -423,7 +420,7 @@ static int vmbus_bus_init(struct pci_dev *pdev)
DPRINT_ERR(VMBUS_DRV, "ERROR - Unable to request IRQ %d",
pdev->irq);
- bus_unregister(&...
2014 Sep 22
1
[PATCH] virtio: unify config_changed handling
...t virtio_device *dev)
+{
+ struct virtio_driver *drv = container_of(dev->dev.driver,
+ struct virtio_driver, driver);
+
+ if (drv && drv->config_changed)
+ drv->config_changed(dev);
+}
+EXPORT_SYMBOL_GPL(virtio_config_changed);
+
static int virtio_init(void)
{
if (bus_register(&virtio_bus) != 0)
diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c
index c600ccf..ef9a165 100644
--- a/drivers/virtio/virtio_mmio.c
+++ b/drivers/virtio/virtio_mmio.c
@@ -234,8 +234,6 @@ static irqreturn_t vm_interrupt(int irq, void *opaque)
{
struct virtio_mmio_de...
2014 Sep 22
1
[PATCH] virtio: unify config_changed handling
...t virtio_device *dev)
+{
+ struct virtio_driver *drv = container_of(dev->dev.driver,
+ struct virtio_driver, driver);
+
+ if (drv && drv->config_changed)
+ drv->config_changed(dev);
+}
+EXPORT_SYMBOL_GPL(virtio_config_changed);
+
static int virtio_init(void)
{
if (bus_register(&virtio_bus) != 0)
diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c
index c600ccf..ef9a165 100644
--- a/drivers/virtio/virtio_mmio.c
+++ b/drivers/virtio/virtio_mmio.c
@@ -234,8 +234,6 @@ static irqreturn_t vm_interrupt(int irq, void *opaque)
{
struct virtio_mmio_de...
2011 Aug 15
9
[PATCH 0/8] Staging: hv: vmbus: Driver cleanup
Further cleanup of the vmbus driver:
1) Cleanup the interrupt handler by inlining some code.
2) Ensure message handling is performed on the same CPU that
takes the vmbus interrupt.
3) Check for events before messages (from the host).
4) Disable auto eoi for the vmbus interrupt since Linux will eoi the
interrupt anyway.
5) Some general cleanup.
Regards,
K. Y
2011 Aug 15
9
[PATCH 0/8] Staging: hv: vmbus: Driver cleanup
Further cleanup of the vmbus driver:
1) Cleanup the interrupt handler by inlining some code.
2) Ensure message handling is performed on the same CPU that
takes the vmbus interrupt.
3) Check for events before messages (from the host).
4) Disable auto eoi for the vmbus interrupt since Linux will eoi the
interrupt anyway.
5) Some general cleanup.
Regards,
K. Y
2020 Feb 12
0
[PATCH V2 3/5] vDPA: introduce vDPA bus
...to be unregistered
>> + */
>> +void vdpa_unregister_driver(struct vdpa_driver *drv)
>> +{
>> + driver_unregister(&drv->driver);
>> +}
>> +EXPORT_SYMBOL_GPL(vdpa_unregister_driver);
>> +
>> +static int vdpa_init(void)
>> +{
>> + if (bus_register(&vdpa_bus) != 0)
>> + panic("virtio bus registration failed");
>> + return 0;
>> +}
> Linus will tell you not to kill the kernel - return the error code and
> propagate it up to the module init function.
Yes, will fix.
>
>> +/**
>> + * vDP...
2020 Jul 17
0
[PATCH V2 3/6] vDPA: implement IRQ offloading helpers in vDPA core
...free_vq_irq(struct device *dev, struct vdpa_device *vdev, int irq,
> + int qid, void *dev_id)
> +{
> + devm_free_irq(dev, irq, dev_id);
> + vdpa_unsetup_irq(vdev, qid);
> +}
> +EXPORT_SYMBOL_GPL(vdpa_free_vq_irq);
> +
> static int vdpa_init(void)
> {
> return bus_register(&vdpa_bus);
> diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h
> index 239db79..7d64d83 100644
> --- a/include/linux/vdpa.h
> +++ b/include/linux/vdpa.h
> @@ -220,17 +220,30 @@ struct vdpa_device *__vdpa_alloc_device(struct device *parent,
>
> int vdpa_regist...
2020 Jul 13
0
[PATCH 4/7] vDPA: implement IRQ offloading helpers in vDPA core
...free_vq_irq(struct device *dev, struct vdpa_device *vdev, int irq,
> + int qid, void *dev_id)
> +{
> + devm_free_irq(dev, irq, dev_id);
> + vdpa_unsetup_irq(vdev, qid);
> +}
> +EXPORT_SYMBOL_GPL(vdpa_free_vq_irq);
> +
> static int vdpa_init(void)
> {
> return bus_register(&vdpa_bus);
> diff --git a/drivers/vhost/Kconfig b/drivers/vhost/Kconfig
Let squash the vhost patch into patch 3.
> index d3688c6..587fbae 100644
> --- a/drivers/vhost/Kconfig
> +++ b/drivers/vhost/Kconfig
> @@ -65,6 +65,7 @@ config VHOST_VDPA
> tristate "Vhost d...
2014 Oct 05
0
[PATCH 04/16] virtio-pci: move freeze/restore to virtio core
...e(dev);
+ if (ret) {
+ add_status(dev, VIRTIO_CONFIG_S_FAILED);
+ return ret;
+ }
+ /* Finally, tell the device we're all set */
+ add_status(dev, VIRTIO_CONFIG_S_DRIVER_OK);
+ }
+
+ return 0;
+}
+EXPORT_SYMBOL_GPL(virtio_device_restore);
+#endif
+
static int virtio_init(void)
{
if (bus_register(&virtio_bus) != 0)
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index 58cbf6e..d34ebfa 100644
--- a/drivers/virtio/virtio_pci.c
+++ b/drivers/virtio/virtio_pci.c
@@ -57,9 +57,6 @@ struct virtio_pci_device
/* Vectors allocated, excluding per-vq vectors if any */
u...
2014 Oct 06
0
[PATCH v2 03/15] virtio-pci: move freeze/restore to virtio core
...e(dev);
+ if (ret) {
+ add_status(dev, VIRTIO_CONFIG_S_FAILED);
+ return ret;
+ }
+ /* Finally, tell the device we're all set */
+ add_status(dev, VIRTIO_CONFIG_S_DRIVER_OK);
+ }
+
+ return 0;
+}
+EXPORT_SYMBOL_GPL(virtio_device_restore);
+#endif
+
static int virtio_init(void)
{
if (bus_register(&virtio_bus) != 0)
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index 58cbf6e..d34ebfa 100644
--- a/drivers/virtio/virtio_pci.c
+++ b/drivers/virtio/virtio_pci.c
@@ -57,9 +57,6 @@ struct virtio_pci_device
/* Vectors allocated, excluding per-vq vectors if any */
u...
2014 Oct 13
0
[PATCH v4 03/25] virtio-pci: move freeze/restore to virtio core
...e(dev);
+ if (ret) {
+ add_status(dev, VIRTIO_CONFIG_S_FAILED);
+ return ret;
+ }
+ }
+
+ /* Finally, tell the device we're all set */
+ add_status(dev, VIRTIO_CONFIG_S_DRIVER_OK);
+
+ return 0;
+}
+EXPORT_SYMBOL_GPL(virtio_device_restore);
+#endif
+
static int virtio_init(void)
{
if (bus_register(&virtio_bus) != 0)
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index f39f4e7..d34ebfa 100644
--- a/drivers/virtio/virtio_pci.c
+++ b/drivers/virtio/virtio_pci.c
@@ -57,9 +57,6 @@ struct virtio_pci_device
/* Vectors allocated, excluding per-vq vectors if any */
u...
2014 Oct 13
0
[PATCH v4 03/25] virtio-pci: move freeze/restore to virtio core
...e(dev);
+ if (ret) {
+ add_status(dev, VIRTIO_CONFIG_S_FAILED);
+ return ret;
+ }
+ }
+
+ /* Finally, tell the device we're all set */
+ add_status(dev, VIRTIO_CONFIG_S_DRIVER_OK);
+
+ return 0;
+}
+EXPORT_SYMBOL_GPL(virtio_device_restore);
+#endif
+
static int virtio_init(void)
{
if (bus_register(&virtio_bus) != 0)
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index f39f4e7..d34ebfa 100644
--- a/drivers/virtio/virtio_pci.c
+++ b/drivers/virtio/virtio_pci.c
@@ -57,9 +57,6 @@ struct virtio_pci_device
/* Vectors allocated, excluding per-vq vectors if any */
u...
2014 Oct 05
0
[PATCH 02/16] virtio: unify config_changed handling
...t virtio_device *dev)
+{
+ struct virtio_driver *drv = container_of(dev->dev.driver,
+ struct virtio_driver, driver);
+
+ if (drv && drv->config_changed)
+ drv->config_changed(dev);
+}
+EXPORT_SYMBOL_GPL(virtio_config_changed);
+
static int virtio_init(void)
{
if (bus_register(&virtio_bus) != 0)
diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c
index c600ccf..ef9a165 100644
--- a/drivers/virtio/virtio_mmio.c
+++ b/drivers/virtio/virtio_mmio.c
@@ -234,8 +234,6 @@ static irqreturn_t vm_interrupt(int irq, void *opaque)
{
struct virtio_mmio_de...
2014 Oct 06
0
[PATCH v2 02/15] virtio: unify config_changed handling
...device);
+void virtio_config_changed(struct virtio_device *dev)
+{
+ struct virtio_driver *drv = drv_to_virtio(dev->dev.driver);
+
+ if (drv && drv->config_changed)
+ drv->config_changed(dev);
+}
+EXPORT_SYMBOL_GPL(virtio_config_changed);
+
static int virtio_init(void)
{
if (bus_register(&virtio_bus) != 0)
diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c
index c600ccf..ef9a165 100644
--- a/drivers/virtio/virtio_mmio.c
+++ b/drivers/virtio/virtio_mmio.c
@@ -234,8 +234,6 @@ static irqreturn_t vm_interrupt(int irq, void *opaque)
{
struct virtio_mmio_de...
2020 Apr 28
0
[PATCH 5/5] virtio: Add bounce DMA ops
...);
> + virtio_bounce_set_dma_ops(dev);
>
> spin_lock_init(&dev->config_lock);
> dev->config_enabled = false;
> @@ -431,6 +432,7 @@ EXPORT_SYMBOL_GPL(virtio_device_restore);
>
> static int virtio_init(void)
> {
> + virtio_map_bounce_buffer();
> if (bus_register(&virtio_bus) != 0)
> panic("virtio bus registration failed");
> return 0;
> diff --git a/drivers/virtio/virtio_bounce.c b/drivers/virtio/virtio_bounce.c
> new file mode 100644
> index 0000000..3de8e0e
> --- /dev/null
> +++ b/drivers/virtio/virtio_bounce.c
&...
2011 Apr 29
17
[RESEND] [PATCH 00/18] Staging: hv: Cleanup vmbus driver code
This is a resend of the patches yet to be applied.
This patch-set addresses some of the bus/driver model cleanup that
Greg sugested over the last couple of days. In this patch-set we
deal with the following issues:
1) Cleanup error handling in the vmbus_probe() and
vmbus_child_device_register() functions. Fixed a
bug in the probe failure path as part of this cleanup.
2) The Windows
2011 Apr 29
17
[RESEND] [PATCH 00/18] Staging: hv: Cleanup vmbus driver code
This is a resend of the patches yet to be applied.
This patch-set addresses some of the bus/driver model cleanup that
Greg sugested over the last couple of days. In this patch-set we
deal with the following issues:
1) Cleanup error handling in the vmbus_probe() and
vmbus_child_device_register() functions. Fixed a
bug in the probe failure path as part of this cleanup.
2) The Windows