correct offsets — off by 4 error Reference: /n/atom/patch/applied/pcimsixcapfix Date: Thu Jan 2 03:56:53 CET 2014 Signed-off-by: quanstro@quanstro.net --- /sys/src/cmd/pci/pci.c Thu Jan 2 03:56:34 2014 +++ /sys/src/cmd/pci/pci.c Thu Jan 2 03:56:35 2014 @@ -107,9 +107,16 @@ u32int u; Bprint(&o, "\t" "msi-x\n"); - u = pcicfgr32(p, off + 0); - Bprint(&o, "\t\t" "table: offset %.8ux; bar %d\n", u&~7, u&7); + u = pcicfgr16(p, off + 2); + Bprint(&o, "\t\t" "ctl: %.4ux; size %d ", u, (u&0x7ff)+1); + if(u & 1<<15) + Bprint(&o, "en "); + if(u & 1<<15) + Bprint(&o, "msk "); + Bprint(&o, "\n"); u = pcicfgr32(p, off + 4); + Bprint(&o, "\t\t" "table: offset %.8ux; bar %d\n", u&~7, u&7); + u = pcicfgr32(p, off + 8); Bprint(&o, "\t\t" "pba: offset %.8ux; bar %d\n", u&~7, u&7); }