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]

 



hi Andy,

yes, that did the trick! ports are still not autodetected, (but
it's no problem), but in lspci, the card has correct IRQ, and when
I set it using setserial, the same way I did in older kernels, it
seems to work!

if it'll be pushed upstream, can you please add it to 4.14 stable as well?

if you want me to test some more patches, I'm at your disposal, in
case it's not final fix. but now it looks OK (and pretty simple) to me

thanks a lot for your help

nik


On Thu, Feb 01, 2018 at 11:51:08PM +0200, Andy Shevchenko wrote:
> 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
> 

-- 
-------------------------------------
Ing. Nikola CIPRICH
LinuxBox.cz, s.r.o.
28. rijna 168, 709 00 Ostrava

tel.:   +420 591 166 214
fax:    +420 596 621 273
mobil:  +420 777 093 799

www.linuxbox.cz

mobil servis: +420 737 238 656
email servis: servis@xxxxxxxxxxx
-------------------------------------

Attachment: pgp3ggT0g5Ema.pgp
Description: PGP signature


[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