From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] More PCI fixes for 2.5.70
Date: Thu, 5 Jun 2003 14:01:17 -0700 [thread overview]
Message-ID: <10548468773655@kroah.com> (raw)
In-Reply-To: <10548468772648@kroah.com>
ChangeSet 1.1313, 2003/06/05 12:03:52-07:00, greg@kroah.com
[PATCH] PCI: fix up previous fusion driver pci changes
This makes the driver build properly now, and removes a direct access
of the pci_devices variable.
drivers/message/fusion/linux_compat.h | 7 ++-----
drivers/message/fusion/mptbase.c | 2 +-
2 files changed, 3 insertions(+), 6 deletions(-)
diff -Nru a/drivers/message/fusion/linux_compat.h b/drivers/message/fusion/linux_compat.h
--- a/drivers/message/fusion/linux_compat.h Thu Jun 5 13:53:01 2003
+++ b/drivers/message/fusion/linux_compat.h Thu Jun 5 13:53:01 2003
@@ -147,9 +147,7 @@
/* PCI/driver subsystem { */
-#ifndef pci_for_each_dev
-#define pci_for_each_dev(dev) for((dev)=pci_devices; (dev)!=NULL; (dev)=(dev)->next)
-#define pci_peek_next_dev(dev) ((dev)->next ? (dev)->next : NULL)
+#if 0 /* FIXME Don't know what to use to check for the proper kernel version */
#define DEVICE_COUNT_RESOURCE 6
#define PCI_BASEADDR_FLAGS(idx) base_address[idx]
#define PCI_BASEADDR_START(idx) base_address[idx] & ~0xFUL
@@ -169,11 +167,10 @@
(4 - size); \
})
#else
-#define pci_peek_next_dev(dev) ((dev) != pci_dev_g(&pci_devices) ? pci_dev_g((dev)->global_list.next) : NULL)
#define PCI_BASEADDR_FLAGS(idx) resource[idx].flags
#define PCI_BASEADDR_START(idx) resource[idx].start
#define PCI_BASEADDR_SIZE(dev,idx) (dev)->resource[idx].end - (dev)->resource[idx].start + 1
-#endif /* } ifndef pci_for_each_dev */
+#endif /* } ifndef 0 */
/* Compatability for the 2.3.x PCI DMA API. */
diff -Nru a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
--- a/drivers/message/fusion/mptbase.c Thu Jun 5 13:53:01 2003
+++ b/drivers/message/fusion/mptbase.c Thu Jun 5 13:53:01 2003
@@ -1184,7 +1184,7 @@
* Do some kind of look ahead here...
*/
if (pdev->devfn & 1) {
- pdev2 = pci_peek_next_dev(pdev);
+ pdev2 = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pdev);
if (pdev2 && (pdev2->vendor == 0x1000) &&
(PCI_SLOT(pdev2->devfn) == PCI_SLOT(pdev->devfn)) &&
(pdev2->device == pdev->device) &&
next prev parent reply other threads:[~2003-06-05 20:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-05 21:00 [BK PATCH] More PCI fixes for 2.5.70 Greg KH
2003-06-05 21:01 ` [PATCH] " Greg KH
2003-06-05 21:01 ` Greg KH
2003-06-05 21:01 ` Greg KH [this message]
2003-06-05 21:01 ` Greg KH
2003-06-05 21:01 ` Greg KH
2003-06-05 21:01 ` Greg KH
2003-06-05 21:01 ` Greg KH
2003-06-05 21:01 ` Greg KH
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=10548468773655@kroah.com \
--to=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
/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.