Skip to content

Commit 7bc6e90

Browse files
committed
Merge tag 'block-6.0-2022-09-29' of git://git.kernel.dk/linux
Pull block fixes from Jens Axboe: "A single NVMe pull request via Christoph with a few fixes that should go into the 6.0 release: - Fix IOC_PR_CLEAR and IOC_PR_RELEASE ioctls for nvme devices (Michael Kelley) - Disable Write Zeroes on Phison E3C/E4C (Tina Hsu)" * tag 'block-6.0-2022-09-29' of git://git.kernel.dk/linux: nvme-pci: disable Write Zeroes on Phison E3C/E4C nvme: Fix IOC_PR_CLEAR and IOC_PR_RELEASE ioctls for nvme devices
2 parents a0debc4 + 6c84501 commit 7bc6e90

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

drivers/nvme/host/core.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2162,14 +2162,14 @@ static int nvme_pr_preempt(struct block_device *bdev, u64 old, u64 new,
21622162

21632163
static int nvme_pr_clear(struct block_device *bdev, u64 key)
21642164
{
2165-
u32 cdw10 = 1 | (key ? 1 << 3 : 0);
2165+
u32 cdw10 = 1 | (key ? 0 : 1 << 3);
21662166

2167-
return nvme_pr_command(bdev, cdw10, key, 0, nvme_cmd_resv_register);
2167+
return nvme_pr_command(bdev, cdw10, key, 0, nvme_cmd_resv_release);
21682168
}
21692169

21702170
static int nvme_pr_release(struct block_device *bdev, u64 key, enum pr_type type)
21712171
{
2172-
u32 cdw10 = nvme_pr_type(type) << 8 | (key ? 1 << 3 : 0);
2172+
u32 cdw10 = nvme_pr_type(type) << 8 | (key ? 0 : 1 << 3);
21732173

21742174
return nvme_pr_command(bdev, cdw10, key, 0, nvme_cmd_resv_release);
21752175
}

drivers/nvme/host/pci.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3470,6 +3470,10 @@ static const struct pci_device_id nvme_id_table[] = {
34703470
{ PCI_DEVICE(0x1987, 0x5016), /* Phison E16 */
34713471
.driver_data = NVME_QUIRK_IGNORE_DEV_SUBNQN |
34723472
NVME_QUIRK_BOGUS_NID, },
3473+
{ PCI_DEVICE(0x1987, 0x5019), /* phison E19 */
3474+
.driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES, },
3475+
{ PCI_DEVICE(0x1987, 0x5021), /* Phison E21 */
3476+
.driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES, },
34733477
{ PCI_DEVICE(0x1b4b, 0x1092), /* Lexar 256 GB SSD */
34743478
.driver_data = NVME_QUIRK_NO_NS_DESC_LIST |
34753479
NVME_QUIRK_IGNORE_DEV_SUBNQN, },

0 commit comments

Comments
 (0)