Skip to contentSkip to conversation

PCI bugfixes for 2.6.12-rc4

PATCH New Greg KH 3 participants 9 messages May 17, 2005 – Jun 1, 2005

Subsystems (2)
lore
Share & tools
lore

Greg KH

author
#0 lore raw

PATCH 1/1 PCI bugfixes for 2.6.12-rc4

Here are 6 patches for the 2.6.12-rc4 tree that fix some PCI and PCI Hotplug bugs. They also delete a lot of code that is no longer needed from the pci hotplug core. There are also two patches in here that make it easier for userspace to autoload modules for PCI devices. All of these patches have been in the past few -mm releases.

Please pull from:

	rsync://rsync.kernel.org/pub/scm/linux/kernel/git/gregkh/pci-2.6.git/

Full patches will be sent to the linux-usb-devel and linux-pci mailing lists, if anyone wants to see them.

thanks,

greg k-h

 drivers/pci/hotplug.c                   |  119 ----------
 drivers/pci/hotplug/cpci_hotplug.h      |    2 
 drivers/pci/hotplug/cpci_hotplug_core.c |  169 +++++++--------
 drivers/pci/hotplug/cpci_hotplug_pci.c  |  352 ++------------------------------
 drivers/pci/hotplug/pciehp.h            |    1 
 drivers/pci/hotplug/pciehp_core.c       |    2 
 drivers/pci/hotplug/pciehp_hpc.c        |  156 +++++++-------
 drivers/pci/hotplug/shpchp_core.c       |    2 
 drivers/pci/hotplug/shpchp_ctrl.c       |   30 +-
 drivers/pci/pci-sysfs.c                 |   12 +
 drivers/pci/pci.h                       |   27 --
 drivers/pci/pcie/portdrv_bus.c          |    3 
 12 files changed, 233 insertions(+), 642 deletions(-)

Dely Sy:
o PCI Hotplug: get pciehp to work on the downstream port of a switch
o PCI Hotplug: Fix echoing 1 to power file of enabled slot problem with SHPC driver

Greg Kroah-Hartman:
o PCI: add MODALIAS to hotplug event for pci devices
o PCI: add modalias sysfs file for pci devices

Scott Murray:
o PCI Hotplug: remove pci_visit_dev
o PCI Hotplug: CPCI update

author
#1 lore raw

PATCH 1/1 PCI Hotplug: Fix echoing 1 to power file of enabled slot problem with SHPC driver

[PATCH] PCI Hotplug: Fix echoing 1 to power file of enabled slot problem with SHPC driver

Here is a patch to fix the problem of echoing 1 to "power" file to enabled slot causing the slot to power down, and echoing 0 to disabled slot causing shpchp_disabled_slot() to be called twice. This problem was reported by kenji Kaneshige.

Thanks,
Dely

---
commit ee17fd93a5892c162b0a02d58cdfdb9c50cf8467
tree d218eab66a47e883ddf84f5c30e9060cd99394ec
parent ff0d2f90fdc4b564d47a7c26b16de81a16cfa28e
author Dely Sy <[email protected]> Thu, 05 May 2005 11:57:25 -0700 committer Greg KH <[email protected]> Tue, 17 May 2005 14:31:10 -0700

 drivers/pci/hotplug/shpchp_core.c |    2 +-
 drivers/pci/hotplug/shpchp_ctrl.c |   30 +++++++++++++++---------------
 2 files changed, 16 insertions(+), 16 deletions(-)
drivers/pci/hotplug/shpchp_core.c (mode:100644) +1 -1
Index: drivers/pci/hotplug/shpchp_core.c
===================================================================
@@ -95,7 +95,7 @@
  */
 static void release_slot(struct hotplug_slot *hotplug_slot)
 {
-	struct slot *slot = (struct slot *)hotplug_slot->private;
+	struct slot *slot = hotplug_slot->private;
 
 	dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
 
drivers/pci/hotplug/shpchp_ctrl.c (mode:100644) +15 -15
Index: drivers/pci/hotplug/shpchp_ctrl.c
===================================================================
@@ -1885,7 +1885,7 @@
 	func = shpchp_slot_find(p_slot->bus, p_slot->device, 0);
 	if (!func) {
 		dbg("%s: Error! slot NULL\n", __FUNCTION__);
-		return 1;
+		return -ENODEV;
 	}
 
 	/* Check to see if (latch closed, card present, power off) */
@@ -1894,19 +1894,19 @@
 	if (rc || !getstatus) {
 		info("%s: no adapter on slot(%x)\n", __FUNCTION__, p_slot->number);
 		up(&p_slot->ctrl->crit_sect);
-		return 1;
+		return -ENODEV;
 	}
 	rc = p_slot->hpc_ops->get_latch_status(p_slot, &getstatus);
 	if (rc || getstatus) {
 		info("%s: latch open on slot(%x)\n", __FUNCTION__, p_slot->number);
 		up(&p_slot->ctrl->crit_sect);
-		return 1;
+		return -ENODEV;
 	}
 	rc = p_slot->hpc_ops->get_power_status(p_slot, &getstatus);
 	if (rc || getstatus) {
 		info("%s: already enabled on slot(%x)\n", __FUNCTION__, p_slot->number);
 		up(&p_slot->ctrl->crit_sect);
-		return 1;
+		return -ENODEV;
 	}
 	up(&p_slot->ctrl->crit_sect);
 
@@ -1914,7 +1914,7 @@
 
 	func = shpchp_slot_create(p_slot->bus);
 	if (func == NULL)
-		return 1;
+		return -ENOMEM;
 
 	func->bus = p_slot->bus;
 	func->device = p_slot->device;
@@ -1939,7 +1939,7 @@
 		/* Setup slot structure with entry for empty slot */
 		func = shpchp_slot_create(p_slot->bus);
 		if (func == NULL)
-			return (1);	/* Out of memory */
+			return -ENOMEM;	/* Out of memory */
 
 		func->bus = p_slot->bus;
 		func->device = p_slot->device;
@@ -1972,7 +1972,7 @@
 	struct pci_func *func;
 
 	if (!p_slot->ctrl)
-		return 1;
+		return -ENODEV;
 
 	pci_bus = p_slot->ctrl->pci_dev->subordinate;
 
@@ -1983,19 +1983,19 @@
 	if (ret || !getstatus) {
 		info("%s: no adapter on slot(%x)\n", __FUNCTION__, p_slot->number);
 		up(&p_slot->ctrl->crit_sect);
-		return 1;
+		return -ENODEV;
 	}
 	ret = p_slot->hpc_ops->get_latch_status(p_slot, &getstatus);
 	if (ret || getstatus) {
 		info("%s: latch open on slot(%x)\n", __FUNCTION__, p_slot->number);
 		up(&p_slot->ctrl->crit_sect);
-		return 1;
+		return -ENODEV;
 	}
 	ret = p_slot->hpc_ops->get_power_status(p_slot, &getstatus);
 	if (ret || !getstatus) {
 		info("%s: already disabled slot(%x)\n", __FUNCTION__, p_slot->number);
 		up(&p_slot->ctrl->crit_sect);
-		return 1;
+		return -ENODEV;
 	}
 	up(&p_slot->ctrl->crit_sect);
 
@@ -2011,7 +2011,7 @@
 		/* Check the Class Code */
 		rc = pci_bus_read_config_byte (pci_bus, devfn, 0x0B, &class_code);
 		if (rc)
-			return rc;
+			return -ENODEV;
 
 		if (class_code == PCI_BASE_CLASS_DISPLAY) {
 			/* Display/Video adapter (not supported) */
@@ -2020,13 +2020,13 @@
 			/* See if it's a bridge */
 			rc = pci_bus_read_config_byte (pci_bus, devfn, PCI_HEADER_TYPE, &header_type);
 			if (rc)
-				return rc;
+				return -ENODEV;
 
 			/* If it's a bridge, check the VGA Enable bit */
 			if ((header_type & 0x7F) == PCI_HEADER_TYPE_BRIDGE) {
 				rc = pci_bus_read_config_byte (pci_bus, devfn, PCI_BRIDGE_CONTROL, &BCR);
 				if (rc)
-					return rc;
+					return -ENODEV;
 
 				/* If the VGA Enable bit is set, remove isn't supported */
 				if (BCR & PCI_BRIDGE_CTL_VGA) {
@@ -2042,12 +2042,12 @@
 	if ((func != NULL) && !rc) {
 		rc = remove_board(func, p_slot->ctrl);
 	} else if (!rc)
-		rc = 1;
+		rc = -ENODEV;
 
 	if (p_slot)
 		update_slot_info(p_slot);
 
-	return(rc);
+	return rc;
 }
 
 
author
#2 lore raw

PATCH 1/1 PCI Hotplug: CPCI update

[PATCH] PCI Hotplug: CPCI update

[PATCH] CPCI: update

I have finally done some work to update the CompactPCI hotplug driver to fix some of the outstanding issues in 2.6:
- Added adapter and latch status ops so that those files will get created by the current PCI hotplug core. This used to not be required, but seems to be now after some of the sysfs rework in the core.
- Replaced slot list spinlock with a r/w semaphore to avoid any potential issues with sleeping. This quiets all of the runtime warnings.
- Reworked interrupt driven hot extraction handling to remove need for a polling operator for ENUM# status. There are a lot of boards that only have an interrupt driven by ENUM#, so this lowers the bar to entry.
- Replaced pci_visit_dev usage with better use of the PCI core functions. The new code is functionally equivalent to the previous code, but the use of pci_enable_device on insert needs to be investigated further, as I need to do some more testing to see if it is still necessary.

---
commit 43b7d7cfb157b5c8c5cc0933f4e96fd81adc81ca
tree 2af3b43ed8ee9468b1e0418c10275f33d23ced19
parent 8b245e45f34280ec61e3c8d643d4613b9e0eb7a4
author Scott Murray <[email protected]> Mon, 09 May 2005 17:31:50 -0400 committer Greg KH <[email protected]> Tue, 17 May 2005 14:31:11 -0700

 drivers/pci/hotplug/cpci_hotplug.h      |    2 
 drivers/pci/hotplug/cpci_hotplug_core.c |  169 +++++++--------
 drivers/pci/hotplug/cpci_hotplug_pci.c  |  352 ++------------------------------
 3 files changed, 112 insertions(+), 411 deletions(-)
drivers/pci/hotplug/cpci_hotplug.h (mode:100644) +1 -1
Index: drivers/pci/hotplug/cpci_hotplug.h
===================================================================
@@ -31,7 +31,7 @@
 #include <linux/types.h>
 #include <linux/pci.h>
 
-/* PICMG 2.12 R2.0 HS CSR bits: */
+/* PICMG 2.1 R2.0 HS CSR bits: */
 #define HS_CSR_INS	0x0080
 #define HS_CSR_EXT	0x0040
 #define HS_CSR_PI	0x0030
drivers/pci/hotplug/cpci_hotplug_core.c (mode:100644) +86 -83

366 lines not on this page · raw message

drivers/pci/hotplug/cpci_hotplug_pci.c (mode:100644) +25 -327

419 lines not on this page · raw message

author
#3 lore raw

PATCH 1/1 PCI Hotplug: get pciehp to work on the downstream port of a switch

[PATCH] PCI Hotplug: get pciehp to work on the downstream port of a switch

Here is the updated patch to get pciehp driver to work for downstream port of a switch and handle the difference in the offset value of PCI Express capability list item of different ports.

---
commit 8b245e45f34280ec61e3c8d643d4613b9e0eb7a4
tree aefa5d7e3d4689f5f1df21a7820088e8d9c7070b
parent ee17fd93a5892c162b0a02d58cdfdb9c50cf8467
author Dely Sy <[email protected]> Fri, 06 May 2005 17:19:09 -0700 committer Greg KH <[email protected]> Tue, 17 May 2005 14:31:11 -0700

 drivers/pci/hotplug/pciehp.h      |    1 
 drivers/pci/hotplug/pciehp_core.c |    2 
 drivers/pci/hotplug/pciehp_hpc.c  |  156 +++++++++++++++++++-------------------
 drivers/pci/pcie/portdrv_bus.c    |    3 
 4 files changed, 83 insertions(+), 79 deletions(-)
drivers/pci/hotplug/pciehp.h (mode:100644) +1 -0
Index: drivers/pci/hotplug/pciehp.h
===================================================================
@@ -130,6 +130,7 @@
 	u8 slot_bus;		/* Bus where the slots handled by this controller sit */
 	u8 ctrlcap;
 	u16 vendor_id;
+	u8 cap_base;
 };
 
 struct irq_mapping {
drivers/pci/hotplug/pciehp_core.c (mode:100644) +1 -1
Index: drivers/pci/hotplug/pciehp_core.c
===================================================================
@@ -607,7 +607,7 @@
 static struct pcie_port_service_id port_pci_ids[] = { { 
 	.vendor = PCI_ANY_ID, 
 	.device = PCI_ANY_ID,
-	.port_type = PCIE_RC_PORT, 
+	.port_type = PCIE_ANY_PORT,
 	.service_type = PCIE_PORT_SERVICE_HP,
 	.driver_data =	0, 
 	}, { /* end: all zeroes */ }
drivers/pci/hotplug/pciehp_hpc.c (mode:100644) +79 -77

491 lines not on this page · raw message

drivers/pci/pcie/portdrv_bus.c (mode:100644) +2 -1
Index: drivers/pci/pcie/portdrv_bus.c
===================================================================
@@ -39,7 +39,8 @@
 		driver->id_table->vendor != pciedev->id.vendor) ||
 	       (driver->id_table->device != PCI_ANY_ID &&
 		driver->id_table->device != pciedev->id.device) ||	
-		driver->id_table->port_type != pciedev->id.port_type ||
+	       (driver->id_table->port_type != PCIE_ANY_PORT &&
+		driver->id_table->port_type != pciedev->id.port_type) ||
 		driver->id_table->service_type != pciedev->id.service_type )
 		return 0;
 
author
#4 lore raw

PATCH 1/1 PCI Hotplug: remove pci_visit_dev

[PATCH] PCI Hotplug: remove pci_visit_dev

If my CPCI hotplug update patch is applied, then there are no longer any in tree users of the pci_visit_dev API, and it and its related code can be removed.

---
commit c22610dadc0452b1273494f2b5157123c6cd60e1
tree 150d5315df21f02605ad5a6541ef7cb00176d023
parent 43b7d7cfb157b5c8c5cc0933f4e96fd81adc81ca
author Scott Murray <[email protected]> Mon, 09 May 2005 17:36:27 -0400 committer Greg KH <[email protected]> Tue, 17 May 2005 14:31:11 -0700

 drivers/pci/hotplug.c |  109 --------------------------------------------------
 drivers/pci/pci.h     |   27 ------------
 2 files changed, 136 deletions(-)
drivers/pci/hotplug.c (mode:100644) +0 -109
Index: drivers/pci/hotplug.c
===================================================================
@@ -56,112 +56,3 @@
 
 	return 0;
 }
-
-static int pci_visit_bus (struct pci_visit * fn, struct pci_bus_wrapped *wrapped_bus, struct pci_dev_wrapped *wrapped_parent)
-{
-	struct list_head *ln;
-	struct pci_dev *dev;
-	struct pci_dev_wrapped wrapped_dev;
-	int result = 0;
-
-	pr_debug("PCI: Scanning bus %04x:%02x\n", pci_domain_nr(wrapped_bus->bus),
-		wrapped_bus->bus->number);
-
-	if (fn->pre_visit_pci_bus) {
-		result = fn->pre_visit_pci_bus(wrapped_bus, wrapped_parent);
-		if (result)
-			return result;
-	}
-
-	ln = wrapped_bus->bus->devices.next; 
-	while (ln != &wrapped_bus->bus->devices) {
-		dev = pci_dev_b(ln);
-		ln = ln->next;
-
-		memset(&wrapped_dev, 0, sizeof(struct pci_dev_wrapped));
-		wrapped_dev.dev = dev;
-
-		result = pci_visit_dev(fn, &wrapped_dev, wrapped_bus);
-		if (result)
-			return result;
-	}
-
-	if (fn->post_visit_pci_bus)
-		result = fn->post_visit_pci_bus(wrapped_bus, wrapped_parent);
-
-	return result;
-}
-
-static int pci_visit_bridge (struct pci_visit * fn,
-			     struct pci_dev_wrapped *wrapped_dev,
-			     struct pci_bus_wrapped *wrapped_parent)
-{
-	struct pci_bus *bus;
-	struct pci_bus_wrapped wrapped_bus;
-	int result = 0;
-
-	pr_debug("PCI: Scanning bridge %s\n", pci_name(wrapped_dev->dev));
-
-	if (fn->visit_pci_dev) {
-		result = fn->visit_pci_dev(wrapped_dev, wrapped_parent);
-		if (result)
-			return result;
-	}
-
-	bus = wrapped_dev->dev->subordinate;
-	if (bus) {
-		memset(&wrapped_bus, 0, sizeof(struct pci_bus_wrapped));
-		wrapped_bus.bus = bus;
-
-		result = pci_visit_bus(fn, &wrapped_bus, wrapped_dev);
-	}
-	return result;
-}
-
-/**
- * pci_visit_dev - scans the pci buses.
- * @fn: callback functions that are called while visiting
- * @wrapped_dev: the device to scan
- * @wrapped_parent: the bus where @wrapped_dev is connected to
- *
- * Every bus and every function is presented to a custom
- * function that can act upon it.
- */
-int pci_visit_dev(struct pci_visit *fn, struct pci_dev_wrapped *wrapped_dev,
-		  struct pci_bus_wrapped *wrapped_parent)
-{
-	struct pci_dev* dev = wrapped_dev ? wrapped_dev->dev : NULL;
-	int result = 0;
-
-	if (!dev)
-		return 0;
-
-	if (fn->pre_visit_pci_dev) {
-		result = fn->pre_visit_pci_dev(wrapped_dev, wrapped_parent);
-		if (result)
-			return result;
-	}
-
-	switch (dev->class >> 8) {
-		case PCI_CLASS_BRIDGE_PCI:
-			result = pci_visit_bridge(fn, wrapped_dev,
-						  wrapped_parent);
-			if (result)
-				return result;
-			break;
-		default:
-			pr_debug("PCI: Scanning device %s\n", pci_name(dev));
-			if (fn->visit_pci_dev) {
-				result = fn->visit_pci_dev (wrapped_dev,
-							    wrapped_parent);
-				if (result)
-					return result;
-			}
-	}
-
-	if (fn->post_visit_pci_dev)
-		result = fn->post_visit_pci_dev(wrapped_dev, wrapped_parent);
-
-	return result;
-}
-EXPORT_SYMBOL(pci_visit_dev);
drivers/pci/pci.h (mode:100644) +0 -27
Index: drivers/pci/pci.h
===================================================================
@@ -32,33 +32,6 @@
 extern unsigned char pci_bus_max_busnr(struct pci_bus *bus);
 extern int pci_bus_find_capability (struct pci_bus *bus, unsigned int devfn, int cap);
 
-struct pci_dev_wrapped {
-	struct pci_dev	*dev;
-	void		*data;
-};
-
-struct pci_bus_wrapped {
-	struct pci_bus	*bus;
-	void		*data;
-};
-
-struct pci_visit {
-	int (* pre_visit_pci_bus)	(struct pci_bus_wrapped *,
-					 struct pci_dev_wrapped *);
-	int (* post_visit_pci_bus)	(struct pci_bus_wrapped *,
-					 struct pci_dev_wrapped *);
-
-	int (* pre_visit_pci_dev)	(struct pci_dev_wrapped *,
-					 struct pci_bus_wrapped *);
-	int (* visit_pci_dev)		(struct pci_dev_wrapped *,
-					 struct pci_bus_wrapped *);
-	int (* post_visit_pci_dev)	(struct pci_dev_wrapped *,
-					 struct pci_bus_wrapped *);
-};
-
-extern int pci_visit_dev(struct pci_visit *fn,
-			 struct pci_dev_wrapped *wrapped_dev,
-			 struct pci_bus_wrapped *wrapped_parent);
 extern void pci_remove_legacy_files(struct pci_bus *bus);
 
 /* Lock for read/write access to pci device and bus lists */
author
#5 lore raw

PATCH 1/1 PCI: add modalias sysfs file for pci devices

[PATCH] PCI: add modalias sysfs file for pci devices

---
commit 9888549e0507cc95d1d7ade1595c00ff8e902659
tree 9c31d2b34ef9b747733f7f39916a8031f89c3d1e
parent c22610dadc0452b1273494f2b5157123c6cd60e1
author Greg KH <[email protected]> Thu, 05 May 2005 11:57:25 -0700 committer Greg KH <[email protected]> Tue, 17 May 2005 14:31:12 -0700

 drivers/pci/pci-sysfs.c |   12 ++++++++++++
 1 files changed, 12 insertions(+)
drivers/pci/pci-sysfs.c (mode:100644) +12 -0
Index: drivers/pci/pci-sysfs.c
===================================================================
@@ -73,6 +73,17 @@
 	return (str - buf);
 }
 
+static ssize_t modalias_show(struct device *dev, char *buf)
+{
+	struct pci_dev *pci_dev = to_pci_dev(dev);
+
+	return sprintf(buf, "pci:v%08Xd%08Xsv%08Xsd%08Xbc%02Xsc%02Xi%02x\n",
+		       pci_dev->vendor, pci_dev->device,
+		       pci_dev->subsystem_vendor, pci_dev->subsystem_device,
+		       (u8)(pci_dev->class >> 16), (u8)(pci_dev->class >> 8),
+		       (u8)(pci_dev->class));
+}
+
 struct device_attribute pci_dev_attrs[] = {
 	__ATTR_RO(resource),
 	__ATTR_RO(vendor),
@@ -82,6 +93,7 @@
 	__ATTR_RO(class),
 	__ATTR_RO(irq),
 	__ATTR_RO(local_cpus),
+	__ATTR_RO(modalias),
 	__ATTR_NULL,
 };
 
author
#6 lore raw

PATCH 1/1 PCI: add MODALIAS to hotplug event for pci devices

[PATCH] PCI: add MODALIAS to hotplug event for pci devices

---
commit d1ded203adf16b42ca90e9041120ae465ca5c4a6
tree 59c3218467807e1793fb4fc5d90141e072ab2212
parent 9888549e0507cc95d1d7ade1595c00ff8e902659
author Greg KH <[email protected]> Thu, 05 May 2005 11:57:25 -0700 committer Greg KH <[email protected]> Tue, 17 May 2005 14:31:12 -0700

 drivers/pci/hotplug.c |   10 ++++++++++
 1 files changed, 10 insertions(+)
drivers/pci/hotplug.c (mode:100644) +10 -0
Index: drivers/pci/hotplug.c
===================================================================
@@ -52,6 +52,16 @@
 	if ((buffer_size - length <= 0) || (i >= num_envp))
 		return -ENOMEM;
 
+	envp[i++] = scratch;
+	length += scnprintf (scratch, buffer_size - length,
+			    "MODALIAS=pci:v%08Xd%08Xsv%08Xsd%08Xbc%02Xsc%02Xi%02x\n",
+			    pdev->vendor, pdev->device,
+			    pdev->subsystem_vendor, pdev->subsystem_device,
+			    (u8)(pdev->class >> 16), (u8)(pdev->class >> 8),
+			    (u8)(pdev->class));
+	if ((buffer_size - length <= 0) || (i >= num_envp))
+		return -ENOMEM;
+
 	envp[i] = NULL;
 
 	return 0;
#7 lore raw

Re: [PATCH] PCI: add modalias sysfs file for pci devices

In reply to Greg KH
Quoted 1 line · Greg KH

[PATCH] PCI: add modalias sysfs file for pci devices

[With similar patch and $MODALIAS in hotplug path stuff
submitted for USB]

Speaking of all this... While the two (USB and PCI) are most important nowadays... Hmm, so probably all other similar "busses", like PCMCIA, even bluetooth, and "not so obvious ones" like IDE and SCSI, and PNP&EISA -- this same approach may be used for all, providing device/modalias file for all (scsi:t0 for sd_mod etc), and $MODALIAS for hotpluggable ones, with appropriate .modalias in modules...

I mean, are we on the way to converting just everything into this modalias thing, so that hotplug/modloading will be just one-liner?

Providing "trivial" aliases for eg PNP or EISA busses seems to be a bit redundrand (a list of pnp:dXXX in device/modalias in addition to XXX in device/id), but without that this whole picture will not be consistent... or should it?

/mjt

#8 lore raw

Re: [PATCH] PCI: add modalias sysfs file for pci devices

Quoted 13 lines · Michael Tokarev
Quoted 1 line · Greg KH

[PATCH] PCI: add modalias sysfs file for pci devices

[With similar patch and $MODALIAS in hotplug path stuff
submitted for USB]

Speaking of all this... While the two (USB and PCI) are most important nowadays... Hmm, so probably all other similar "busses", like PCMCIA, even bluetooth, and "not so obvious ones" like IDE and SCSI, and PNP&EISA -- this same approach may be used for all, providing device/modalias file for all (scsi:t0 for sd_mod etc), and $MODALIAS for hotpluggable ones, with appropriate .modalias in modules...

Quoted 3 lines

I mean, are we on the way to converting just everything into this modalias thing, so that hotplug/modloading will be just one-liner?

Yes, care to make up patches for these other busses?

thanks,

greg k-h