All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olaf Hering <olaf@aepfle.de>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Alan <alan@lxorguk.ukuu.org.uk>,
	Sergei Shtylyov <sshtylyov@ru.mvista.com>,
	linuxppc-dev@ozlabs.org, greg@kroah.com,
	linux-ide@vger.kernel.org, linux-pci@atrey.karlin.mff.cuni.cz
Subject: Re: What is the correct way to indicate an unassigned PCI resource ?
Date: Fri, 5 Jan 2007 11:26:18 +0100	[thread overview]
Message-ID: <20070105102618.GA9970@aepfle.de> (raw)
In-Reply-To: <1167946240.5273.11.camel@localhost.localdomain>

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,


WARNING: multiple messages have this Message-ID (diff)
From: Olaf Hering <olaf@aepfle.de>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linux-ide@vger.kernel.org, greg@kroah.com,
	linuxppc-dev@ozlabs.org, linux-pci@atrey.karlin.mff.cuni.cz,
	Alan <alan@lxorguk.ukuu.org.uk>
Subject: Re: What is the correct way to indicate an unassigned PCI resource ?
Date: Fri, 5 Jan 2007 11:26:18 +0100	[thread overview]
Message-ID: <20070105102618.GA9970@aepfle.de> (raw)
In-Reply-To: <1167946240.5273.11.camel@localhost.localdomain>

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,

  reply	other threads:[~2007-01-05 10:26 UTC|newest]

Thread overview: 90+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-30 16:52 pata_sl82c105 can not reserve IO region Olaf Hering
2006-11-30 17:10 ` Alan
2006-11-30 18:47   ` Olaf Hering
2006-12-01 18:34     ` Olaf Hering
2006-12-01 18:58       ` Alan
2006-12-01 19:05       ` Sergei Shtylyov
2006-12-01 19:05         ` Sergei Shtylyov
2006-12-01 21:53         ` Benjamin Herrenschmidt
2006-12-01 21:53           ` Benjamin Herrenschmidt
2006-12-01 22:15           ` Alan
2006-12-01 22:15             ` Alan
2006-12-01 22:19             ` Benjamin Herrenschmidt
2006-12-01 22:19               ` Benjamin Herrenschmidt
2006-12-02 14:36               ` U-Boot allocating PCI I/O space from 0 (Was: pata_sl82c105 can not reserve IO region) Sergei Shtylyov
2006-12-02 16:33                 ` Sergei Shtylyov
2006-12-26 20:53                   ` [U-Boot-Users] " Sergei Shtylyov
2006-12-03 23:39               ` pata_sl82c105 can not reserve IO region Alan
2006-12-03 23:39                 ` Alan
2006-12-03 17:12 ` Olaf Hering
2006-12-03 22:24   ` Olaf Hering
2006-12-03 23:23     ` Alan
2006-12-04  0:30       ` Olaf Hering
2006-12-04  9:21         ` Olaf Hering
2006-12-03 23:07   ` Alan
2006-12-04 12:38 ` [PATCH] mark PCI resource with start 0 as unassigned Olaf Hering
2006-12-04 12:44   ` Segher Boessenkool
2006-12-04 12:50     ` Sergei Shtylyov
2006-12-04 12:50       ` Sergei Shtylyov
2006-12-04 12:54       ` Segher Boessenkool
2006-12-04 12:54         ` Segher Boessenkool
2006-12-04 13:08         ` Sergei Shtylyov
2006-12-04 13:08           ` Sergei Shtylyov
2006-12-04 13:21           ` Alan
2006-12-04 13:25             ` Segher Boessenkool
2006-12-04 13:25               ` Segher Boessenkool
2006-12-04 14:15               ` Alan
2007-08-01 14:22               ` Sergei Shtylyov
2007-08-01 14:22                 ` Sergei Shtylyov
2007-08-01 15:51                 ` Alan Cox
2007-08-01 15:51                   ` Alan Cox
2007-08-06 18:04                   ` Segher Boessenkool
2007-08-06 18:04                     ` Segher Boessenkool
2007-08-06 19:52                     ` Alan Cox
2007-08-06 19:52                       ` Alan Cox
2007-08-06 22:14                     ` Benjamin Herrenschmidt
2007-08-06 22:14                       ` Benjamin Herrenschmidt
2006-12-04 13:27             ` Sergei Shtylyov
2006-12-04 13:27               ` Sergei Shtylyov
2006-12-04 14:22               ` What is the correct way to indicate an unassigned PCI resource ? Alan
2006-12-04 14:34                 ` Sergei Shtylyov
2006-12-04 14:34                   ` Sergei Shtylyov
2006-12-04 14:44                   ` Alan
2006-12-04 15:40                     ` Sergei Shtylyov
2006-12-04 15:40                       ` Sergei Shtylyov
2006-12-04 15:55                       ` Sergei Shtylyov
2006-12-04 15:55                         ` Sergei Shtylyov
2006-12-04 20:53                         ` Guennadi Liakhovetski
2006-12-04 20:53                           ` Guennadi Liakhovetski
2006-12-05  4:43                           ` Benjamin Herrenschmidt
2006-12-05  4:43                             ` Benjamin Herrenschmidt
2006-12-05  4:41                 ` Benjamin Herrenschmidt
2006-12-05  4:41                   ` Benjamin Herrenschmidt
2006-12-05  8:15                   ` Olaf Hering
2006-12-05  8:15                     ` Olaf Hering
2006-12-05 20:19                     ` Benjamin Herrenschmidt
2006-12-05 20:19                       ` Benjamin Herrenschmidt
2006-12-05 21:26                       ` Sergei Shtylyov
2006-12-05 21:26                         ` Sergei Shtylyov
2007-01-04 17:49                       ` Olaf Hering
2007-01-04 21:30                         ` Benjamin Herrenschmidt
2007-01-05 10:26                           ` Olaf Hering [this message]
2007-01-05 10:26                             ` Olaf Hering
2007-01-05 12:05                             ` Benjamin Herrenschmidt
2007-01-05 12:05                               ` Benjamin Herrenschmidt
2006-12-05 10:51                   ` Gabriel Paubert
2006-12-05 10:51                     ` Gabriel Paubert
2006-12-05 12:38                     ` Sergei Shtylyov
2006-12-05 12:38                       ` Sergei Shtylyov
2006-12-05 17:37                       ` Grant Grundler
2006-12-05 17:37                         ` Grant Grundler
2006-12-05 19:22                         ` Sergei Shtylyov
2006-12-05 19:22                           ` Sergei Shtylyov
2006-12-04 12:56     ` [PATCH] mark PCI resource with start 0 as unassigned Olaf Hering
2006-12-04 13:05       ` Segher Boessenkool
2006-12-04 12:47   ` Sergei Shtylyov
2006-12-04 12:40 ` [PATCH] add delay around sl82c105_reset_engine calls Olaf Hering
2006-12-04 13:02   ` Alan
2006-12-04 13:12     ` Olaf Hering
2007-01-04  6:42     ` Olaf Hering
2007-01-04 10:53       ` Alan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070105102618.GA9970@aepfle.de \
    --to=olaf@aepfle.de \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=benh@kernel.crashing.org \
    --cc=greg@kroah.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-pci@atrey.karlin.mff.cuni.cz \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=sshtylyov@ru.mvista.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.