Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'pci/misc'

- Sort Intel Device IDs by value (Andy Shevchenko)

- Change Capability offsets to hex to match spec (Baruch Siach)

- Correct misspellings (Krzysztof Wilczyński)

- Terminate statement with semicolon in pci_endpoint_test.c (Ming Wang)

* pci/misc:
misc: pci_endpoint_test: Terminate statement with semicolon
PCI: Correct misspelled words
PCI: Change capability register offsets to hex
PCI: Sort Intel Device IDs by value

+101 -101
+1 -1
drivers/misc/pci_endpoint_test.c
··· 865 865 goto err_release_irq; 866 866 } 867 867 misc_device->parent = &pdev->dev; 868 - misc_device->fops = &pci_endpoint_test_fops, 868 + misc_device->fops = &pci_endpoint_test_fops; 869 869 870 870 err = misc_register(misc_device); 871 871 if (err) {
+1 -1
drivers/pci/controller/cadence/pcie-cadence.h
··· 310 310 * single function at a time 311 311 * @vendor_id: PCI vendor ID 312 312 * @device_id: PCI device ID 313 - * @avail_ib_bar: Satus of RP_BAR0, RP_BAR1 and RP_NO_BAR if it's free or 313 + * @avail_ib_bar: Status of RP_BAR0, RP_BAR1 and RP_NO_BAR if it's free or 314 314 * available 315 315 * @quirk_retrain_flag: Retrain link as quirk for PCIe Gen2 316 316 * @quirk_detect_quiet_flag: LTSSM Detect Quiet min delay set as quirk
+1 -1
drivers/pci/controller/pcie-mediatek-gen3.c
··· 311 311 writel_relaxed(val, port->base + PCIE_RST_CTRL_REG); 312 312 313 313 /* 314 - * Described in PCIe CEM specification setctions 2.2 (PERST# Signal) 314 + * Described in PCIe CEM specification sections 2.2 (PERST# Signal) 315 315 * and 2.2.1 (Initial Power-Up (G3 to S0)). 316 316 * The deassertion of PERST# should be delayed 100ms (TPVPERL) 317 317 * for the power and clock to become stable.
+1 -1
drivers/pci/endpoint/functions/pci-epf-ntb.c
··· 1262 1262 } 1263 1263 1264 1264 /** 1265 - * epf_ntb_configure_interrupt() - Configure MSI/MSI-X capaiblity 1265 + * epf_ntb_configure_interrupt() - Configure MSI/MSI-X capability 1266 1266 * @ntb: NTB device that facilitates communication between HOST1 and HOST2 1267 1267 * @type: PRIMARY interface or SECONDARY interface 1268 1268 *
+1 -1
drivers/pci/of.c
··· 247 247 else 248 248 pci_clear_flags(PCI_PROBE_ONLY); 249 249 250 - pr_info("PROBE_ONLY %sabled\n", val ? "en" : "dis"); 250 + pr_info("PROBE_ONLY %s\n", val ? "enabled" : "disabled"); 251 251 } 252 252 EXPORT_SYMBOL_GPL(of_pci_check_probe_only); 253 253
+2 -2
drivers/pci/quirks.c
··· 980 980 else 981 981 tmp = 0x1f; /* all known bits (4-0) routed to external APIC */ 982 982 983 - pci_info(dev, "%sbling VIA external APIC routing\n", 984 - tmp == 0 ? "Disa" : "Ena"); 983 + pci_info(dev, "%s VIA external APIC routing\n", 984 + tmp ? "Enabling" : "Disabling"); 985 985 986 986 /* Offset 0x58: External APIC IRQ output control */ 987 987 pci_write_config_byte(dev, 0x58, tmp);
+25 -25
include/linux/pci_ids.h
··· 2635 2635 #define PCI_DEVICE_ID_INTEL_PXHD_0 0x0320 2636 2636 #define PCI_DEVICE_ID_INTEL_PXHD_1 0x0321 2637 2637 #define PCI_DEVICE_ID_INTEL_PXH_0 0x0329 2638 - #define PCI_DEVICE_ID_INTEL_PXH_1 0x032A 2639 - #define PCI_DEVICE_ID_INTEL_PXHV 0x032C 2638 + #define PCI_DEVICE_ID_INTEL_PXH_1 0x032a 2639 + #define PCI_DEVICE_ID_INTEL_PXHV 0x032c 2640 2640 #define PCI_DEVICE_ID_INTEL_80332_0 0x0330 2641 2641 #define PCI_DEVICE_ID_INTEL_80332_1 0x0332 2642 2642 #define PCI_DEVICE_ID_INTEL_80333_0 0x0370 ··· 2654 2654 #define PCI_DEVICE_ID_INTEL_MFD_SDIO2 0x0822 2655 2655 #define PCI_DEVICE_ID_INTEL_MFD_EMMC0 0x0823 2656 2656 #define PCI_DEVICE_ID_INTEL_MFD_EMMC1 0x0824 2657 - #define PCI_DEVICE_ID_INTEL_MRST_SD2 0x084F 2658 - #define PCI_DEVICE_ID_INTEL_QUARK_X1000_ILB 0x095E 2657 + #define PCI_DEVICE_ID_INTEL_MRST_SD2 0x084f 2658 + #define PCI_DEVICE_ID_INTEL_QUARK_X1000_ILB 0x095e 2659 2659 #define PCI_DEVICE_ID_INTEL_I960 0x0960 2660 2660 #define PCI_DEVICE_ID_INTEL_I960RM 0x0962 2661 2661 #define PCI_DEVICE_ID_INTEL_CENTERTON_ILB 0x0c60 2662 2662 #define PCI_DEVICE_ID_INTEL_8257X_SOL 0x1062 2663 2663 #define PCI_DEVICE_ID_INTEL_82573E_SOL 0x1085 2664 - #define PCI_DEVICE_ID_INTEL_82573L_SOL 0x108F 2664 + #define PCI_DEVICE_ID_INTEL_82573L_SOL 0x108f 2665 2665 #define PCI_DEVICE_ID_INTEL_82815_MC 0x1130 2666 2666 #define PCI_DEVICE_ID_INTEL_82815_CGC 0x1132 2667 2667 #define PCI_DEVICE_ID_INTEL_82092AA_0 0x1221 ··· 2755 2755 #define PCI_DEVICE_ID_INTEL_82801EB_11 0x24db 2756 2756 #define PCI_DEVICE_ID_INTEL_82801EB_12 0x24dc 2757 2757 #define PCI_DEVICE_ID_INTEL_82801EB_13 0x24dd 2758 - #define PCI_DEVICE_ID_INTEL_ESB_1 0x25a1 2759 - #define PCI_DEVICE_ID_INTEL_ESB_2 0x25a2 2760 - #define PCI_DEVICE_ID_INTEL_ESB_4 0x25a4 2761 - #define PCI_DEVICE_ID_INTEL_ESB_5 0x25a6 2762 - #define PCI_DEVICE_ID_INTEL_ESB_9 0x25ab 2763 - #define PCI_DEVICE_ID_INTEL_ESB_10 0x25ac 2764 2758 #define PCI_DEVICE_ID_INTEL_82820_HB 0x2500 2765 2759 #define PCI_DEVICE_ID_INTEL_82820_UP_HB 0x2501 2766 2760 #define PCI_DEVICE_ID_INTEL_82850_HB 0x2530 ··· 2769 2775 #define PCI_DEVICE_ID_INTEL_82915G_IG 0x2582 2770 2776 #define PCI_DEVICE_ID_INTEL_82915GM_HB 0x2590 2771 2777 #define PCI_DEVICE_ID_INTEL_82915GM_IG 0x2592 2772 - #define PCI_DEVICE_ID_INTEL_5000_ERR 0x25F0 2773 - #define PCI_DEVICE_ID_INTEL_5000_FBD0 0x25F5 2774 - #define PCI_DEVICE_ID_INTEL_5000_FBD1 0x25F6 2775 - #define PCI_DEVICE_ID_INTEL_82945G_HB 0x2770 2776 - #define PCI_DEVICE_ID_INTEL_82945G_IG 0x2772 2777 - #define PCI_DEVICE_ID_INTEL_3000_HB 0x2778 2778 - #define PCI_DEVICE_ID_INTEL_82945GM_HB 0x27A0 2779 - #define PCI_DEVICE_ID_INTEL_82945GM_IG 0x27A2 2778 + #define PCI_DEVICE_ID_INTEL_ESB_1 0x25a1 2779 + #define PCI_DEVICE_ID_INTEL_ESB_2 0x25a2 2780 + #define PCI_DEVICE_ID_INTEL_ESB_4 0x25a4 2781 + #define PCI_DEVICE_ID_INTEL_ESB_5 0x25a6 2782 + #define PCI_DEVICE_ID_INTEL_ESB_9 0x25ab 2783 + #define PCI_DEVICE_ID_INTEL_ESB_10 0x25ac 2784 + #define PCI_DEVICE_ID_INTEL_5000_ERR 0x25f0 2785 + #define PCI_DEVICE_ID_INTEL_5000_FBD0 0x25f5 2786 + #define PCI_DEVICE_ID_INTEL_5000_FBD1 0x25f6 2780 2787 #define PCI_DEVICE_ID_INTEL_ICH6_0 0x2640 2781 2788 #define PCI_DEVICE_ID_INTEL_ICH6_1 0x2641 2782 2789 #define PCI_DEVICE_ID_INTEL_ICH6_2 0x2642 ··· 2789 2794 #define PCI_DEVICE_ID_INTEL_ESB2_14 0x2698 2790 2795 #define PCI_DEVICE_ID_INTEL_ESB2_17 0x269b 2791 2796 #define PCI_DEVICE_ID_INTEL_ESB2_18 0x269e 2797 + #define PCI_DEVICE_ID_INTEL_82945G_HB 0x2770 2798 + #define PCI_DEVICE_ID_INTEL_82945G_IG 0x2772 2799 + #define PCI_DEVICE_ID_INTEL_3000_HB 0x2778 2800 + #define PCI_DEVICE_ID_INTEL_82945GM_HB 0x27a0 2801 + #define PCI_DEVICE_ID_INTEL_82945GM_IG 0x27a2 2792 2802 #define PCI_DEVICE_ID_INTEL_ICH7_0 0x27b8 2793 2803 #define PCI_DEVICE_ID_INTEL_ICH7_1 0x27b9 2794 2804 #define PCI_DEVICE_ID_INTEL_ICH7_30 0x27b0 ··· 2846 2846 #define PCI_DEVICE_ID_INTEL_LYNNFIELD_QPI_PHY0 0x2c91 2847 2847 #define PCI_DEVICE_ID_INTEL_LYNNFIELD_MCR 0x2c98 2848 2848 #define PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_TAD 0x2c99 2849 - #define PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_TEST 0x2c9C 2849 + #define PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_TEST 0x2c9c 2850 2850 #define PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_CH0_CTRL 0x2ca0 2851 2851 #define PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_CH0_ADDR 0x2ca1 2852 2852 #define PCI_DEVICE_ID_INTEL_LYNNFIELD_MC_CH0_RANK 0x2ca2 ··· 2958 2958 #define PCI_DEVICE_ID_INTEL_SBRIDGE_BR 0x3cf5 /* 13.6 */ 2959 2959 #define PCI_DEVICE_ID_INTEL_SBRIDGE_SAD1 0x3cf6 /* 12.7 */ 2960 2960 #define PCI_DEVICE_ID_INTEL_IOAT_SNB 0x402f 2961 + #define PCI_DEVICE_ID_INTEL_5400_ERR 0x4030 2962 + #define PCI_DEVICE_ID_INTEL_5400_FBD0 0x4035 2963 + #define PCI_DEVICE_ID_INTEL_5400_FBD1 0x4036 2964 + #define PCI_DEVICE_ID_INTEL_EP80579_0 0x5031 2965 + #define PCI_DEVICE_ID_INTEL_EP80579_1 0x5032 2961 2966 #define PCI_DEVICE_ID_INTEL_5100_16 0x65f0 2962 2967 #define PCI_DEVICE_ID_INTEL_5100_19 0x65f3 2963 2968 #define PCI_DEVICE_ID_INTEL_5100_21 0x65f5 2964 2969 #define PCI_DEVICE_ID_INTEL_5100_22 0x65f6 2965 - #define PCI_DEVICE_ID_INTEL_5400_ERR 0x4030 2966 - #define PCI_DEVICE_ID_INTEL_5400_FBD0 0x4035 2967 - #define PCI_DEVICE_ID_INTEL_5400_FBD1 0x4036 2968 2970 #define PCI_DEVICE_ID_INTEL_IOAT_SCNB 0x65ff 2969 - #define PCI_DEVICE_ID_INTEL_EP80579_0 0x5031 2970 - #define PCI_DEVICE_ID_INTEL_EP80579_1 0x5032 2971 2971 #define PCI_DEVICE_ID_INTEL_82371SB_0 0x7000 2972 2972 #define PCI_DEVICE_ID_INTEL_82371SB_1 0x7010 2973 2973 #define PCI_DEVICE_ID_INTEL_82371SB_2 0x7020
+69 -69
include/uapi/linux/pci_regs.h
··· 301 301 #define PCI_SID_ESR_FIC 0x20 /* First In Chassis Flag */ 302 302 #define PCI_SID_CHASSIS_NR 3 /* Chassis Number */ 303 303 304 - /* Message Signalled Interrupt registers */ 304 + /* Message Signaled Interrupt registers */ 305 305 306 - #define PCI_MSI_FLAGS 2 /* Message Control */ 306 + #define PCI_MSI_FLAGS 0x02 /* Message Control */ 307 307 #define PCI_MSI_FLAGS_ENABLE 0x0001 /* MSI feature enabled */ 308 308 #define PCI_MSI_FLAGS_QMASK 0x000e /* Maximum queue size available */ 309 309 #define PCI_MSI_FLAGS_QSIZE 0x0070 /* Message queue size configured */ 310 310 #define PCI_MSI_FLAGS_64BIT 0x0080 /* 64-bit addresses allowed */ 311 311 #define PCI_MSI_FLAGS_MASKBIT 0x0100 /* Per-vector masking capable */ 312 312 #define PCI_MSI_RFU 3 /* Rest of capability flags */ 313 - #define PCI_MSI_ADDRESS_LO 4 /* Lower 32 bits */ 314 - #define PCI_MSI_ADDRESS_HI 8 /* Upper 32 bits (if PCI_MSI_FLAGS_64BIT set) */ 315 - #define PCI_MSI_DATA_32 8 /* 16 bits of data for 32-bit devices */ 316 - #define PCI_MSI_MASK_32 12 /* Mask bits register for 32-bit devices */ 317 - #define PCI_MSI_PENDING_32 16 /* Pending intrs for 32-bit devices */ 318 - #define PCI_MSI_DATA_64 12 /* 16 bits of data for 64-bit devices */ 319 - #define PCI_MSI_MASK_64 16 /* Mask bits register for 64-bit devices */ 320 - #define PCI_MSI_PENDING_64 20 /* Pending intrs for 64-bit devices */ 313 + #define PCI_MSI_ADDRESS_LO 0x04 /* Lower 32 bits */ 314 + #define PCI_MSI_ADDRESS_HI 0x08 /* Upper 32 bits (if PCI_MSI_FLAGS_64BIT set) */ 315 + #define PCI_MSI_DATA_32 0x08 /* 16 bits of data for 32-bit devices */ 316 + #define PCI_MSI_MASK_32 0x0c /* Mask bits register for 32-bit devices */ 317 + #define PCI_MSI_PENDING_32 0x10 /* Pending intrs for 32-bit devices */ 318 + #define PCI_MSI_DATA_64 0x0c /* 16 bits of data for 64-bit devices */ 319 + #define PCI_MSI_MASK_64 0x10 /* Mask bits register for 64-bit devices */ 320 + #define PCI_MSI_PENDING_64 0x14 /* Pending intrs for 64-bit devices */ 321 321 322 322 /* MSI-X registers (in MSI-X capability) */ 323 323 #define PCI_MSIX_FLAGS 2 /* Message Control */ ··· 335 335 336 336 /* MSI-X Table entry format (in memory mapped by a BAR) */ 337 337 #define PCI_MSIX_ENTRY_SIZE 16 338 - #define PCI_MSIX_ENTRY_LOWER_ADDR 0 /* Message Address */ 339 - #define PCI_MSIX_ENTRY_UPPER_ADDR 4 /* Message Upper Address */ 340 - #define PCI_MSIX_ENTRY_DATA 8 /* Message Data */ 341 - #define PCI_MSIX_ENTRY_VECTOR_CTRL 12 /* Vector Control */ 338 + #define PCI_MSIX_ENTRY_LOWER_ADDR 0x0 /* Message Address */ 339 + #define PCI_MSIX_ENTRY_UPPER_ADDR 0x4 /* Message Upper Address */ 340 + #define PCI_MSIX_ENTRY_DATA 0x8 /* Message Data */ 341 + #define PCI_MSIX_ENTRY_VECTOR_CTRL 0xc /* Vector Control */ 342 342 #define PCI_MSIX_ENTRY_CTRL_MASKBIT 0x00000001 343 343 344 344 /* CompactPCI Hotswap Register */ ··· 470 470 471 471 /* PCI Express capability registers */ 472 472 473 - #define PCI_EXP_FLAGS 2 /* Capabilities register */ 473 + #define PCI_EXP_FLAGS 0x02 /* Capabilities register */ 474 474 #define PCI_EXP_FLAGS_VERS 0x000f /* Capability version */ 475 475 #define PCI_EXP_FLAGS_TYPE 0x00f0 /* Device/Port type */ 476 476 #define PCI_EXP_TYPE_ENDPOINT 0x0 /* Express Endpoint */ ··· 484 484 #define PCI_EXP_TYPE_RC_EC 0xa /* Root Complex Event Collector */ 485 485 #define PCI_EXP_FLAGS_SLOT 0x0100 /* Slot implemented */ 486 486 #define PCI_EXP_FLAGS_IRQ 0x3e00 /* Interrupt message number */ 487 - #define PCI_EXP_DEVCAP 4 /* Device capabilities */ 487 + #define PCI_EXP_DEVCAP 0x04 /* Device capabilities */ 488 488 #define PCI_EXP_DEVCAP_PAYLOAD 0x00000007 /* Max_Payload_Size */ 489 489 #define PCI_EXP_DEVCAP_PHANTOM 0x00000018 /* Phantom functions */ 490 490 #define PCI_EXP_DEVCAP_EXT_TAG 0x00000020 /* Extended tags */ ··· 497 497 #define PCI_EXP_DEVCAP_PWR_VAL 0x03fc0000 /* Slot Power Limit Value */ 498 498 #define PCI_EXP_DEVCAP_PWR_SCL 0x0c000000 /* Slot Power Limit Scale */ 499 499 #define PCI_EXP_DEVCAP_FLR 0x10000000 /* Function Level Reset */ 500 - #define PCI_EXP_DEVCTL 8 /* Device Control */ 500 + #define PCI_EXP_DEVCTL 0x08 /* Device Control */ 501 501 #define PCI_EXP_DEVCTL_CERE 0x0001 /* Correctable Error Reporting En. */ 502 502 #define PCI_EXP_DEVCTL_NFERE 0x0002 /* Non-Fatal Error Reporting Enable */ 503 503 #define PCI_EXP_DEVCTL_FERE 0x0004 /* Fatal Error Reporting Enable */ ··· 522 522 #define PCI_EXP_DEVCTL_READRQ_2048B 0x4000 /* 2048 Bytes */ 523 523 #define PCI_EXP_DEVCTL_READRQ_4096B 0x5000 /* 4096 Bytes */ 524 524 #define PCI_EXP_DEVCTL_BCR_FLR 0x8000 /* Bridge Configuration Retry / FLR */ 525 - #define PCI_EXP_DEVSTA 10 /* Device Status */ 525 + #define PCI_EXP_DEVSTA 0x0a /* Device Status */ 526 526 #define PCI_EXP_DEVSTA_CED 0x0001 /* Correctable Error Detected */ 527 527 #define PCI_EXP_DEVSTA_NFED 0x0002 /* Non-Fatal Error Detected */ 528 528 #define PCI_EXP_DEVSTA_FED 0x0004 /* Fatal Error Detected */ ··· 530 530 #define PCI_EXP_DEVSTA_AUXPD 0x0010 /* AUX Power Detected */ 531 531 #define PCI_EXP_DEVSTA_TRPND 0x0020 /* Transactions Pending */ 532 532 #define PCI_CAP_EXP_RC_ENDPOINT_SIZEOF_V1 12 /* v1 endpoints without link end here */ 533 - #define PCI_EXP_LNKCAP 12 /* Link Capabilities */ 533 + #define PCI_EXP_LNKCAP 0x0c /* Link Capabilities */ 534 534 #define PCI_EXP_LNKCAP_SLS 0x0000000f /* Supported Link Speeds */ 535 535 #define PCI_EXP_LNKCAP_SLS_2_5GB 0x00000001 /* LNKCAP2 SLS Vector bit 0 */ 536 536 #define PCI_EXP_LNKCAP_SLS_5_0GB 0x00000002 /* LNKCAP2 SLS Vector bit 1 */ ··· 549 549 #define PCI_EXP_LNKCAP_DLLLARC 0x00100000 /* Data Link Layer Link Active Reporting Capable */ 550 550 #define PCI_EXP_LNKCAP_LBNC 0x00200000 /* Link Bandwidth Notification Capability */ 551 551 #define PCI_EXP_LNKCAP_PN 0xff000000 /* Port Number */ 552 - #define PCI_EXP_LNKCTL 16 /* Link Control */ 552 + #define PCI_EXP_LNKCTL 0x10 /* Link Control */ 553 553 #define PCI_EXP_LNKCTL_ASPMC 0x0003 /* ASPM Control */ 554 554 #define PCI_EXP_LNKCTL_ASPM_L0S 0x0001 /* L0s Enable */ 555 555 #define PCI_EXP_LNKCTL_ASPM_L1 0x0002 /* L1 Enable */ ··· 562 562 #define PCI_EXP_LNKCTL_HAWD 0x0200 /* Hardware Autonomous Width Disable */ 563 563 #define PCI_EXP_LNKCTL_LBMIE 0x0400 /* Link Bandwidth Management Interrupt Enable */ 564 564 #define PCI_EXP_LNKCTL_LABIE 0x0800 /* Link Autonomous Bandwidth Interrupt Enable */ 565 - #define PCI_EXP_LNKSTA 18 /* Link Status */ 565 + #define PCI_EXP_LNKSTA 0x12 /* Link Status */ 566 566 #define PCI_EXP_LNKSTA_CLS 0x000f /* Current Link Speed */ 567 567 #define PCI_EXP_LNKSTA_CLS_2_5GB 0x0001 /* Current Link Speed 2.5GT/s */ 568 568 #define PCI_EXP_LNKSTA_CLS_5_0GB 0x0002 /* Current Link Speed 5.0GT/s */ ··· 582 582 #define PCI_EXP_LNKSTA_LBMS 0x4000 /* Link Bandwidth Management Status */ 583 583 #define PCI_EXP_LNKSTA_LABS 0x8000 /* Link Autonomous Bandwidth Status */ 584 584 #define PCI_CAP_EXP_ENDPOINT_SIZEOF_V1 20 /* v1 endpoints with link end here */ 585 - #define PCI_EXP_SLTCAP 20 /* Slot Capabilities */ 585 + #define PCI_EXP_SLTCAP 0x14 /* Slot Capabilities */ 586 586 #define PCI_EXP_SLTCAP_ABP 0x00000001 /* Attention Button Present */ 587 587 #define PCI_EXP_SLTCAP_PCP 0x00000002 /* Power Controller Present */ 588 588 #define PCI_EXP_SLTCAP_MRLSP 0x00000004 /* MRL Sensor Present */ ··· 595 595 #define PCI_EXP_SLTCAP_EIP 0x00020000 /* Electromechanical Interlock Present */ 596 596 #define PCI_EXP_SLTCAP_NCCS 0x00040000 /* No Command Completed Support */ 597 597 #define PCI_EXP_SLTCAP_PSN 0xfff80000 /* Physical Slot Number */ 598 - #define PCI_EXP_SLTCTL 24 /* Slot Control */ 598 + #define PCI_EXP_SLTCTL 0x18 /* Slot Control */ 599 599 #define PCI_EXP_SLTCTL_ABPE 0x0001 /* Attention Button Pressed Enable */ 600 600 #define PCI_EXP_SLTCTL_PFDE 0x0002 /* Power Fault Detected Enable */ 601 601 #define PCI_EXP_SLTCTL_MRLSCE 0x0004 /* MRL Sensor Changed Enable */ ··· 617 617 #define PCI_EXP_SLTCTL_EIC 0x0800 /* Electromechanical Interlock Control */ 618 618 #define PCI_EXP_SLTCTL_DLLSCE 0x1000 /* Data Link Layer State Changed Enable */ 619 619 #define PCI_EXP_SLTCTL_IBPD_DISABLE 0x4000 /* In-band PD disable */ 620 - #define PCI_EXP_SLTSTA 26 /* Slot Status */ 620 + #define PCI_EXP_SLTSTA 0x1a /* Slot Status */ 621 621 #define PCI_EXP_SLTSTA_ABP 0x0001 /* Attention Button Pressed */ 622 622 #define PCI_EXP_SLTSTA_PFD 0x0002 /* Power Fault Detected */ 623 623 #define PCI_EXP_SLTSTA_MRLSC 0x0004 /* MRL Sensor Changed */ ··· 627 627 #define PCI_EXP_SLTSTA_PDS 0x0040 /* Presence Detect State */ 628 628 #define PCI_EXP_SLTSTA_EIS 0x0080 /* Electromechanical Interlock Status */ 629 629 #define PCI_EXP_SLTSTA_DLLSC 0x0100 /* Data Link Layer State Changed */ 630 - #define PCI_EXP_RTCTL 28 /* Root Control */ 630 + #define PCI_EXP_RTCTL 0x1c /* Root Control */ 631 631 #define PCI_EXP_RTCTL_SECEE 0x0001 /* System Error on Correctable Error */ 632 632 #define PCI_EXP_RTCTL_SENFEE 0x0002 /* System Error on Non-Fatal Error */ 633 633 #define PCI_EXP_RTCTL_SEFEE 0x0004 /* System Error on Fatal Error */ 634 634 #define PCI_EXP_RTCTL_PMEIE 0x0008 /* PME Interrupt Enable */ 635 635 #define PCI_EXP_RTCTL_CRSSVE 0x0010 /* CRS Software Visibility Enable */ 636 - #define PCI_EXP_RTCAP 30 /* Root Capabilities */ 636 + #define PCI_EXP_RTCAP 0x1e /* Root Capabilities */ 637 637 #define PCI_EXP_RTCAP_CRSVIS 0x0001 /* CRS Software Visibility capability */ 638 - #define PCI_EXP_RTSTA 32 /* Root Status */ 638 + #define PCI_EXP_RTSTA 0x20 /* Root Status */ 639 639 #define PCI_EXP_RTSTA_PME 0x00010000 /* PME status */ 640 640 #define PCI_EXP_RTSTA_PENDING 0x00020000 /* PME pending */ 641 641 /* ··· 646 646 * Use pcie_capability_read_word() and similar interfaces to use them 647 647 * safely. 648 648 */ 649 - #define PCI_EXP_DEVCAP2 36 /* Device Capabilities 2 */ 649 + #define PCI_EXP_DEVCAP2 0x24 /* Device Capabilities 2 */ 650 650 #define PCI_EXP_DEVCAP2_COMP_TMOUT_DIS 0x00000010 /* Completion Timeout Disable supported */ 651 651 #define PCI_EXP_DEVCAP2_ARI 0x00000020 /* Alternative Routing-ID */ 652 652 #define PCI_EXP_DEVCAP2_ATOMIC_ROUTE 0x00000040 /* Atomic Op routing */ ··· 658 658 #define PCI_EXP_DEVCAP2_OBFF_MSG 0x00040000 /* New message signaling */ 659 659 #define PCI_EXP_DEVCAP2_OBFF_WAKE 0x00080000 /* Re-use WAKE# for OBFF */ 660 660 #define PCI_EXP_DEVCAP2_EE_PREFIX 0x00200000 /* End-End TLP Prefix */ 661 - #define PCI_EXP_DEVCTL2 40 /* Device Control 2 */ 661 + #define PCI_EXP_DEVCTL2 0x28 /* Device Control 2 */ 662 662 #define PCI_EXP_DEVCTL2_COMP_TIMEOUT 0x000f /* Completion Timeout Value */ 663 663 #define PCI_EXP_DEVCTL2_COMP_TMOUT_DIS 0x0010 /* Completion Timeout Disable */ 664 664 #define PCI_EXP_DEVCTL2_ARI 0x0020 /* Alternative Routing-ID */ ··· 670 670 #define PCI_EXP_DEVCTL2_OBFF_MSGA_EN 0x2000 /* Enable OBFF Message type A */ 671 671 #define PCI_EXP_DEVCTL2_OBFF_MSGB_EN 0x4000 /* Enable OBFF Message type B */ 672 672 #define PCI_EXP_DEVCTL2_OBFF_WAKE_EN 0x6000 /* OBFF using WAKE# signaling */ 673 - #define PCI_EXP_DEVSTA2 42 /* Device Status 2 */ 674 - #define PCI_CAP_EXP_RC_ENDPOINT_SIZEOF_V2 44 /* v2 endpoints without link end here */ 675 - #define PCI_EXP_LNKCAP2 44 /* Link Capabilities 2 */ 673 + #define PCI_EXP_DEVSTA2 0x2a /* Device Status 2 */ 674 + #define PCI_CAP_EXP_RC_ENDPOINT_SIZEOF_V2 0x2c /* end of v2 EPs w/o link */ 675 + #define PCI_EXP_LNKCAP2 0x2c /* Link Capabilities 2 */ 676 676 #define PCI_EXP_LNKCAP2_SLS_2_5GB 0x00000002 /* Supported Speed 2.5GT/s */ 677 677 #define PCI_EXP_LNKCAP2_SLS_5_0GB 0x00000004 /* Supported Speed 5GT/s */ 678 678 #define PCI_EXP_LNKCAP2_SLS_8_0GB 0x00000008 /* Supported Speed 8GT/s */ ··· 680 680 #define PCI_EXP_LNKCAP2_SLS_32_0GB 0x00000020 /* Supported Speed 32GT/s */ 681 681 #define PCI_EXP_LNKCAP2_SLS_64_0GB 0x00000040 /* Supported Speed 64GT/s */ 682 682 #define PCI_EXP_LNKCAP2_CROSSLINK 0x00000100 /* Crosslink supported */ 683 - #define PCI_EXP_LNKCTL2 48 /* Link Control 2 */ 683 + #define PCI_EXP_LNKCTL2 0x30 /* Link Control 2 */ 684 684 #define PCI_EXP_LNKCTL2_TLS 0x000f 685 685 #define PCI_EXP_LNKCTL2_TLS_2_5GT 0x0001 /* Supported Speed 2.5GT/s */ 686 686 #define PCI_EXP_LNKCTL2_TLS_5_0GT 0x0002 /* Supported Speed 5GT/s */ ··· 691 691 #define PCI_EXP_LNKCTL2_ENTER_COMP 0x0010 /* Enter Compliance */ 692 692 #define PCI_EXP_LNKCTL2_TX_MARGIN 0x0380 /* Transmit Margin */ 693 693 #define PCI_EXP_LNKCTL2_HASD 0x0020 /* HW Autonomous Speed Disable */ 694 - #define PCI_EXP_LNKSTA2 50 /* Link Status 2 */ 695 - #define PCI_CAP_EXP_ENDPOINT_SIZEOF_V2 52 /* v2 endpoints with link end here */ 696 - #define PCI_EXP_SLTCAP2 52 /* Slot Capabilities 2 */ 694 + #define PCI_EXP_LNKSTA2 0x32 /* Link Status 2 */ 695 + #define PCI_CAP_EXP_ENDPOINT_SIZEOF_V2 0x32 /* end of v2 EPs w/ link */ 696 + #define PCI_EXP_SLTCAP2 0x34 /* Slot Capabilities 2 */ 697 697 #define PCI_EXP_SLTCAP2_IBPD 0x00000001 /* In-band PD Disable Supported */ 698 - #define PCI_EXP_SLTCTL2 56 /* Slot Control 2 */ 699 - #define PCI_EXP_SLTSTA2 58 /* Slot Status 2 */ 698 + #define PCI_EXP_SLTCTL2 0x38 /* Slot Control 2 */ 699 + #define PCI_EXP_SLTSTA2 0x3a /* Slot Status 2 */ 700 700 701 701 /* Extended Capabilities (PCI-X 2.0 and Express) */ 702 702 #define PCI_EXT_CAP_ID(header) (header & 0x0000ffff) ··· 742 742 #define PCI_EXT_CAP_MCAST_ENDPOINT_SIZEOF 40 743 743 744 744 /* Advanced Error Reporting */ 745 - #define PCI_ERR_UNCOR_STATUS 4 /* Uncorrectable Error Status */ 745 + #define PCI_ERR_UNCOR_STATUS 0x04 /* Uncorrectable Error Status */ 746 746 #define PCI_ERR_UNC_UND 0x00000001 /* Undefined */ 747 747 #define PCI_ERR_UNC_DLP 0x00000010 /* Data Link Protocol */ 748 748 #define PCI_ERR_UNC_SURPDN 0x00000020 /* Surprise Down */ ··· 760 760 #define PCI_ERR_UNC_MCBTLP 0x00800000 /* MC blocked TLP */ 761 761 #define PCI_ERR_UNC_ATOMEG 0x01000000 /* Atomic egress blocked */ 762 762 #define PCI_ERR_UNC_TLPPRE 0x02000000 /* TLP prefix blocked */ 763 - #define PCI_ERR_UNCOR_MASK 8 /* Uncorrectable Error Mask */ 763 + #define PCI_ERR_UNCOR_MASK 0x08 /* Uncorrectable Error Mask */ 764 764 /* Same bits as above */ 765 - #define PCI_ERR_UNCOR_SEVER 12 /* Uncorrectable Error Severity */ 765 + #define PCI_ERR_UNCOR_SEVER 0x0c /* Uncorrectable Error Severity */ 766 766 /* Same bits as above */ 767 - #define PCI_ERR_COR_STATUS 16 /* Correctable Error Status */ 767 + #define PCI_ERR_COR_STATUS 0x10 /* Correctable Error Status */ 768 768 #define PCI_ERR_COR_RCVR 0x00000001 /* Receiver Error Status */ 769 769 #define PCI_ERR_COR_BAD_TLP 0x00000040 /* Bad TLP Status */ 770 770 #define PCI_ERR_COR_BAD_DLLP 0x00000080 /* Bad DLLP Status */ ··· 773 773 #define PCI_ERR_COR_ADV_NFAT 0x00002000 /* Advisory Non-Fatal */ 774 774 #define PCI_ERR_COR_INTERNAL 0x00004000 /* Corrected Internal */ 775 775 #define PCI_ERR_COR_LOG_OVER 0x00008000 /* Header Log Overflow */ 776 - #define PCI_ERR_COR_MASK 20 /* Correctable Error Mask */ 776 + #define PCI_ERR_COR_MASK 0x14 /* Correctable Error Mask */ 777 777 /* Same bits as above */ 778 - #define PCI_ERR_CAP 24 /* Advanced Error Capabilities */ 779 - #define PCI_ERR_CAP_FEP(x) ((x) & 31) /* First Error Pointer */ 778 + #define PCI_ERR_CAP 0x18 /* Advanced Error Capabilities & Ctrl*/ 779 + #define PCI_ERR_CAP_FEP(x) ((x) & 0x1f) /* First Error Pointer */ 780 780 #define PCI_ERR_CAP_ECRC_GENC 0x00000020 /* ECRC Generation Capable */ 781 781 #define PCI_ERR_CAP_ECRC_GENE 0x00000040 /* ECRC Generation Enable */ 782 782 #define PCI_ERR_CAP_ECRC_CHKC 0x00000080 /* ECRC Check Capable */ 783 783 #define PCI_ERR_CAP_ECRC_CHKE 0x00000100 /* ECRC Check Enable */ 784 - #define PCI_ERR_HEADER_LOG 28 /* Header Log Register (16 bytes) */ 785 - #define PCI_ERR_ROOT_COMMAND 44 /* Root Error Command */ 784 + #define PCI_ERR_HEADER_LOG 0x1c /* Header Log Register (16 bytes) */ 785 + #define PCI_ERR_ROOT_COMMAND 0x2c /* Root Error Command */ 786 786 #define PCI_ERR_ROOT_CMD_COR_EN 0x00000001 /* Correctable Err Reporting Enable */ 787 787 #define PCI_ERR_ROOT_CMD_NONFATAL_EN 0x00000002 /* Non-Fatal Err Reporting Enable */ 788 788 #define PCI_ERR_ROOT_CMD_FATAL_EN 0x00000004 /* Fatal Err Reporting Enable */ 789 - #define PCI_ERR_ROOT_STATUS 48 789 + #define PCI_ERR_ROOT_STATUS 0x30 790 790 #define PCI_ERR_ROOT_COR_RCV 0x00000001 /* ERR_COR Received */ 791 791 #define PCI_ERR_ROOT_MULTI_COR_RCV 0x00000002 /* Multiple ERR_COR */ 792 792 #define PCI_ERR_ROOT_UNCOR_RCV 0x00000004 /* ERR_FATAL/NONFATAL */ ··· 795 795 #define PCI_ERR_ROOT_NONFATAL_RCV 0x00000020 /* Non-Fatal Received */ 796 796 #define PCI_ERR_ROOT_FATAL_RCV 0x00000040 /* Fatal Received */ 797 797 #define PCI_ERR_ROOT_AER_IRQ 0xf8000000 /* Advanced Error Interrupt Message Number */ 798 - #define PCI_ERR_ROOT_ERR_SRC 52 /* Error Source Identification */ 798 + #define PCI_ERR_ROOT_ERR_SRC 0x34 /* Error Source Identification */ 799 799 800 800 /* Virtual Channel */ 801 - #define PCI_VC_PORT_CAP1 4 801 + #define PCI_VC_PORT_CAP1 0x04 802 802 #define PCI_VC_CAP1_EVCC 0x00000007 /* extended VC count */ 803 803 #define PCI_VC_CAP1_LPEVCC 0x00000070 /* low prio extended VC count */ 804 804 #define PCI_VC_CAP1_ARB_SIZE 0x00000c00 805 - #define PCI_VC_PORT_CAP2 8 805 + #define PCI_VC_PORT_CAP2 0x08 806 806 #define PCI_VC_CAP2_32_PHASE 0x00000002 807 807 #define PCI_VC_CAP2_64_PHASE 0x00000004 808 808 #define PCI_VC_CAP2_128_PHASE 0x00000008 809 809 #define PCI_VC_CAP2_ARB_OFF 0xff000000 810 - #define PCI_VC_PORT_CTRL 12 810 + #define PCI_VC_PORT_CTRL 0x0c 811 811 #define PCI_VC_PORT_CTRL_LOAD_TABLE 0x00000001 812 - #define PCI_VC_PORT_STATUS 14 812 + #define PCI_VC_PORT_STATUS 0x0e 813 813 #define PCI_VC_PORT_STATUS_TABLE 0x00000001 814 - #define PCI_VC_RES_CAP 16 814 + #define PCI_VC_RES_CAP 0x10 815 815 #define PCI_VC_RES_CAP_32_PHASE 0x00000002 816 816 #define PCI_VC_RES_CAP_64_PHASE 0x00000004 817 817 #define PCI_VC_RES_CAP_128_PHASE 0x00000008 818 818 #define PCI_VC_RES_CAP_128_PHASE_TB 0x00000010 819 819 #define PCI_VC_RES_CAP_256_PHASE 0x00000020 820 820 #define PCI_VC_RES_CAP_ARB_OFF 0xff000000 821 - #define PCI_VC_RES_CTRL 20 821 + #define PCI_VC_RES_CTRL 0x14 822 822 #define PCI_VC_RES_CTRL_LOAD_TABLE 0x00010000 823 823 #define PCI_VC_RES_CTRL_ARB_SELECT 0x000e0000 824 824 #define PCI_VC_RES_CTRL_ID 0x07000000 825 825 #define PCI_VC_RES_CTRL_ENABLE 0x80000000 826 - #define PCI_VC_RES_STATUS 26 826 + #define PCI_VC_RES_STATUS 0x1a 827 827 #define PCI_VC_RES_STATUS_TABLE 0x00000001 828 828 #define PCI_VC_RES_STATUS_NEGO 0x00000002 829 829 #define PCI_CAP_VC_BASE_SIZEOF 0x10 830 - #define PCI_CAP_VC_PER_VC_SIZEOF 0x0C 830 + #define PCI_CAP_VC_PER_VC_SIZEOF 0x0c 831 831 832 832 /* Power Budgeting */ 833 - #define PCI_PWR_DSR 4 /* Data Select Register */ 834 - #define PCI_PWR_DATA 8 /* Data Register */ 833 + #define PCI_PWR_DSR 0x04 /* Data Select Register */ 834 + #define PCI_PWR_DATA 0x08 /* Data Register */ 835 835 #define PCI_PWR_DATA_BASE(x) ((x) & 0xff) /* Base Power */ 836 836 #define PCI_PWR_DATA_SCALE(x) (((x) >> 8) & 3) /* Data Scale */ 837 837 #define PCI_PWR_DATA_PM_SUB(x) (((x) >> 10) & 7) /* PM Sub State */ 838 838 #define PCI_PWR_DATA_PM_STATE(x) (((x) >> 13) & 3) /* PM State */ 839 839 #define PCI_PWR_DATA_TYPE(x) (((x) >> 15) & 7) /* Type */ 840 840 #define PCI_PWR_DATA_RAIL(x) (((x) >> 18) & 7) /* Power Rail */ 841 - #define PCI_PWR_CAP 12 /* Capability */ 841 + #define PCI_PWR_CAP 0x0c /* Capability */ 842 842 #define PCI_PWR_CAP_BUDGET(x) ((x) & 1) /* Included in system budget */ 843 - #define PCI_EXT_CAP_PWR_SIZEOF 16 843 + #define PCI_EXT_CAP_PWR_SIZEOF 0x10 844 844 845 845 /* Root Complex Event Collector Endpoint Association */ 846 846 #define PCI_RCEC_RCIEP_BITMAP 4 /* Associated Bitmap for RCiEPs */ ··· 964 964 #define PCI_SRIOV_VFM_MI 0x1 /* Dormant.MigrateIn */ 965 965 #define PCI_SRIOV_VFM_MO 0x2 /* Active.MigrateOut */ 966 966 #define PCI_SRIOV_VFM_AV 0x3 /* Active.Available */ 967 - #define PCI_EXT_CAP_SRIOV_SIZEOF 64 967 + #define PCI_EXT_CAP_SRIOV_SIZEOF 0x40 968 968 969 969 #define PCI_LTR_MAX_SNOOP_LAT 0x4 970 970 #define PCI_LTR_MAX_NOSNOOP_LAT 0x6 ··· 1017 1017 #define PCI_TPH_LOC_NONE 0x000 /* no location */ 1018 1018 #define PCI_TPH_LOC_CAP 0x200 /* in capability */ 1019 1019 #define PCI_TPH_LOC_MSIX 0x400 /* in MSI-X */ 1020 - #define PCI_TPH_CAP_ST_MASK 0x07FF0000 /* st table mask */ 1021 - #define PCI_TPH_CAP_ST_SHIFT 16 /* st table shift */ 1022 - #define PCI_TPH_BASE_SIZEOF 12 /* size with no st table */ 1020 + #define PCI_TPH_CAP_ST_MASK 0x07FF0000 /* ST table mask */ 1021 + #define PCI_TPH_CAP_ST_SHIFT 16 /* ST table shift */ 1022 + #define PCI_TPH_BASE_SIZEOF 0xc /* size with no ST table */ 1023 1023 1024 1024 /* Downstream Port Containment */ 1025 - #define PCI_EXP_DPC_CAP 4 /* DPC Capability */ 1025 + #define PCI_EXP_DPC_CAP 0x04 /* DPC Capability */ 1026 1026 #define PCI_EXP_DPC_IRQ 0x001F /* Interrupt Message Number */ 1027 1027 #define PCI_EXP_DPC_CAP_RP_EXT 0x0020 /* Root Port Extensions */ 1028 1028 #define PCI_EXP_DPC_CAP_POISONED_TLP 0x0040 /* Poisoned TLP Egress Blocking Supported */ ··· 1030 1030 #define PCI_EXP_DPC_RP_PIO_LOG_SIZE 0x0F00 /* RP PIO Log Size */ 1031 1031 #define PCI_EXP_DPC_CAP_DL_ACTIVE 0x1000 /* ERR_COR signal on DL_Active supported */ 1032 1032 1033 - #define PCI_EXP_DPC_CTL 6 /* DPC control */ 1033 + #define PCI_EXP_DPC_CTL 0x06 /* DPC control */ 1034 1034 #define PCI_EXP_DPC_CTL_EN_FATAL 0x0001 /* Enable trigger on ERR_FATAL message */ 1035 1035 #define PCI_EXP_DPC_CTL_EN_NONFATAL 0x0002 /* Enable trigger on ERR_NONFATAL message */ 1036 1036 #define PCI_EXP_DPC_CTL_INT_EN 0x0008 /* DPC Interrupt Enable */ 1037 1037 1038 - #define PCI_EXP_DPC_STATUS 8 /* DPC Status */ 1038 + #define PCI_EXP_DPC_STATUS 0x08 /* DPC Status */ 1039 1039 #define PCI_EXP_DPC_STATUS_TRIGGER 0x0001 /* Trigger Status */ 1040 1040 #define PCI_EXP_DPC_STATUS_TRIGGER_RSN 0x0006 /* Trigger Reason */ 1041 1041 #define PCI_EXP_DPC_STATUS_INTERRUPT 0x0008 /* Interrupt Status */ 1042 1042 #define PCI_EXP_DPC_RP_BUSY 0x0010 /* Root Port Busy */ 1043 1043 #define PCI_EXP_DPC_STATUS_TRIGGER_RSN_EXT 0x0060 /* Trig Reason Extension */ 1044 1044 1045 - #define PCI_EXP_DPC_SOURCE_ID 10 /* DPC Source Identifier */ 1045 + #define PCI_EXP_DPC_SOURCE_ID 0x0A /* DPC Source Identifier */ 1046 1046 1047 1047 #define PCI_EXP_DPC_RP_PIO_STATUS 0x0C /* RP PIO Status */ 1048 1048 #define PCI_EXP_DPC_RP_PIO_MASK 0x10 /* RP PIO Mask */