Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F154923594
D29595.id87306.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D29595.id87306.diff
View Options
diff --git a/sys/dev/qlnx/qlnxr/qlnxr_def.h b/sys/dev/qlnx/qlnxr/qlnxr_def.h
--- a/sys/dev/qlnx/qlnxr/qlnxr_def.h
+++ b/sys/dev/qlnx/qlnxr/qlnxr_def.h
@@ -364,7 +364,7 @@
struct ecore_dev *cdev;
/* Added to extend Applications Support */
- struct pci_dev *pdev;
+ struct pci_dev pdev;
uint32_t dp_module;
uint8_t dp_level;
diff --git a/sys/dev/qlnx/qlnxr/qlnxr_os.c b/sys/dev/qlnx/qlnxr/qlnxr_os.c
--- a/sys/dev/qlnx/qlnxr/qlnxr_os.c
+++ b/sys/dev/qlnx/qlnxr/qlnxr_os.c
@@ -257,7 +257,7 @@
ibdev->post_recv = qlnxr_post_recv;
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;
@@ -1097,11 +1097,7 @@
dev->ha = eth_dev;
dev->cdev = &ha->cdev;
/* Added to extend Application support */
- dev->pdev = kzalloc(sizeof(struct pci_dev), GFP_KERNEL);
-
- 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);
+ linux_pci_attach_device(dev->ha->pci_dev, NULL, NULL, &dev->pdev);
dev->rdma_ctx = &ha->cdev.hwfns[0];
dev->wq_multiplier = wq_multiplier;
@@ -1210,6 +1206,8 @@
qlnxr_remove_sysfiles(dev);
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);
return (0);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, May 1, 2:12 AM (5 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32549435
Default Alt Text
D29595.id87306.diff (1 KB)
Attached To
Mode
D29595: qlnxr: Properly initialize the Linux device structure
Attached
Detach File
Event Timeline
Log In to Comment