svn commit: r188640 - head/usr.sbin/pciconf

Alexander Motin mav at FreeBSD.org
Sun Feb 15 01:56:47 PST 2009


Author: mav
Date: Sun Feb 15 09:56:47 2009
New Revision: 188640
URL: http://svn.freebsd.org/changeset/base/188640

Log:
  Add SATA and PCI Advanced Features capabilities reporting.

Modified:
  head/usr.sbin/pciconf/cap.c

Modified: head/usr.sbin/pciconf/cap.c
==============================================================================
--- head/usr.sbin/pciconf/cap.c	Sun Feb 15 09:49:21 2009	(r188639)
+++ head/usr.sbin/pciconf/cap.c	Sun Feb 15 09:56:47 2009	(r188640)
@@ -414,6 +414,24 @@ cap_msix(int fd, struct pci_conf *p, uin
 		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;


More information about the svn-src-all mailing list