Skip to content

Commit d4d7c03

Browse files
committed
Merge tag 'nvme-6.12-2024-09-13' of git://git.infradead.org/nvme into for-6.12/block
Pull NVMe fixes from Keith: "nvme fixes for Linux 6.12 - A syntax cleanup (Shen) - Fix a Kconfig linking error (Arnd) - New queue-depth quirk (Keith)" * tag 'nvme-6.12-2024-09-13' of git://git.infradead.org/nvme: nvme-pci: qdepth 1 quirk nvme-tcp: fix link failure for TCP auth nvme: Convert comma to semicolon
2 parents 26e197b + 83bdfcb commit d4d7c03

File tree

4 files changed

+16
-11
lines changed

4 files changed

+16
-11
lines changed

drivers/nvme/host/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ config NVME_HWMON
4141

4242
config NVME_FABRICS
4343
select NVME_CORE
44+
select NVME_KEYRING if NVME_TCP_TLS
4445
tristate
4546

4647
config NVME_RDMA
@@ -94,7 +95,6 @@ config NVME_TCP
9495
config NVME_TCP_TLS
9596
bool "NVMe over Fabrics TCP TLS encryption support"
9697
depends on NVME_TCP
97-
select NVME_KEYRING
9898
select NET_HANDSHAKE
9999
select KEYS
100100
help

drivers/nvme/host/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4605,7 +4605,7 @@ int nvme_alloc_io_tag_set(struct nvme_ctrl *ctrl, struct blk_mq_tag_set *set,
46054605
set->flags = BLK_MQ_F_SHOULD_MERGE;
46064606
if (ctrl->ops->flags & NVME_F_BLOCKING)
46074607
set->flags |= BLK_MQ_F_BLOCKING;
4608-
set->cmd_size = cmd_size,
4608+
set->cmd_size = cmd_size;
46094609
set->driver_data = ctrl;
46104610
set->nr_hw_queues = ctrl->queue_count - 1;
46114611
set->timeout = NVME_IO_TIMEOUT;

drivers/nvme/host/nvme.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@ enum nvme_quirks {
9090
*/
9191
NVME_QUIRK_NO_DEEPEST_PS = (1 << 5),
9292

93+
/*
94+
* Problems seen with concurrent commands
95+
*/
96+
NVME_QUIRK_QDEPTH_ONE = (1 << 6),
97+
9398
/*
9499
* Set MEDIUM priority on SQ creation
95100
*/

drivers/nvme/host/pci.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2557,15 +2557,8 @@ static int nvme_pci_enable(struct nvme_dev *dev)
25572557
else
25582558
dev->io_sqes = NVME_NVM_IOSQES;
25592559

2560-
/*
2561-
* Temporary fix for the Apple controller found in the MacBook8,1 and
2562-
* some MacBook7,1 to avoid controller resets and data loss.
2563-
*/
2564-
if (pdev->vendor == PCI_VENDOR_ID_APPLE && pdev->device == 0x2001) {
2560+
if (dev->ctrl.quirks & NVME_QUIRK_QDEPTH_ONE) {
25652561
dev->q_depth = 2;
2566-
dev_warn(dev->ctrl.device, "detected Apple NVMe controller, "
2567-
"set queue depth=%u to work around controller resets\n",
2568-
dev->q_depth);
25692562
} else if (pdev->vendor == PCI_VENDOR_ID_SAMSUNG &&
25702563
(pdev->device == 0xa821 || pdev->device == 0xa822) &&
25712564
NVME_CAP_MQES(dev->ctrl.cap) == 0) {
@@ -3425,6 +3418,8 @@ static const struct pci_device_id nvme_id_table[] = {
34253418
NVME_QUIRK_BOGUS_NID, },
34263419
{ PCI_VDEVICE(REDHAT, 0x0010), /* Qemu emulated controller */
34273420
.driver_data = NVME_QUIRK_BOGUS_NID, },
3421+
{ PCI_DEVICE(0x1217, 0x8760), /* O2 Micro 64GB Steam Deck */
3422+
.driver_data = NVME_QUIRK_QDEPTH_ONE },
34283423
{ PCI_DEVICE(0x126f, 0x2262), /* Silicon Motion generic */
34293424
.driver_data = NVME_QUIRK_NO_DEEPEST_PS |
34303425
NVME_QUIRK_BOGUS_NID, },
@@ -3559,7 +3554,12 @@ static const struct pci_device_id nvme_id_table[] = {
35593554
{ PCI_DEVICE(PCI_VENDOR_ID_AMAZON, 0xcd02),
35603555
.driver_data = NVME_QUIRK_DMA_ADDRESS_BITS_48, },
35613556
{ PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2001),
3562-
.driver_data = NVME_QUIRK_SINGLE_VECTOR },
3557+
/*
3558+
* Fix for the Apple controller found in the MacBook8,1 and
3559+
* some MacBook7,1 to avoid controller resets and data loss.
3560+
*/
3561+
.driver_data = NVME_QUIRK_SINGLE_VECTOR |
3562+
NVME_QUIRK_QDEPTH_ONE },
35633563
{ PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2003) },
35643564
{ PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2005),
35653565
.driver_data = NVME_QUIRK_SINGLE_VECTOR |

0 commit comments

Comments
 (0)