> Date: Fri, 21 Oct 2022 20:11:49 +0200
> From: Stefan Sperling <[email protected]>
> 
> On Fri, Oct 21, 2022 at 06:46:14PM +0100, Jason McIntyre wrote:
> > pluggable?

The word "removable" is probably a better choice as this is the
language used by the ACPI and device tree standards.

> It really is a very machine-specific question. It depends
> on how the manufaturer decided to connect devices to the
> mainboard, which is not always possible to tell from the
> perspective of software which runs on the machine.

We probably can do a better job than we do now, but there will always
be machines where the firmware lies to us.

> There can be flash disks soldered into laptops which are
> connected via an sdmmc bus, which will be detached because
> they look just like a pluggable SD card.

Actually that is a case where we do take into account what the
firmware tells us.  In ACPI there is a _RMV() method that will return
0 if a device cannot be removed.  And device trees have a
"non-removable" property.  But that information isn't always correct
and there are weird corner cases like eMMC modules that aren't
soldered but are not quite so removable as a pluggable SD card.

> There are machines with internal USB disks, e.g. the Edge
> Router lite, which, granted, is not an amd64 machine and
> does not suspend/resume. But a similar embedded amd64 with
> a USB slot for internal disk could exist. Perhaps as a custom
> build where someone plugged a USB stick into a USB header on
> the motherboard. Certainly feasible.
> 
> Several laptops I own have internal webcams on the USB bus.
> Which will be detached because there isn't a generic way to
> tell whether they are on an internal or external USB port.
> And perhaps the entire USB bus will be powered down when
> the host controller goes to sleep, and all connected devices
> will lose power.

Losing power isn't reall what's relevant.  Most devices should lose
power during suspend/hibernate.
 
> I tend to agree that the complexity of this is out of scope for
> man pages. Understanding this properly requires reading books
> about computer architecture first.

So I would phrase this as something like "device that the OpenBSD
kernel considers removable".  And also note that the opposite happens
as well: there are devices that our kernel considers non-removable
that are in fact removable.  For example ExpressCard devices, which
are considered non-removable since they are indistinguishable from
normal PCIe devices.

Reply via email to