search for: bus_type

Displaying 20 results from an estimated 241 matches for "bus_type".

2023 Mar 13
0
[PATCH 31/36] vhost-vdpa: vhost_vdpa_alloc_domain() should be using a const struct bus_type *
The function, vhost_vdpa_alloc_domain(), has a pointer to a struct bus_type, but it should be constant as the function it passes it to expects it to be const, and the vhost code does not modify it in any way. Cc: "Michael S. Tsirkin" <mst at redhat.com> Cc: Jason Wang <jasowang at redhat.com> Cc: kvm at vger.kernel.org Cc: virtualization at lists.lin...
2020 Apr 14
0
[PATCH v2 13/33] iommu: Export bus_iommu_probe() and make is safe for re-probing
...oup_get(dev) != NULL) + return 0; + if (!try_module_get(ops->owner)) { ret = -EINVAL; goto err_free_dev_iommu; @@ -1783,7 +1787,7 @@ static int iommu_group_create_direct_mappings(struct iommu_group *group) iommu_do_create_direct_mappings); } -static int bus_iommu_probe(struct bus_type *bus) +int bus_iommu_probe(struct bus_type *bus) { const struct iommu_ops *ops = bus->iommu_ops; int ret; diff --git a/include/linux/iommu.h b/include/linux/iommu.h index 30170d191e5e..fea1622408ad 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h @@ -445,6 +445,7 @@ static inl...
2008 Jun 14
0
[PATCH 1/2] virtio: Use bus_type probe and remove methods
On Friday 13 June 2008 22:46:40 Mark McLoughlin wrote: > Hook up to the probe() and remove() methods in bus_type > rather than device_driver. The latter has been preferred > since 2.6.16. > > Signed-off-by: Mark McLoughlin <markmc at redhat.com> Thanks, applied. Cheers, Rusty.
2015 Mar 11
2
[PATCH] virtio: Remove virtio device during shutdown
...evice *_d) +{ + struct virtio_device *dev = dev_to_virtio(_d); + struct virtio_driver *drv = drv_to_virtio(dev->dev.driver); + + virtio_config_disable(dev); + + drv->remove(dev); + + /* Driver should have reset device. */ + WARN_ON_ONCE(dev->config->get_status(dev)); +} + static struct bus_type virtio_bus = { .name = "virtio", .match = virtio_dev_match, @@ -276,6 +289,7 @@ static struct bus_type virtio_bus = { .uevent = virtio_uevent, .probe = virtio_dev_probe, .remove = virtio_dev_remove, + .shutdown = virtio_dev_shutdown, }; bool virtio_device_is_legacy_only(str...
2015 Mar 11
2
[PATCH] virtio: Remove virtio device during shutdown
...evice *_d) +{ + struct virtio_device *dev = dev_to_virtio(_d); + struct virtio_driver *drv = drv_to_virtio(dev->dev.driver); + + virtio_config_disable(dev); + + drv->remove(dev); + + /* Driver should have reset device. */ + WARN_ON_ONCE(dev->config->get_status(dev)); +} + static struct bus_type virtio_bus = { .name = "virtio", .match = virtio_dev_match, @@ -276,6 +289,7 @@ static struct bus_type virtio_bus = { .uevent = virtio_uevent, .probe = virtio_dev_probe, .remove = virtio_dev_remove, + .shutdown = virtio_dev_shutdown, }; bool virtio_device_is_legacy_only(str...
2020 Apr 14
0
[PATCH v2 11/33] iommu: Split off default domain allocation from group assignment
...t;, + iommu_domain_type_str(type), + dev_name(gtype->dev), + iommu_domain_type_str(gtype->type)); + gtype->type = 0; + } + + if (!gtype->dev) { + gtype->dev = dev; + gtype->type = type; + } + } + + return 0; +} + +static void probe_alloc_default_domain(struct bus_type *bus, + struct iommu_group *group) +{ + struct __group_domain_type gtype; + + memset(&gtype, 0, sizeof(gtype)); + + /* Ask for default domain requirements of all devices in the group */ + __iommu_group_for_each_dev(group, &gtype, + probe_get_default_domain_type); + + if (!gt...
2015 Mar 11
3
[PATCH] virtio: Remove virtio device during shutdown
...*_d) > +{ > + struct virtio_device *dev = dev_to_virtio(_d); > + /* > + * Reset the device to make it stop sending interrupts, DMA, etc. > + * We are shutting down, no need for full cleanup. > + */ > + dev->config->reset(dev); > + > +} > + > static struct bus_type virtio_bus = { > .name = "virtio", > .match = virtio_dev_match, > @@ -276,6 +288,7 @@ static struct bus_type virtio_bus = { > .uevent = virtio_uevent, > .probe = virtio_dev_probe, > .remove = virtio_dev_remove, > + .shutdown = virtio_dev_shutdown, > };...
2015 Mar 11
3
[PATCH] virtio: Remove virtio device during shutdown
...*_d) > +{ > + struct virtio_device *dev = dev_to_virtio(_d); > + /* > + * Reset the device to make it stop sending interrupts, DMA, etc. > + * We are shutting down, no need for full cleanup. > + */ > + dev->config->reset(dev); > + > +} > + > static struct bus_type virtio_bus = { > .name = "virtio", > .match = virtio_dev_match, > @@ -276,6 +288,7 @@ static struct bus_type virtio_bus = { > .uevent = virtio_uevent, > .probe = virtio_dev_probe, > .remove = virtio_dev_remove, > + .shutdown = virtio_dev_shutdown, > };...
2020 Apr 14
0
[PATCH v2 12/33] iommu: Move iommu_group_create_direct_mappings() out of iommu_group_add_device()
..., struct device *dev) dev->iommu_group = group; - iommu_group_create_direct_mappings(group, dev); - mutex_lock(&group->mutex); list_add_tail(&device->list, &group->devices); if (group->domain) @@ -1736,6 +1743,7 @@ static void probe_alloc_default_domain(struct bus_type *bus, gtype.type = iommu_def_domain_type; iommu_group_alloc_default_domain(bus, group, gtype.type); + } static int iommu_group_do_dma_attach(struct device *dev, void *data) @@ -1760,6 +1768,21 @@ static int __iommu_group_dma_attach(struct iommu_group *group) iommu_group_do_dma_at...
2020 Apr 14
0
[PATCH v2 08/33] iommu: Move default domain allocation to iommu_probe_device()
...644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -79,6 +79,16 @@ static bool iommu_cmd_line_dma_api(void) return !!(iommu_cmd_line & IOMMU_CMD_LINE_DMA_API); } +static int iommu_alloc_default_domain(struct device *dev); +static struct iommu_domain *__iommu_domain_alloc(struct bus_type *bus, + unsigned type); +static int __iommu_attach_device(struct iommu_domain *domain, + struct device *dev); +static int __iommu_attach_group(struct iommu_domain *domain, + struct iommu_group *group); +static void __iommu_detach_group(struct iommu_domain *domain, + struct iommu_gr...
2019 Oct 15
1
[PATCH V3 2/7] mdev: bus uevent support
...drv) > return 0; > } > > +static int mdev_uevent(struct device *dev, struct kobj_uevent_env *env) > +{ > + struct mdev_device *mdev = to_mdev_device(dev); > + > + return add_uevent_var(env, "MODALIAS=mdev:c%02X", mdev->class_id); > +} > + > struct bus_type mdev_bus_type = { > .name = "mdev", > .match = mdev_match, > + .uevent = mdev_uevent, > .probe = mdev_probe, > .remove = mdev_remove, > }; I'd merge that into the previous patch.
2013 Oct 08
0
[PATCH 5/8] virtio: convert bus code to use dev_groups
The dev_attrs field of struct bus_type is going away soon, dev_groups should be used instead. This converts the virtio bus code to use the correct field. Cc: Rusty Russell <rusty at rustcorp.com.au> Cc: "Michael S. Tsirkin" <mst at redhat.com> Cc: <virtualization at lists.linux-foundation.org> Signed-off-by...
2015 Mar 11
0
[PATCH] virtio: Remove virtio device during shutdown
...0; } +static void virtio_dev_shutdown(struct device *_d) +{ + struct virtio_device *dev = dev_to_virtio(_d); + /* + * Reset the device to make it stop sending interrupts, DMA, etc. + * We are shutting down, no need for full cleanup. + */ + dev->config->reset(dev); + +} + static struct bus_type virtio_bus = { .name = "virtio", .match = virtio_dev_match, @@ -276,6 +288,7 @@ static struct bus_type virtio_bus = { .uevent = virtio_uevent, .probe = virtio_dev_probe, .remove = virtio_dev_remove, + .shutdown = virtio_dev_shutdown, }; bool virtio_device_is_legacy_only(str...
2013 Oct 08
0
[PATCH 5/8] virtio: convert bus code to use dev_groups
The dev_attrs field of struct bus_type is going away soon, dev_groups should be used instead. This converts the virtio bus code to use the correct field. Cc: Rusty Russell <rusty at rustcorp.com.au> Cc: "Michael S. Tsirkin" <mst at redhat.com> Cc: <virtualization at lists.linux-foundation.org> Signed-off-by...
2015 Mar 11
0
[PATCH] virtio: Remove virtio device during shutdown
...0; } +static void virtio_dev_shutdown(struct device *_d) +{ + struct virtio_device *dev = dev_to_virtio(_d); + /* + * Reset the device to make it stop sending interrupts, DMA, etc. + * We are shutting down, no need for full cleanup. + */ + dev->config->reset(dev); + +} + static struct bus_type virtio_bus = { .name = "virtio", .match = virtio_dev_match, @@ -276,6 +288,7 @@ static struct bus_type virtio_bus = { .uevent = virtio_uevent, .probe = virtio_dev_probe, .remove = virtio_dev_remove, + .shutdown = virtio_dev_shutdown, }; bool virtio_device_is_legacy_only(str...
2015 Mar 12
0
[PATCH] virtio: Remove virtio device during shutdown
...v = dev_to_virtio(_d); > > + /* > > + * Reset the device to make it stop sending interrupts, DMA, etc. > > + * We are shutting down, no need for full cleanup. > > + */ > > + dev->config->reset(dev); > > + > > +} > > + > > static struct bus_type virtio_bus = { > > .name = "virtio", > > .match = virtio_dev_match, > > @@ -276,6 +288,7 @@ static struct bus_type virtio_bus = { > > .uevent = virtio_uevent, > > .probe = virtio_dev_probe, > > .remove = virtio_dev_remove, > > + .shutdo...
2015 Mar 12
0
[PATCH] virtio: Remove virtio device during shutdown
...v = dev_to_virtio(_d); > > + /* > > + * Reset the device to make it stop sending interrupts, DMA, etc. > > + * We are shutting down, no need for full cleanup. > > + */ > > + dev->config->reset(dev); > > + > > +} > > + > > static struct bus_type virtio_bus = { > > .name = "virtio", > > .match = virtio_dev_match, > > @@ -276,6 +288,7 @@ static struct bus_type virtio_bus = { > > .uevent = virtio_uevent, > > .probe = virtio_dev_probe, > > .remove = virtio_dev_remove, > > + .shutdo...
2009 Jul 02
0
3w_9xxx + Xen-patched 2.6.30 dom0 == bad LUN detection
...3.04 PQ: 0 ANSI: 3 scsi: On host 0 channel 0 id 0 only 511 (max_scsi_report_luns) of 788538 luns reported, try increasing max_scsi_report_luns. scsi: host 0 channel 0 id 0 lun 0xf85041d2065141d2 has a LUN larger than currently supported. Driver ''sd'' needs updating - please use bus_type methods Driver ''sr'' needs updating - please use bus_type methods sd 0:0:0:0: [sda] 1953103872 512-byte hardware sectors: (999 GB/931 GiB) sd 0:0:0:0: Attached scsi generic sg0 type 0 (XEN) PCI add device 00:1f.1 sd 0:0:0:0: [sda] Write Protect is off sd 0:0:0:0: [sda] Write cache...
2013 Oct 17
0
patch "virtio: convert bus code to use dev_groups" added to driver-core tree
...about this process, please let me know. >From 3736dab6e5e54c0f769f528f5616c335762bdac2 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman <gregkh at linuxfoundation.org> Date: Mon, 7 Oct 2013 18:27:39 -0700 Subject: virtio: convert bus code to use dev_groups The dev_attrs field of struct bus_type is going away soon, dev_groups should be used instead. This converts the virtio bus code to use the correct field. Cc: Rusty Russell <rusty at rustcorp.com.au> Cc: "Michael S. Tsirkin" <mst at redhat.com> Cc: <virtualization at lists.linux-foundation.org> Signed-off-by...
2013 Oct 17
0
patch "virtio: convert bus code to use dev_groups" added to driver-core tree
...about this process, please let me know. >From 3736dab6e5e54c0f769f528f5616c335762bdac2 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman <gregkh at linuxfoundation.org> Date: Mon, 7 Oct 2013 18:27:39 -0700 Subject: virtio: convert bus code to use dev_groups The dev_attrs field of struct bus_type is going away soon, dev_groups should be used instead. This converts the virtio bus code to use the correct field. Cc: Rusty Russell <rusty at rustcorp.com.au> Cc: "Michael S. Tsirkin" <mst at redhat.com> Cc: <virtualization at lists.linux-foundation.org> Signed-off-by...