Skip to contentSkip to conversation

NVMe: Add device id to vendor specific chunk size

PATCH New Keith Busch 2 participants 2 messages Jul 31, 2015 – Aug 1, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 NVMe: Add device id to vendor specific chunk size

A controller with a new device id supports the same striping feature currently used with DID 0953h, so appending the new device identifier to the check that enables this feature.

Signed-off-by Keith Busch <keith.busch at intel.com>
---
 drivers/block/nvme-core.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/block/nvme-core.c +2 -1
index 7e9dd11..8f936f3 100644
@@ -2347,6 +2347,7 @@ static int nvme_dev_add(struct nvme_dev *dev)
 	unsigned nn;
 	struct nvme_id_ctrl *ctrl;
 	int shift = NVME_CAP_MPSMIN(readq(&dev->bar->cap)) + 12;
+	u16 did = pdev->device;
 
 	res = nvme_identify_ctrl(dev, &ctrl);
 	if (res) {
@@ -2364,7 +2365,7 @@ static int nvme_dev_add(struct nvme_dev *dev)
 	if (ctrl->mdts)
 		dev->max_hw_sectors = 1 << (ctrl->mdts + shift - 9);
 	if ((pdev->vendor == PCI_VENDOR_ID_INTEL) &&
-			(pdev->device == 0x0953) && ctrl->vs[3]) {
+			(did == 0x0953 || did == 0x0a54) && ctrl->vs[3]) {
 		unsigned int max_hw_sectors;
 
 		dev->stripe_size = 1 << (ctrl->vs[3] + shift);
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/1 NVMe: Add device id to vendor specific chunk size

Quoted 3 lines · Keith Busch

A controller with a new device id supports the same striping feature currently used with DID 0953h, so appending the new device identifier to the check that enables this feature.

Eww. Why do we need these workarounds for new hardware? If this is
something Intel want to be stuck with it should be pushed as something reported in IDENTIFY data.