]> mj.ucw.cz Git - pciutils.git/blobdiff - ls-ecaps.c
Merge remote-tracking branch 'pali/i386-io-windows'
[pciutils.git] / ls-ecaps.c
index 2ff8f27eefed2275d6858400243686c2aa81e3f0..b9a451283dba34a2431b9b48b9d77ffda8f16294 100644 (file)
@@ -549,7 +549,7 @@ cap_vc(struct device *d, int where)
       pat_pos = BITS(rcap, 24, 8);
       printf("Caps:\tPATOffset=%02x MaxTimeSlots=%d RejSnoopTrans%c\n",
        pat_pos,
-       BITS(rcap, 16, 6) + 1,
+       BITS(rcap, 16, 7) + 1,
        FLAG(rcap, 1 << 15));
 
       printf("\t\t\tArb:");
@@ -812,8 +812,8 @@ dvsec_cxl_register_locator(struct device *d, int where, int len)
 
   for (int i=0; ; i++)
     {
-      int pos = where + 8*i;
-      if (pos + 7 >= len)
+      int pos = where + PCI_CXL_RL_BLOCK1_LO + 8*i;
+      if (pos + 7 >= where + len)
        break;
 
       u32 lo = get_conf_long(d, pos);
@@ -834,7 +834,7 @@ dvsec_cxl_register_locator(struct device *d, int where, int len)
       else
        id_name = "<?>";
 
-      printf("\t\tBlock%d: BIR: bar%d, ID: %s, offset: %016" PCI_U64_FMT_X "\n", i, bir, id_name, base);
+      printf("\t\tBlock%d: BIR: bar%d, ID: %s, offset: %016" PCI_U64_FMT_X "\n", i + 1, bir, id_name, base);
     }
 }