]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
ata: ahci: mvebu: override ahci_stop_engine for mvebu AHCI
authorEvan Wang <xswang@marvell.com>
Fri, 13 Apr 2018 04:32:31 +0000 (12:32 +0800)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 1 Oct 2018 12:55:49 +0000 (14:55 +0200)
commit2429b8b326a2db876c6f7294c98af0a463e84dc5
treecce41d417bf3ca54a38c246a1fd8d105991e4017
parent76ff34cf5452a7e781514ea883cb0c609a7e4d1f
ata: ahci: mvebu: override ahci_stop_engine for mvebu AHCI

BugLink: http://bugs.launchpad.net/bugs/1794889
[ Upstream commit daa2e3bdbb0b3e691cf20a042350817310cb8cb5 ]

There is an issue(Errata Ref#226) that the SATA can not be
detected via SATA Port-MultiPlayer(PMP) with following
error log:
  ata1.15: PMP product ID mismatch
  ata1.15: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
  ata1.15: Port Multiplier vendor mismatch '0x1b4b'!='0x0'
  ata1.15: PMP revalidation failed (errno=-19)

After debugging, the reason is found that the value Port-x
FIS-based Switching Control(PxFBS@0x40) become wrong.
According to design, the bits[11:8, 0] of register PxFBS
are cleared when Port Command and Status (0x18) bit[0]
changes its value from 1 to 0, i.e. falling edge of Port
Command and Status bit[0] sends PULSE that resets PxFBS
bits[11:8; 0].
So it needs a mvebu SATA WA to save the port PxFBS register
before PxCMD ST write and restore it afterwards.

This patch implements the WA in a separate function of
ahci_mvebu_stop_engine to override ahci_stop_gngine.

Signed-off-by: Evan Wang <xswang@marvell.com>
Cc: Ofer Heifetz <oferh@marvell.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/ata/ahci_mvebu.c