public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [3/3] PCI segment support
@ 2003-04-07 23:44 Matthew Wilcox
  2003-04-08 16:38 ` Ivan Kokshaysky
  0 siblings, 1 reply; 19+ messages in thread
From: Matthew Wilcox @ 2003-04-07 23:44 UTC (permalink / raw)
  To: linux-kernel


I'm putting this patch out for comments rather than merging, since I'm
aware that it won't apply to Linus' tree any more.

 - Add segment to pci_bus.
 - Change the sysfs name of each device to include a 16-bit segment ID.

diff -urpNX dontdiff linux-2.5.66/drivers/pci/probe.c linux-2.5.66-laptop/drivers/pci/probe.c
--- linux-2.5.66/drivers/pci/probe.c	2003-04-04 08:43:01.000000000 -0600
+++ linux-2.5.66-laptop/drivers/pci/probe.c	2003-04-04 14:36:37.000000000 -0600
@@ -510,7 +510,7 @@ pci_scan_device(struct pci_bus *bus, int
 	pci_name_device(dev);
 
 	/* now put in global tree */
-	strcpy(dev->dev.bus_id,dev->slot_name);
+	sprintf(dev->dev.bus_id, "%04x:%s", bus->segment, dev->slot_name);
 	dev->dev.dma_mask = &dev->dma_mask;
 
 	return dev;
diff -urpNX dontdiff linux-2.5.66/drivers/pcmcia/cardbus.c linux-2.5.66-laptop/drivers/pcmcia/cardbus.c
--- linux-2.5.66/drivers/pcmcia/cardbus.c	2003-04-04 08:43:59.000000000 -0600
+++ linux-2.5.66-laptop/drivers/pcmcia/cardbus.c	2003-04-04 14:36:36.000000000 -0600
@@ -282,7 +282,8 @@ int cb_alloc(socket_info_t * s)
 
 		pci_setup_device(dev);
 
-		strcpy(dev->dev.bus_id, dev->slot_name);
+		sprintf(dev->dev.bus_id, "%04x:%s", bus->segment,
+				dev->slot_name);
 
 		/* We need to assign resources for expansion ROM. */
 		for (r = 0; r < 7; r++) {
diff -urpNX dontdiff linux-2.5.66/include/linux/pci.h linux-2.5.66-laptop/include/linux/pci.h
--- linux-2.5.66/include/linux/pci.h	2003-04-04 08:43:21.000000000 -0600
+++ linux-2.5.66-laptop/include/linux/pci.h	2003-04-04 14:07:34.000000000 -0600
@@ -451,6 +451,7 @@ struct pci_bus {
 	void		*sysdata;	/* hook for sys-specific extension */
 	struct proc_dir_entry *procdir;	/* directory entry in /proc/bus/pci */
 
+	unsigned short	segment;	/* domain/segment number */
 	unsigned char	number;		/* bus number */
 	unsigned char	primary;	/* number of primary bridge */
 	unsigned char	secondary;	/* number of secondary bridge */

-- 
"It's not Hollywood.  War is real, war is primarily not about defeat or
victory, it is about death.  I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2003-06-09 14:20 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-07 23:44 [PATCH] [3/3] PCI segment support Matthew Wilcox
2003-04-08 16:38 ` Ivan Kokshaysky
2003-04-08 16:50   ` Matthew Wilcox
2003-04-08 17:21     ` Ivan Kokshaysky
2003-04-08 17:31       ` Matthew Wilcox
2003-04-09  5:41         ` Grant Grundler
2003-06-08 16:43   ` Matthew Wilcox
2003-06-08 21:33     ` Russell King
2003-06-08 23:16       ` Alan Cox
2003-06-09 10:07     ` Ivan Kokshaysky
2003-06-09 10:20       ` David S. Miller
2003-06-09 10:42         ` Ivan Kokshaysky
2003-06-09 10:43           ` David S. Miller
2003-06-09 11:00             ` Ivan Kokshaysky
2003-06-09 11:04               ` David S. Miller
2003-06-09 11:17       ` Matthew Wilcox
2003-06-09 11:26         ` Ivan Kokshaysky
2003-06-09 14:34           ` Matthew Wilcox
2003-06-09 11:41         ` Ivan Kokshaysky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox