lkml.org 
[lkml]   [2019]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] 8250_pci.c: Update NI specific devices class to multi serial
On Tue, Jan 15, 2019 at 06:10:05PM +0800, Guan Yung Tseng wrote:
> +/*
> + * NI Serial devices incorrectly identify themselves
> + * PCI_CLASS_COMMUNICATION_OTHER, instead of what
> + * they really are: PCI_CLASS_COMMUNICATION_MULTISERIAL
> + */
> +static int pci_ni_probe(struct pci_dev *dev)
> +{
> + dev->class = PCI_CLASS_COMMUNICATION_MULTISERIAL << 8 |
> + (dev->class & 0xff);
> + return 0;
> +}

This looks odd. dev->class should just contain the class code read from
config space. I think you need to work around this in the places that
check the classcode instead and add a quirk for these devices.

\
 
 \ /
  Last update: 2019-01-15 14:32    [W:0.047 / U:8.500 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site