PHY_MODE_SATA build fix
cover PHY_MODE_SATA build fix
From: John Hubbard <[email protected]>
Hi,
Say, I just ran into this build breakage on today's linux.git, and after checking the email threads, I do realize that PHY_MODE_SATA is about to be added as part of [1]. However, I also noticed that it was not identified as a build fix, nor did anyone notice the potential naming conflict. So here is a patch for that.
Please feel free to merge, reword, discard, etc, as you see fit. :)
[1] https://lkml.kernel.org/r/[email protected]
John Hubbard (1):
phy: fix build breakage: add PHY_MODE_SATA
drivers/phy/marvell/phy-berlin-sata.c | 5 +++-- include/linux/phy/phy.h | 1 + 2 files changed, 4 insertions(+), 2 deletions(-)
Signature · 1 line
2.20.1
PATCH 1/1 phy: fix build breakage: add PHY_MODE_SATA
From: John Hubbard <[email protected]>
Commit 49e54187ae0b ("ata: libahci_platform: comply to PHY framework") uses the PHY_MODE_SATA, but that enum had not yet been added. This caused a build failure for me, with today's linux.git.
Also, there is a potentially conflicting (mis-named) PHY_MODE_SATA, hiding in the Marvell Berlin SATA PHY driver.
Fix the build by:
1) Renaming Marvell's defined value to a more scoped name, in order to avoid any potential conflicts: PHY_BERLIN_MODE_SATA.
2) Adding the missing enum, which was going to be added anyway as part of [1].
[1] https://lkml.kernel.org/r/[email protected]
--- drivers/phy/marvell/phy-berlin-sata.c | 5 +++-- include/linux/phy/phy.h | 1 + 2 files changed, 4 insertions(+), 2 deletions(-)
drivers/phy/marvell/phy-berlin-sata.c +3 -2
@@ -32,7 +32,7 @@/* register 0x01 */ #define REF_FREF_SEL_25 BIT(0) -#define PHY_MODE_SATA (0x0 << 5) +#define PHY_BERLIN_MODE_SATA (0x0 << 5)/* register 0x02 */ #define USE_MAX_PLL_RATE BIT(12)
@@ -102,7 +102,8 @@ static int phy_berlin_sata_power_on(struct phy *phy)/* set PHY mode and ref freq to 25 MHz */ phy_berlin_sata_reg_setbits (ctrl_reg, priv->phy_base,0x01 , -0x00ff ,REF_FREF_SEL_25 |PHY_MODE_SATA ); +0x00ff , +REF_FREF_SEL_25 |PHY_BERLIN_MODE_SATA );/* set PHY up to 6 Gbps */ phy_berlin_sata_reg_setbits(ctrl_reg, priv->phy_base, 0x25,
include/linux/phy/phy.h +1 -0
@@ -42,6 +42,7 @@ enum phy_mode {PHY_MODE_PCIE ,PHY_MODE_ETHERNET ,PHY_MODE_MIPI_DPHY , + PHY_MODE_SATA };/**
Signature · 1 line
2.20.1
Re: [PATCH 1/1] phy: fix build breakage: add PHY_MODE_SATA
Quoted 14 lines · On 1/12/19 6:29 PM, [email protected] wrote:
From: John Hubbard <[email protected]>
Commit
49e54187ae0b("ata:libahci_platform: comply to PHY framework") uses thePHY_MODE_SATA, but that enum had not yet been added. This caused a build failure for me, with today's linux.git.Also, there is a potentially conflicting (mis-named)
PHY_MODE_SATA, hiding in the Marvell Berlin SATA PHY driver.Fix the build by:
1) Renaming Marvell's defined value to a more scoped name, in order to avoid any potential conflicts:
PHY_BERLIN_MODE_SATA.
Quoted 6 lines
2) Adding the missing enum, which was going to be added anyway as part of [1].
[1] https://lkml.kernel.org/r/[email protected]
Fixes 49e54187ae0b ("ata: libahci_platform: comply to PHY framework")
Linus, this is probably a better option in terms of what should go in to fix that commit.
Quoted 47 lines
Cc Grzegorz Jaszczyk <[email protected]>Cc Miquel Raynal <[email protected]>Cc Hans de Goede <[email protected]>Cc Jens Axboe <[email protected]>Signed-off-by John Hubbard <[email protected]>--- drivers/phy/marvell/phy-berlin-sata.c | 5 +++-- include/linux/phy/phy.h | 1 + 2 files changed, 4 insertions(+), 2 deletions(-)drivers/phy/marvell/phy-berlin-sata.c +3
-2@@ -32,7 +32,7 @@/* register 0x01 */ #define REF_FREF_SEL_25 BIT(0) -#define PHY_MODE_SATA (0x0 << 5) +#define PHY_BERLIN_MODE_SATA (0x0 << 5)/* register 0x02 */ #define USE_MAX_PLL_RATE BIT(12)@@ -102,7 +102,8 @@ static int phy_berlin_sata_power_on(struct phy *phy)/* set PHY mode and ref freq to 25 MHz */ phy_berlin_sata_reg_setbits (ctrl_reg, priv->phy_base,0x01 , -0x00ff ,REF_FREF_SEL_25 |PHY_MODE_SATA ); +0x00ff , +REF_FREF_SEL_25 |PHY_BERLIN_MODE_SATA );/* set PHY up to 6 Gbps */ phy_berlin_sata_reg_setbits(ctrl_reg, priv->phy_base, 0x25,include/linux/phy/phy.h +1
-0@@ -42,6 +42,7 @@ enum phy_mode {PHY_MODE_PCIE ,PHY_MODE_ETHERNET ,PHY_MODE_MIPI_DPHY , + PHY_MODE_SATA };/**
Signature · 1 line
Jens Axboe
Re: [PATCH 1/1] phy: fix build breakage: add PHY_MODE_SATA
Quoted 19 lines · Jens Axboe
Quoted 17 lines · On 1/12/19 6:29 PM, [email protected] wrote:
From: John Hubbard <[email protected]>
Commit
49e54187ae0b("ata:libahci_platform: comply to PHY framework") uses thePHY_MODE_SATA, but that enum had not yet been added. This caused a build failure for me, with today's linux.git.Also, there is a potentially conflicting (mis-named)
PHY_MODE_SATA, hiding in the Marvell Berlin SATA PHY driver.Fix the build by:
1) Renaming Marvell's defined value to a more scoped name, in order to avoid any potential conflicts:
PHY_BERLIN_MODE_SATA.2) Adding the missing enum, which was going to be added anyway as part of [1].
Quoted 6 lines
Quoted 3 lines
[1] https://lkml.kernel.org/r/[email protected]
Fixes 49e54187ae0b ("ata: libahci_platform: comply to PHY framework")Linus, this is probably a better option in terms of what should go in to fix that commit.
I'm OK with this, but it does beg the question how the patch was tested before submitting, if it didn't build.
Is there functional breakage behind it? I currently lack online hardware to test myself, unfortunately.
-Olof
Re: [PATCH 1/1] phy: fix build breakage: add PHY_MODE_SATA
Hi Olof,
Olof Johansson <[email protected]> wrote on Sat, 12 Jan 2019 19:57:12 -0800:
Quoted 24 lines · Jens Axboe
Quoted 23 lines · On 1/12/19 6:29 PM, [email protected] wrote:
Quoted 20 lines
From: John Hubbard <[email protected]>
Commit
49e54187ae0b("ata:libahci_platform: comply to PHY framework") uses thePHY_MODE_SATA, but that enum had not yet been added. This caused a build failure for me, with today's linux.git.Also, there is a potentially conflicting (mis-named)
PHY_MODE_SATA, hiding in the Marvell Berlin SATA PHY driver.Fix the build by:
1) Renaming Marvell's defined value to a more scoped name, in order to avoid any potential conflicts:
PHY_BERLIN_MODE_SATA.2) Adding the missing enum, which was going to be added anyway as part of [1].
[1] https://lkml.kernel.org/r/[email protected]
Fixes 49e54187ae0b ("ata: libahci_platform: comply to PHY framework")
Quoted 8 lines
Quoted 2 lines
Linus, this is probably a better option in terms of what should go in to fix that commit.
I'm OK with this, but it does beg the question how the patch was tested before submitting, if it didn't build.
Is there functional breakage behind it? I currently lack online hardware to test myself, unfortunately.
This is my mistake, I forgot to tell Jens about this dependency, I am very sorry about that. As reported by John, this patch depends on the addition of PHY_MODE_SATA in the PHY type enumeration. This series ([1]) has been delayed and I should have warned Jens about it. I'm fine with the above fix though.
Kishon, will you be able to base phy-next on top of this fix? It will be needed for the addition of the COMPHY driver.
Thanks and again, sorry for the troubles.
Miquèl
Re: [PATCH 1/1] phy: fix build breakage: add PHY_MODE_SATA
Quoted 38 lines · Miquel Raynal
Hi Olof,
Olof Johansson <[email protected]> wrote on Sat, 12 Jan 2019 19:57:12 -0800:
Quoted 24 lines · Jens Axboe
Quoted 23 lines · On 1/12/19 6:29 PM, [email protected] wrote:
Quoted 20 lines
From: John Hubbard <[email protected]>
Commit
49e54187ae0b("ata:libahci_platform: comply to PHY framework") uses thePHY_MODE_SATA, but that enum had not yet been added. This caused a build failure for me, with today's linux.git.Also, there is a potentially conflicting (mis-named)
PHY_MODE_SATA, hiding in the Marvell Berlin SATA PHY driver.Fix the build by:
1) Renaming Marvell's defined value to a more scoped name, in order to avoid any potential conflicts:
PHY_BERLIN_MODE_SATA.2) Adding the missing enum, which was going to be added anyway as part of [1].
[1] https://lkml.kernel.org/r/[email protected]
Fixes 49e54187ae0b ("ata: libahci_platform: comply to PHY framework")Quoted 8 lines
Quoted 2 lines
Linus, this is probably a better option in terms of what should go in to fix that commit.
I'm OK with this, but it does beg the question how the patch was tested before submitting, if it didn't build.
Is there functional breakage behind it? I currently lack online hardware to test myself, unfortunately.
Quoted 8 lines
This is my mistake, I forgot to tell Jens about this dependency, I am very sorry about that. As reported by John, this patch depends on the addition of
PHY_MODE_SATAin the PHY type enumeration. This series ([1]) has been delayed and I should have warned Jens about it. I'm fine with the above fix though.Kishon, will you be able to base phy-next on top of this fix? It will be needed for the addition of the COMPHY driver.
Sure, I'll include this in my tree.
Thanks
Kishon
Kishon Vijay Abraham I
Acked-byRe: [PATCH 1/1] phy: fix build breakage: add PHY_MODE_SATA
In reply to Jens AxboeQuoted 18 lines · Jens Axboe
Quoted 17 lines · On 1/12/19 6:29 PM, [email protected] wrote:
From: John Hubbard <[email protected]>
Commit
49e54187ae0b("ata:libahci_platform: comply to PHY framework") uses thePHY_MODE_SATA, but that enum had not yet been added. This caused a build failure for me, with today's linux.git.Also, there is a potentially conflicting (mis-named)
PHY_MODE_SATA, hiding in the Marvell Berlin SATA PHY driver.Fix the build by:
1) Renaming Marvell's defined value to a more scoped name, in order to avoid any potential conflicts:
PHY_BERLIN_MODE_SATA.2) Adding the missing enum, which was going to be added anyway as part of [1].
Quoted 13 lines
Quoted 3 lines
[1] https://lkml.kernel.org/r/[email protected]
Fixes 49e54187ae0b ("ata: libahci_platform: comply to PHY framework")Linus, this is probably a better option in terms of what should go in to fix that commit.
Quoted 6 lines
Cc Grzegorz Jaszczyk <[email protected]>Cc Miquel Raynal <[email protected]>Cc Hans de Goede <[email protected]>Cc Jens Axboe <[email protected]>Signed-off-by John Hubbard <[email protected]>
Quoted 43 lines
Quoted 41 lines
--- drivers/phy/marvell/phy-berlin-sata.c | 5 +++-- include/linux/phy/phy.h | 1 + 2 files changed, 4 insertions(+), 2 deletions(-)drivers/phy/marvell/phy-berlin-sata.c +3
-2@@ -32,7 +32,7 @@/* register 0x01 */ #define REF_FREF_SEL_25 BIT(0) -#define PHY_MODE_SATA (0x0 << 5) +#define PHY_BERLIN_MODE_SATA (0x0 << 5)/* register 0x02 */ #define USE_MAX_PLL_RATE BIT(12)@@ -102,7 +102,8 @@ static int phy_berlin_sata_power_on(struct phy *phy)/* set PHY mode and ref freq to 25 MHz */ phy_berlin_sata_reg_setbits (ctrl_reg, priv->phy_base,0x01 , -0x00ff ,REF_FREF_SEL_25 |PHY_MODE_SATA ); +0x00ff , +REF_FREF_SEL_25 |PHY_BERLIN_MODE_SATA );/* set PHY up to 6 Gbps */ phy_berlin_sata_reg_setbits(ctrl_reg, priv->phy_base, 0x25,include/linux/phy/phy.h +1
-0@@ -42,6 +42,7 @@ enum phy_mode {PHY_MODE_PCIE ,PHY_MODE_ETHERNET ,PHY_MODE_MIPI_DPHY , + PHY_MODE_SATA };/**