Skip to content

Commit 8e99563

Browse files
authored
Merge pull request #911 from intel/push-2025-02-19
Push 2025 02 19
2 parents ccaf9c2 + 45cec87 commit 8e99563

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/pci.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -248,15 +248,15 @@ union VSEC {
248248
template <class MatchFunc, class ProcessFunc>
249249
void processDVSEC(MatchFunc matchFunc, ProcessFunc processFunc)
250250
{
251-
forAllIntelDevices([&](const uint32 group, const uint32 bus, const uint32 device, const uint32 function, const uint32 /* device_id */)
251+
forAllIntelDevices([&](const uint32 group, const uint32 bus, const uint32 device, const uint32 function, const uint32 device_id)
252252
{
253-
// std::cerr << "Intel device scan. found " << std::hex << group << ":" << bus << ":" << device << ":" << function << " " << device_id << std::dec;
253+
DBG(2, "Intel device scan.found " , std::hex , group , ":" , bus , " : " , device , " : " , function , " " , device_id);
254254
uint32 status{0};
255255
PciHandleType h(group, bus, device, function);
256256
h.read32(4, &status); // read status
257257
if (status & 0x100000) // has capability list
258258
{
259-
// std::cerr << "Intel device scan. found "<< std::hex << group << ":" << bus << ":" << device << ":" << function << " " << device_id << " with capability list\n" << std::dec;
259+
DBG(2, "Intel device scan. found ", std::hex , group , ":" , bus , ":" , device , ":" , function , " " , device_id , " with capability list");
260260
VSEC header;
261261
uint64 offset = 0x100;
262262
do
@@ -269,11 +269,10 @@ void processDVSEC(MatchFunc matchFunc, ProcessFunc processFunc)
269269
{
270270
return;
271271
}
272-
// std::cerr << "offset 0x" << std::hex << offset << " header.fields.cap_id: 0x" << header.fields.cap_id << std::dec << "\n";
273-
// std::cerr << ".. found entryID: 0x" << std::hex << header.fields.entryID << std::dec << "\n";
272+
DBG(2, "offset 0x" , std::hex , offset , " cap_id: 0x" , header.fields.cap_id , " vsec_id: 0x", header.fields.vsec_id, " entryID: 0x" , std::hex , header.fields.entryID , std::dec);
274273
if (matchFunc(header))
275274
{
276-
// std::cerr << ".... found match\n";
275+
DBG(2, ".... found match");
277276
auto barOffset = 0x10 + header.fields.tBIR * 4;
278277
uint32 bar = 0;
279278
if (h.read32(barOffset, &bar) == sizeof(uint32) && bar != 0) // read bar
@@ -290,6 +289,7 @@ void processDVSEC(MatchFunc matchFunc, ProcessFunc processFunc)
290289
offset = header.fields.cap_next & ~3;
291290
if (lastOffset == offset) // the offset did not change
292291
{
292+
DBG(2, " lastOffset == offset ", lastOffset , "==", offset);
293293
return; // deadlock protection
294294
}
295295
} while (1);

0 commit comments

Comments
 (0)