fix for PC: detach panda kernel driver if active (#1950)

pull/2006/head
xx979xx 5 years ago committed by GitHub
parent 424205325b
commit 4f0c75291b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      selfdrive/boardd/panda.cc

@ -25,6 +25,10 @@ Panda::Panda(){
dev_handle = libusb_open_device_with_vid_pid(ctx, 0xbbaa, 0xddcc);
if (dev_handle == NULL) { goto fail; }
if (libusb_kernel_driver_active(dev_handle, 0) == 1) {
libusb_detach_kernel_driver(dev_handle, 0);
}
err = libusb_set_configuration(dev_handle, 1);
if (err != 0) { goto fail; }

Loading…
Cancel
Save