Module Name:    src
Committed By:   msaitoh
Date:           Thu Nov 12 12:08:13 UTC 2015

Modified Files:
        src/sys/dev/pci: pcireg.h

Log Message:
 PCI_HT_CAP() is right shifted value, so PCI_HT_CAP_* should not use
__SHIFTIN(). This change fixes a bug that HyperTransport system misunderstand
whether MSI/MSI-X can be used or not.


To generate a diff of this commit:
cvs rdiff -u -r1.106 -r1.107 src/sys/dev/pci/pcireg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/pcireg.h
diff -u src/sys/dev/pci/pcireg.h:1.106 src/sys/dev/pci/pcireg.h:1.107
--- src/sys/dev/pci/pcireg.h:1.106	Fri Oct 30 20:03:45 2015
+++ src/sys/dev/pci/pcireg.h	Thu Nov 12 12:08:13 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: pcireg.h,v 1.106 2015/10/30 20:03:45 msaitoh Exp $	*/
+/*	$NetBSD: pcireg.h,v 1.107 2015/11/12 12:08:13 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 1995, 1996, 1999, 2000
@@ -788,23 +788,23 @@ typedef u_int8_t pci_revision_t;
 #define PCI_HT_CAP(cr) ((((cr) >> 27) < 0x08) ?				      \
     (((cr) >> 27) & 0x1c) : (((cr) >> 27) & 0x1f))
 #define PCI_HT_CAPMASK		__BITS(31, 27)
-#define PCI_HT_CAP_SLAVE	__SHIFTIN(0b00000, PCI_HT_CAPMASK) /* 000xx */
-#define PCI_HT_CAP_HOST		__SHIFTIN(0b00100, PCI_HT_CAPMASK) /* 001xx */
-#define PCI_HT_CAP_SWITCH	__SHIFTIN(0b01000, PCI_HT_CAPMASK)
-#define PCI_HT_CAP_INTERRUPT	__SHIFTIN(0b10000, PCI_HT_CAPMASK)
-#define PCI_HT_CAP_REVID	__SHIFTIN(0b10001, PCI_HT_CAPMASK)
-#define PCI_HT_CAP_UNITID_CLUMP	__SHIFTIN(0b10010, PCI_HT_CAPMASK)
-#define PCI_HT_CAP_EXTCNFSPACE	__SHIFTIN(0b10011, PCI_HT_CAPMASK)
-#define PCI_HT_CAP_ADDRMAP	__SHIFTIN(0b10100, PCI_HT_CAPMASK)
-#define PCI_HT_CAP_MSIMAP	__SHIFTIN(0b10101, PCI_HT_CAPMASK)
-#define PCI_HT_CAP_DIRECTROUTE	__SHIFTIN(0b10110, PCI_HT_CAPMASK)
-#define PCI_HT_CAP_VCSET	__SHIFTIN(0b10111, PCI_HT_CAPMASK)
-#define PCI_HT_CAP_RETRYMODE	__SHIFTIN(0b11000, PCI_HT_CAPMASK)
-#define PCI_HT_CAP_X86ENCODE	__SHIFTIN(0b11001, PCI_HT_CAPMASK)
-#define PCI_HT_CAP_GEN3		__SHIFTIN(0b11010, PCI_HT_CAPMASK)
-#define PCI_HT_CAP_FLE		__SHIFTIN(0b11011, PCI_HT_CAPMASK)
-#define PCI_HT_CAP_PM		__SHIFTIN(0b11100, PCI_HT_CAPMASK)
-#define PCI_HT_CAP_HIGHNODECNT	__SHIFTIN(0b11101, PCI_HT_CAPMASK)
+#define PCI_HT_CAP_SLAVE	0b00000 /* 000xx */
+#define PCI_HT_CAP_HOST		0b00100 /* 001xx */
+#define PCI_HT_CAP_SWITCH	0b01000
+#define PCI_HT_CAP_INTERRUPT	0b10000
+#define PCI_HT_CAP_REVID	0b10001
+#define PCI_HT_CAP_UNITID_CLUMP	0b10010
+#define PCI_HT_CAP_EXTCNFSPACE	0b10011
+#define PCI_HT_CAP_ADDRMAP	0b10100
+#define PCI_HT_CAP_MSIMAP	0b10101
+#define PCI_HT_CAP_DIRECTROUTE	0b10110
+#define PCI_HT_CAP_VCSET	0b10111
+#define PCI_HT_CAP_RETRYMODE	0b11000
+#define PCI_HT_CAP_X86ENCODE	0b11001
+#define PCI_HT_CAP_GEN3		0b11010
+#define PCI_HT_CAP_FLE		0b11011
+#define PCI_HT_CAP_PM		0b11100
+#define PCI_HT_CAP_HIGHNODECNT	0b11101
 
 #define PCI_HT_MSI_ADDR_LO	0x04
 #define PCI_HT_MSI_ADDR_HI	0x08

Reply via email to