Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/qlnx/qlnxr/qlnxr_os.c
Show First 20 Lines • Show All 251 Lines • ▼ Show 20 Lines | #else | ||||
ibdev->free_fast_reg_page_list = qlnxr_free_frmr_page_list; | ibdev->free_fast_reg_page_list = qlnxr_free_frmr_page_list; | ||||
#endif /* #if __FreeBSD_version >= 1102000 */ | #endif /* #if __FreeBSD_version >= 1102000 */ | ||||
ibdev->poll_cq = qlnxr_poll_cq; | ibdev->poll_cq = qlnxr_poll_cq; | ||||
ibdev->post_send = qlnxr_post_send; | ibdev->post_send = qlnxr_post_send; | ||||
ibdev->post_recv = qlnxr_post_recv; | ibdev->post_recv = qlnxr_post_recv; | ||||
ibdev->process_mad = qlnxr_process_mad; | ibdev->process_mad = qlnxr_process_mad; | ||||
ibdev->dma_device = &dev->pdev->dev; | ibdev->dma_device = &dev->pdev.dev; | ||||
ibdev->get_link_layer = qlnxr_link_layer; | ibdev->get_link_layer = qlnxr_link_layer; | ||||
if (QLNX_IS_IWARP(dev)) { | if (QLNX_IS_IWARP(dev)) { | ||||
iwcm = kmalloc(sizeof(*iwcm), GFP_KERNEL); | iwcm = kmalloc(sizeof(*iwcm), GFP_KERNEL); | ||||
device_printf(dev->ha->pci_dev, "device is IWARP\n"); | device_printf(dev->ha->pci_dev, "device is IWARP\n"); | ||||
if (iwcm == NULL) | if (iwcm == NULL) | ||||
▲ Show 20 Lines • Show All 823 Lines • ▼ Show 20 Lines | qlnxr_add(void *eth_dev) | ||||
dev = (struct qlnxr_dev *)ib_alloc_device(sizeof(struct qlnxr_dev)); | dev = (struct qlnxr_dev *)ib_alloc_device(sizeof(struct qlnxr_dev)); | ||||
if (dev == NULL) | if (dev == NULL) | ||||
return (NULL); | return (NULL); | ||||
dev->ha = eth_dev; | dev->ha = eth_dev; | ||||
dev->cdev = &ha->cdev; | dev->cdev = &ha->cdev; | ||||
/* Added to extend Application support */ | /* Added to extend Application support */ | ||||
dev->pdev = kzalloc(sizeof(struct pci_dev), GFP_KERNEL); | linux_pci_attach_device(dev->ha->pci_dev, NULL, NULL, &dev->pdev); | ||||
dev->pdev->dev = *(dev->ha->pci_dev); | |||||
dev->pdev->device = pci_get_device(dev->ha->pci_dev); | |||||
dev->pdev->vendor = pci_get_vendor(dev->ha->pci_dev); | |||||
dev->rdma_ctx = &ha->cdev.hwfns[0]; | dev->rdma_ctx = &ha->cdev.hwfns[0]; | ||||
dev->wq_multiplier = wq_multiplier; | dev->wq_multiplier = wq_multiplier; | ||||
dev->num_cnq = QLNX_NUM_CNQ; | dev->num_cnq = QLNX_NUM_CNQ; | ||||
QL_DPRINT12(ha, | QL_DPRINT12(ha, | ||||
"ha = %p dev = %p ha->cdev = %p\n", | "ha = %p dev = %p ha->cdev = %p\n", | ||||
ha, dev, &ha->cdev); | ha, dev, &ha->cdev); | ||||
QL_DPRINT12(ha, | QL_DPRINT12(ha, | ||||
▲ Show 20 Lines • Show All 90 Lines • ▼ Show 20 Lines | qlnxr_remove(void *eth_dev, void *qlnx_rdma_dev) | ||||
ecore_rdma_stop(dev->rdma_ctx); | ecore_rdma_stop(dev->rdma_ctx); | ||||
qlnxr_release_irqs(dev); | qlnxr_release_irqs(dev); | ||||
qlnxr_free_resources(dev); | qlnxr_free_resources(dev); | ||||
qlnxr_remove_sysfiles(dev); | qlnxr_remove_sysfiles(dev); | ||||
ib_dealloc_device(&dev->ibdev); | ib_dealloc_device(&dev->ibdev); | ||||
linux_pci_detach_device(&dev->pdev); | |||||
QL_DPRINT12(ha, "exit ha = %p qlnx_rdma_dev = %p\n", ha, qlnx_rdma_dev); | QL_DPRINT12(ha, "exit ha = %p qlnx_rdma_dev = %p\n", ha, qlnx_rdma_dev); | ||||
return (0); | return (0); | ||||
} | } | ||||
int | int | ||||
qlnx_rdma_ll2_set_mac_filter(void *rdma_ctx, uint8_t *old_mac_address, | qlnx_rdma_ll2_set_mac_filter(void *rdma_ctx, uint8_t *old_mac_address, | ||||
uint8_t *new_mac_address) | uint8_t *new_mac_address) | ||||
▲ Show 20 Lines • Show All 126 Lines • Show Last 20 Lines |