Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1278021 > unrolled thread
| Started by | Xiangliang Yu <Xiangliang.Yu@amd.com> |
|---|---|
| First post | 2015-11-26 08:30 +0100 |
| Last post | 2015-11-30 16:10 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH 1/1] AHCI: Fix softreset failed issue of Port Multiplier Xiangliang Yu <Xiangliang.Yu@amd.com> - 2015-11-26 08:30 +0100
Re: [PATCH 1/1] AHCI: Fix softreset failed issue of Port Multiplier Tejun Heo <tj@kernel.org> - 2015-11-30 16:10 +0100
| From | Xiangliang Yu <Xiangliang.Yu@amd.com> |
|---|---|
| Date | 2015-11-26 08:30 +0100 |
| Subject | [PATCH 1/1] AHCI: Fix softreset failed issue of Port Multiplier |
| Message-ID | <qyZa9-1J3-1@gated-at.bofh.it> |
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 <Xiangliang.Yu@amd.com>
---
drivers/ata/libahci.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
index 096064c..4665512 100644
--- a/drivers/ata/libahci.c
+++ b/drivers/ata/libahci.c
@@ -1273,6 +1273,15 @@ static int ahci_exec_polled_cmd(struct ata_port *ap, int pmp,
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);
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Tejun Heo <tj@kernel.org> |
|---|---|
| Date | 2015-11-30 16:10 +0100 |
| Message-ID | <qAyfw-5eb-29@gated-at.bofh.it> |
| In reply to | #1278021 |
On Thu, Nov 26, 2015 at 08:27:02PM +0800, Xiangliang Yu wrote: > 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 <Xiangliang.Yu@amd.com> Applied to libata/for-4.4-fixes w/ stable cc'd. Thanks. -- tejun -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web