Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions XDMA/linux-kernel/xdma/cdev_ctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ static long version_ioctl(struct xdma_cdev *xcdev, void __user *arg)
obj.bus = PCI_BUS_NUM(xdev->pdev->devfn);
obj.dev = PCI_SLOT(xdev->pdev->devfn);
obj.func = PCI_FUNC(xdev->pdev->devfn);
obj.pci.number = xdev->pdev->bus->number;
memcpy(obj.pci.name, dev_name(&(xdev->pdev)->dev), sizeof(obj.pci.name));

if (copy_to_user(arg, &obj, sizeof(struct xdma_ioc_info)))
return -EFAULT;
return 0;
Expand Down
6 changes: 6 additions & 0 deletions XDMA/linux-kernel/xdma/cdev_ctrl.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ struct xdma_ioc_base {
unsigned int command;
};

struct xdma_ioc_pci {
unsigned char number;
char name[48];
};

struct xdma_ioc_info {
struct xdma_ioc_base base;
unsigned short vendor;
Expand All @@ -72,6 +77,7 @@ struct xdma_ioc_info {
unsigned char bus;
unsigned char dev;
unsigned char func;
struct xdma_ioc_pci pci;
};

/* IOCTL codes */
Expand Down