Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: guenther@tum.de (Stephan Günther)
Subject: [PATCH 1/2] nvme: add support for Apple NVMe controller
Date: Wed, 4 Nov 2015 00:47:40 +0100	[thread overview]
Message-ID: <a59fbe4252293ecbcbf8063659f06d51@localhost> (raw)
In-Reply-To: <33537e8a12dff1f96eaec9098724d01e@localhost>

Some controllers may require ordered split transfers even on 64bit
machines, e.g. Apple's NVMe controller as found in the MacBook8,1 and
MacBookAir7,1 (256/512GB models).

This patch enforces ordered split transfers on 64bit platforms, which
works around that issue for all controllers. As pointed out by Christoph
[1] there should be no performance impact due to that modification.

[1] http://lists.infradead.org/pipermail/linux-nvme/2015-November/002965.html

Signed-off-by: Stephan Guenther <guenther at tum.de>
Signed-off-by: Maurice Leclaire <leclaire at in.tum.de>
---
 drivers/block/nvme-core.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c
index ccc0c1f..2f1766b 100644
--- a/drivers/block/nvme-core.c
+++ b/drivers/block/nvme-core.c
@@ -43,6 +43,14 @@
 #include <scsi/sg.h>
 #include <asm-generic/io-64-nonatomic-lo-hi.h>
 
+/*
+ * Some controllers may require ordered split transfers even on 64bit
+ * platforms, e.g. Apple's NVMe controller as found in the MacBook8,1 and
+ * MacBookAir7,1 (256/512GB models).
+ */
+#define readq lo_hi_readq
+#define writeq lo_hi_writeq
+
 #define NVME_MINORS		(1U << MINORBITS)
 #define NVME_Q_DEPTH		1024
 #define NVME_AQ_DEPTH		256

  reply	other threads:[~2015-11-03 23:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-03 23:31 [PATCH 0/2] nvme: adding support for Apple's NVMe controller Stephan Günther
2015-11-03 23:47 ` Stephan Günther [this message]
2015-11-03 23:49 ` [PATCH 2/2] nvme: add support for Apple " Stephan Günther
2015-11-04 14:25 ` [PATCH 0/2] nvme: adding support for Apple's " Christoph Hellwig
2015-11-07  1:32   ` Stephan Günther
2015-11-08  0:20 ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a59fbe4252293ecbcbf8063659f06d51@localhost \
    --to=guenther@tum.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox