aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2006-03-05 10:49:48 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-03-23 17:35:16 -0500
commit5eeca8e688b6affba4cd85262152fdd1b274ad33 (patch)
treeb7b44b1b931ea80809dac937db230116bab2e721
parent1305e9184a3de84f78dca102b293d21007bb6c49 (diff)
[PATCH] PCI: the scheduled removal of PCI_LEGACY_PROC
This patch contains the scheduled removal of PCI_LEGACY_PROC. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--Documentation/feature-removal-schedule.txt7
-rw-r--r--drivers/pci/Kconfig17
-rw-r--r--drivers/pci/proc.c126
3 files changed, 0 insertions, 150 deletions
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index afeaf6218ea2..c7a4d0faab22 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -158,13 +158,6 @@ Who: Adrian Bunk <bunk@stusta.de>
158 158
159--------------------------- 159---------------------------
160 160
161What: Legacy /proc/pci interface (PCI_LEGACY_PROC)
162When: March 2006
163Why: deprecated since 2.5.53 in favor of lspci(8)
164Who: Adrian Bunk <bunk@stusta.de>
165
166---------------------------
167
168What: pci_module_init(driver) 161What: pci_module_init(driver)
169When: January 2007 162When: January 2007
170Why: Is replaced by pci_register_driver(pci_driver). 163Why: Is replaced by pci_register_driver(pci_driver).
diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig
index f187fd8aeed6..d3dcce815d15 100644
--- a/drivers/pci/Kconfig
+++ b/drivers/pci/Kconfig
@@ -13,23 +13,6 @@ config PCI_MSI
13 13
14 If you don't know what to do here, say N. 14 If you don't know what to do here, say N.
15 15
16config PCI_LEGACY_PROC
17 bool "Legacy /proc/pci interface"
18 depends on PCI
19 ---help---
20 This feature enables a procfs file -- /proc/pci -- that provides a
21 summary of PCI devices in the system.
22
23 This feature has been deprecated as of v2.5.53, in favor of using the
24 tool lspci(8). This feature may be removed at a future date.
25
26 lspci can provide the same data, as well as much more. lspci is a part of
27 the pci-utils package, which should be installed by your distribution.
28 See <file:Documentation/Changes> for information on where to get the latest
29 version.
30
31 When in doubt, say N.
32
33config PCI_DEBUG 16config PCI_DEBUG
34 bool "PCI Debugging" 17 bool "PCI Debugging"
35 depends on PCI && DEBUG_KERNEL 18 depends on PCI && DEBUG_KERNEL
diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c
index 92a885760832..54b2ebc9c91a 100644
--- a/drivers/pci/proc.c
+++ b/drivers/pci/proc.c
@@ -458,131 +458,6 @@ int pci_proc_detach_bus(struct pci_bus* bus)
458 return 0; 458 return 0;
459} 459}
460 460
461#ifdef CONFIG_PCI_LEGACY_PROC
462
463/*
464 * Backward compatible /proc/pci interface.
465 */
466
467/*
468 * Convert some of the configuration space registers of the device at
469 * address (bus,devfn) into a string (possibly several lines each).
470 * The configuration string is stored starting at buf[len]. If the
471 * string would exceed the size of the buffer (SIZE), 0 is returned.
472 */
473static int show_dev_config(struct seq_file *m, void *v)
474{
475 struct pci_dev *dev = v;
476 struct pci_dev *first_dev;
477 struct pci_driver *drv;
478 u32 class_rev;
479 unsigned char latency, min_gnt, max_lat;
480 int reg;
481
482 first_dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, NULL);
483 if (dev == first_dev)
484 seq_puts(m, "PCI devices found:\n");
485 pci_dev_put(first_dev);
486
487 drv = pci_dev_driver(dev);
488
489 pci_user_read_config_dword(dev, PCI_CLASS_REVISION, &class_rev);
490 pci_user_read_config_byte (dev, PCI_LATENCY_TIMER, &latency);
491 pci_user_read_config_byte (dev, PCI_MIN_GNT, &min_gnt);
492 pci_user_read_config_byte (dev, PCI_MAX_LAT, &max_lat);
493 seq_printf(m, " Bus %2d, device %3d, function %2d:\n",
494 dev->bus->number, PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn));
495 seq_printf(m, " Class %04x", class_rev >> 16);
496 seq_printf(m, ": PCI device %04x:%04x", dev->vendor, dev->device);
497 seq_printf(m, " (rev %d).\n", class_rev & 0xff);
498
499 if (dev->irq)
500 seq_printf(m, " IRQ %d.\n", dev->irq);
501
502 if (latency || min_gnt || max_lat) {
503 seq_printf(m, " Master Capable. ");
504 if (latency)
505 seq_printf(m, "Latency=%d. ", latency);
506 else
507 seq_puts(m, "No bursts. ");
508 if (min_gnt)
509 seq_printf(m, "Min Gnt=%d.", min_gnt);
510 if (max_lat)
511 seq_printf(m, "Max Lat=%d.", max_lat);
512 seq_putc(m, '\n');
513 }
514
515 for (reg = 0; reg < 6; reg++) {
516 struct resource *res = dev->resource + reg;
517 unsigned long base, end, flags;
518
519 base = res->start;
520 end = res->end;
521 flags = res->flags;
522 if (!end)
523 continue;
524
525 if (flags & PCI_BASE_ADDRESS_SPACE_IO) {
526 seq_printf(m, " I/O at 0x%lx [0x%lx].\n",
527 base, end);
528 } else {
529 const char *pref, *type = "unknown";
530
531 if (flags & PCI_BASE_ADDRESS_MEM_PREFETCH)
532 pref = "P";
533 else
534 pref = "Non-p";
535 switch (flags & PCI_BASE_ADDRESS_MEM_TYPE_MASK) {
536 case PCI_BASE_ADDRESS_MEM_TYPE_32:
537 type = "32 bit"; break;
538 case PCI_BASE_ADDRESS_MEM_TYPE_1M:
539 type = "20 bit"; break;
540 case PCI_BASE_ADDRESS_MEM_TYPE_64:
541 type = "64 bit"; break;
542 }
543 seq_printf(m, " %srefetchable %s memory at "
544 "0x%lx [0x%lx].\n", pref, type,
545 base,
546 end);
547 }
548 }
549 return 0;
550}
551
552static struct seq_operations proc_pci_op = {
553 .start = pci_seq_start,
554 .next = pci_seq_next,
555 .stop = pci_seq_stop,
556 .show = show_dev_config
557};
558
559static int proc_pci_open(struct inode *inode, struct file *file)
560{
561 return seq_open(file, &proc_pci_op);
562}
563static struct file_operations proc_pci_operations = {
564 .open = proc_pci_open,
565 .read = seq_read,
566 .llseek = seq_lseek,
567 .release = seq_release,
568};
569
570static void legacy_proc_init(void)
571{
572 struct proc_dir_entry * entry = create_proc_entry("pci", 0, NULL);
573 if (entry)
574 entry->proc_fops = &proc_pci_operations;
575}
576
577#else
578
579static void legacy_proc_init(void)
580{
581
582}
583
584#endif /* CONFIG_PCI_LEGACY_PROC */
585
586static int proc_bus_pci_dev_open(struct inode *inode, struct file *file) 461static int proc_bus_pci_dev_open(struct inode *inode, struct file *file)
587{ 462{
588 return seq_open(file, &proc_bus_pci_devices_op); 463 return seq_open(file, &proc_bus_pci_devices_op);
@@ -606,7 +481,6 @@ static int __init pci_proc_init(void)
606 while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { 481 while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
607 pci_proc_attach_device(dev); 482 pci_proc_attach_device(dev);
608 } 483 }
609 legacy_proc_init();
610 return 0; 484 return 0;
611} 485}
612 486