From c77b4d9c80c057656da35a310ce37f07de6c6123 Mon Sep 17 00:00:00 2001 From: mav Date: Sun, 15 Feb 2009 09:56:47 +0000 Subject: Add SATA and PCI Advanced Features capabilities reporting. --- usr.sbin/pciconf/cap.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/usr.sbin/pciconf/cap.c b/usr.sbin/pciconf/cap.c index 4c18a7f..987c959 100644 --- a/usr.sbin/pciconf/cap.c +++ b/usr.sbin/pciconf/cap.c @@ -414,6 +414,24 @@ cap_msix(int fd, struct pci_conf *p, uint8_t ptr) printf(" enabled"); } +static void +cap_sata(int fd, struct pci_conf *p, uint8_t ptr) +{ + + printf("SATA Index-Data Pair"); +} + +static void +cap_pciaf(int fd, struct pci_conf *p, uint8_t ptr) +{ + uint8_t cap; + + cap = read_config(fd, &p->pc_sel, ptr + PCIR_PCIAF_CAP, 1); + printf("PCI Advanced Features: %s%s", + (cap & PCIM_PCIAFCAP_FLR)?"FLR ":"", + (cap & PCIM_PCIAFCAP_TP)?"TP ":""); +} + void list_caps(int fd, struct pci_conf *p) { @@ -476,6 +494,12 @@ list_caps(int fd, struct pci_conf *p) case PCIY_MSIX: cap_msix(fd, p, ptr); break; + case PCIY_SATA: + cap_sata(fd, p, ptr); + break; + case PCIY_PCIAF: + cap_pciaf(fd, p, ptr); + break; default: printf("unknown"); break; -- cgit v1.1