Re: Serial device with PCI class memory device (0x05)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 07, 2019 at 09:57:56AM +0100, Gerhard Khüny wrote:
> Hello,
> 
> I have a question regarding the function
> serial_pci_is_class_communication() in 8250_pci:
> 
> static int serial_pci_is_class_communication(struct pci_dev *dev) {
> 
>         /*
>         * If it is not a communications device or the programming
>         * interface is greater than 6, give up.
>         */
>         if ((((dev->class >> 8) != PCI_CLASS_COMMUNICATION_SERIAL) &&
>              ((dev->class >> 8) != PCI_CLASS_COMMUNICATION_MULTISERIAL) &&
>              ((dev->class >> 8) != PCI_CLASS_COMMUNICATION_MODEM)) ||
>             (dev->class & 0xff) > 6)
>                return -ENODEV;
> 
>         return 0;
> 
> }
> 
> We have implemented a serial interface in a FPGA. The existing driver
> 8250_pci is working perfect for us. Only the check using the function
> serial_pci_is_class_communication does not work since the PCI class is
> 0x05, subclass is 0x00 and programming interface is 0x00 for our
> device.

Then fix your PCI device identifier structure :)

> My question is, if it is the intention to exclude PCI class memory
> devices implementing a serial driver? The comment in the code could
> say something different.

If your device says it is a memory device and not a serial device, how
could the kernel "know" it is really a serial device?

Please read the PCI spec for what a class device really means, and if
your device does follow the serial specification, then change your pci
device structure of your device to properly tell the host operating
system that it is a serial device.

thanks,

greg k-h



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux