Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] NVMe: Add device id to vendor specific chunk size
@ 2015-07-31 22:03 Keith Busch
  2015-08-01  3:26 ` Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: Keith Busch @ 2015-07-31 22:03 UTC (permalink / raw)


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(-)

diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c
index 7e9dd11..8f936f3 100644
--- a/drivers/block/nvme-core.c
+++ b/drivers/block/nvme-core.c
@@ -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);
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-08-01  3:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-31 22:03 [PATCH] NVMe: Add device id to vendor specific chunk size Keith Busch
2015-08-01  3:26 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox