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.
This commit is contained in:
msaitoh 2015-11-12 12:08:13 +00:00
parent 656c43404f
commit e2a104e557

View File

@ -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