From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Yet more PCI fixes for 2.5.70
Date: Tue, 10 Jun 2003 11:49:26 -0700 [thread overview]
Message-ID: <10552709663992@kroah.com> (raw)
In-Reply-To: <1055270966633@kroah.com>
ChangeSet 1.1337, 2003/06/09 15:48:21-07:00, greg@kroah.com
PCI: remove pci_present() from drivers/net/dgrs.c
drivers/net/dgrs.c | 80 +++++++++++++++++++++++++----------------------------
1 files changed, 38 insertions(+), 42 deletions(-)
diff -Nru a/drivers/net/dgrs.c b/drivers/net/dgrs.c
--- a/drivers/net/dgrs.c Tue Jun 10 11:21:04 2003
+++ b/drivers/net/dgrs.c Tue Jun 10 11:21:04 2003
@@ -1356,55 +1356,51 @@
uint irq;
uint plxreg;
uint plxdma;
+ struct pci_dev *pdev = NULL;
/*
* First, check for PCI boards
*/
- if (pci_present())
+ while ((pdev = pci_find_device(SE6_PCI_VENDOR_ID, SE6_PCI_DEVICE_ID, pdev)) != NULL)
{
- struct pci_dev *pdev = NULL;
+ /*
+ * Get and check the bus-master and latency values.
+ * Some PCI BIOSes fail to set the master-enable bit,
+ * and the latency timer must be set to the maximum
+ * value to avoid data corruption that occurs when the
+ * timer expires during a transfer. Yes, it's a bug.
+ */
+ if (pci_enable_device(pdev))
+ continue;
+ pci_set_master(pdev);
+
+ plxreg = pci_resource_start (pdev, 0);
+ io = pci_resource_start (pdev, 1);
+ mem = pci_resource_start (pdev, 2);
+ pci_read_config_dword(pdev, 0x30, &plxdma);
+ irq = pdev->irq;
+ plxdma &= ~15;
+
+ /*
+ * On some BIOSES, the PLX "expansion rom" (used for DMA)
+ * address comes up as "0". This is probably because
+ * the BIOS doesn't see a valid 55 AA ROM signature at
+ * the "ROM" start and zeroes the address. To get
+ * around this problem the SE-6 is configured to ask
+ * for 4 MB of space for the dual port memory. We then
+ * must set its range back to 2 MB, and use the upper
+ * half for DMA register access
+ */
+ OUTL(io + PLX_SPACE0_RANGE, 0xFFE00000L);
+ if (plxdma == 0)
+ plxdma = mem + (2048L * 1024L);
+ pci_write_config_dword(pdev, 0x30, plxdma + 1);
+ pci_read_config_dword(pdev, 0x30, &plxdma);
+ plxdma &= ~15;
- while ((pdev = pci_find_device(SE6_PCI_VENDOR_ID, SE6_PCI_DEVICE_ID, pdev)) != NULL)
- {
- /*
- * Get and check the bus-master and latency values.
- * Some PCI BIOSes fail to set the master-enable bit,
- * and the latency timer must be set to the maximum
- * value to avoid data corruption that occurs when the
- * timer expires during a transfer. Yes, it's a bug.
- */
- if (pci_enable_device(pdev))
- continue;
- pci_set_master(pdev);
+ dgrs_found_device(io, mem, irq, plxreg, plxdma);
- plxreg = pci_resource_start (pdev, 0);
- io = pci_resource_start (pdev, 1);
- mem = pci_resource_start (pdev, 2);
- pci_read_config_dword(pdev, 0x30, &plxdma);
- irq = pdev->irq;
- plxdma &= ~15;
-
- /*
- * On some BIOSES, the PLX "expansion rom" (used for DMA)
- * address comes up as "0". This is probably because
- * the BIOS doesn't see a valid 55 AA ROM signature at
- * the "ROM" start and zeroes the address. To get
- * around this problem the SE-6 is configured to ask
- * for 4 MB of space for the dual port memory. We then
- * must set its range back to 2 MB, and use the upper
- * half for DMA register access
- */
- OUTL(io + PLX_SPACE0_RANGE, 0xFFE00000L);
- if (plxdma == 0)
- plxdma = mem + (2048L * 1024L);
- pci_write_config_dword(pdev, 0x30, plxdma + 1);
- pci_read_config_dword(pdev, 0x30, &plxdma);
- plxdma &= ~15;
-
- dgrs_found_device(io, mem, irq, plxreg, plxdma);
-
- cards_found++;
- }
+ cards_found++;
}
/*
next prev parent reply other threads:[~2003-06-10 20:38 UTC|newest]
Thread overview: 76+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-10 18:49 [PATCH] Yet more PCI fixes for 2.5.70 Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH [this message]
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2003-06-10 18:33 [BK PATCH] " Greg KH
2003-06-10 18:49 ` [PATCH] " Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` Greg KH
2003-06-10 18:49 ` 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=10552709663992@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox