mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 16:44:58 +02:00
nvme fixes for Linux 6.15
- fix queue unquiesce check on PCI slot_reset (Keith Busch)
- fix premature queue removal and I/O failover in nvme-tcp
(Michael Liang)
- don't restore null sk_state_change (Alistair Francis)
- select CONFIG_TLS where needed (Alistair Francis)
- always free derived key data (Hannes Reinecke)
- more quirks (Wentao Guan)
-----BEGIN PGP SIGNATURE-----
iQI/BAABCgApFiEEgdbnc3r/njty3Iq9D55TZVIEUYMFAmgTd88LHGhjaEBsc3Qu
ZGUACgkQD55TZVIEUYOnCg//cq9rROfnicHd21/Ohf0cwrdGzc3iuyr007MuFkun
h8AqsSaV5WwOswGrB8XZc/uO5JQfgsTwULU6fWGAbyt6/8VYDRM8lSdCSY6wvpF0
r4n5G+yY6jSwc9jYHFyXlSLRD4aVLz0tzxCyx6qP730gN8Iu27zcmSoSRvJBs5UR
EArG8AQ9P4L61WCODWxKtqi3XxgEVRnNKr8Zv4u3zBtWHwXOzVejeJKTdC2GhDuG
mjgnh2zUnsV4IOMel4JFe8caboVWeUnVI8+Ons0KkDx2qKX0vNd/o05jfKSJ3Mtp
2aN7lHUxEvMlNl30uYsJaFqU5XUQkE92+A+G+FFEjURcLs5bWBqDGVxRuW56VHyr
3Ic+3sBgAzbDOLVOJ27fe/eeZlwvUJdy83XA2dHfm466MlIrvozautUZF58IYWja
x7Wkd/jpFtdR4yL4seU+H2PT/mSvm+Aa12JbWyOeVEWIop3+or97byYzgp53KiO0
IfyOHGk0TGxK0td/9SCaYrONEToMDOPLr/QdeBuIMiyq8X+W2sf1qYQNdFRsoZN9
cFJDipXBXAcH3uSr/Rz1ixhuF8SoBj3OKMzovbvNhZGERnLTKmSYDWz/5QIONZa3
QsqZME4eRXamkZpdUYpufHkdMnEZJVayQbtdtvNS3n18u1S8HSTgsAifH5tiF4Tj
K+o=
=4k8v
-----END PGP SIGNATURE-----
Merge tag 'nvme-6.15-2025-05-01' of git://git.infradead.org/nvme into block-6.15
Pull NVMe fixes from Christoph:
"nvme fixes for Linux 6.15
- fix queue unquiesce check on PCI slot_reset (Keith Busch)
- fix premature queue removal and I/O failover in nvme-tcp
(Michael Liang)
- don't restore null sk_state_change (Alistair Francis)
- select CONFIG_TLS where needed (Alistair Francis)
- always free derived key data (Hannes Reinecke)
- more quirks (Wentao Guan)"
* tag 'nvme-6.15-2025-05-01' of git://git.infradead.org/nvme:
nvmet-auth: always free derived key data
nvmet-tcp: don't restore null sk_state_change
nvmet-tcp: select CONFIG_TLS from CONFIG_NVME_TARGET_TCP_TLS
nvme-tcp: select CONFIG_TLS from CONFIG_NVME_TCP_TLS
nvme-tcp: fix premature queue removal and I/O failover
nvme-pci: add quirks for WDC Blue SN550 15b7:5009
nvme-pci: add quirks for device 126f:1001
nvme-pci: fix queue unquiesce check on slot_reset
This commit is contained in:
commit
6d732e8d1e
|
|
@ -102,6 +102,7 @@ config NVME_TCP_TLS
|
|||
depends on NVME_TCP
|
||||
select NET_HANDSHAKE
|
||||
select KEYS
|
||||
select TLS
|
||||
help
|
||||
Enables TLS encryption for NVMe TCP using the netlink handshake API.
|
||||
|
||||
|
|
|
|||
|
|
@ -3575,7 +3575,7 @@ static pci_ers_result_t nvme_slot_reset(struct pci_dev *pdev)
|
|||
|
||||
dev_info(dev->ctrl.device, "restart after slot reset\n");
|
||||
pci_restore_state(pdev);
|
||||
if (!nvme_try_sched_reset(&dev->ctrl))
|
||||
if (nvme_try_sched_reset(&dev->ctrl))
|
||||
nvme_unquiesce_io_queues(&dev->ctrl);
|
||||
return PCI_ERS_RESULT_RECOVERED;
|
||||
}
|
||||
|
|
@ -3623,6 +3623,9 @@ static const struct pci_device_id nvme_id_table[] = {
|
|||
.driver_data = NVME_QUIRK_BOGUS_NID, },
|
||||
{ PCI_DEVICE(0x1217, 0x8760), /* O2 Micro 64GB Steam Deck */
|
||||
.driver_data = NVME_QUIRK_DMAPOOL_ALIGN_512, },
|
||||
{ PCI_DEVICE(0x126f, 0x1001), /* Silicon Motion generic */
|
||||
.driver_data = NVME_QUIRK_NO_DEEPEST_PS |
|
||||
NVME_QUIRK_IGNORE_DEV_SUBNQN, },
|
||||
{ PCI_DEVICE(0x126f, 0x2262), /* Silicon Motion generic */
|
||||
.driver_data = NVME_QUIRK_NO_DEEPEST_PS |
|
||||
NVME_QUIRK_BOGUS_NID, },
|
||||
|
|
@ -3646,6 +3649,9 @@ static const struct pci_device_id nvme_id_table[] = {
|
|||
NVME_QUIRK_IGNORE_DEV_SUBNQN, },
|
||||
{ PCI_DEVICE(0x15b7, 0x5008), /* Sandisk SN530 */
|
||||
.driver_data = NVME_QUIRK_BROKEN_MSI },
|
||||
{ PCI_DEVICE(0x15b7, 0x5009), /* Sandisk SN550 */
|
||||
.driver_data = NVME_QUIRK_BROKEN_MSI |
|
||||
NVME_QUIRK_NO_DEEPEST_PS },
|
||||
{ PCI_DEVICE(0x1987, 0x5012), /* Phison E12 */
|
||||
.driver_data = NVME_QUIRK_BOGUS_NID, },
|
||||
{ PCI_DEVICE(0x1987, 0x5016), /* Phison E16 */
|
||||
|
|
|
|||
|
|
@ -1946,7 +1946,7 @@ static void __nvme_tcp_stop_queue(struct nvme_tcp_queue *queue)
|
|||
cancel_work_sync(&queue->io_work);
|
||||
}
|
||||
|
||||
static void nvme_tcp_stop_queue(struct nvme_ctrl *nctrl, int qid)
|
||||
static void nvme_tcp_stop_queue_nowait(struct nvme_ctrl *nctrl, int qid)
|
||||
{
|
||||
struct nvme_tcp_ctrl *ctrl = to_tcp_ctrl(nctrl);
|
||||
struct nvme_tcp_queue *queue = &ctrl->queues[qid];
|
||||
|
|
@ -1965,6 +1965,31 @@ static void nvme_tcp_stop_queue(struct nvme_ctrl *nctrl, int qid)
|
|||
mutex_unlock(&queue->queue_lock);
|
||||
}
|
||||
|
||||
static void nvme_tcp_wait_queue(struct nvme_ctrl *nctrl, int qid)
|
||||
{
|
||||
struct nvme_tcp_ctrl *ctrl = to_tcp_ctrl(nctrl);
|
||||
struct nvme_tcp_queue *queue = &ctrl->queues[qid];
|
||||
int timeout = 100;
|
||||
|
||||
while (timeout > 0) {
|
||||
if (!test_bit(NVME_TCP_Q_ALLOCATED, &queue->flags) ||
|
||||
!sk_wmem_alloc_get(queue->sock->sk))
|
||||
return;
|
||||
msleep(2);
|
||||
timeout -= 2;
|
||||
}
|
||||
dev_warn(nctrl->device,
|
||||
"qid %d: timeout draining sock wmem allocation expired\n",
|
||||
qid);
|
||||
}
|
||||
|
||||
static void nvme_tcp_stop_queue(struct nvme_ctrl *nctrl, int qid)
|
||||
{
|
||||
nvme_tcp_stop_queue_nowait(nctrl, qid);
|
||||
nvme_tcp_wait_queue(nctrl, qid);
|
||||
}
|
||||
|
||||
|
||||
static void nvme_tcp_setup_sock_ops(struct nvme_tcp_queue *queue)
|
||||
{
|
||||
write_lock_bh(&queue->sock->sk->sk_callback_lock);
|
||||
|
|
@ -2032,7 +2057,9 @@ static void nvme_tcp_stop_io_queues(struct nvme_ctrl *ctrl)
|
|||
int i;
|
||||
|
||||
for (i = 1; i < ctrl->queue_count; i++)
|
||||
nvme_tcp_stop_queue(ctrl, i);
|
||||
nvme_tcp_stop_queue_nowait(ctrl, i);
|
||||
for (i = 1; i < ctrl->queue_count; i++)
|
||||
nvme_tcp_wait_queue(ctrl, i);
|
||||
}
|
||||
|
||||
static int nvme_tcp_start_io_queues(struct nvme_ctrl *ctrl,
|
||||
|
|
|
|||
|
|
@ -98,6 +98,7 @@ config NVME_TARGET_TCP_TLS
|
|||
bool "NVMe over Fabrics TCP target TLS encryption support"
|
||||
depends on NVME_TARGET_TCP
|
||||
select NET_HANDSHAKE
|
||||
select TLS
|
||||
help
|
||||
Enables TLS encryption for the NVMe TCP target using the netlink handshake API.
|
||||
|
||||
|
|
|
|||
|
|
@ -600,13 +600,12 @@ void nvmet_auth_insert_psk(struct nvmet_sq *sq)
|
|||
pr_warn("%s: ctrl %d qid %d failed to refresh key, error %ld\n",
|
||||
__func__, sq->ctrl->cntlid, sq->qid, PTR_ERR(tls_key));
|
||||
tls_key = NULL;
|
||||
kfree_sensitive(tls_psk);
|
||||
}
|
||||
if (sq->ctrl->tls_key)
|
||||
key_put(sq->ctrl->tls_key);
|
||||
sq->ctrl->tls_key = tls_key;
|
||||
#endif
|
||||
|
||||
kfree_sensitive(tls_psk);
|
||||
out_free_digest:
|
||||
kfree_sensitive(digest);
|
||||
out_free_psk:
|
||||
|
|
|
|||
|
|
@ -1560,6 +1560,9 @@ static void nvmet_tcp_restore_socket_callbacks(struct nvmet_tcp_queue *queue)
|
|||
{
|
||||
struct socket *sock = queue->sock;
|
||||
|
||||
if (!queue->state_change)
|
||||
return;
|
||||
|
||||
write_lock_bh(&sock->sk->sk_callback_lock);
|
||||
sock->sk->sk_data_ready = queue->data_ready;
|
||||
sock->sk->sk_state_change = queue->state_change;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user