From f3fad2c75d9ace54dcdd63f07d79f6bee75beee7 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sun, 14 Feb 2016 13:59:21 -0800 Subject: [PATCH] 3.14-stable patches added patches: ahci-fix-softreset-failed-issue-of-port-multiplier.patch ahci-intel-dnv-device-ids-sata.patch libata-disable-forced-ports_impl-for-ahci-1.3.patch --- ...eset-failed-issue-of-port-multiplier.patch | 46 ++++++++++++++++++ .../ahci-intel-dnv-device-ids-sata.patch | 48 +++++++++++++++++++ ...sable-forced-ports_impl-for-ahci-1.3.patch | 40 ++++++++++++++++ queue-3.14/series | 3 ++ 4 files changed, 137 insertions(+) create mode 100644 queue-3.14/ahci-fix-softreset-failed-issue-of-port-multiplier.patch create mode 100644 queue-3.14/ahci-intel-dnv-device-ids-sata.patch create mode 100644 queue-3.14/libata-disable-forced-ports_impl-for-ahci-1.3.patch diff --git a/queue-3.14/ahci-fix-softreset-failed-issue-of-port-multiplier.patch b/queue-3.14/ahci-fix-softreset-failed-issue-of-port-multiplier.patch new file mode 100644 index 00000000000..747ecc2322f --- /dev/null +++ b/queue-3.14/ahci-fix-softreset-failed-issue-of-port-multiplier.patch @@ -0,0 +1,46 @@ +From 023113d24ef9e1d2b44cb2446872b17e2b01d8b1 Mon Sep 17 00:00:00 2001 +From: Xiangliang Yu +Date: Thu, 26 Nov 2015 20:27:02 +0800 +Subject: AHCI: Fix softreset failed issue of Port Multiplier + +From: Xiangliang Yu + +commit 023113d24ef9e1d2b44cb2446872b17e2b01d8b1 upstream. + +Current code doesn't update port value of Port Multiplier(PM) when +sending FIS of softreset to device, command will fail if FBS is +enabled. + +There are two ways to fix the issue: the first is to disable FBS +before sending softreset command to PM device and the second is +to update port value of PM when sending command. + +For the first way, i can't find any related rule in AHCI Spec. The +second way can avoid disabling FBS and has better performance. + +Signed-off-by: Xiangliang Yu +Signed-off-by: Tejun Heo +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/ata/libahci.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +--- a/drivers/ata/libahci.c ++++ b/drivers/ata/libahci.c +@@ -1253,6 +1253,15 @@ static int ahci_exec_polled_cmd(struct a + ata_tf_to_fis(tf, pmp, is_cmd, fis); + ahci_fill_cmd_slot(pp, 0, cmd_fis_len | flags | (pmp << 12)); + ++ /* set port value for softreset of Port Multiplier */ ++ if (pp->fbs_enabled && pp->fbs_last_dev != pmp) { ++ tmp = readl(port_mmio + PORT_FBS); ++ tmp &= ~(PORT_FBS_DEV_MASK | PORT_FBS_DEC); ++ tmp |= pmp << PORT_FBS_DEV_OFFSET; ++ writel(tmp, port_mmio + PORT_FBS); ++ pp->fbs_last_dev = pmp; ++ } ++ + /* issue & wait */ + writel(1, port_mmio + PORT_CMD_ISSUE); + diff --git a/queue-3.14/ahci-intel-dnv-device-ids-sata.patch b/queue-3.14/ahci-intel-dnv-device-ids-sata.patch new file mode 100644 index 00000000000..4962c907979 --- /dev/null +++ b/queue-3.14/ahci-intel-dnv-device-ids-sata.patch @@ -0,0 +1,48 @@ +From 342decff2b846b46fa61eb5ee40986fab79a9a32 Mon Sep 17 00:00:00 2001 +From: Alexandra Yates +Date: Fri, 5 Feb 2016 15:27:49 -0800 +Subject: ahci: Intel DNV device IDs SATA + +From: Alexandra Yates + +commit 342decff2b846b46fa61eb5ee40986fab79a9a32 upstream. + +Adding Intel codename DNV platform device IDs for SATA. + +Signed-off-by: Alexandra Yates +Signed-off-by: Tejun Heo +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/ata/ahci.c | 20 ++++++++++++++++++++ + 1 file changed, 20 insertions(+) + +--- a/drivers/ata/ahci.c ++++ b/drivers/ata/ahci.c +@@ -249,6 +249,26 @@ static const struct pci_device_id ahci_p + { PCI_VDEVICE(INTEL, 0x3b2b), board_ahci }, /* PCH RAID */ + { PCI_VDEVICE(INTEL, 0x3b2c), board_ahci }, /* PCH RAID */ + { PCI_VDEVICE(INTEL, 0x3b2f), board_ahci }, /* PCH AHCI */ ++ { PCI_VDEVICE(INTEL, 0x19b0), board_ahci }, /* DNV AHCI */ ++ { PCI_VDEVICE(INTEL, 0x19b1), board_ahci }, /* DNV AHCI */ ++ { PCI_VDEVICE(INTEL, 0x19b2), board_ahci }, /* DNV AHCI */ ++ { PCI_VDEVICE(INTEL, 0x19b3), board_ahci }, /* DNV AHCI */ ++ { PCI_VDEVICE(INTEL, 0x19b4), board_ahci }, /* DNV AHCI */ ++ { PCI_VDEVICE(INTEL, 0x19b5), board_ahci }, /* DNV AHCI */ ++ { PCI_VDEVICE(INTEL, 0x19b6), board_ahci }, /* DNV AHCI */ ++ { PCI_VDEVICE(INTEL, 0x19b7), board_ahci }, /* DNV AHCI */ ++ { PCI_VDEVICE(INTEL, 0x19bE), board_ahci }, /* DNV AHCI */ ++ { PCI_VDEVICE(INTEL, 0x19bF), board_ahci }, /* DNV AHCI */ ++ { PCI_VDEVICE(INTEL, 0x19c0), board_ahci }, /* DNV AHCI */ ++ { PCI_VDEVICE(INTEL, 0x19c1), board_ahci }, /* DNV AHCI */ ++ { PCI_VDEVICE(INTEL, 0x19c2), board_ahci }, /* DNV AHCI */ ++ { PCI_VDEVICE(INTEL, 0x19c3), board_ahci }, /* DNV AHCI */ ++ { PCI_VDEVICE(INTEL, 0x19c4), board_ahci }, /* DNV AHCI */ ++ { PCI_VDEVICE(INTEL, 0x19c5), board_ahci }, /* DNV AHCI */ ++ { PCI_VDEVICE(INTEL, 0x19c6), board_ahci }, /* DNV AHCI */ ++ { PCI_VDEVICE(INTEL, 0x19c7), board_ahci }, /* DNV AHCI */ ++ { PCI_VDEVICE(INTEL, 0x19cE), board_ahci }, /* DNV AHCI */ ++ { PCI_VDEVICE(INTEL, 0x19cF), board_ahci }, /* DNV AHCI */ + { PCI_VDEVICE(INTEL, 0x1c02), board_ahci }, /* CPT AHCI */ + { PCI_VDEVICE(INTEL, 0x1c03), board_ahci }, /* CPT AHCI */ + { PCI_VDEVICE(INTEL, 0x1c04), board_ahci }, /* CPT RAID */ diff --git a/queue-3.14/libata-disable-forced-ports_impl-for-ahci-1.3.patch b/queue-3.14/libata-disable-forced-ports_impl-for-ahci-1.3.patch new file mode 100644 index 00000000000..63aeddf5a1f --- /dev/null +++ b/queue-3.14/libata-disable-forced-ports_impl-for-ahci-1.3.patch @@ -0,0 +1,40 @@ +From 566d1827df2ef0cbe921d3d6946ac3007b1a6938 Mon Sep 17 00:00:00 2001 +From: Tejun Heo +Date: Fri, 15 Jan 2016 15:13:05 -0500 +Subject: libata: disable forced PORTS_IMPL for >= AHCI 1.3 + +From: Tejun Heo + +commit 566d1827df2ef0cbe921d3d6946ac3007b1a6938 upstream. + +Some early controllers incorrectly reported zero ports in PORTS_IMPL +register and the ahci driver fabricates PORTS_IMPL from the number of +ports in those cases. This hasn't mattered but with the new nvme +controllers there are cases where zero PORTS_IMPL is valid and should +be honored. + +Disable the workaround for >= AHCI 1.3. + +Signed-off-by: Tejun Heo +Reported-by: Andy Lutomirski +Link: http://lkml.kernel.org/g/CALCETrU7yMvXEDhjAUShoHEhDwifJGapdw--BKxsP0jmjKGmRw@mail.gmail.com +Cc: Sergei Shtylyov +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/ata/libahci.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/ata/libahci.c ++++ b/drivers/ata/libahci.c +@@ -487,8 +487,8 @@ void ahci_save_initial_config(struct dev + } + } + +- /* fabricate port_map from cap.nr_ports */ +- if (!port_map) { ++ /* fabricate port_map from cap.nr_ports for < AHCI 1.3 */ ++ if (!port_map && vers < 0x10300) { + port_map = (1 << ahci_nr_ports(cap)) - 1; + dev_warn(dev, "forcing PORTS_IMPL to 0x%x\n", port_map); + diff --git a/queue-3.14/series b/queue-3.14/series index a5cb68055e7..96441073bc7 100644 --- a/queue-3.14/series +++ b/queue-3.14/series @@ -65,3 +65,6 @@ xhci-fix-usb2-resume-timing-and-races.patch ext4-fix-handling-of-extended-tv_sec.patch crypto-af_alg-disallow-bind-setkey-...-after-accept-2.patch crypto-af_alg-fix-socket-double-free-when-accept-fails.patch +ahci-fix-softreset-failed-issue-of-port-multiplier.patch +libata-disable-forced-ports_impl-for-ahci-1.3.patch +ahci-intel-dnv-device-ids-sata.patch -- 2.47.3