Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/ntb/ntb_hw/ntb_hw_intel.c
Show First 20 Lines • Show All 489 Lines • ▼ Show 20 Lines | /* XXX: PS/SS IDs left out until they are supported. */ | ||||
NTB_SDOORBELL_LOCKUP | NTB_B2BDOORBELL_BIT14 | | NTB_SDOORBELL_LOCKUP | NTB_B2BDOORBELL_BIT14 | | ||||
NTB_SB01BASE_LOCKUP | NTB_BAR_SIZE_4K }, | NTB_SB01BASE_LOCKUP | NTB_BAR_SIZE_4K }, | ||||
{ 0x2F0D8086, "HSX Xeon E5 V3 Non-Transparent Bridge B2B", NTB_XEON, | { 0x2F0D8086, "HSX Xeon E5 V3 Non-Transparent Bridge B2B", NTB_XEON, | ||||
NTB_SDOORBELL_LOCKUP | NTB_B2BDOORBELL_BIT14 | | NTB_SDOORBELL_LOCKUP | NTB_B2BDOORBELL_BIT14 | | ||||
NTB_SB01BASE_LOCKUP }, | NTB_SB01BASE_LOCKUP }, | ||||
{ 0x6F0D8086, "BDX Xeon E5 V4 Non-Transparent Bridge B2B", NTB_XEON, | { 0x6F0D8086, "BDX Xeon E5 V4 Non-Transparent Bridge B2B", NTB_XEON, | ||||
NTB_SDOORBELL_LOCKUP | NTB_B2BDOORBELL_BIT14 | | NTB_SDOORBELL_LOCKUP | NTB_B2BDOORBELL_BIT14 | | ||||
NTB_SB01BASE_LOCKUP }, | NTB_SB01BASE_LOCKUP }, | ||||
{ 0x00000000, NULL, NTB_ATOM, 0 } | |||||
}; | }; | ||||
static const struct ntb_reg atom_reg = { | static const struct ntb_reg atom_reg = { | ||||
.ntb_ctl = ATOM_NTBCNTL_OFFSET, | .ntb_ctl = ATOM_NTBCNTL_OFFSET, | ||||
.lnk_sta = ATOM_LINK_STATUS_OFFSET, | .lnk_sta = ATOM_LINK_STATUS_OFFSET, | ||||
.db_size = sizeof(uint64_t), | .db_size = sizeof(uint64_t), | ||||
.mw_bar = { NTB_B2B_BAR_1, NTB_B2B_BAR_2 }, | .mw_bar = { NTB_B2B_BAR_1, NTB_B2B_BAR_2 }, | ||||
}; | }; | ||||
▲ Show 20 Lines • Show All 877 Lines • ▼ Show 20 Lines | for (i = 0; i < XEON_NONLINK_DB_MSIX_BITS; i++) { | ||||
ntb->msix_data[i].nmd_data = data; | ntb->msix_data[i].nmd_data = data; | ||||
} | } | ||||
} | } | ||||
static struct ntb_hw_info * | static struct ntb_hw_info * | ||||
intel_ntb_get_device_info(uint32_t device_id) | intel_ntb_get_device_info(uint32_t device_id) | ||||
{ | { | ||||
struct ntb_hw_info *ep = pci_ids; | struct ntb_hw_info *ep; | ||||
while (ep->device_id) { | for (ep = pci_ids; ep < &pci_ids[nitems(pci_ids)]; ep++) { | ||||
if (ep->device_id == device_id) | if (ep->device_id == device_id) | ||||
return (ep); | return (ep); | ||||
++ep; | |||||
} | } | ||||
return (NULL); | return (NULL); | ||||
} | } | ||||
static void | static void | ||||
intel_ntb_teardown_xeon(struct ntb_softc *ntb) | intel_ntb_teardown_xeon(struct ntb_softc *ntb) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 1,710 Lines • ▼ Show 20 Lines | static device_method_t ntb_intel_methods[] = { | ||||
DEVMETHOD_END | DEVMETHOD_END | ||||
}; | }; | ||||
static DEFINE_CLASS_0(ntb_hw, ntb_intel_driver, ntb_intel_methods, | static DEFINE_CLASS_0(ntb_hw, ntb_intel_driver, ntb_intel_methods, | ||||
sizeof(struct ntb_softc)); | sizeof(struct ntb_softc)); | ||||
DRIVER_MODULE(ntb_hw_intel, pci, ntb_intel_driver, ntb_hw_devclass, NULL, NULL); | DRIVER_MODULE(ntb_hw_intel, pci, ntb_intel_driver, ntb_hw_devclass, NULL, NULL); | ||||
MODULE_DEPEND(ntb_hw_intel, ntb, 1, 1, 1); | MODULE_DEPEND(ntb_hw_intel, ntb, 1, 1, 1); | ||||
MODULE_VERSION(ntb_hw_intel, 1); | MODULE_VERSION(ntb_hw_intel, 1); | ||||
MODULE_PNP_INFO("W32:vendor/device;D:human", pci, ntb_hw_intel, pci_ids, | |||||
sizeof(pci_ids[0]), nitems(pci_ids)); |