83908af19e6df37236b14d8f556eec06498a4475
[openwrt/staging/chunkeey.git] / target / linux / mvebu / patches-4.19 / 540-phy-fix-build-breakage-add-PHY_MODE_SATA.patch
1 From e1706720408e72fb883f6b151c2b3b23d8e7e5b2 Mon Sep 17 00:00:00 2001
2 From: John Hubbard <jhubbard@nvidia.com>
3 Date: Sat, 12 Jan 2019 17:29:09 -0800
4 Subject: [PATCH] phy: fix build breakage: add PHY_MODE_SATA
5
6 Commit 49e54187ae0b ("ata: libahci_platform: comply to PHY framework") uses
7 the PHY_MODE_SATA, but that enum had not yet been added. This caused a
8 build failure for me, with today's linux.git.
9
10 Also, there is a potentially conflicting (mis-named) PHY_MODE_SATA, hiding
11 in the Marvell Berlin SATA PHY driver.
12
13 Fix the build by:
14
15 1) Renaming Marvell's defined value to a more scoped name,
16 in order to avoid any potential conflicts: PHY_BERLIN_MODE_SATA.
17
18 2) Adding the missing enum, which was going to be added anyway as part
19 of [1].
20
21 [1] https://lkml.kernel.org/r/20190108163124.6409-3-miquel.raynal@bootlin.com
22
23 Fixes: 49e54187ae0b ("ata: libahci_platform: comply to PHY framework")
24
25 Signed-off-by: John Hubbard <jhubbard@nvidia.com>
26 Acked-by: Jens Axboe <axboe@kernel.dk>
27 Acked-by: Olof Johansson <olof@lixom.net>
28 Cc: Grzegorz Jaszczyk <jaz@semihalf.com>
29 Cc: Miquel Raynal <miquel.raynal@bootlin.com>
30 Cc: Hans de Goede <hdegoede@redhat.com>
31 Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
32 ---
33 include/linux/phy/phy.h | 1 +
34 1 file changed, 1 insertion(+)
35
36 --- a/include/linux/phy/phy.h
37 +++ b/include/linux/phy/phy.h
38 @@ -43,6 +43,7 @@ enum phy_mode {
39 PHY_MODE_UFS_HS_B,
40 PHY_MODE_PCIE,
41 PHY_MODE_ETHERNET,
42 + PHY_MODE_SATA
43 };
44
45 /**