[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240119053756.GC2543524@black.fi.intel.com>
Date: Fri, 19 Jan 2024 07:37:56 +0200
From: Mika Westerberg <mika.westerberg@...ux.intel.com>
To: Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc: Mario Limonciello <mario.limonciello@....com>,
Esther Shimanovich <eshimanovich@...omium.org>,
Lukas Wunner <lukas@...ner.de>, Bjorn Helgaas <bhelgaas@...gle.com>,
linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
Rajat Jain <rajatja@...gle.com>
Subject: Re: [PATCH v4] PCI: Relabel JHL6540 on Lenovo X1 Carbon 7,8
On Thu, Jan 18, 2024 at 08:12:56AM -0800, Dmitry Torokhov wrote:
> On Thu, Jan 18, 2024 at 09:47:07AM -0600, Mario Limonciello wrote:
> > On 1/18/2024 00:00, Mika Westerberg wrote:
> > > > Before my patch, you see that the JHL6540 controller is inaccurately
> > > > labeled “removable”:
> > > > $ udevadm info -a -p /sys/bus/pci/devices/0000:05:00.0 | grep -e
> > > > {removable} -e {device} -e {vendor} -e looking
> > > > looking at device '/devices/pci0000:00/0000:00:1d.4/0000:05:00.0':
> > > > ATTR{device}=="0x15d3"
> > > > ATTR{removable}=="removable"
> > > > ATTR{vendor}=="0x8086"
> > >
> > > This is actually accurate. The Thunderbolt controller is itself
> > > hot-removable and that BTW happens to be hot-removed when fwupd applies
> > > firmware upgrades to the device.
>
> This is quite interesting take. Does fwupd rip the controller out of the
> box to update it? By that account your touchpad is also removable as it
> may stop functioning when its firmware gets updated.
The Thunderbolt controller is connected to a hotpluggable PCIe root port
so it will be dissappear from the userspace so that "removable" in that
sense is accurate.
> > Depending on the consumers of this removable attribute I wonder if we need
> > to a new ATTR of "external" instead of overloading "removable".
>
> Isn't this the same thing? From
> Documentation/ABI/testing/sysfs-devices-removable:
>
> What: /sys/devices/.../removable
> Date: May 2021
> Contact: Rajat Jain <rajatxjain@...il.com>
> Description:
> Information about whether a given device can be removed from the
> platform by the user. This is determined by its subsystem in a
> bus / platform-specific way. This attribute is only present for
> devices that can support determining such information:
>
> =========== ===================================================
> "removable" device can be removed from the platform by the user
> "fixed" device is fixed to the platform / cannot be removed
> by the user.
>
> Note this "by the user". Maybe we should add word "physically" here to
> qualify the meaning completely, but that is what it is. Not that it
> disappears from the bus or stops operating for some time because of
> firmware updates, but it can be physically detached from the
> platform/system.
That would be good to fully qualify what this means. But I get you it is
intented to identify devices that can be physically unplugged from the
system.
Powered by blists - more mailing lists