Re: What is the correct way to indicate an unassigned PCI resource ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 05, Benjamin Herrenschmidt wrote:

> Nah, but also set resource->end = 0 too and or-in IORESOURCE_UNSET for
> flags not (=) (or just set it to 0, I have no problem with completely
> clearing the resource, that will keep it out of the way)

I get this output with the change below:

Using INTC for W82c105 IDE controller.
W82c105: bn 0 dfn 19
00: f 0000000000000101 s 000000000000f000 e 000000000000f007
01: f 0000000000000101 s 000000000000f010 e 000000000000f013
02: f 0000000000000101 s 000000000000f020 e 000000000000f027
03: f 0000000000000101 s 000000000000f030 e 000000000000f033
04: f 0000000000000101 s 000000000000f040 e 000000000000f04f
05: f 0000000000000101 s 0000000000000000 e 000000000000000f
05: disable IO resource on W82c105 IDE controller
06: f 0000000000000000 s 0000000000000000 e 0000000000000000
07: f 0000000000000000 s 0000000000000000 e 0000000000000000
08: f 0000000000000000 s 0000000000000000 e 0000000000000000
09: f 0000000000000000 s 0000000000000000 e 0000000000000000
10: f 0000000000000000 s 0000000000000000 e 0000000000000000
11: f 0000000000000000 s 0000000000000000 e 0000000000000000

If thats ok, I will submit a patch without the printk.

@@ -130,11 +130,18 @@ static void fixup_winbond_82c105(struct 
        /* Enable LEGIRQ to use INTC instead of ISA interrupts */
        pci_write_config_dword(dev, 0x40, reg | (1<<11));
 
+       printk("W82c105: bn %x dfn %x\n", dev->bus->number, dev->devfn);
        for (i = 0; i < DEVICE_COUNT_RESOURCE; ++i) {
+               printk("%02d: f %016lx s %016lx e %016lx\n", i, dev->resource[i].flags, dev->resource[i].start, dev->resource[i].end);
                /* zap the 2nd function of the winbond chip */
                if (dev->resource[i].flags & IORESOURCE_IO
                    && dev->bus->number == 0 && dev->devfn == 0x81)
                        dev->resource[i].flags &= ~IORESOURCE_IO;
+               if (dev->resource[i].start == 0 && dev->resource[i].end) {
+                       printk("%02d: disable IO resource on W82c105 IDE controller\n", i);
+                       dev->resource[i].flags = 0;
+                       dev->resource[i].end = 0;
+               }
        }
 }
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_82C105,

-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux