public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: stcarlso@linux.microsoft.com
To: u-boot@lists.denx.de
Subject: [PATCH 2/3] drivers: pci: sandbox: Add stub sandbox PCI MPS support
Date: Tue,  7 Mar 2023 16:32:33 -0800	[thread overview]
Message-ID: <20230308003234.465014-3-stcarlso@linux.microsoft.com> (raw)
In-Reply-To: <20230308003234.465014-1-stcarlso@linux.microsoft.com>

From: Stephen Carlson <stcarlso@linux.microsoft.com>

Reports the sandbox swapcase PCI Express device to support a 256 byte
Maximum Payload Size for MPS tuning tests.

Signed-off-by: Stephen Carlson <stcarlso@linux.microsoft.com>
---
 drivers/misc/swap_case.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/misc/swap_case.c b/drivers/misc/swap_case.c
index 7093ad1cd4..ee5c12bd0a 100644
--- a/drivers/misc/swap_case.c
+++ b/drivers/misc/swap_case.c
@@ -165,6 +165,9 @@ static int sandbox_swap_case_read_config(const struct udevice *emul,
 	case PCI_CAP_ID_EXP_OFFSET + PCI_CAP_LIST_NEXT:
 		*valuep = PCI_CAP_ID_MSIX_OFFSET;
 		break;
+	case PCI_CAP_ID_EXP_OFFSET + PCI_EXP_DEVCAP:
+		*valuep = PCI_EXP_DEVCAP_PAYLOAD_256B;
+		break;
 	case PCI_CAP_ID_MSIX_OFFSET:
 		if (sandbox_swap_case_use_ea(emul))
 			*valuep = (PCI_CAP_ID_EA_OFFSET << 8) | PCI_CAP_ID_MSIX;
-- 
2.25.1


  parent reply	other threads:[~2023-03-08  0:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-08  0:32 [PATCH 0/3] Add command to set MPS of all PCI Express devices stcarlso
2023-03-08  0:32 ` [PATCH 1/3] cmd: pci: Add command to set MPS of all PCIe devices stcarlso
2023-03-08  0:32 ` stcarlso [this message]
2023-03-08  0:32 ` [PATCH 3/3] test: Add test for new command pci_mps stcarlso
2023-03-08 17:16   ` Simon Glass

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=20230308003234.465014-3-stcarlso@linux.microsoft.com \
    --to=stcarlso@linux.microsoft.com \
    --cc=u-boot@lists.denx.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox