Skip to content

Commit f6c69b7

Browse files
committed
Merge tag 'block-5.6-2020-02-22' of git://git.kernel.dk/linux-block
Pull block fixes from Jens Axboe: "Just a set of NVMe fixes via Keith" * tag 'block-5.6-2020-02-22' of git://git.kernel.dk/linux-block: nvme-multipath: Fix memory leak with ana_log_buf nvme: Fix uninitialized-variable warning nvme-pci: Use single IRQ vector for old Apple models nvme/pci: Add sleep quirk for Samsung and Toshiba drives
2 parents b98b809 + ae7bbc0 commit f6c69b7

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

drivers/nvme/host/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1165,8 +1165,8 @@ static int nvme_identify_ns(struct nvme_ctrl *ctrl,
11651165
static int nvme_features(struct nvme_ctrl *dev, u8 op, unsigned int fid,
11661166
unsigned int dword11, void *buffer, size_t buflen, u32 *result)
11671167
{
1168+
union nvme_result res = { 0 };
11681169
struct nvme_command c;
1169-
union nvme_result res;
11701170
int ret;
11711171

11721172
memset(&c, 0, sizeof(c));

drivers/nvme/host/multipath.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,7 @@ int nvme_mpath_init(struct nvme_ctrl *ctrl, struct nvme_id_ctrl *id)
715715
}
716716

717717
INIT_WORK(&ctrl->ana_work, nvme_ana_work);
718+
kfree(ctrl->ana_log_buf);
718719
ctrl->ana_log_buf = kmalloc(ctrl->ana_log_size, GFP_KERNEL);
719720
if (!ctrl->ana_log_buf) {
720721
error = -ENOMEM;

drivers/nvme/host/pci.c

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2747,6 +2747,18 @@ static unsigned long check_vendor_combination_bug(struct pci_dev *pdev)
27472747
(dmi_match(DMI_BOARD_NAME, "PRIME B350M-A") ||
27482748
dmi_match(DMI_BOARD_NAME, "PRIME Z370-A")))
27492749
return NVME_QUIRK_NO_APST;
2750+
} else if ((pdev->vendor == 0x144d && (pdev->device == 0xa801 ||
2751+
pdev->device == 0xa808 || pdev->device == 0xa809)) ||
2752+
(pdev->vendor == 0x1e0f && pdev->device == 0x0001)) {
2753+
/*
2754+
* Forcing to use host managed nvme power settings for
2755+
* lowest idle power with quick resume latency on
2756+
* Samsung and Toshiba SSDs based on suspend behavior
2757+
* on Coffee Lake board for LENOVO C640
2758+
*/
2759+
if ((dmi_match(DMI_BOARD_VENDOR, "LENOVO")) &&
2760+
dmi_match(DMI_BOARD_NAME, "LNVNB161216"))
2761+
return NVME_QUIRK_SIMPLE_SUSPEND;
27502762
}
27512763

27522764
return 0;
@@ -3109,7 +3121,8 @@ static const struct pci_device_id nvme_id_table[] = {
31093121
.driver_data = NVME_QUIRK_NO_DEEPEST_PS |
31103122
NVME_QUIRK_IGNORE_DEV_SUBNQN, },
31113123
{ PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_EXPRESS, 0xffffff) },
3112-
{ PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2001) },
3124+
{ PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2001),
3125+
.driver_data = NVME_QUIRK_SINGLE_VECTOR },
31133126
{ PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2003) },
31143127
{ PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2005),
31153128
.driver_data = NVME_QUIRK_SINGLE_VECTOR |

0 commit comments

Comments
 (0)