Skip to content

Kernel driver #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Jun 26, 2017
Merged

Kernel driver #16

merged 14 commits into from
Jun 26, 2017

Conversation

diamondman
Copy link
Contributor

First version of the Panda Kernel Driver.
Works with all 3 CNA interfaces of the Panda.
Passes workbench test of panda to panda communication.

@@ -0,0 +1,612 @@
/**
* @file panda.c
* @author Jeddy Diamond Exum
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol, typo in your name

@@ -0,0 +1,2 @@
all:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move this to driver/linux/test

@@ -0,0 +1,6 @@
.*.cmd
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move this to driver/linux/

Expecting a windows driver soon


module_usb_driver(panda_usb_driver);

MODULE_LICENSE("GPL");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any issue with "Dual MIT/GPL"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code largely influenced by an existing kernel driver. GPL is likely required.

return -ENOMEM;
}

usb_fill_int_urb(urb, priv_dev->udev,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we call panda_usb_read_int_callback to trigger this to avoid copied code?

usb_rcvintpipe(priv_dev->udev, 1),
urb->transfer_buffer, PANDA_USB_RX_BUFF_SIZE,
panda_usb_read_int_callback, priv_dev, 5);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does URB_NO_TRANSFER_DMA_MAP have to be set here? If not, why is it set for the first usb_fill_int_urb?

@geohot geohot merged commit b81c62c into commaai:master Jun 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants