Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Feb 2009 09:56:47 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r188640 - head/usr.sbin/pciconf
Message-ID:  <200902150956.n1F9ulEG062861@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902150956.n1F9ulEG062861>