Linux CXL
 help / color / mirror / Atom feed
* [PATCH 0/2] cxl: Convert remaining PCIBIOS errors to errno
@ 2026-06-07  7:02 Richard Cheng
  2026-06-07  7:02 ` [PATCH 1/2] cxl: Convert PCIBIOS errors to errno on remaining DVSEC/PCIe accesses Richard Cheng
  2026-06-07  7:02 ` [PATCH 2/2] cxl/core/regs: Check return value of DVSEC register locator reads Richard Cheng
  0 siblings, 2 replies; 5+ messages in thread
From: Richard Cheng @ 2026-06-07  7:02 UTC (permalink / raw)
  To: dave, jic23, dave.jiang, alison.schofield, vishal.l.verma,
	ira.weiny, djbw
  Cc: terry.bowman, gourry, ming.li, alucerop, linux-cxl, linux-kernel,
	newtonl, kristinc, kaihengf, kobak, vaslot, smadhavan,
	Richard Cheng

This is a follow-up to "cxl/pci: Convert PCIBIOS errors to errno on
DVSEC config accesses". After that series landed by Dave Jiang, I
continued auditing the CXL code for PCI config accessors that propagate
positive PCIBIOS_* status codes where callers expect negative errnos,
and found a few more spots.

Patch 1 converts the remaining DVSEC and PCIe capability accesses in
update_gpf_port_dvsec() and the dport setup path that returned the raw
PCIBIOS status to callers testing for failure.

Patch 2 fixes __cxl_find_regblock_instance(), which ignored the
pci_read_config_dword() return value entirely. On a failed config read
the raw accessor leaves PCI_ERROR_RESPONSE (~0) in the destination, so
the code computed a bogus regblock count and decoded register block
addresses from garbage. Check the return value and convert it.

Richard Cheng (2):
  cxl: Convert PCIBIOS errors to errno on remaining DVSEC/PCIe accesses
  cxl/core/regs: Check return value of DVSEC register locator reads

 drivers/cxl/core/pci.c  |  2 +-
 drivers/cxl/core/regs.c | 14 ++++++++++----
 drivers/cxl/port.c      |  2 +-
 3 files changed, 12 insertions(+), 6 deletions(-)


base-commit: 26aa60e0276272ae61b843a05a91748dcb1130f9
-- 
2.43.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-06-07  7:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-07  7:02 [PATCH 0/2] cxl: Convert remaining PCIBIOS errors to errno Richard Cheng
2026-06-07  7:02 ` [PATCH 1/2] cxl: Convert PCIBIOS errors to errno on remaining DVSEC/PCIe accesses Richard Cheng
2026-06-07  7:13   ` sashiko-bot
2026-06-07  7:02 ` [PATCH 2/2] cxl/core/regs: Check return value of DVSEC register locator reads Richard Cheng
2026-06-07  7:13   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox