Re: [PATCH] parport: Add support for the WCH384 4S multi-IO card

From: Andy Shevchenko
Date: Wed Jun 06 2018 - 13:07:50 EST


On Wed, Jun 6, 2018 at 8:04 PM, Andy Shevchenko
<andy.shevchenko@xxxxxxxxx> wrote:
> On Wed, Jun 6, 2018 at 9:07 AM, Matt Turner <mattst88@xxxxxxxxx> wrote:
>> On Sat, May 26, 2018 at 12:35 PM, Matt Turner <mattst88@xxxxxxxxx> wrote:
>>> This Multi-IO card has one serial 16550-like serial connectors. Here's
>>> the lspci output, after this commit is applied:
>>>
>>> 01:00.0 Serial controller [0700]: Device [1c00:3470] (rev 10) (prog-if 05 [16850])
>>> Subsystem: Device [1c00:3470]
>>> Flags: fast devsel, IRQ 16
>>> I/O ports at e000 [size=256]
>>> Memory at f0100000 (32-bit, prefetchable) [size=32K]
>>> I/O ports at e100 [size=4]
>>> Expansion ROM at f7d00000 [disabled] [size=32K]
>>> Capabilities: [60] Power Management version 3
>>> Capabilities: [68] MSI: Enable- Count=1/32 Maskable+ 64bit+
>>> Capabilities: [80] Express Legacy Endpoint, MSI 00
>>> Capabilities: [100] Advanced Error Reporting
>>> Kernel driver in use: parport_serial
>>>
>>> This card was already added to the blacklist of 8250_pci.c in commit
>>> 72a3c0e4e662 ("tty: Add support for the WCH384 4S multi-IO card").
>
> First of all, this patch is in conflict with tty-next AFAICS.
>
> Second, what card w/o parport should do in parport_serial?
>
> Third, this patch brings more mess: either you should remove the code
> from 8250_pci, or do not add it here. See below.
>
> it looks like the mentioned patch mistakenly added it to blacklist by
> unknown reason.
>
> Feels to me like NAK to this one.
>
> And btw, you missed s letter in the model name across the code and I
> don't see any of cards there listed with numports == 0.

Ah, it seems that you have two identical VID:DID devices with either
numports == 0 or 1.

First one should be served by 8250_pci. The second one indeed is good
to have here.

Though, how to distinguish them? By PCI class? by sVID:sDID?


--
With Best Regards,
Andy Shevchenko