Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/ntb/ntb_hw/ntb_hw_intel.c
Show First 20 Lines • Show All 805 Lines • ▼ Show 20 Lines | if (bus_dma_tag_create(bus_get_dma_tag(ntb->device), 1, 0, | ||||
bar->size, 1, bar->size, 0, NULL, NULL, &ntb->bar0_dma_tag)) { | bar->size, 1, bar->size, 0, NULL, NULL, &ntb->bar0_dma_tag)) { | ||||
device_printf(ntb->device, "Unable to create BAR0 tag\n"); | device_printf(ntb->device, "Unable to create BAR0 tag\n"); | ||||
return (ENOMEM); | return (ENOMEM); | ||||
} | } | ||||
if (bus_dmamap_create(ntb->bar0_dma_tag, 0, &ntb->bar0_dma_map)) { | if (bus_dmamap_create(ntb->bar0_dma_tag, 0, &ntb->bar0_dma_map)) { | ||||
device_printf(ntb->device, "Unable to create BAR0 map\n"); | device_printf(ntb->device, "Unable to create BAR0 map\n"); | ||||
return (ENOMEM); | return (ENOMEM); | ||||
} | } | ||||
if (bus_dma_dmar_load_ident(ntb->bar0_dma_tag, ntb->bar0_dma_map, | if (bus_dma_iommu_load_ident(ntb->bar0_dma_tag, ntb->bar0_dma_map, | ||||
bar->pbase, bar->size, 0)) { | bar->pbase, bar->size, 0)) { | ||||
device_printf(ntb->device, "Unable to load BAR0 map\n"); | device_printf(ntb->device, "Unable to load BAR0 map\n"); | ||||
return (ENOMEM); | return (ENOMEM); | ||||
} | } | ||||
bar = &ntb->bar_info[NTB_B2B_BAR_1]; | bar = &ntb->bar_info[NTB_B2B_BAR_1]; | ||||
bar->pci_resource_id = PCIR_BAR(2); | bar->pci_resource_id = PCIR_BAR(2); | ||||
rc = map_memory_window_bar(ntb, bar); | rc = map_memory_window_bar(ntb, bar); | ||||
▲ Show 20 Lines • Show All 2,393 Lines • Show Last 20 Lines |