From: Kulikov Vasiliy <segooon@gmail.com>
To: kernel-janitors@vger.kernel.org
Cc: Kyle McMartin <kyle@mcmartin.ca>, Helge Deller <deller@gmx.de>,
"James E.J. Bottomley" <jejb@parisc-linux.org>,
Frans Pop <elendil@planet.nl>,
Thomas Gleixner <tglx@linutronix.de>,
linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 07/11] parisc: superio: do not use PCI resources before pci_enable_device()
Date: Tue, 03 Aug 2010 15:44:13 +0000 [thread overview]
Message-ID: <1280850253-6128-1-git-send-email-segooon@gmail.com> (raw)
IRQ and resource[] may not have correct values until
after PCI hotplug setup occurs at pci_enable_device() time.
The semantic match that finds this problem is as follows:
// <smpl>
@@
identifier x;
identifier request ~= "pci_request.*|pci_resource.*";
@@
(
* x->irq
|
* x->resource
|
* request(x, ...)
)
...
*pci_enable_device(x)
// </smpl>
Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
---
drivers/parisc/superio.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/parisc/superio.c b/drivers/parisc/superio.c
index f7806d8..c8a36a2 100644
--- a/drivers/parisc/superio.c
+++ b/drivers/parisc/superio.c
@@ -169,8 +169,6 @@ superio_init(struct pci_dev *pcidev)
/* ...then properly fixup the USB to point at suckyio PIC */
sio->usb_pdev->irq = superio_fixup_irq(sio->usb_pdev);
- printk(KERN_INFO PFX "Found NS87560 Legacy I/O device at %s (IRQ %i)\n",
- pci_name(pdev), pdev->irq);
pci_read_config_dword (pdev, SIO_SP1BAR, &sio->sp1_base);
sio->sp1_base &= ~1;
@@ -204,6 +202,9 @@ superio_init(struct pci_dev *pcidev)
ret = pci_enable_device(pdev);
BUG_ON(ret < 0); /* not too much we can do about this... */
+ printk(KERN_INFO PFX "Found NS87560 Legacy I/O device at %s (IRQ %i)\n",
+ pci_name(pdev), pdev->irq);
+
/*
* Next project is programming the onboard interrupt controllers.
* PDC hasn't done this for us, since it's using polled I/O.
--
1.7.0.4
WARNING: multiple messages have this Message-ID (diff)
From: Kulikov Vasiliy <segooon@gmail.com>
To: kernel-janitors@vger.kernel.org
Cc: Kyle McMartin <kyle@mcmartin.ca>, Helge Deller <deller@gmx.de>,
"James E.J. Bottomley" <jejb@parisc-linux.org>,
Frans Pop <elendil@planet.nl>,
Thomas Gleixner <tglx@linutronix.de>,
linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 07/11] parisc: superio: do not use PCI resources before pci_enable_device()
Date: Tue, 3 Aug 2010 19:44:13 +0400 [thread overview]
Message-ID: <1280850253-6128-1-git-send-email-segooon@gmail.com> (raw)
IRQ and resource[] may not have correct values until
after PCI hotplug setup occurs at pci_enable_device() time.
The semantic match that finds this problem is as follows:
// <smpl>
@@
identifier x;
identifier request ~= "pci_request.*|pci_resource.*";
@@
(
* x->irq
|
* x->resource
|
* request(x, ...)
)
...
*pci_enable_device(x)
// </smpl>
Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
---
drivers/parisc/superio.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/parisc/superio.c b/drivers/parisc/superio.c
index f7806d8..c8a36a2 100644
--- a/drivers/parisc/superio.c
+++ b/drivers/parisc/superio.c
@@ -169,8 +169,6 @@ superio_init(struct pci_dev *pcidev)
/* ...then properly fixup the USB to point at suckyio PIC */
sio->usb_pdev->irq = superio_fixup_irq(sio->usb_pdev);
- printk(KERN_INFO PFX "Found NS87560 Legacy I/O device at %s (IRQ %i)\n",
- pci_name(pdev), pdev->irq);
pci_read_config_dword (pdev, SIO_SP1BAR, &sio->sp1_base);
sio->sp1_base &= ~1;
@@ -204,6 +202,9 @@ superio_init(struct pci_dev *pcidev)
ret = pci_enable_device(pdev);
BUG_ON(ret < 0); /* not too much we can do about this... */
+ printk(KERN_INFO PFX "Found NS87560 Legacy I/O device at %s (IRQ %i)\n",
+ pci_name(pdev), pdev->irq);
+
/*
* Next project is programming the onboard interrupt controllers.
* PDC hasn't done this for us, since it's using polled I/O.
--
1.7.0.4
next reply other threads:[~2010-08-03 15:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-03 15:44 Kulikov Vasiliy [this message]
2010-08-03 15:44 ` [PATCH 07/11] parisc: superio: do not use PCI resources before pci_enable_device() Kulikov Vasiliy
2010-08-03 16:11 ` [PATCH 07/11] parisc: superio: do not use PCI resources before James Bottomley
2010-08-03 16:11 ` [PATCH 07/11] parisc: superio: do not use PCI resources before pci_enable_device() James Bottomley
2010-08-03 16:35 ` [PATCH 07/11] parisc: superio: do not use PCI resources before Vasiliy Kulikov
2010-08-03 16:35 ` [PATCH 07/11] parisc: superio: do not use PCI resources before pci_enable_device() Vasiliy Kulikov
2010-08-03 16:38 ` [PATCH 07/11] parisc: superio: do not use PCI resources before James Bottomley
2010-08-03 16:38 ` [PATCH 07/11] parisc: superio: do not use PCI resources before pci_enable_device() James Bottomley
2010-08-03 16:36 ` [PATCH 07/11] parisc: superio: do not use PCI resources before Jesse Barnes
2010-08-03 16:36 ` [PATCH 07/11] parisc: superio: do not use PCI resources before pci_enable_device() Jesse Barnes
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=1280850253-6128-1-git-send-email-segooon@gmail.com \
--to=segooon@gmail.com \
--cc=deller@gmx.de \
--cc=elendil@planet.nl \
--cc=jejb@parisc-linux.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=kyle@mcmartin.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-parisc@vger.kernel.org \
--cc=tglx@linutronix.de \
/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.