Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6:
Revert "adjust legacy IDE resource setting (v2)"

+13 -32
+13 -32
drivers/pci/probe.c
··· 682 682 dev->irq = irq; 683 683 } 684 684 685 - static void change_legacy_io_resource(struct pci_dev * dev, unsigned index, 686 - unsigned start, unsigned end) 687 - { 688 - unsigned base = start & PCI_BASE_ADDRESS_IO_MASK; 689 - unsigned len = (end | ~PCI_BASE_ADDRESS_IO_MASK) - base + 1; 690 - 691 - /* 692 - * Some X versions get confused when the BARs reported through 693 - * /sys or /proc differ from those seen in config space, thus 694 - * try to update the config space values, too. 695 - */ 696 - if (!(pci_resource_flags(dev, index) & IORESOURCE_IO)) 697 - printk(KERN_WARNING "%s: cannot adjust BAR%u (not I/O)\n", 698 - pci_name(dev), index); 699 - else if (pci_resource_len(dev, index) != len) 700 - printk(KERN_WARNING "%s: cannot adjust BAR%u (size %04X)\n", 701 - pci_name(dev), index, (unsigned)pci_resource_len(dev, index)); 702 - else { 703 - printk(KERN_INFO "%s: trying to change BAR%u from %04X to %04X\n", 704 - pci_name(dev), index, 705 - (unsigned)pci_resource_start(dev, index), base); 706 - pci_write_config_dword(dev, PCI_BASE_ADDRESS_0 + index * 4, base); 707 - } 708 - pci_resource_start(dev, index) = start; 709 - pci_resource_end(dev, index) = end; 710 - pci_resource_flags(dev, index) = 711 - IORESOURCE_IO | IORESOURCE_PCI_FIXED | PCI_BASE_ADDRESS_SPACE_IO; 712 - } 685 + #define LEGACY_IO_RESOURCE (IORESOURCE_IO | IORESOURCE_PCI_FIXED) 713 686 714 687 /** 715 688 * pci_setup_device - fill in class and map information of a device ··· 735 762 u8 progif; 736 763 pci_read_config_byte(dev, PCI_CLASS_PROG, &progif); 737 764 if ((progif & 1) == 0) { 738 - change_legacy_io_resource(dev, 0, 0x1F0, 0x1F7); 739 - change_legacy_io_resource(dev, 1, 0x3F6, 0x3F6); 765 + dev->resource[0].start = 0x1F0; 766 + dev->resource[0].end = 0x1F7; 767 + dev->resource[0].flags = LEGACY_IO_RESOURCE; 768 + dev->resource[1].start = 0x3F6; 769 + dev->resource[1].end = 0x3F6; 770 + dev->resource[1].flags = LEGACY_IO_RESOURCE; 740 771 } 741 772 if ((progif & 4) == 0) { 742 - change_legacy_io_resource(dev, 2, 0x170, 0x177); 743 - change_legacy_io_resource(dev, 3, 0x376, 0x376); 773 + dev->resource[2].start = 0x170; 774 + dev->resource[2].end = 0x177; 775 + dev->resource[2].flags = LEGACY_IO_RESOURCE; 776 + dev->resource[3].start = 0x376; 777 + dev->resource[3].end = 0x376; 778 + dev->resource[3].flags = LEGACY_IO_RESOURCE; 744 779 } 745 780 } 746 781 break;