9de4856...
by
Martin Belanger <email address hidden>
nvme: expose cntrltype and dctype through sysfs
TP8010 introduces the Discovery Controller Type attribute (dctype).
The dctype is returned in the response to the Identify command. This
patch exposes the dctype through the sysfs. Since the dctype depends on
the Controller Type (cntrltype), another attribute of the Identify
response, the patch also exposes the cntrltype as well. The dctype will
only be displayed for discovery controllers.
A note about the naming of this attribute:
Although TP8010 calls this attribute the Discovery Controller Type,
note that the dctype is now part of the response to the Identify
command for all controller types. I/O, Discovery, and Admin controllers
all share the same Identify response PDU structure. Non-discovery
controllers as well as pre-TP8010 discovery controllers will continue
to set this field to 0 (which has always been the default for reserved
bytes). Per TP8010, the value 0 now means "Discovery controller type is
not reported" instead of "Reserved". One could argue that this
definition is correct even for non-discovery controllers, and by
extension, exposing it in the sysfs for non-discovery controllers is
appropriate.
Signed-off-by: Martin Belanger <email address hidden>
Reviewed-by: Chaitanya Kulkarni <email address hidden>
Reviewed-by: John Meneghini <email address hidden>
Reviewed-by: Hannes Reinecke <email address hidden>
Signed-off-by: Christoph Hellwig <email address hidden>
(cherry picked from commit 86c2457a8e8112f16af8fd10a3e1dd7a302c3c3e linux-next)
Signed-off-by: Michael Reed <email address hidden>
582b780...
by
Martin Belanger <email address hidden>
nvme: send uevent on connection up
When connectivity with a controller is lost, the driver will keep
trying to reconnect once every 10 sec. When connection is restored,
user-space apps need to be informed so that they can take proper
action. For example, TP8010 introduces the DIM PDU, which is used to
register with a discovery controller (DC). The DIM PDU is sent from
user-space. The DIM PDU must be sent every time a connection is
established with a DC. Therefore, the kernel must tell user-space apps
when connection is restored so that registration can happen.
The uevent sent is a "change" uevent with environmental data
set to: "NVME_EVENT=connected".
Disable KFENCE as a workaround to prevent potential kernel panics that
seem to happen in nested KVM environments (e.g., systemd autopackage
test).
Disabling this feature also allows to remove the overhead of the
periodic sampling performed by KFENCE. The regression potential is that
we may receive memory corruption bug reports (that were previously
detected explicitly by KFENCE), but in such case we have always the
option to provide a test kernel with KASAN enabled, that provides a
better coverage for this kind of bugs.
Signed-off-by: Andrea Righi <email address hidden>