PCI: aardvark: Fix comphy with old ATF
Subsystems (5)
Pali Rohár
maintainercover PCI: aardvark: Fix comphy with old ATF
This patch series fixes regression introduced in commit 366697018c9a ("PCI: aardvark: Add PHY support") which caused aardvark driver initialization failure on EspressoBin board with factory version of Arm Trusted Firmware provided by Marvell.
Second patch depends on the first patch, so please add appropriate Fixes/Cc:stable@ tags to have both patches correctly backported to stable kernels.
I have tested both patches with Marvell ATF firmware ebin-17.10-uart.zip and with upstream ATF+uboot and aardvark was initialized successfully. Without this patch series on ebin-17.10-uart.zip aardvark initialization failed.
Pali Rohár (2):
phy: marvell: comphy: Convert internal SMCC firmware return codes to
errno
PCI: aardvark: Fix initialization with old Marvell's Arm Trusted
Firmware
drivers/pci/controller/pci-aardvark.c | 4 +++- drivers/phy/marvell/phy-mvebu-a3700-comphy.c | 14 +++++++++++--- drivers/phy/marvell/phy-mvebu-cp110-comphy.c | 14 +++++++++++--- 3 files changed, 25 insertions(+), 7 deletions(-)
Signature · 1 line
2.20.1
Pali Rohár
maintainerPATCH 1/2 phy: marvell: comphy: Convert internal SMCC firmware return codes to errno
Driver ->power_on and ->power_off callbacks leaks internal SMCC firmware return codes to phy caller. This patch converts SMCC error codes to standard linux errno codes. Include file linux/arm-smccc.h already provides defines for SMCC error codes, so use them instead of custom driver defines. Note that return value is signed 32bit, but stored in unsigned long type with zero padding.
--- drivers/phy/marvell/phy-mvebu-a3700-comphy.c | 14 +++++++++++--- drivers/phy/marvell/phy-mvebu-cp110-comphy.c | 14 +++++++++++--- 2 files changed, 22 insertions(+), 6 deletions(-)
drivers/phy/marvell/phy-mvebu-a3700-comphy.c +11 -3
@@ -26,7 +26,6 @@#define COMPHY_SIP_POWER_ON 0x82000001#define COMPHY_SIP_POWER_OFF 0x82000002#define COMPHY_SIP_PLL_LOCK 0x82000003 -#define COMPHY_FW_NOT_SUPPORTED (-1)#define COMPHY_FW_MODE_SATA 0x1#define COMPHY_FW_MODE_SGMII 0x2
@@ -112,10 +111,19 @@ static int mvebu_a3700_comphy_smc(unsigned long function, unsigned long lane, unsigned long mode) {struct arm_smccc_res res; +s32 ret;arm_smccc_smc (function, lane, mode,0 ,0 ,0 ,0 ,0 , &res); + ret = res.a0; -return res.a0; +switch (ret) { +case SMCCC_RET_SUCCESS : +return 0 ; +case SMCCC_RET_NOT_SUPPORTED : +return -EOPNOTSUPP ; +default : +return -EINVAL ; + } } static int mvebu_a3700_comphy_get_fw_mode(int lane, int port,
@@ -220,7 +228,7 @@ static int mvebu_a3700_comphy_power_on(struct phy *phy) } ret =mvebu_a3700_comphy_smc (COMPHY_SIP_POWER_ON , lane->id, fw_param); -if (ret ==COMPHY_FW_NOT_SUPPORTED ) +if (ret == -EOPNOTSUPP )dev_err (lane->dev,"unsupported SMC call, try updating your firmware\n" );
drivers/phy/marvell/phy-mvebu-cp110-comphy.c +11 -3
@@ -123,7 +123,6 @@#define COMPHY_SIP_POWER_ON 0x82000001#define COMPHY_SIP_POWER_OFF 0x82000002 -#define COMPHY_FW_NOT_SUPPORTED (-1)/* * A lane is described by the following bitfields:
@@ -273,10 +272,19 @@ static int mvebu_comphy_smc(unsigned long function, unsigned long phys, unsigned long lane, unsigned long mode) {struct arm_smccc_res res; +s32 ret;arm_smccc_smc (function, phys, lane, mode,0 ,0 ,0 ,0 , &res); + ret = res.a0; -return res.a0; +switch (ret) { +case SMCCC_RET_SUCCESS : +return 0 ; +case SMCCC_RET_NOT_SUPPORTED : +return -EOPNOTSUPP ; +default : +return -EINVAL ; + } } static int mvebu_comphy_get_mode(bool fw_mode, int lane, int port,
@@ -819,7 +827,7 @@ static int mvebu_comphy_power_on(struct phy *phy)if (!ret)return ret; -if (ret ==COMPHY_FW_NOT_SUPPORTED ) +if (ret == -EOPNOTSUPP )dev_err (priv->dev,"unsupported SMC call, try updating your firmware\n" );
Signature · 1 line
2.20.1
Re: [PATCH 1/2] phy: marvell: comphy: Convert internal SMCC firmware return codes to errno
Quoted 35 lines · Pali Rohár
Driver ->power_on and ->power_off callbacks leaks internal SMCC firmware return codes to phy caller. This patch converts SMCC error codes to standard linux errno codes. Include file
linux/arm-smccc.halready provides defines for SMCC error codes, so use them instead of custom driver defines. Note that return value is signed 32bit, but stored in unsigned long type with zero padding.Signed-off-by Pali Rohár <[email protected]>--- drivers/phy/marvell/phy-mvebu-a3700-comphy.c | 14 +++++++++++--- drivers/phy/marvell/phy-mvebu-cp110-comphy.c | 14 +++++++++++--- 2 files changed, 22 insertions(+), 6 deletions(-)drivers/phy/marvell/phy-mvebu-a3700-comphy.c +2
-2@@ -26,7 +26,6 @@#define COMPHY_SIP_POWER_ON 0x82000001#define COMPHY_SIP_POWER_OFF 0x82000002#define COMPHY_SIP_PLL_LOCK 0x82000003 -#define COMPHY_FW_NOT_SUPPORTED (-1)#define COMPHY_FW_MODE_SATA 0x1#define COMPHY_FW_MODE_SGMII 0x2@@ -112,10 +111,19 @@ static int mvebu_a3700_comphy_smc(unsigned long function, unsigned long lane, unsigned long mode) {struct arm_smccc_res res; +s32 ret;arm_smccc_smc (function, lane, mode,0 ,0 ,0 ,0 ,0 , &res); + ret = res.a0; -return res.a0;
drivers/phy/marvell/phy-mvebu-a3700-comphy.c static int mvebu_a3700_comphy_smc(unsigned long function, unsigned long lane, · line 128
Quoted 10 lines
drivers/phy/marvell/phy-mvebu-a3700-comphy.c +8
-0+switch (ret) { +case SMCCC_RET_SUCCESS : +return 0 ; +case SMCCC_RET_NOT_SUPPORTED : +return -EOPNOTSUPP ; +default : +return -EINVAL ; + } }
Hi Pali
Maybe this should be a global helper translating SMCCC_RET_* into a standard errno value?
Andrew
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Pali Rohár
maintainerRe: [PATCH 1/2] phy: marvell: comphy: Convert internal SMCC firmware return codes to errno
Quoted 49 lines · On Wednesday 02 September 2020 18:13:28 Andrew Lunn wrote:
Quoted 35 lines · Pali Rohár
Driver ->power_on and ->power_off callbacks leaks internal SMCC firmware return codes to phy caller. This patch converts SMCC error codes to standard linux errno codes. Include file
linux/arm-smccc.halready provides defines for SMCC error codes, so use them instead of custom driver defines. Note that return value is signed 32bit, but stored in unsigned long type with zero padding.Signed-off-by Pali Rohár <[email protected]>--- drivers/phy/marvell/phy-mvebu-a3700-comphy.c | 14 +++++++++++--- drivers/phy/marvell/phy-mvebu-cp110-comphy.c | 14 +++++++++++--- 2 files changed, 22 insertions(+), 6 deletions(-)drivers/phy/marvell/phy-mvebu-a3700-comphy.c +2
-2@@ -26,7 +26,6 @@#define COMPHY_SIP_POWER_ON 0x82000001#define COMPHY_SIP_POWER_OFF 0x82000002#define COMPHY_SIP_PLL_LOCK 0x82000003 -#define COMPHY_FW_NOT_SUPPORTED (-1)#define COMPHY_FW_MODE_SATA 0x1#define COMPHY_FW_MODE_SGMII 0x2@@ -112,10 +111,19 @@ static int mvebu_a3700_comphy_smc(unsigned long function, unsigned long lane, unsigned long mode) {struct arm_smccc_res res; +s32 ret;arm_smccc_smc (function, lane, mode,0 ,0 ,0 ,0 ,0 , &res); + ret = res.a0; -return res.a0;drivers/phy/marvell/phy-mvebu-a3700-comphy.c static int mvebu_a3700_comphy_smc(unsigned long function, unsigned long lane, · line 128
Quoted 10 lines
drivers/phy/marvell/phy-mvebu-a3700-comphy.c +8
-0+switch (ret) { +case SMCCC_RET_SUCCESS : +return 0 ; +case SMCCC_RET_NOT_SUPPORTED : +return -EOPNOTSUPP ; +default : +return -EINVAL ; + } }Hi Pali
Quoted 4 lines
Maybe this should be a global helper translating SMCCC_RET_* into a standard errno value?
Andrew
Hello Andrew!
Well, I'm not sure if some standard global helper is the correct way for marvell comphy handler. It returns 0 for success and -1 on error when handler is not supported.
Generic SMCC helper would need to support also other values which are defined/used by SMCC. And I'm not sure if some helpers cannot define and use also non-standard codecs.
I think that such generic helper would need larger discussion and aim of these patches is to fix PCIe support on Armada 3720 HW which is broken since mentioned commit when users use factory firmware. So patches could be easily backported to stable kernels.
On Espressobin is kernel stored on uSD card, so updating it is simple and easy -- as opposite of updating ATF firmware which is stored in SPI.
Re: [PATCH 1/2] phy: marvell: comphy: Convert internal SMCC firmware return codes to errno
Quoted 15 lines
Quoted 15 lines
drivers/phy/marvell/phy-mvebu-a3700-comphy.c static int mvebu_a3700_comphy_smc(unsigned long function, unsigned long lane, · line 127
Quoted 9 lines
drivers/phy/marvell/phy-mvebu-a3700-comphy.c +8
-0+switch (ret) { +case SMCCC_RET_SUCCESS : +return 0 ; +case SMCCC_RET_NOT_SUPPORTED : +return -EOPNOTSUPP ; +default : +return -EINVAL ; + } }Hi Pali
Maybe this should be a global helper translating SMCCC_RET_* into a standard errno value?
Quoted 7 lines
Quoted 1 line
Andrew
Hello Andrew!
Well, I'm not sure if some standard global helper is the correct way for marvell comphy handler. It returns 0 for success and -1 on error when handler is not supported.
No, i was meaning just
switch (ret) {
case SMCCC_RET_SUCCESS:
return 0; case SMCCC_RET_NOT_SUPPORTED: return -EOPNOTSUPP; default: return -EINVAL; }
There is nothing Marvell specific here.
Andrew
Pali Rohár
maintainerRe: [PATCH 1/2] phy: marvell: comphy: Convert internal SMCC firmware return codes to errno
Quoted 25 lines · On Wednesday 02 September 2020 19:00:10 Andrew Lunn wrote:
Quoted 15 lines
Quoted 15 lines
drivers/phy/marvell/phy-mvebu-a3700-comphy.c static int mvebu_a3700_comphy_smc(unsigned long function, unsigned long lane, · line 127
Quoted 9 lines
drivers/phy/marvell/phy-mvebu-a3700-comphy.c +8
-0+switch (ret) { +case SMCCC_RET_SUCCESS : +return 0 ; +case SMCCC_RET_NOT_SUPPORTED : +return -EOPNOTSUPP ; +default : +return -EINVAL ; + } }Hi Pali
Maybe this should be a global helper translating SMCCC_RET_* into a standard errno value?
Quoted 7 lines
Quoted 1 line
Andrew
Hello Andrew!
Well, I'm not sure if some standard global helper is the correct way for marvell comphy handler. It returns 0 for success and -1 on error when handler is not supported.
No, i was meaning just
Quoted 8 lines
switch (ret) {
caseSMCCC_RET_SUCCESS:return 0; case SMCCC_RET_NOT_SUPPORTED: return -EOPNOTSUPP; default: return -EINVAL; }
But this is not a complete generic helper. There are more generic SMCC return codes and generic helper should define and translate all of them.
Re: [PATCH 1/2] phy: marvell: comphy: Convert internal SMCC firmware return codes to errno
Quoted 35 lines · Pali Rohár
Quoted 25 lines · On Wednesday 02 September 2020 19:00:10 Andrew Lunn wrote:
Quoted 15 lines
Quoted 15 lines
drivers/phy/marvell/phy-mvebu-a3700-comphy.c static int mvebu_a3700_comphy_smc(unsigned long function, unsigned long lane, · line 127
Quoted 9 lines
drivers/phy/marvell/phy-mvebu-a3700-comphy.c +8
-0+switch (ret) { +case SMCCC_RET_SUCCESS : +return 0 ; +case SMCCC_RET_NOT_SUPPORTED : +return -EOPNOTSUPP ; +default : +return -EINVAL ; + } }Hi Pali
Maybe this should be a global helper translating SMCCC_RET_* into a standard errno value?
Quoted 7 lines
Quoted 1 line
Andrew
Hello Andrew!
Well, I'm not sure if some standard global helper is the correct way for marvell comphy handler. It returns 0 for success and -1 on error when handler is not supported.
No, i was meaning just
Quoted 8 lines
switch (ret) {
caseSMCCC_RET_SUCCESS:return 0; case SMCCC_RET_NOT_SUPPORTED: return -EOPNOTSUPP; default: return -EINVAL; }
Quoted 2 lines
But this is not a complete generic helper. There are more generic SMCC return codes and generic helper should define and translate all of them.
/*
* Return codes defined in ARM DEN 0070A
* ARM DEN 0070A is now merged/consolidated into ARM DEN 0028 C */
#define SMCCC_RET_SUCCESS 0
#define SMCCC_RET_NOT_SUPPORTED -1
#define SMCCC_RET_NOT_REQUIRED -2
#define SMCCC_RET_INVALID_PARAMETER -3
I only see problems with SMCCC_RET_NOT_REQUIRED and what value to use for it. Do you have any idea what is actually means? A parameter was passed which was not required? Or that the call itself is not required? Looking at the uses of it currently in the kernel, it does not seem to be an actual error. So maybe just return 0?
Andrew
Pali Rohár
maintainerRe: [PATCH 1/2] phy: marvell: comphy: Convert internal SMCC firmware return codes to errno
Quoted 39 lines · On Wednesday 02 September 2020 19:20:29 Andrew Lunn wrote:
Quoted 35 lines · Pali Rohár
Quoted 25 lines · On Wednesday 02 September 2020 19:00:10 Andrew Lunn wrote:
Quoted 15 lines
Quoted 15 lines
drivers/phy/marvell/phy-mvebu-a3700-comphy.c static int mvebu_a3700_comphy_smc(unsigned long function, unsigned long lane, · line 127
Quoted 9 lines
drivers/phy/marvell/phy-mvebu-a3700-comphy.c +8
-0+switch (ret) { +case SMCCC_RET_SUCCESS : +return 0 ; +case SMCCC_RET_NOT_SUPPORTED : +return -EOPNOTSUPP ; +default : +return -EINVAL ; + } }Hi Pali
Maybe this should be a global helper translating SMCCC_RET_* into a standard errno value?
Quoted 7 lines
Quoted 1 line
Andrew
Hello Andrew!
Well, I'm not sure if some standard global helper is the correct way for marvell comphy handler. It returns 0 for success and -1 on error when handler is not supported.
No, i was meaning just
Quoted 8 lines
switch (ret) {
caseSMCCC_RET_SUCCESS:return 0; case SMCCC_RET_NOT_SUPPORTED: return -EOPNOTSUPP; default: return -EINVAL; }Quoted 2 lines
But this is not a complete generic helper. There are more generic SMCC return codes and generic helper should define and translate all of them.
Quoted 8 lines
/*
* Return codes defined in ARM DEN 0070A
* ARM DEN 0070A is now merged/consolidated into ARM DEN 0028 C */
#defineSMCCC_RET_SUCCESS0
#defineSMCCC_RET_NOT_SUPPORTED-1
#defineSMCCC_RET_NOT_REQUIRED-2
#defineSMCCC_RET_INVALID_PARAMETER-3
Routines can use also other custom return codes. These are IIRC just standard defined.
Quoted 5 lines
I only see problems with
SMCCC_RET_NOT_REQUIREDand what value to use for it. Do you have any idea what is actually means? A parameter was passed which was not required? Or that the call itself is not required? Looking at the uses of it currently in the kernel, it does not seem to be an actual error. So maybe just return 0?
I'm not sure. That is why I wrote that larger discussion about generic helper is needed. There are for sure people who understand SMC better and have deep insight.
For Marvell comphy we cannot use return code -2 as success like 0.
Re: [PATCH 1/2] phy: marvell: comphy: Convert internal SMCC firmware return codes to errno
In reply to Pali RohárQuoted 7 lines · Pali Rohár
Driver ->power_on and ->power_off callbacks leaks internal SMCC firmware return codes to phy caller. This patch converts SMCC error codes to standard linux errno codes. Include file
linux/arm-smccc.halready provides defines for SMCC error codes, so use them instead of custom driver defines. Note that return value is signed 32bit, but stored in unsigned long type with zero padding.
Quoted 6 lines
Signed-off-by Pali Rohár <[email protected]>--- drivers/phy/marvell/phy-mvebu-a3700-comphy.c | 14 +++++++++++--- drivers/phy/marvell/phy-mvebu-cp110-comphy.c | 14 +++++++++++--- 2 files changed, 22 insertions(+), 6 deletions(-)
Pali Rohár
maintainerPATCH 2/2 PCI: aardvark: Fix initialization with old Marvell's Arm Trusted Firmware
In reply to Pali RohárOld ATF automatically power on pcie phy and does not provide SMC call for phy power on functionality which leads to aardvark initialization failure:
[ 0.330134] mvebu-a3700-comphy d0018300.phy: unsupported SMC call, try updating your firmware [ 0.338846] phy phy-d0018300.phy.1: phy poweron failed --> -95 [ 0.344753] advk-pcie d0070000.pcie: Failed to initialize PHY (-95) [ 0.351160] advk-pcie: probe of d0070000.pcie failed with error -95
This patch fixes above failure by ignoring 'not supported' error in aardvark driver. In this case it is expected that phy is already power on.
--- drivers/pci/controller/pci-aardvark.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/pci/controller/pci-aardvark.c +3 -1
@@ -1108,7 +1108,9 @@ static int advk_pcie_enable_phy(struct advk_pcie *pcie) } ret =phy_power_on (pcie->phy); -if (ret) { +if (ret == -EOPNOTSUPP ) { +dev_warn (&pcie->pdev->dev,"PHY unsupported by firmware\n" ); + }else if (ret) {phy_exit (pcie->phy);return ret; }
Signature · 1 line
2.20.1
Re: [PATCH 2/2] PCI: aardvark: Fix initialization with old Marvell's Arm Trusted Firmware
Quoted 8 lines · Pali Rohár
Old ATF automatically power on pcie phy and does not provide SMC call for phy power on functionality which leads to aardvark initialization failure:
[ 0.330134] mvebu-a3700-comphy d0018300.phy: unsupported SMC call, try updating your firmware [ 0.338846] phy phy-d0018300.phy.1: phy poweron failed --> -95 [ 0.344753] advk-pcie d0070000.pcie: Failed to initialize PHY (-95) [ 0.351160] advk-pcie: probe of d0070000.pcie failed with error -95
Quoted 9 lines
This patch fixes above failure by ignoring 'not supported' error in aardvark driver. In this case it is expected that phy is already power on.
Signed-off-by Pali Rohár <[email protected]>Fixes 366697018c9a ("PCI: aardvark: Add PHY support")--- drivers/pci/controller/pci-aardvark.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
W dniu 02.09.2020 o 16:43, Pali Rohár pisze:
Quoted 14 lines
This patch series fixes regression introduced in commit
366697018c9a("PCI: aardvark: Add PHY support") which caused aardvark driver initialization failure on EspressoBin board with factory version of Arm Trusted Firmware provided by Marvell.Second patch depends on the first patch, so please add appropriate Fixes/Cc:stable@ tags to have both patches correctly backported to stable kernels.
I have tested both patches with Marvell ATF firmware ebin-17.10-uart.zip and with upstream ATF+uboot and aardvark was initialized successfully. Without this patch series on ebin-17.10-uart.zip aardvark initialization failed.
Quoted 5 lines
Pali Rohár (2):
phy: marvell: comphy: Convert internal SMCC firmware return codes to
errno
PCI: aardvark: Fix initialization with old Marvell's Arm Trusted
Firmware
For both patches
Quoted 6 lines
drivers/pci/controller/pci-aardvark.c | 4 +++- drivers/phy/marvell/phy-mvebu-a3700-comphy.c | 14 +++++++++++--- drivers/phy/marvell/phy-mvebu-cp110-comphy.c | 14 +++++++++++--- 3 files changed, 25 insertions(+), 7 deletions(-)
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Pali Rohár
maintainerLorenzo, could you look and review this patch series? It fixes commit 366697018c9a and we would like to have fix also in stable kernels.
Quoted 32 lines · On Wednesday 16 September 2020 17:14:02 Tomasz Maciej Nowak wrote:
W dniu 02.09.2020 o 16:43, Pali Rohár pisze:
Quoted 14 lines
This patch series fixes regression introduced in commit
366697018c9a("PCI: aardvark: Add PHY support") which caused aardvark driver initialization failure on EspressoBin board with factory version of Arm Trusted Firmware provided by Marvell.Second patch depends on the first patch, so please add appropriate Fixes/Cc:stable@ tags to have both patches correctly backported to stable kernels.
I have tested both patches with Marvell ATF firmware ebin-17.10-uart.zip and with upstream ATF+uboot and aardvark was initialized successfully. Without this patch series on ebin-17.10-uart.zip aardvark initialization failed.
Quoted 5 lines
Pali Rohár (2):
phy: marvell: comphy: Convert internal SMCC firmware return codes to
errno
PCI: aardvark: Fix initialization with old Marvell's Arm Trusted
FirmwareFor both patches
Tested-by Tomasz Maciej Nowak <[email protected]>Quoted 6 lines
drivers/pci/controller/pci-aardvark.c | 4 +++- drivers/phy/marvell/phy-mvebu-a3700-comphy.c | 14 +++++++++++--- drivers/phy/marvell/phy-mvebu-cp110-comphy.c | 14 +++++++++++--- 3 files changed, 25 insertions(+), 7 deletions(-)
Pali Rohár
maintainerQuoted 5 lines · On Wednesday 02 September 2020 16:43:42 Pali Rohár wrote:
This patch series fixes regression introduced in commit
366697018c9a("PCI: aardvark: Add PHY support") which caused aardvark driver initialization failure on EspressoBin board with factory version of Arm Trusted Firmware provided by Marvell.
Quoted 8 lines
Second patch depends on the first patch, so please add appropriate Fixes/Cc:stable@ tags to have both patches correctly backported to stable kernels.
I have tested both patches with Marvell ATF firmware ebin-17.10-uart.zip and with upstream ATF+uboot and aardvark was initialized successfully. Without this patch series on ebin-17.10-uart.zip aardvark initialization failed.
Lorenzo or Bjorn, could you review this patch series? I would like to see this regression fixed in stable kernels.
Quoted 14 lines
Pali Rohár (2):
phy: marvell: comphy: Convert internal SMCC firmware return codes to
errno
PCI: aardvark: Fix initialization with old Marvell's Arm Trusted
Firmwaredrivers/pci/controller/pci-aardvark.c | 4 +++- drivers/phy/marvell/phy-mvebu-a3700-comphy.c | 14 +++++++++++--- drivers/phy/marvell/phy-mvebu-cp110-comphy.c | 14 +++++++++++--- 3 files changed, 25 insertions(+), 7 deletions(-)Signature · 1 line
2.20.1
Lorenzo Pieralisi
AppliedQuoted 20 lines · Pali Rohár
This patch series fixes regression introduced in commit
366697018c9a("PCI: aardvark: Add PHY support") which caused aardvark driver initialization failure on EspressoBin board with factory version of Arm Trusted Firmware provided by Marvell.Second patch depends on the first patch, so please add appropriate Fixes/Cc:stable@ tags to have both patches correctly backported to stable kernels.
I have tested both patches with Marvell ATF firmware ebin-17.10-uart.zip and with upstream ATF+uboot and aardvark was initialized successfully. Without this patch series on ebin-17.10-uart.zip aardvark initialization failed.
Pali Rohár (2):
phy: marvell: comphy: Convert internal SMCC firmware return codes to
errno
PCI: aardvark: Fix initialization with old Marvell's Arm Trusted
Firmware
Quoted 4 lines
drivers/pci/controller/pci-aardvark.c | 4 +++- drivers/phy/marvell/phy-mvebu-a3700-comphy.c | 14 +++++++++++--- drivers/phy/marvell/phy-mvebu-cp110-comphy.c | 14 +++++++++++--- 3 files changed, 25 insertions(+), 7 deletions(-)
Applied to pci/aardvark (both patches), thanks.
Lorenzo
Pali Rohár
maintainerQuoted 21 lines · On Friday 02 October 2020 14:37:13 Lorenzo Pieralisi wrote:
Quoted 20 lines · Pali Rohár
This patch series fixes regression introduced in commit
366697018c9a("PCI: aardvark: Add PHY support") which caused aardvark driver initialization failure on EspressoBin board with factory version of Arm Trusted Firmware provided by Marvell.Second patch depends on the first patch, so please add appropriate Fixes/Cc:stable@ tags to have both patches correctly backported to stable kernels.
I have tested both patches with Marvell ATF firmware ebin-17.10-uart.zip and with upstream ATF+uboot and aardvark was initialized successfully. Without this patch series on ebin-17.10-uart.zip aardvark initialization failed.
Pali Rohár (2):
phy: marvell: comphy: Convert internal SMCC firmware return codes to
errno
PCI: aardvark: Fix initialization with old Marvell's Arm Trusted
Firmware
Quoted 6 lines
Quoted 4 lines
drivers/pci/controller/pci-aardvark.c | 4 +++- drivers/phy/marvell/phy-mvebu-a3700-comphy.c | 14 +++++++++++--- drivers/phy/marvell/phy-mvebu-cp110-comphy.c | 14 +++++++++++--- 3 files changed, 25 insertions(+), 7 deletions(-)Applied to pci/aardvark (both patches), thanks.
Ok! For second patch would be needed to put CC:stable line with specifying prerequisite of first patch as written in document:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
If I understood it correctly, second patch needs following line:
where <commit_id_of_first_path> is commit id of PATCH 1/2.
(correct me if I'm wrong)
Now when first commit has commit id, could you update second commit to include this information about prerequisite?
Quoted 36 lines · Pali Rohár
Quoted 21 lines · On Friday 02 October 2020 14:37:13 Lorenzo Pieralisi wrote:
Quoted 20 lines · Pali Rohár
This patch series fixes regression introduced in commit
366697018c9a("PCI: aardvark: Add PHY support") which caused aardvark driver initialization failure on EspressoBin board with factory version of Arm Trusted Firmware provided by Marvell.Second patch depends on the first patch, so please add appropriate Fixes/Cc:stable@ tags to have both patches correctly backported to stable kernels.
I have tested both patches with Marvell ATF firmware ebin-17.10-uart.zip and with upstream ATF+uboot and aardvark was initialized successfully. Without this patch series on ebin-17.10-uart.zip aardvark initialization failed.
Pali Rohár (2):
phy: marvell: comphy: Convert internal SMCC firmware return codes to
errno
PCI: aardvark: Fix initialization with old Marvell's Arm Trusted
FirmwareQuoted 6 lines
Quoted 4 lines
drivers/pci/controller/pci-aardvark.c | 4 +++- drivers/phy/marvell/phy-mvebu-a3700-comphy.c | 14 +++++++++++--- drivers/phy/marvell/phy-mvebu-cp110-comphy.c | 14 +++++++++++--- 3 files changed, 25 insertions(+), 7 deletions(-)Applied to pci/aardvark (both patches), thanks.
Ok! For second patch would be needed to put CC:stable line with specifying prerequisite of first patch as written in document:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
If I understood it correctly, second patch needs following line:
Quoted 8 lines
Cc <[email protected]> # <commit_id_of_first_path>: comphy: errno return codeswhere <
commit_id_of_first_path> is commit id of PATCH 1/2.(correct me if I'm wrong)
Now when first commit has commit id, could you update second commit to include this information about prerequisite?
No I can't because they will be merged at the same time. What we can do is mark the second patch for stable and during the stable review ask to pull patch (1). Or better you shall send both patches to stable kernels when they hit Linus' tree.
Lorenzo
Pali Rohár
maintainerQuoted 39 lines · On Friday 02 October 2020 15:38:51 Lorenzo Pieralisi wrote:
Quoted 38 lines · Pali Rohár
Quoted 21 lines · On Friday 02 October 2020 14:37:13 Lorenzo Pieralisi wrote:
Quoted 20 lines · Pali Rohár
This patch series fixes regression introduced in commit
366697018c9a("PCI: aardvark: Add PHY support") which caused aardvark driver initialization failure on EspressoBin board with factory version of Arm Trusted Firmware provided by Marvell.Second patch depends on the first patch, so please add appropriate Fixes/Cc:stable@ tags to have both patches correctly backported to stable kernels.
I have tested both patches with Marvell ATF firmware ebin-17.10-uart.zip and with upstream ATF+uboot and aardvark was initialized successfully. Without this patch series on ebin-17.10-uart.zip aardvark initialization failed.
Pali Rohár (2):
phy: marvell: comphy: Convert internal SMCC firmware return codes to
errno
PCI: aardvark: Fix initialization with old Marvell's Arm Trusted
FirmwareQuoted 6 lines
Quoted 4 lines
drivers/pci/controller/pci-aardvark.c | 4 +++- drivers/phy/marvell/phy-mvebu-a3700-comphy.c | 14 +++++++++++--- drivers/phy/marvell/phy-mvebu-cp110-comphy.c | 14 +++++++++++--- 3 files changed, 25 insertions(+), 7 deletions(-)Applied to pci/aardvark (both patches), thanks.
Ok! For second patch would be needed to put CC:stable line with specifying prerequisite of first patch as written in document:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
If I understood it correctly, second patch needs following line:
Cc <[email protected]> # <commit_id_of_first_path>: comphy: errno return codes
Quoted 8 lines
Quoted 6 lines
where <
commit_id_of_first_path> is commit id of PATCH 1/2.(correct me if I'm wrong)
Now when first commit has commit id, could you update second commit to include this information about prerequisite?
No I can't because they will be merged at the same time.
And it is a problem? Git commit id of first patch would not be changed, so referencing to it is now possible from second commit (unless you do rebasing).
Quoted 1 line
What we can do is mark the second patch for stable
This is done by adding "Cc: <[email protected]>" line to second patch which I suggested, right?
Quoted 5 lines
and during the stable review
ask to pull patch (1). Or better you shall send both patches to stable kernels when they hit Linus' tree.Lorenzo
Quoted 49 lines · Pali Rohár
Quoted 39 lines · On Friday 02 October 2020 15:38:51 Lorenzo Pieralisi wrote:
Quoted 38 lines · Pali Rohár
Quoted 21 lines · On Friday 02 October 2020 14:37:13 Lorenzo Pieralisi wrote:
Quoted 20 lines · Pali Rohár
This patch series fixes regression introduced in commit
366697018c9a("PCI: aardvark: Add PHY support") which caused aardvark driver initialization failure on EspressoBin board with factory version of Arm Trusted Firmware provided by Marvell.Second patch depends on the first patch, so please add appropriate Fixes/Cc:stable@ tags to have both patches correctly backported to stable kernels.
I have tested both patches with Marvell ATF firmware ebin-17.10-uart.zip and with upstream ATF+uboot and aardvark was initialized successfully. Without this patch series on ebin-17.10-uart.zip aardvark initialization failed.
Pali Rohár (2):
phy: marvell: comphy: Convert internal SMCC firmware return codes to
errno
PCI: aardvark: Fix initialization with old Marvell's Arm Trusted
FirmwareQuoted 6 lines
Quoted 4 lines
drivers/pci/controller/pci-aardvark.c | 4 +++- drivers/phy/marvell/phy-mvebu-a3700-comphy.c | 14 +++++++++++--- drivers/phy/marvell/phy-mvebu-cp110-comphy.c | 14 +++++++++++--- 3 files changed, 25 insertions(+), 7 deletions(-)Applied to pci/aardvark (both patches), thanks.
Ok! For second patch would be needed to put CC:stable line with specifying prerequisite of first patch as written in document:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
If I understood it correctly, second patch needs following line:
Cc <[email protected]> # <commit_id_of_first_path>: comphy: errno return codesQuoted 8 lines
Quoted 6 lines
where <
commit_id_of_first_path> is commit id of PATCH 1/2.(correct me if I'm wrong)
Now when first commit has commit id, could you update second commit to include this information about prerequisite?
No I can't because they will be merged at the same time.
Quoted 8 lines
And it is a problem? Git commit id of first patch would not be changed, so referencing to it is now possible from second commit (unless you do rebasing).
Quoted 1 line
What we can do is mark the second patch for stable
This is done by adding "Cc: <[email protected]>" line to second patch which I suggested, right?
I will apply the stable tag and dependency, it should be fine.
Please ensure you follow up stable updates especially in case patches don't backport properly (ie please try).
Lorenzo
Pali Rohár
maintainerQuoted 54 lines · On Friday 02 October 2020 16:03:09 Lorenzo Pieralisi wrote:
Quoted 53 lines · Pali Rohár
Quoted 39 lines · On Friday 02 October 2020 15:38:51 Lorenzo Pieralisi wrote:
Quoted 38 lines · Pali Rohár
Quoted 21 lines · On Friday 02 October 2020 14:37:13 Lorenzo Pieralisi wrote:
Quoted 20 lines · Pali Rohár
This patch series fixes regression introduced in commit
366697018c9a("PCI: aardvark: Add PHY support") which caused aardvark driver initialization failure on EspressoBin board with factory version of Arm Trusted Firmware provided by Marvell.Second patch depends on the first patch, so please add appropriate Fixes/Cc:stable@ tags to have both patches correctly backported to stable kernels.
I have tested both patches with Marvell ATF firmware ebin-17.10-uart.zip and with upstream ATF+uboot and aardvark was initialized successfully. Without this patch series on ebin-17.10-uart.zip aardvark initialization failed.
Pali Rohár (2):
phy: marvell: comphy: Convert internal SMCC firmware return codes to
errno
PCI: aardvark: Fix initialization with old Marvell's Arm Trusted
FirmwareQuoted 6 lines
Quoted 4 lines
drivers/pci/controller/pci-aardvark.c | 4 +++- drivers/phy/marvell/phy-mvebu-a3700-comphy.c | 14 +++++++++++--- drivers/phy/marvell/phy-mvebu-cp110-comphy.c | 14 +++++++++++--- 3 files changed, 25 insertions(+), 7 deletions(-)Applied to pci/aardvark (both patches), thanks.
Ok! For second patch would be needed to put CC:stable line with specifying prerequisite of first patch as written in document:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
If I understood it correctly, second patch needs following line:
Cc <[email protected]> # <commit_id_of_first_path>: comphy: errno return codesQuoted 8 lines
Quoted 6 lines
where <
commit_id_of_first_path> is commit id of PATCH 1/2.(correct me if I'm wrong)
Now when first commit has commit id, could you update second commit to include this information about prerequisite?
No I can't because they will be merged at the same time.
And it is a problem? Git commit id of first patch would not be changed, so referencing to it is now possible from second commit (unless you do rebasing).
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
What we can do is mark the second patch for stable
This is done by adding "Cc: <[email protected]>" line to second patch which I suggested, right?
I will apply the stable tag and dependency, it should be fine.
Ok! I thought that according to stable-kernel-rules.html that dependent commit could be added after stable email address separated with # char. At least this is how I understood stable-kernel-rules.html and its section:
"Additionally, some patches submitted via Option 1 may have additional
patch prerequisites which can be cherry-picked."
Quoted 2 lines
Please ensure you follow up stable updates especially in case patches don't backport properly (ie please try).
No problem, I can monitor emails about backporting these patches.
Quoted 1 line
Lorenzo
On Fri, Oct 02, 2020 at 05:07:01PM +0200, Pali Rohár wrote:
[...]
Quoted 9 lines
Quoted 1 line
I will apply the stable tag and dependency, it should be fine.
Ok! I thought that according to stable-kernel-rules.html that dependent commit could be added after stable email address separated with # char. At least this is how I understood stable-kernel-rules.html and its section:
"Additionally, some patches submitted via Option 1 may have additional
patch prerequisites which can be cherry-picked."
That's what I did - pci/aardvark branch.
Lorenzo
Pali Rohár
maintainerQuoted 11 lines · On Friday 02 October 2020 16:15:47 Lorenzo Pieralisi wrote:
On Fri, Oct 02, 2020 at 05:07:01PM +0200, Pali Rohár wrote:
[...]
Quoted 7 lines
Quoted 1 line
I will apply the stable tag and dependency, it should be fine.
Ok! I thought that according to stable-kernel-rules.html that dependent commit could be added after stable email address separated with # char. At least this is how I understood stable-kernel-rules.html and its section:
Quoted 4 lines
Quoted 2 lines
"Additionally, some patches submitted via Option 1 may have additional
patch prerequisites which can be cherry-picked."That's what I did - pci/aardvark branch.
Great, thank you!
I will be monitoring backport emails in case it would not be correctly detected/cherrypicked.