Re: [PATCH 4/5] thunderbolt: Correlate PCI devices with Thunderbolt ports

From: Mika Westerberg
Date: Mon Sep 10 2018 - 05:45:17 EST


Hi Lukas,

On Sun, Sep 09, 2018 at 11:42:01PM +0200, Lukas Wunner wrote:
> Ideas what we can do with correlation:
>
> * Represent the relationship between PCI devices and Thunderbolt ports
> with symlinks in sysfs.

I wonder is that really useful? I don't think we should be adding sysfs
entries without any real reason why it would be needed and who would be
using them.

> * Thunderbolt controllers up to revision 1 of Cactus Ridge 4C have to
> use INTx because MSI signaling is broken. This results in hotplug
> ports sharing interrupts with other devices and, when daisy-chaining
> multiple affected Thunderbolt controllers, can lead to extremely
> unbalanced interrupt usage. To avoid this we could prefer downstream
> ports for tunnel establishment which do not share interrupts (based
> on the nr_actions field of the correlated PCI device's irq_desc).
>
> * Alternatively, we could use non-working MSI signaling on affected
> controllers and synthesize an interrupt whenever a tunnel is
> established or goes down on unplug.

Problem I see with this patch as it stands is that you add 200+ lines of
code into the driver that is not being used by anything as far as I
understand it.