Skip to content
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

Unloading bdc_pci should not be needed. #40

Open
xgnata opened this issue Jan 7, 2016 · 17 comments
Open

Unloading bdc_pci should not be needed. #40

xgnata opened this issue Jan 7, 2016 · 17 comments

Comments

@xgnata
Copy link

xgnata commented Jan 7, 2016

On my box, a simple modprobe facetimehd does not work.
One has to unload bdc_pci first and then load facetimehd.
I know that with behaviour is documented in the Additional Notes of the wiki.
However, I think it is a issue which should be on the "FIXME" list (as the driver is now streaming more or less like a charm).

@WhyNotHugo
Copy link
Contributor

What the Arch package does, is blacklists bdc_pci. This is done by including a /etc/modprobe.d/bcwc-pcie.conf file. Its contents of the file are just one line: blacklist bdc_pci.

I'd suggest adding that upstream/here, but currently there's no installation script which would do this (current Makefile merely builds the package, as far as I understand).

@Malo87
Copy link

Malo87 commented Jan 8, 2016

I just drop two lines in a loadWebcamModule.sh (chmod a+x):

#!/bin/sh
sudo modprobe -r bdc_pci
sudo modprobe facetimehd

then
$> ./loadWebcamModule.sh

@wvengen
Copy link

wvengen commented Jan 8, 2016

Do we have a pci device id collision here? Looking at the type of chip, it seems to me that the facetimehd device is more abundant, and it may be useful to blacklist bdc_pci by default if this driver gets mainstream.

https://github.com/torvalds/linux/blob/master/drivers/usb/gadget/udc/bdc/Kconfig
http://cateee.net/lkddb/web-lkddb/USB_BDC_PCI.html

@WhyNotHugo
Copy link
Contributor

I just drop two lines in a loadWebcamModule.sh (chmod a+x):

There's no such script in the repository. Using modprobe.d sound like the standard approach too.

@patjak
Copy link
Owner

patjak commented Jan 9, 2016

bdc_pci needs to be more restrictive on grabbing the device so the change should be done there. Not much we can do since broadcom decided to reuse the pci id.

@xgnata
Copy link
Author

xgnata commented Jan 9, 2016

Any chance to contact Ashwini Pahuja (bdc_pci (maintainer) and ask him
to do the change in his driver?
Maybe it is to early?

Xavier

bdc_pci needs to be more restrictive on grabbing the device so the
change should be done there. Not much we can do since broadcom decided
to reuse the pci id.


Reply to this email directly or view it on GitHub
#40 (comment).

@wvengen
Copy link

wvengen commented Jan 10, 2016

I don't think it's too early - kernel changes may take some time to ripple through. I'd be happy to contact him if needed.

@xgnata xgnata closed this as completed Jan 14, 2016
@xgnata xgnata reopened this Jan 14, 2016
@xgnata
Copy link
Author

xgnata commented Jan 14, 2016

I did contact him asking if he could use PCI_CLASS to resolve this conflict.

@wvengen
Copy link

wvengen commented Jan 15, 2016

👍

@proninyaroslav
Copy link

@hobarrera
I can't add it to the blacklist on Ubuntu 15.10 (he still loaded).

@wvengen
Copy link

wvengen commented Jan 18, 2016

@xgnata
Copy link
Author

xgnata commented Jan 18, 2016

Another (better) way of solving the problem is to fix bdc_pci. I have
already sent a bug report on the linux-pci list. However, coming with a
patch would probably speedup the process quite a bit. Both bdc-pci and
facetimehd should not only look at the pci-id to decide to grab the device
or not. If facetimehd code is already looking at e.g. the pci-class then it
should be easy to copy this part of the code into a patch for bdc-pci
(assuming bdc-pci class is documented somewhere...). I'll try to find a bit
of time to look at that.
Le 18 janv. 2016 2:29 PM, "wvengen" notifications@github.com a écrit :

@proninyaroslav https://github.com/proninyaroslav I suppose you edited
/etc/modprobe.d/blacklist.conf and rebooted? You may need to run
update-initramfs in between (depends).
http://askubuntu.com/questions/110341/how-to-blacklist-kernel-modules
https://help.ubuntu.com/community/Loadable_Modules#Blacklisting_Modules
https://wiki.debian.org/KernelModuleBlacklisting
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/227158


Reply to this email directly or view it on GitHub
#40 (comment).

@wvengen
Copy link

wvengen commented Jan 18, 2016

that's even better in the long run, great!

@proninyaroslav
Copy link

Maybe off topic, but after update-initramfs touchpad stopped working (MacBook Air 2014). Repeated deleting module of blacklist, update-initramfs and reboot didn't help.
/var/log/Xorg.0.log http://pastebin.com/61gXjZBa

Bus 001 Device 003: ID 05ac:0291 Apple, Inc. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x05ac Apple, Inc.
  idProduct          0x0291 
  bcdDevice            1.71
  iManufacturer           1 Apple Inc.
  iProduct                2 Apple Internal Keyboard / Trackpad
  iSerial                 3 DQ64125GGGPF94RA3C1
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           84
    bNumInterfaces          3
    bConfigurationValue     1
iConfiguration          4 Keyboard / Trackpad
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              5 Device Management
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0 Not supported
          bNumDescriptors         1
 bDescriptorType        34 Report
          wDescriptorLength      26
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               8
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      1 Keyboard
      iInterface              6 Keyboard / Boot
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode           13 International (ISO)
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     182
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               8
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      2 Mouse
      iInterface              7 Trackpad / Boot
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     110
         Report Descriptors: 
bLength                 9
          bDescriptorType        33
          bcdHID               1.10
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     110
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
Device Status:     0x0000
  (Bus Powered)

@dcunited001
Copy link

@proninyaroslav for me, after i installed the mtrack touchpad drivers, then facetimehd does not autoload and instead bdc_pci does

@xgnata
Copy link
Author

xgnata commented Feb 11, 2016

I wrote a patch to fix bdc_pci but so far no feedback from the author or from kernel maintainers.
I would help a lot if someone could find a doc proving that this USB controller driven by bdc_pci has a device class ID equal to 0x0c (like any other usb controller).
It seems that "nobody" it using bdc_pci for real.
Could someone find even only a doc showing what this controller (it is a Broadcom IP block) really is??? It looks like it exist on some ARM plateforms....but it is annoying to have a driver of a device "nobody" seems to care about grabbing incorrectly a pretty widely use webcam.
Anyone with better google skills that me??

@patjak
Copy link
Owner

patjak commented Feb 11, 2016

I'll get in contact with him and if he is unresponsive I'll just send out the patch to fix it. He's working for Broadcom so if they are sloppy with PCI ID assignments it's their fault and they will have to adjust. Thanks for looking at this.

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

No branches or pull requests

7 participants