summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ahci-disable-MSI-instead-of-NCQ-on-Samsung-pci-e-SSD.patch67
-rw-r--r--kernel.spec9
2 files changed, 76 insertions, 0 deletions
diff --git a/ahci-disable-MSI-instead-of-NCQ-on-Samsung-pci-e-SSD.patch b/ahci-disable-MSI-instead-of-NCQ-on-Samsung-pci-e-SSD.patch
new file mode 100644
index 000000000..64d0e44f7
--- /dev/null
+++ b/ahci-disable-MSI-instead-of-NCQ-on-Samsung-pci-e-SSD.patch
@@ -0,0 +1,67 @@
+From: Tejun Heo <tj@kernel.org>
+Date: Mon, 27 Oct 2014 10:30:52 -0400
+Subject: [PATCH] ahci: disable MSI instead of NCQ on Samsung pci-e SSDs on
+ macbooks
+
+From 44aecdabc85087e7c299d7a28e095e2b91894a51 Mon Sep 17 00:00:00 2001
+From: Tejun Heo <tj@kernel.org>
+Date: Mon, 27 Oct 2014 10:22:56 -0400
+
+Samsung pci-e SSDs on macbooks failed miserably on NCQ commands, so
+67809f85d31e ("ahci: disable NCQ on Samsung pci-e SSDs on macbooks")
+disabled NCQ on them. It turns out that NCQ is fine as long as MSI is
+not used, so let's turn off MSI and leave NCQ on.
+
+Signed-off-by: Tejun Heo <tj@kernel.org>
+Link: https://bugzilla.kernel.org/show_bug.cgi?id=60731
+Tested-by: <dorin@i51.org>
+Tested-by: Imre Kaloz <kaloz@openwrt.org>
+Cc: stable@vger.kernel.org
+Fixes: 67809f85d31e ("ahci: disable NCQ on Samsung pci-e SSDs on macbooks")
+---
+ drivers/ata/ahci.c | 14 +++++++++++---
+ 1 file changed, 11 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
+index 5f039f191067..ef4b647b3ed2 100644
+--- a/drivers/ata/ahci.c
++++ b/drivers/ata/ahci.c
+@@ -60,6 +60,7 @@ enum board_ids {
+ /* board IDs by feature in alphabetical order */
+ board_ahci,
+ board_ahci_ign_iferr,
++ board_ahci_nomsi,
+ board_ahci_noncq,
+ board_ahci_nosntf,
+ board_ahci_yes_fbs,
+@@ -121,6 +122,13 @@ static const struct ata_port_info ahci_port_info[] = {
+ .udma_mask = ATA_UDMA6,
+ .port_ops = &ahci_ops,
+ },
++ [board_ahci_nomsi] = {
++ AHCI_HFLAGS (AHCI_HFLAG_NO_MSI),
++ .flags = AHCI_FLAG_COMMON,
++ .pio_mask = ATA_PIO4,
++ .udma_mask = ATA_UDMA6,
++ .port_ops = &ahci_ops,
++ },
+ [board_ahci_noncq] = {
+ AHCI_HFLAGS (AHCI_HFLAG_NO_NCQ),
+ .flags = AHCI_FLAG_COMMON,
+@@ -475,10 +483,10 @@ static const struct pci_device_id ahci_pci_tbl[] = {
+ { PCI_VDEVICE(ASMEDIA, 0x0612), board_ahci }, /* ASM1062 */
+
+ /*
+- * Samsung SSDs found on some macbooks. NCQ times out.
+- * https://bugzilla.kernel.org/show_bug.cgi?id=60731
++ * Samsung SSDs found on some macbooks. NCQ times out if MSI is
++ * enabled. https://bugzilla.kernel.org/show_bug.cgi?id=60731
+ */
+- { PCI_VDEVICE(SAMSUNG, 0x1600), board_ahci_noncq },
++ { PCI_VDEVICE(SAMSUNG, 0x1600), board_ahci_nomsi },
+
+ /* Enmotus */
+ { PCI_DEVICE(0x1c44, 0x8000), board_ahci },
+--
+1.9.3
+
diff --git a/kernel.spec b/kernel.spec
index dc7aa6a34..2cc619949 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -616,6 +616,9 @@ Patch26064: Input-add-driver-for-the-Goodix-touchpanel.patch
Patch26065: sched-Remove-lockdep-check-in-sched_move_task.patch
+#rhbz 1161805
+Patch26066: ahci-disable-MSI-instead-of-NCQ-on-Samsung-pci-e-SSD.patch
+
# git clone ssh://git.fedorahosted.org/git/kernel-arm64.git, git diff master...devel
Patch30000: kernel-arm64.patch
@@ -1341,6 +1344,9 @@ ApplyPatch Input-add-driver-for-the-Goodix-touchpanel.patch
ApplyPatch sched-Remove-lockdep-check-in-sched_move_task.patch
+#rhbz 1161805
+ApplyPatch ahci-disable-MSI-instead-of-NCQ-on-Samsung-pci-e-SSD.patch
+
%if 0%{?aarch64patches}
ApplyPatch kernel-arm64.patch
%ifnarch aarch64 # this is stupid, but i want to notice before secondary koji does.
@@ -2209,6 +2215,9 @@ fi
# ||----w |
# || ||
%changelog
+* Mon Nov 10 2014 Josh Boyer <jwboyer@fedoraproject.org>
+- Fix Samsung pci-e SSD handling on some macbooks (rhbz 1161805)
+
* Mon Nov 10 2014 Josh Boyer <jwboyer@fedoraproject.org> - 3.18.0-0.rc4.git0.1
- Linux v3.18-rc4
- Temporarily disable aarch64patches