From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/6] Realview PCIX support - add main support module code
Date: Thu, 28 Oct 2010 15:02:48 +0100 [thread overview]
Message-ID: <20101028140248.GD3122@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20101020130253.22199.48589.stgit@e102602-lin.cambridge.arm.com>
On Wed, Oct 20, 2010 at 02:02:54PM +0100, Colin Tuckley wrote:
> +#include <mach/platform.h>
> +#include <asm/io.h>
linux/io.h
> +static void pcie_fix_sizes(void)
> +{
> + struct pci_dev *pdev = NULL;
> + int rrq;
> + int max_rrq = 4096;
> +
> + /* Set the max read request size for all devices to the
> + * smallest in the tree. So far, the only device we've seen
> + * that fails without this is the Marvell Yukon 88E8053 but
> + * this may fix other devices too.
> + */
> + while ((pdev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pdev)) != NULL) {
> + rrq = pcie_get_readrq(pdev);
> + if (rrq > 0 && rrq < max_rrq)
> + max_rrq = rrq;
> + }
> +
> + pdev = NULL; /* reset scan */
> + while ((pdev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pdev)) != NULL) {
> + rrq = pcie_get_readrq(pdev);
> + printk(KERN_DEBUG "%s: %02x:%02x %04x/%04x : RRQSZ %d -> %d\n",
> + __func__, pdev->bus->number, pdev->devfn,
> + pdev->vendor, pdev->device, rrq, max_rrq);
> + pcie_set_readrq(pdev, max_rrq);
> + }
> +}
> +
> +static int __init realview_pcie_fixups(void)
> +{
> + pcie_fix_sizes();
> + return 0;
> +}
> +late_initcall(realview_pcie_fixups);
Shouldn't this be done as a PCI quirk rather than walking the entire list
of PCI devices at some point after drivers have potentially initialised
and bound to these devices?
next prev parent reply other threads:[~2010-10-28 14:02 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-20 13:02 [PATCH 0/6] Add PCI support for ARM RealView boards Colin Tuckley
2010-10-20 13:02 ` [PATCH 1/6] Realview PCIX support - add main support module code Colin Tuckley
2010-10-20 21:16 ` Arnd Bergmann
2010-10-21 10:03 ` Colin Tuckley
2010-10-21 12:44 ` Arnd Bergmann
2010-10-28 14:09 ` Russell King - ARM Linux
2010-10-28 14:29 ` Arnd Bergmann
2010-10-28 14:02 ` Russell King - ARM Linux [this message]
2010-10-20 13:02 ` [PATCH 2/6] ARM: enable bridges in pci_common_init Colin Tuckley
2010-10-20 13:03 ` [PATCH 3/6] ARM Realview PCIX map include file changes Colin Tuckley
2010-10-20 21:28 ` Arnd Bergmann
2010-10-20 13:03 ` [PATCH 4/6] ARM Realview PCIX IRQ " Colin Tuckley
2010-10-20 13:03 ` [PATCH 5/6] ARM Realview PCIX board " Colin Tuckley
2010-10-20 13:03 ` [PATCH 6/6] ARM Realview PCIX build " Colin Tuckley
2010-10-20 21:32 ` Arnd Bergmann
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=20101028140248.GD3122@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=linux-arm-kernel@lists.infradead.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.