From: Carl-Daniel Hailfinger Date: Sun, 9 Nov 2008 19:49:09 +0000 (+0100) Subject: Decode HT 1.02 in the same way as HT 1.03. X-Git-Tag: v3.0.3~4 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=fe6b822ed40da89ce015a73974cdfbe3f45aa4d7;p=pciutils.git Decode HT 1.02 in the same way as HT 1.03. AMD K8 processors claim that they're using HyperTransport 1.02, but the publicly available documentation (specifically the BKDG) states that the HT version is 1.03 in reality. lspci will issue a warning "!!! Possibly incomplete decoding" and only decode some basic HT properties for HT versions before 1.03. Move that boundary down to HT version 1.02. Signed-off-by: Carl-Daniel Hailfinger --- diff --git a/lspci.c b/lspci.c index 235f9c6..fcf4733 100644 --- a/lspci.c +++ b/lspci.c @@ -571,10 +571,10 @@ cap_ht_pri(struct device *d, int where, int cmd) if (!config_fetch(d, where + PCI_HT_PRI_LCTR0, PCI_HT_PRI_SIZEOF - PCI_HT_PRI_LCTR0)) return; rid = get_conf_byte(d, where + PCI_HT_PRI_RID); - if (rid < 0x23 && rid > 0x11) + if (rid < 0x22 && rid > 0x11) printf("\t\t!!! Possibly incomplete decoding\n"); - if (rid >= 0x23) + if (rid >= 0x22) fmt = "\t\tCommand: BaseUnitID=%u UnitCnt=%u MastHost%c DefDir%c DUL%c\n"; else fmt = "\t\tCommand: BaseUnitID=%u UnitCnt=%u MastHost%c DefDir%c\n"; @@ -585,7 +585,7 @@ cap_ht_pri(struct device *d, int where, int cmd) FLAG(cmd, PCI_HT_PRI_CMD_DD), FLAG(cmd, PCI_HT_PRI_CMD_DUL)); lctr0 = get_conf_word(d, where + PCI_HT_PRI_LCTR0); - if (rid >= 0x23) + if (rid >= 0x22) fmt = "\t\tLink Control 0: CFlE%c CST%c CFE%c = 0x23) + if (rid >= 0x22) fmt = "\t\tLink Config 0: MLWI=%1$s DwFcIn%5$c MLWO=%2$s DwFcOut%6$c LWI=%3$s DwFcInEn%7$c LWO=%4$s DwFcOutEn%8$c\n"; else fmt = "\t\tLink Config 0: MLWI=%s MLWO=%s LWI=%s LWO=%s\n"; @@ -617,7 +617,7 @@ cap_ht_pri(struct device *d, int where, int cmd) FLAG(lcnf0, PCI_HT_LCNF_DFIE), FLAG(lcnf0, PCI_HT_LCNF_DFOE)); lctr1 = get_conf_word(d, where + PCI_HT_PRI_LCTR1); - if (rid >= 0x23) + if (rid >= 0x22) fmt = "\t\tLink Control 1: CFlE%c CST%c CFE%c = 0x23) + if (rid >= 0x22) fmt = "\t\tLink Config 1: MLWI=%1$s DwFcIn%5$c MLWO=%2$s DwFcOut%6$c LWI=%3$s DwFcInEn%7$c LWO=%4$s DwFcOutEn%8$c\n"; else fmt = "\t\tLink Config 1: MLWI=%s MLWO=%s LWI=%s LWO=%s\n"; @@ -650,7 +650,7 @@ cap_ht_pri(struct device *d, int where, int cmd) FLAG(lcnf1, PCI_HT_LCNF_DFOE)); printf("\t\tRevision ID: %u.%02u\n", (rid & PCI_HT_RID_MAJ) >> 5, (rid & PCI_HT_RID_MIN)); - if (rid < 0x23) + if (rid < 0x22) return; lfrer0 = get_conf_byte(d, where + PCI_HT_PRI_LFRER0); printf("\t\tLink Frequency 0: %s\n", ht_link_freq(lfrer0 & PCI_HT_LFRER_FREQ)); @@ -739,10 +739,10 @@ cap_ht_sec(struct device *d, int where, int cmd) if (!config_fetch(d, where + PCI_HT_SEC_LCTR, PCI_HT_SEC_SIZEOF - PCI_HT_SEC_LCTR)) return; rid = get_conf_byte(d, where + PCI_HT_SEC_RID); - if (rid < 0x23 && rid > 0x11) + if (rid < 0x22 && rid > 0x11) printf("\t\t!!! Possibly incomplete decoding\n"); - if (rid >= 0x23) + if (rid >= 0x22) fmt = "\t\tCommand: WarmRst%c DblEnd%c DevNum=%u ChainSide%c HostHide%c Slave%c = 0x23) + if (rid >= 0x22) fmt = "\t\tLink Control: CFlE%c CST%c CFE%c = 0x23) + if (rid >= 0x22) fmt = "\t\tLink Config: MLWI=%1$s DwFcIn%5$c MLWO=%2$s DwFcOut%6$c LWI=%3$s DwFcInEn%7$c LWO=%4$s DwFcOutEn%8$c\n"; else fmt = "\t\tLink Config: MLWI=%s MLWO=%s LWI=%s LWO=%s\n"; @@ -789,7 +789,7 @@ cap_ht_sec(struct device *d, int where, int cmd) FLAG(lcnf, PCI_HT_LCNF_DFOE)); printf("\t\tRevision ID: %u.%02u\n", (rid & PCI_HT_RID_MAJ) >> 5, (rid & PCI_HT_RID_MIN)); - if (rid < 0x23) + if (rid < 0x22) return; lfrer = get_conf_byte(d, where + PCI_HT_SEC_LFRER); printf("\t\tLink Frequency: %s\n", ht_link_freq(lfrer & PCI_HT_LFRER_FREQ));