Re: [BISECTED] - multiport braiboxes serial card broken between 4.8 and 4.9 (and again in 4.14)

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

 



On Thu, 2018-02-01 at 22:31 +0200, Andy Shevchenko wrote:
> On Thu, 2018-02-01 at 20:28 +0100, Nikola Ciprich wrote:
> 
> 
> > 7d8905d064058f4b65057e0101588f362f288bc0 is the first bad commit
> > commit 7d8905d064058f4b65057e0101588f362f288bc0
> > Author: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> > Date:   Mon Jul 24 20:28:32 2017 +0300
> > 
> >     serial: 8250_pci: Enable device after we check black list

Looking to the patch more I have only one idea in mind. The driver now
skips the function 0 which seems has correct IRQ line and continues with
the rest where it eventually matches devices as serial.

It would be nice to have output of

% lspci -vv -n -xxx # before _and_ after this commit applied (or
reverted)

> > 02:00.0 0702: 135a:4100 (rev 02)


#define PCI_BASE_CLASS_COMMUNICATION    0x07
#define PCI_CLASS_COMMUNICATION_SERIAL  0x0700
#define PCI_CLASS_COMMUNICATION_PARALLEL 0x0701
#define PCI_CLASS_COMMUNICATION_MULTISERIAL 0x0702
#define PCI_CLASS_COMMUNICATION_MODEM   0x0703
#define PCI_CLASS_COMMUNICATION_OTHER   0x0780

And we check there only for 0x700 and 0x703.


Can you try the following if it fixes the issue?

--- a/drivers/tty/serial/8250/8250_pci.c
+++ b/drivers/tty/serial/8250/8250_pci.c
@@ -3392,6 +3392,7 @@ static int
serial_pci_is_class_communication(struct pci_dev *dev)
         * later?)
         */
        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;


> > 	Subsystem: 135a:0443
> > 	Flags: fast devsel, IRQ 18

> > 	Memory at f7d02000 (32-bit, non-prefetchable) [size=128]
> > 	I/O ports at e000 [size=128]
> > 	I/O ports at e080 [size=64]
> > 	I/O ports at e0c0 [size=16]
> > 	Memory at f7d01000 (32-bit, non-prefetchable) [size=128]
> > 	Memory at f7d00000 (32-bit, non-prefetchable) [size=128]

Interesting IO/MMIO configuration...

Btw, I noticed two records in the 8250_pci WRT INTASHIELD cards (I think
Brainboxes bought it, that's why PCI ID inherited).

-- 
Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Intel Finland Oy
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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