]> git.hungrycats.org Git - linux/commitdiff
ata: pmp: add quirk for Marvell 4140 SATA PMP
authorLior Amsalem <alior@marvell.com>
Tue, 30 Jun 2015 14:09:49 +0000 (16:09 +0200)
committerZefan Li <lizefan@huawei.com>
Mon, 21 Mar 2016 01:17:44 +0000 (09:17 +0800)
commit 945b47441d83d2392ac9f984e0267ad521f24268 upstream.

This commit adds the necessary quirk to make the Marvell 4140 SATA PMP
work properly. This PMP doesn't like SRST on port number 4 (the host
port) so this commit marks this port as not supporting SRST.

Signed-off-by: Lior Amsalem <alior@marvell.com>
Reviewed-by: Nadav Haklai <nadavh@marvell.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Zefan Li <lizefan@huawei.com>
drivers/ata/libata-pmp.c

index 0ba32fe00d13680dd64e90a9e000395200055e34..93ea33509fa8a2305cd56ad4118573ab86791a95 100644 (file)
@@ -460,6 +460,13 @@ static void sata_pmp_quirks(struct ata_port *ap)
                                       ATA_LFLAG_NO_SRST |
                                       ATA_LFLAG_ASSUME_ATA;
                }
+       } else if (vendor == 0x11ab && devid == 0x4140) {
+               /* Marvell 4140 quirks */
+               ata_for_each_link(link, ap, EDGE) {
+                       /* port 4 is for SEMB device and it doesn't like SRST */
+                       if (link->pmp == 4)
+                               link->flags |= ATA_LFLAG_DISABLED;
+               }
        }
 }