linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafał Miłecki" <zajec5@gmail.com>
To: Bjorn Helgaas <bhelgaas@google.com>, linux-pci@vger.kernel.org
Cc: "Chris Metcalf" <cmetcalf@ezchip.com>,
	"Rafał Miłecki" <zajec5@gmail.com>
Subject: [PATCH 3/5] tile: use PCI define for max read request size
Date: Mon, 26 Jan 2015 18:06:12 +0100	[thread overview]
Message-ID: <1422291972-12412-1-git-send-email-zajec5@gmail.com> (raw)
In-Reply-To: <1422291922-12324-1-git-send-email-zajec5@gmail.com>

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
---
 arch/tile/kernel/pci.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/tile/kernel/pci.c b/arch/tile/kernel/pci.c
index f70c789..325df47 100644
--- a/arch/tile/kernel/pci.c
+++ b/arch/tile/kernel/pci.c
@@ -245,7 +245,7 @@ static void fixup_read_and_payload_sizes(void)
 {
 	struct pci_dev *dev = NULL;
 	int smallest_max_payload = 0x1; /* Tile maxes out at 256 bytes. */
-	int max_read_size = 0x2; /* Limit to 512 byte reads. */
+	int max_read_size = PCI_EXP_DEVCTL_READRQ_512B;
 	u16 new_values;
 
 	/* Scan for the smallest maximum payload size. */
@@ -258,7 +258,7 @@ static void fixup_read_and_payload_sizes(void)
 	}
 
 	/* Now, set the max_payload_size for all devices to that value. */
-	new_values = (max_read_size << 12) | (smallest_max_payload << 5);
+	new_values = max_read_size | (smallest_max_payload << 5);
 	for_each_pci_dev(dev)
 		pcie_capability_clear_and_set_word(dev, PCI_EXP_DEVCTL,
 				PCI_EXP_DEVCTL_PAYLOAD | PCI_EXP_DEVCTL_READRQ,
-- 
1.8.4.5


  parent reply	other threads:[~2015-01-26 17:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-26 17:05 [PATCH 1/5] PCI: Add defines for max read request sizes Rafał Miłecki
2015-01-26 17:06 ` [PATCH 2/5] rapidio/tsi721: use PCI define for max read request size Rafał Miłecki
2015-01-26 18:15   ` Bounine, Alexandre
2015-01-26 17:06 ` Rafał Miłecki [this message]
2015-01-26 18:21   ` [PATCH 3/5] tile: " Chris Metcalf
2015-01-26 17:06 ` [PATCH 4/5] [SCSI] esas2r: " Rafał Miłecki
2015-01-26 17:06 ` [PATCH 5/5] r8169: " Rafał Miłecki
2015-01-27  8:23   ` David Miller
2015-01-27  0:20 ` [PATCH 1/5] PCI: Add defines for max read request sizes Bjorn Helgaas

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=1422291972-12412-1-git-send-email-zajec5@gmail.com \
    --to=zajec5@gmail.com \
    --cc=bhelgaas@google.com \
    --cc=cmetcalf@ezchip.com \
    --cc=linux-pci@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;
as well as URLs for NNTP newsgroup(s).