<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/dev/nvme, branch releng/13.4</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>nvme: Firmware revisions in the firmware slot info logpage are ASCII strings</title>
<updated>2024-04-08T18:01:07+00:00</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2024-03-01T22:18:43+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=4329e6ccfa4a493933700d267dd4918ba3592a3f'/>
<id>4329e6ccfa4a493933700d267dd4918ba3592a3f</id>
<content type='text'>
In particular, don't try to byteswap the values as 64-bit integers and
always print a non-empty version as a string.

Reviewed by:	chuck, imp
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D44121

(cherry picked from commit 7485926e09a08fbfe83a9bc908e7d43aaca4c172)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In particular, don't try to byteswap the values as 64-bit integers and
always print a non-empty version as a string.

Reviewed by:	chuck, imp
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D44121

(cherry picked from commit 7485926e09a08fbfe83a9bc908e7d43aaca4c172)
</pre>
</div>
</content>
</entry>
<entry>
<title>nvme: Introduce longer timeouts for admin queue</title>
<updated>2023-11-14T12:57:28+00:00</updated>
<author>
<name>Alexander Motin</name>
<email>mav@FreeBSD.org</email>
</author>
<published>2023-11-06T16:05:48+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=35372e305863b7c372d8f019d3f422e7d2ee3be9'/>
<id>35372e305863b7c372d8f019d3f422e7d2ee3be9</id>
<content type='text'>
KIOXIA CD8 SSDs routinely take ~25 seconds to delete non-empty
namespace.  In some cases like hot-plug it takes longer, triggering
timeout and controller resets after just 30 seconds. Linux for many
years has separate 60 seconds timeout for admin queue.  This patch
does the same.  And it is good to be consistent.

Sponsored by:	iXsystems, Inc.
Reviewed by:	imp
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D42454

(cherry picked from commit 8d6c0743e36e3cff9279c40468711a82db98df23)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
KIOXIA CD8 SSDs routinely take ~25 seconds to delete non-empty
namespace.  In some cases like hot-plug it takes longer, triggering
timeout and controller resets after just 30 seconds. Linux for many
years has separate 60 seconds timeout for admin queue.  This patch
does the same.  And it is good to be consistent.

Sponsored by:	iXsystems, Inc.
Reviewed by:	imp
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D42454

(cherry picked from commit 8d6c0743e36e3cff9279c40468711a82db98df23)
</pre>
</div>
</content>
</entry>
<entry>
<title>nvme: Fix memory leak in pt ioctl commands</title>
<updated>2023-10-09T00:41:52+00:00</updated>
<author>
<name>David Sloan</name>
<email>david.sloan@eideticom.com</email>
</author>
<published>2023-09-07T16:22:21+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=242a062841e7166d8354470835dc1d94773b5c01'/>
<id>242a062841e7166d8354470835dc1d94773b5c01</id>
<content type='text'>
When running nvme passthrough commands through the ioctl interface
memory is mapped with vmapbuf() but not unmapped. This results in leaked
memory whenever a process executes an nvme passthrough command with a
data buffer. This can be replicated with a simple c function (error
checks skipped for brevity):

void leak_memory(int nvme_ns_fd, uint16_t nblocks) {
	struct nvme_pt_command pt = {
		.cmd = {
			.opc = NVME_OPC_READ,
			.cdw12 = nblocks - 1,
		},
		.len = nblocks * 512, // Assumes devices with 512 byte lba
		.is_read = 1, // Reads and writes should both trigger leak
	}
	void *buf;

	posix_memalign(&amp;buf, nblocks * 512);
	pt.buf = buf;
	ioctl(nvme_ns_fd, NVME_PASSTHROUGH_COMMAND, &amp;pt);
	free(buf);
}

Signed-off-by: David Sloan &lt;david.sloan@eideticom.com&gt;

PR:		273626
Reviewed by:	imp, markj
MFC after:	1 week

(cherry picked from commit 7ea866eb14f8ec869a525442c03228b6701e1dab)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When running nvme passthrough commands through the ioctl interface
memory is mapped with vmapbuf() but not unmapped. This results in leaked
memory whenever a process executes an nvme passthrough command with a
data buffer. This can be replicated with a simple c function (error
checks skipped for brevity):

void leak_memory(int nvme_ns_fd, uint16_t nblocks) {
	struct nvme_pt_command pt = {
		.cmd = {
			.opc = NVME_OPC_READ,
			.cdw12 = nblocks - 1,
		},
		.len = nblocks * 512, // Assumes devices with 512 byte lba
		.is_read = 1, // Reads and writes should both trigger leak
	}
	void *buf;

	posix_memalign(&amp;buf, nblocks * 512);
	pt.buf = buf;
	ioctl(nvme_ns_fd, NVME_PASSTHROUGH_COMMAND, &amp;pt);
	free(buf);
}

Signed-off-by: David Sloan &lt;david.sloan@eideticom.com&gt;

PR:		273626
Reviewed by:	imp, markj
MFC after:	1 week

(cherry picked from commit 7ea866eb14f8ec869a525442c03228b6701e1dab)
</pre>
</div>
</content>
</entry>
<entry>
<title>sys: Remove $FreeBSD$: one-line .c pattern</title>
<updated>2023-08-23T17:43:25+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-22T01:31:27+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=3bc80996974a61a4223eae4c1ccd47b6ee32a48a'/>
<id>3bc80996974a61a4223eae4c1ccd47b6ee32a48a</id>
<content type='text'>
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/

Similar commit in current:
(cherry picked from commit 685dc743dc3b)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/

Similar commit in current:
(cherry picked from commit 685dc743dc3b)
</pre>
</div>
</content>
</entry>
<entry>
<title>sys: Remove $FreeBSD$: two-line .h pattern</title>
<updated>2023-08-23T17:43:20+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-22T01:31:02+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=f8167e0404dab9ffeaca95853dd237ab7c587f82'/>
<id>f8167e0404dab9ffeaca95853dd237ab7c587f82</id>
<content type='text'>
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/

Similar commit in current:
(cherry picked from commit 95ee2897e98f)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/

Similar commit in current:
(cherry picked from commit 95ee2897e98f)
</pre>
</div>
</content>
</entry>
<entry>
<title>spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD</title>
<updated>2023-07-25T15:13:49+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-05-10T15:40:58+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=caa41f641755c935b036e17440a3b49329c904ed'/>
<id>caa41f641755c935b036e17440a3b49329c904ed</id>
<content type='text'>
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with:		pfg
MFC After:		3 days
Sponsored by:		Netflix

(cherry picked from commit 4d846d260e2b9a3d4d0a701462568268cbfe7a5b)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with:		pfg
MFC After:		3 days
Sponsored by:		Netflix

(cherry picked from commit 4d846d260e2b9a3d4d0a701462568268cbfe7a5b)
</pre>
</div>
</content>
</entry>
<entry>
<title>Add NAMESPACE MANAGEMENT into admin_opcode[].</title>
<updated>2023-03-13T13:52:51+00:00</updated>
<author>
<name>Alexander Motin</name>
<email>mav@FreeBSD.org</email>
</author>
<published>2023-03-08T20:42:31+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=359b91804001d33c5ae19851baff2aac6dcfdec0'/>
<id>359b91804001d33c5ae19851baff2aac6dcfdec0</id>
<content type='text'>
MFC after: 1 week

(cherry picked from commit 49ebbdb264fe185a685dce846985b95f28320e3f)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
MFC after: 1 week

(cherry picked from commit 49ebbdb264fe185a685dce846985b95f28320e3f)
</pre>
</div>
</content>
</entry>
<entry>
<title>bhyve: abort and return FEATURE_NOT_SAVEABLE while set feature with a save flag for NVMe controller.</title>
<updated>2022-11-22T06:51:28+00:00</updated>
<author>
<name>Wanpeng Qian</name>
<email>wanpengqian@gmail.com</email>
</author>
<published>2022-11-14T13:02:44+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=5ebc003a2882a35054a93411a2c4d60f6e9cec3c'/>
<id>5ebc003a2882a35054a93411a2c4d60f6e9cec3c</id>
<content type='text'>
Currently bhyve's NVMe controller cannot save feature values cross
reboot. It should return a FEATURE_NOT_SAVEABLE error when the command
specifies a save flag.

Quote from NVMe specification, page 205:

https://nvmexpress.org/wp-content/uploads/NVM-Express-1_4-2019.06.10-Ratified.pdf

If the Feature Identifier specified in the Set Features command is not
saveable by the controller and the controller receives a Set Features
command with the Save bit set to one, then the command shall be aborted
with a status of Feature Identifier Not Saveable.

Reviewed by:		chuck (older version)
Approved by:		manu (mentor)
MFC after:		1 week
Differential Revision:	https://reviews.freebsd.org/D32767

(cherry picked from commit 8ab99dbea16728f3e34137310587a6aeb3f3d317)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently bhyve's NVMe controller cannot save feature values cross
reboot. It should return a FEATURE_NOT_SAVEABLE error when the command
specifies a save flag.

Quote from NVMe specification, page 205:

https://nvmexpress.org/wp-content/uploads/NVM-Express-1_4-2019.06.10-Ratified.pdf

If the Feature Identifier specified in the Set Features command is not
saveable by the controller and the controller receives a Set Features
command with the Save bit set to one, then the command shall be aborted
with a status of Feature Identifier Not Saveable.

Reviewed by:		chuck (older version)
Approved by:		manu (mentor)
MFC after:		1 week
Differential Revision:	https://reviews.freebsd.org/D32767

(cherry picked from commit 8ab99dbea16728f3e34137310587a6aeb3f3d317)
</pre>
</div>
</content>
</entry>
<entry>
<title>Add random VMware device IDs.</title>
<updated>2022-10-27T02:48:56+00:00</updated>
<author>
<name>Alexander Motin</name>
<email>mav@FreeBSD.org</email>
</author>
<published>2022-10-20T14:19:24+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=7e53019b06d5fd66b6db9fe2edd0bbbdb5eec2a8'/>
<id>7e53019b06d5fd66b6db9fe2edd0bbbdb5eec2a8</id>
<content type='text'>
Just to make dmesg look nicer there.

MFC after:	1 week

(cherry picked from commit 2a31a06bf1bb2d328d6672ed91c3e54734684cc0)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Just to make dmesg look nicer there.

MFC after:	1 week

(cherry picked from commit 2a31a06bf1bb2d328d6672ed91c3e54734684cc0)
</pre>
</div>
</content>
</entry>
<entry>
<title>nvme: Print CRD, M and DNR status bits on errors.</title>
<updated>2022-08-15T17:34:48+00:00</updated>
<author>
<name>Alexander Motin</name>
<email>mav@FreeBSD.org</email>
</author>
<published>2022-08-05T14:58:19+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=bdd4dbb070ac7369d058ab2e59cc4b1df6d7d6cb'/>
<id>bdd4dbb070ac7369d058ab2e59cc4b1df6d7d6cb</id>
<content type='text'>
It may help with some issues debugging.

MFC after:	1 week

(cherry picked from commit a69c0964625f4e20a7d5f22d51e036e13eedbeeb)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It may help with some issues debugging.

MFC after:	1 week

(cherry picked from commit a69c0964625f4e20a7d5f22d51e036e13eedbeeb)
</pre>
</div>
</content>
</entry>
</feed>
