stmmac: Reporting ethtool_ts_info

2015-10-27 Thread Phil Reid
s. Which would be (priv->dma_cap.time_stamp || priv->dma_cap.atime_stamp) Does this seem reasonable? -- Regards Phil Reid -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[0/1] stmmac: Correctly report PTP capabilities.

2015-10-30 Thread Phil Reid
Phil Reid (1): stmmac: Correctly report PTP capabilities. drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) -- 1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message

[1/1] stmmac: Correctly report PTP capabilities.

2015-10-30 Thread Phil Reid
priv->hwts_*_en indicate if timestamping is enabled/disabled at run time. But priv->dma_cap.time_stamp and priv->dma_cap.atime_stamp indicates HW is support for PTPv1/PTPv2. Signed-off-by: Phil Reid <pr...@electromag.com.au> --- drivers/net/ethernet/stmicro/stmmac/stmma

rfi: stmmac: creating an of mdio bus for attached dsa

2015-09-18 Thread Phil Reid
G'day All, Prior to submitting a patch I'd just like to get an idea on what the correct way is to create and register an mdio bus for use by the marvell dsa driver. On our system the cpu ethernet port is connected directly to a switch with a fixed link (1Gbit). So the driver needs to create

Re: [PATCH v2 5/5] stmmac: socfpga: Provide dt node to config ptp clk source.

2015-12-07 Thread Phil Reid
On 7/12/2015 5:05 PM, Arnd Bergmann wrote: On Monday 07 December 2015 09:38:44 Phil Reid wrote: Signed-off-by: Phil Reid <pr...@electromag.com.au> --- Documentation/devicetree/bindings/net/socfpga-dwmac.txt | 2 ++ drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c | 9 +++

Re: [PATCH v2 4/5] stmmac: Add ptp debugfs entry.

2015-12-07 Thread Phil Reid
On 7/12/2015 5:03 PM, Arnd Bergmann wrote: On Monday 07 December 2015 09:38:43 Phil Reid wrote: This adds a debugfs entry to view the current status of the ptp registers. Signed-off-by: Phil Reid <pr...@electromag.com.au> Your description should explain what this is good for. Why

Re: [PATCH v2 5/5] stmmac: socfpga: Provide dt node to config ptp clk source.

2015-12-07 Thread Phil Reid
On 7/12/2015 7:59 PM, Sergei Shtylyov wrote: On 12/07/2015 04:38 AM, Phil Reid wrote: +if(dwmac->f2h_ptp_ref_clk) Please run your patches thru scripts/checkpatch.pl (space needed after *if*). [...] MBR, Sergei Will do. -- Regards Phil Reid -- To unsubscribe from this l

[PATCH 5/5] stmmac: socfpga: Provide dt node to config ptp clk source.

2015-12-04 Thread Phil Reid
Signed-off-by: Phil Reid <pr...@electromag.com.au> --- Documentation/devicetree/bindings/net/socfpga-dwmac.txt | 2 ++ drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c | 10 ++ 2 files changed, 12 insertions(+) diff --git a/Documentation/devicetree/bindings/net/socfpga-dwm

[PATCH 1/5] stmmac: create of compatible mdio bus for stmacc driver

2015-12-04 Thread Phil Reid
. Signed-off-by: Phil Reid <pr...@electromag.com.au> --- Documentation/devicetree/bindings/net/stmmac.txt | 10 ++- drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 32 -- .../net/ethernet/stmicro/stmmac/stmmac_platform.c | 2 +- 3 files changed, 34 insertions(

[PATCH 4/5] stmmac: Add ptp debugfs entry.

2015-12-04 Thread Phil Reid
This adds a debugfs entry to view the current status of the ptp registers. Signed-off-by: Phil Reid <pr...@electromag.com.au> --- drivers/net/ethernet/stmicro/stmmac/stmmac.h | 1 + drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 61 +++ drivers/net/ethernet/s

[PATCH 3/5] stmmac: Fix calculations for ptp counters when clock input = 50Mhz.

2015-12-04 Thread Phil Reid
-by: Phil Reid <pr...@electromag.com.au> --- drivers/net/ethernet/stmicro/stmmac/common.h | 2 +- drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c | 8 +--- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 18 +++--- 3 files changed, 13 insertions(

[PATCH 2/5] stmmac: Correct documentation on stmmac clocks.

2015-12-04 Thread Phil Reid
devm_get_clk looks in clock-name property for matching clock. the ptp_ref_clk property is ignored. Signed-off-by: Phil Reid <pr...@electromag.com.au> --- Documentation/devicetree/bindings/net/stmmac.txt | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff

[PATCH 0/5] stmmac: Fixed Phy & PTP fixes

2015-12-04 Thread Phil Reid
ice tree setting to config ptp clk source on socfpga platforms. Phil Reid (5): stmmac: create of compatible mdio bus for stmacc driver stmmac: Correct documentation on stmmac clocks. stmmac: Fix calculations for ptp counters when clock input = 50Mhz. stmmac: Add ptp debugfs entry. stm

[PATCH v2 5/5] stmmac: socfpga: Provide dt node to config ptp clk source.

2015-12-06 Thread Phil Reid
Signed-off-by: Phil Reid <pr...@electromag.com.au> --- Documentation/devicetree/bindings/net/socfpga-dwmac.txt | 2 ++ drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c | 9 + 2 files changed, 11 insertions(+) diff --git a/Documentation/devicetree/bindings/net/socfpga-dwmac.

[PATCH v2 0/5] stmmac: Fixed Phy & PTP fixes

2015-12-06 Thread Phil Reid
ice tree setting to config ptp clk source on socfpga platforms. Changes from V1: - Fixed mismatch doc / code for ptp_ref_clk dt node. - Remove unit address from doc example. Phil Reid (5): stmmac: create of compatible mdio bus for stmacc driver stmmac: Correct documentation on stmmac clo

[PATCH v2 1/5] stmmac: create of compatible mdio bus for stmacc driver

2015-12-06 Thread Phil Reid
. Acked-by: Rob Herring <r...@kernel.org> Signed-off-by: Phil Reid <pr...@electromag.com.au> --- Documentation/devicetree/bindings/net/stmmac.txt | 10 ++- drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 32 -- .../net/ethernet/stmicro/stmmac/stmmac_plat

[PATCH v2 3/5] stmmac: Fix calculations for ptp counters when clock input = 50Mhz.

2015-12-06 Thread Phil Reid
-by: Phil Reid <pr...@electromag.com.au> --- drivers/net/ethernet/stmicro/stmmac/common.h | 2 +- drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c | 8 +--- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 18 +++--- 3 files changed, 13 insertions(

[PATCH 1/1] stmmac: socfpga: Provide dt node to config ptp clk source.

2015-12-06 Thread Phil Reid
Signed-off-by: Phil Reid <pr...@electromag.com.au> --- Documentation/devicetree/bindings/net/socfpga-dwmac.txt | 2 ++ drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c | 10 ++ 2 files changed, 12 insertions(+) diff --git a/Documentation/devicetree/bindings/net/socfpga-dwm

[PATCH v2 2/5] stmmac: Correct documentation on stmmac clocks.

2015-12-06 Thread Phil Reid
devm_get_clk looks in clock-name property for matching clock. the ptp_ref_clk property is ignored. Acked-by: Rob Herring <r...@kernel.org> Signed-off-by: Phil Reid <pr...@electromag.com.au> --- Documentation/devicetree/bindings/net/stmmac.txt | 17 - 1 file changed,

[PATCH v2 4/5] stmmac: Add ptp debugfs entry.

2015-12-06 Thread Phil Reid
This adds a debugfs entry to view the current status of the ptp registers. Signed-off-by: Phil Reid <pr...@electromag.com.au> --- drivers/net/ethernet/stmicro/stmmac/stmmac.h | 1 + drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 61 +++ drivers/net/ethernet/s

[PATCH v4 0/4] stmmac: Fixed Phy & PTP fixes

2015-12-08 Thread Phil Reid
ing, spaces & lines > 80 chars. Using checkpatch - Drop PTP register debugfs patch. Changes from V1: - Fixed mismatch doc / code for ptp_ref_clk dt node. - Remove unit address from doc example. Phil Reid (5): stmmac: create of compatible mdio bus for stmacc driver stmmac: Correct doc

[PATCH v4 2/4] stmmac: Correct documentation on stmmac clocks.

2015-12-08 Thread Phil Reid
devm_get_clk looks in clock-name property for matching clock. the ptp_ref_clk property is ignored. Acked-by: Rob Herring <r...@kernel.org> Signed-off-by: Phil Reid <pr...@electromag.com.au> --- Documentation/devicetree/bindings/net/stmmac.txt | 17 - 1 file changed,

[PATCH v4 4/4] stmmac: socfpga: Provide dt node to config ptp clk source.

2015-12-08 Thread Phil Reid
Provides an options to use the ptp clock routed from the Altera FPGA fabric. Instead of the defalt eosc1 clock connected to the ARM HPS core. This setting affects all emacs in the core as the ptp clock is common. Signed-off-by: Phil Reid <pr...@electromag.com.au> --- Documentation/devi

[PATCH v4 1/4] stmmac: create of compatible mdio bus for stmacc driver

2015-12-08 Thread Phil Reid
. Acked-by: Rob Herring <r...@kernel.org> Signed-off-by: Phil Reid <pr...@electromag.com.au> --- Documentation/devicetree/bindings/net/stmmac.txt | 8 + drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 39 ++ .../net/ethernet/stmicro/stmmac/stmmac_platform.c

[PATCH v4 3/4] stmmac: Fix calculations for ptp counters when clock input = 50Mhz.

2015-12-08 Thread Phil Reid
-by: Phil Reid <pr...@electromag.com.au> --- drivers/net/ethernet/stmicro/stmmac/common.h | 2 +- drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c | 9 ++--- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 19 --- 3 files changed, 15 insertions(

[PATCH v3 3/4] stmmac: Fix calculations for ptp counters when clock input = 50Mhz.

2015-12-07 Thread Phil Reid
-by: Phil Reid <pr...@electromag.com.au> --- drivers/net/ethernet/stmicro/stmmac/common.h | 2 +- drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c | 9 ++--- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 19 --- 3 files changed, 15 insertions(

[PATCH v3 4/4] stmmac: socfpga: Provide dt node to config ptp clk source.

2015-12-07 Thread Phil Reid
Provides an options to use the ptp clock routed from the Altera FPGA fabric. Instead of the defalt eosc1 clock connected to the ARM HPS core. This setting affects all emacs in the core as the ptp clock is common. Signed-off-by: Phil Reid <pr...@electromag.com.au> --- Documentation/devi

[PATCH v3 2/4] stmmac: Correct documentation on stmmac clocks.

2015-12-07 Thread Phil Reid
devm_get_clk looks in clock-name property for matching clock. the ptp_ref_clk property is ignored. Acked-by: Rob Herring <r...@kernel.org> Signed-off-by: Phil Reid <pr...@electromag.com.au> --- Documentation/devicetree/bindings/net/stmmac.txt | 17 - 1 file changed,

[PATCH v3 1/4] stmmac: create of compatible mdio bus for stmacc driver

2015-12-07 Thread Phil Reid
. Acked-by: Rob Herring <r...@kernel.org> Signed-off-by: Phil Reid <pr...@electromag.com.au> --- Documentation/devicetree/bindings/net/stmmac.txt | 8 ++ drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 32 -- .../net/ethernet/stmicro/stmmac/stmmac_plat

[PATCH v3 0/4] stmmac: Fixed Phy & PTP fixes

2015-12-07 Thread Phil Reid
ice tree setting to config ptp clk source on socfpga platforms. Changes from V2: - Formatting, spaces & lines > 80 chars. Using checkpatch - Drop PTP register debugfs patch. Changes from V1: - Fixed mismatch doc / code for ptp_ref_clk dt node. - Remove unit address from doc example. Ph

[PATCH v5 1/4] stmmac: create of compatible mdio bus for stmacc driver

2015-12-09 Thread Phil Reid
. Acked-by: Rob Herring <r...@kernel.org> Signed-off-by: Phil Reid <pr...@electromag.com.au> --- Documentation/devicetree/bindings/net/stmmac.txt | 8 ++ drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 31 +++--- .../net/ethernet/stmicro/stmmac/stmmac_plat

[PATCH v5 4/4] stmmac: socfpga: Provide dt node to config ptp clk source.

2015-12-09 Thread Phil Reid
Provides an options to use the ptp clock routed from the Altera FPGA fabric. Instead of the defalt eosc1 clock connected to the ARM HPS core. This setting affects all emacs in the core as the ptp clock is common. Acked-by: Rob Herring <r...@kernel.org> Signed-off-by: Phil Re

[PATCH v5 2/4] stmmac: Correct documentation on stmmac clocks.

2015-12-09 Thread Phil Reid
devm_get_clk looks in clock-name property for matching clock. the ptp_ref_clk property is ignored. Acked-by: Rob Herring <r...@kernel.org> Signed-off-by: Phil Reid <pr...@electromag.com.au> --- Documentation/devicetree/bindings/net/stmmac.txt | 17 - 1 file changed,

[PATCH v5 3/4] stmmac: Fix calculations for ptp counters when clock input = 50Mhz.

2015-12-09 Thread Phil Reid
-by: Phil Reid <pr...@electromag.com.au> --- drivers/net/ethernet/stmicro/stmmac/common.h | 2 +- drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c | 9 ++--- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 19 --- 3 files changed, 15 insertions(

[PATCH v5 0/4] stmmac: Fixed Phy & PTP fixes

2015-12-09 Thread Phil Reid
dress from doc example. Phil Reid (5): stmmac: create of compatible mdio bus for stmacc driver stmmac: Correct documentation on stmmac clocks. stmmac: Fix calculations for ptp counters when clock input = 50Mhz. stmmac: socfpga: Provide dt node to config ptp clk source. .../devicetree/bi

[PATCH v6 1/4] stmmac: create of compatible mdio bus for stmmac driver

2015-12-13 Thread Phil Reid
. Acked-by: Rob Herring <r...@kernel.org> Signed-off-by: Phil Reid <pr...@electromag.com.au> --- Documentation/devicetree/bindings/net/stmmac.txt | 8 +++ drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 26 +++--- .../net/ethernet/stmicro/stmmac/stmmac_plat

[PATCH v6 3/4] stmmac: Fix calculations for ptp counters when clock input = 50Mhz.

2015-12-13 Thread Phil Reid
-by: Phil Reid <pr...@electromag.com.au> --- drivers/net/ethernet/stmicro/stmmac/common.h | 2 +- drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c | 9 ++--- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 19 --- 3 files changed, 15 insertions(

[PATCH v6 0/4] stmmac: create of compatible mdio bus for stmacc driver

2015-12-13 Thread Phil Reid
dress from doc example. Phil Reid (4): stmmac: create of compatible mdio bus for stmmac driver stmmac: Correct documentation on stmmac clocks. stmmac: Fix calculations for ptp counters when clock input = 50Mhz. stmmac: socfpga: Provide dt node to config ptp clk source. .../devicetree/bi

[PATCH v6 2/4] stmmac: Correct documentation on stmmac clocks.

2015-12-13 Thread Phil Reid
devm_get_clk looks in clock-name property for matching clock. the ptp_ref_clk property is ignored. Acked-by: Rob Herring <r...@kernel.org> Signed-off-by: Phil Reid <pr...@electromag.com.au> --- Documentation/devicetree/bindings/net/stmmac.txt | 17 - 1 file changed,

[PATCH v6 4/4] stmmac: socfpga: Provide dt node to config ptp clk source.

2015-12-13 Thread Phil Reid
Provides an options to use the ptp clock routed from the Altera FPGA fabric. Instead of the defalt eosc1 clock connected to the ARM HPS core. This setting affects all emacs in the core as the ptp clock is common. Acked-by: Rob Herring <r...@kernel.org> Signed-off-by: Phil Re

Re: [PATCH v5 1/4] stmmac: create of compatible mdio bus for stmacc driver

2015-12-10 Thread Phil Reid
G'day Giuseppe, On 11/12/2015 1:16 AM, Giuseppe CAVALLARO wrote: Hi also pls fix this typo stmmac: create of compatible mdio bus for stmacc driver stmmac Will do. On 12/9/2015 9:39 AM, Phil Reid

Re: [PATCH net-next 2/2] dsa: mv88e6xxx.c: Hardware reset the chip if available

2015-11-18 Thread Phil Reid
od and something I has been >> looking at adding. > > Please feel free to test it on your hardware and send a Tested-by :-) Worked as expected on my hardware, can see the line toggle, chip is configured correctly. Tested-by: Phil Reid <pr...@electromag.com.au> > >> Would

Re: [PATCHv2 (net.git) 2/2] stmmac: fix MDIO settings

2016-03-11 Thread Phil Reid
x eead8ab..1b4884c 100644 --- a/include/linux/stmmac.h +++ b/include/linux/stmmac.h @@ -94,7 +94,6 @@ struct stmmac_dma_cfg { }; struct plat_stmmacenet_data { - char *phy_bus_name; int bus_id; int phy_addr; int interface; -- Regards Phil Reid

Re: [PATCHv3 (net.git) 2/2] stmmac: fix MDIO settings

2016-03-13 Thread Phil Reid
G'day Giuseppe, On 11/03/2016 11:32 PM, Giuseppe CAVALLARO wrote: On 3/11/2016 4:14 PM, Phil Reid wrote: G'day Giuseppe, I wont be able to test until Monday. Concept looks ok to me except for comment below. On 11/03/2016 9:33 PM, Giuseppe Cavallaro wrote: Initially the phy_bus_name

[PATCH 1/1] net: stmmac: Don't search for phys if mdio node is defined.

2016-03-15 Thread Phil Reid
If a dt mdio entry has been added least assume that we wont search for phys attached. The DT and of_mdiobus_register already do this. This stops DSA phys being found and phys created for them, as this is handled by the DSA driver. Signed-off-by: Phil Reid <pr...@electromag.com.au> --- d

[PATCH 0/1] net: stmmac: Don't search for phys if mdio node is defined.

2016-03-15 Thread Phil Reid
should be included in the conditional here. But it looks like if a phy-handle is used then we don't want to search for phys. Phil Reid (1): net: stmmac: Don't search for phys if mdio node is defined. drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 4 1 file changed, 4 insertions(+) -- 1.8.3.1

Re: [PATCHv3 (net.git) 2/2] stmmac: fix MDIO settings

2016-03-11 Thread Phil Reid
e> Tested-by: Frank Schäfer <fschaefer@googlemail.com> Cc: Gabriel Fernandez <gabriel.fernan...@linaro.org> Cc: Dinh Nguyen <dinh.li...@gmail.com> Cc: David S. Miller <da...@davemloft.net> Cc: Phil Reid <pr...@electromag.com.au> --- V2: use is_pseudo_fixed_li

[PATCH 0/1] net: stmmac: socfgpa: Ensure emac bit set in System Manger for PTP

2016-04-07 Thread Phil Reid
Enable PTP FPGA clock, pps and ext trig connections to stmmac. Note: This hardware configuration is not offically support by Altera. Phil Reid (1): net: stmmac: socfgpa: Ensure emac bit set in System Manger for PTP drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c | 16 +--- 1

[PATCH 1/1] net: stmmac: socfgpa: Ensure emac bit set in System Manger for PTP

2016-04-07 Thread Phil Reid
the FPGA and also connects the PTP pps and ext trig signals to the stmmac PTP hardware. Patch proposed by Phil Collins. Signed-off-by: Phil Reid <pr...@electromag.com.au> --- drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c | 16 +--- 1 file changed, 13 insertions(+), 3 del

Re: GMII2RGMII Converter support in macb driver

2016-04-12 Thread Phil Reid
know if it makes sense). I don't know if others have already made such an adaptation layer between GMII to RGMII but I'm pretty sure it can't be inserted into the macb driver. Bye, This sounds very similar to the altera emac-splitter. See stmmac driver for how they handled this. -- Regards Phil Reid

Re: [PATCH 1/1] net: stmmac: Don't search for phys if mdio node is defined.

2016-03-19 Thread Phil Reid
On 16/03/2016 5:36 PM, Giuseppe CAVALLARO wrote: On 3/15/2016 8:34 AM, Phil Reid wrote: If a dt mdio entry has been added least assume that we wont search for phys attached. The DT and of_mdiobus_register already do this. This stops DSA phys being found and phys created for them

Re: [PATCH] net: stmmac: Remove wrong message in stmmac_probe_config_dt

2017-02-01 Thread Phil Reid
cf87736bd0824fd37ec02e65 stmmac: move stmmac_clk, pclk, clk_ptp_ref and stmmac_rst to platform structure -- Regards Phil Reid

Re: [PATCH v2] stmmac: CSR clock configuration fix

2016-12-22 Thread Phil Reid
On 22/12/2016 23:47, Joao Pinto wrote: Hello Phil, Às 3:42 PM de 12/22/2016, Phil Reid escreveu: G'day Joao, On 22/12/2016 20:38, Joao Pinto wrote: When testing stmmac with my QoS reference design I checked a problem in the CSR clock configuration that was impossibilitating the phy

Re: [PATCH v2] stmmac: CSR clock configuration fix

2016-12-22 Thread Phil Reid
_csr & priv->hw->mii.clk_csr_mask) - << priv->hw->mii.clk_csr_shift); + value |= (priv->clk_csr << priv->hw->mii.clk_csr_shift) + & priv->hw->mii.clk_csr_mask; if (priv->plat->has_gmac4) value |= MII_GMAC4_WRITE; -- Regards Phil Reid

Re: [PATCH v2] stmmac: CSR clock configuration fix

2016-12-22 Thread Phil Reid
G'day Joao, On 23/12/2016 01:06, Joao Pinto wrote: Às 4:57 PM de 12/22/2016, Phil Reid escreveu: On 22/12/2016 23:47, Joao Pinto wrote: Hello Phil, Às 3:42 PM de 12/22/2016, Phil Reid escreveu: G'day Joao, On 22/12/2016 20:38, Joao Pinto wrote: When testing stmmac with my QoS reference

[PATCH 2/2] net: dsa: lan9303: check error value from devm_gpiod_get_optional()

2017-11-13 Thread Phil Reid
devm_gpiod_get_optional() can return an error in addition to a NULL ptr. Check for error and propagate that to the probe function. Check return value in probe. This will now handle EPROBE_DEFER for the reset gpio. Signed-off-by: Phil Reid <pr...@electromag.com.au> --- drivers/net/dsa/l

[PATCH 0/2] net: dsa: lan9303: check error value from devm_gpiod_get_optional()

2017-11-13 Thread Phil Reid
Replaces Pan Bian <bianpan2...@163.com> patch "net: dsa: lan9303: correctly check return value of devm_gpiod_get_optional" Errors need to be prograted back from probe. Note: I have only compile tested the code as I don't have the hardware. Phil Reid (2): net: ds

[PATCH 1/2] net: dsa: lan9303: make lan9303_handle_reset() a void function

2017-11-13 Thread Phil Reid
lan9303_handle_reset never returns anything other than success. So there's not need for it to return an error code. Signed-off-by: Phil Reid <pr...@electromag.com.au> --- drivers/net/dsa/lan9303-core.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/n

Re: [PATCH] net: dsa: lan9303: correctly check return value of devm_gpiod_get_optional

2017-11-12 Thread Phil Reid
) always returns 0. lan9303_probe checks lan9303_handle_reset() return value. Probably should be checking lan9303_probe_reset_gpio() instead. -- Regards Phil Reid

Re: [PATCH 0/2] net: dsa: lan9303: check error value from devm_gpiod_get_optional()

2018-01-09 Thread Phil Reid
On 7/01/2018 00:54, Egil Hjelmeland wrote: Den 13. nov. 2017 09:07, skrev Phil Reid: Replaces Pan Bian <bianpan2...@163.com> patch "net: dsa: lan9303: correctly check return value of devm_gpiod_get_optional" Errors need to be prograted back from probe. Note: I have onl

[PATCH v2 2/2] net: dsa: lan9303: check error value from devm_gpiod_get_optional()

2018-01-09 Thread Phil Reid
devm_gpiod_get_optional() can return an error in addition to a NULL ptr. Check for error and propagate that to the probe function. Check return value in probe. This will now handle EPROBE_DEFER for the reset gpio. Signed-off-by: Phil Reid <pr...@electromag.com.au> --- drivers/net/dsa/l

[PATCH v2 0/2] net: dsa: lan9303: check error value from devm_gpiod_get_optional()

2018-01-09 Thread Phil Reid
ebased on net-next Phil Reid (2): net: dsa: lan9303: make lan9303_handle_reset() a void function net: dsa: lan9303: check error value from devm_gpiod_get_optional() drivers/net/dsa/lan9303-core.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) -- 1.8.3.1

[PATCH v2 1/2] net: dsa: lan9303: make lan9303_handle_reset() a void function

2018-01-09 Thread Phil Reid
lan9303_handle_reset never returns anything other than success. So there's not need for it to return an error code. Signed-off-by: Phil Reid <pr...@electromag.com.au> --- drivers/net/dsa/lan9303-core.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/n

Re: [PATCH] net: dsa: b53: Replace mdelay with msleep in b53_switch_reset_gpio

2018-04-10 Thread Phil Reid
(gpio, 0); - mdelay(50); + msleep(50); gpio_set_value(gpio, 1); - mdelay(20); + msleep(20); dev->current_page = 0xff; } Would that also imply gpio_set_value could be gpio_set_value_cansleep? -- Regards Phil Reid

Re: [PATCH v2] net: dsa: b53: Using sleep-able operations in b53_switch_reset_gpio

2018-04-11 Thread Phil Reid
gpio, 1); - mdelay(20); + gpio_set_value_cansleep(gpio, 1); + msleep(20); dev->current_page = 0xff; } FWIW: Reviewed-by: Phil Reid <pr...@electromag.com.au>