PERFORCE change 167729 for review

Alexander Motin mav at FreeBSD.org
Mon Aug 24 12:34:53 UTC 2009


http://perforce.freebsd.org/chv.cgi?CH=167729

Change 167729 by mav at mav_mavbook on 2009/08/24 12:34:15

	Report maximum supported PIO mode.

Affected files ...

.. //depot/projects/scottl-camlock/src/sbin/camcontrol/camcontrol.c#17 edit

Differences ...

==== //depot/projects/scottl-camlock/src/sbin/camcontrol/camcontrol.c#17 (text+ko) ====

@@ -1054,6 +1054,26 @@
 	else
 		printf("\n");
 
+	printf("PIO supported         PIO");
+	if (parm->atavalid & ATA_FLAG_64_70) {
+		if (parm->apiomodes & 0x02)
+			printf("4");
+		else if (parm->apiomodes & 0x01)
+			printf("3");
+	} else if (parm->mwdmamodes & 0x04)
+		printf("4");
+	else if (parm->mwdmamodes & 0x02)
+		printf("3");
+	else if (parm->mwdmamodes & 0x01)
+		printf("2");
+	else if ((parm->retired_piomode & ATA_RETIRED_PIO_MASK) == 0x200)
+		printf("2");
+	else if ((parm->retired_piomode & ATA_RETIRED_PIO_MASK) == 0x100)
+		printf("1");
+	else
+		printf("0");
+	printf("\n");
+
 	printf("DMA%ssupported         ",
 		parm->capabilities1 & ATA_SUPPORT_DMA ? " " : " not ");
 	if (parm->capabilities1 & ATA_SUPPORT_DMA) {


More information about the p4-projects mailing list