[PATCH v1 net-next 1/5] net: stmmac: introduce DMA interrupt status masking per traffic direction

2021-03-03 Thread Voon Weifeng
From: Ong Boon Leong In preparation to make stmmac support multi-vector MSI, we introduce the interrupt status masking according to RX, TX or RXTX. Default to use RXTX inside stmmac_dma_interrupt(), so there is no run-time logic difference now. Signed-off-by: Ong Boon Leong Signed-off-by: Voon

[PATCH v1 net-next 0/5] net: stmmac: enable multi-vector MSI

2021-03-03 Thread Voon Weifeng
This patchset adds support for multi MSI interrupts in addition to current single common interrupt implementation. Each MSI interrupt is tied to a newly introduce interrupt service routine(ISR). Hence, each interrupt will only go through the corresponding ISR. In order to increase the efficiency,

[PATCH v1 net-next 2/5] net: stmmac: make stmmac_interrupt() function more friendly to MSI

2021-03-03 Thread Voon Weifeng
From: Ong Boon Leong Refactor stmmac_interrupt() by introducing stmmac_common_interrupt() so that we prepare the ISR operation to be friendly to MSI later. Signed-off-by: Ong Boon Leong Signed-off-by: Voon Weifeng --- .../net/ethernet/stmicro/stmmac/stmmac_main.c | 59 +++ 1

[PATCH v1 net-next 5/5] net: stmmac: use interrupt mode INTM=1 for multi-MSI

2021-03-03 Thread Voon Weifeng
ch TX intr and RX intr (TI/RI) will be handled by TX/RX ISR without the need of calling the common MAC ISR. Updated the TX/RX NORMAL interrupts status checking process as the NIS status bit is not asserted for any RI/TI events for INTM=1. Signed-off-by: Wong, Vee Khee Co-developed-by: Voon Weife

[PATCH v1 net-next 3/5] net: stmmac: introduce MSI Interrupt routines for mac, safety, RX & TX

2021-03-03 Thread Voon Weifeng
ned-off-by: Ong Boon Leong Signed-off-by: Voon Weifeng --- drivers/net/ethernet/stmicro/stmmac/common.h | 15 + drivers/net/ethernet/stmicro/stmmac/stmmac.h | 16 + .../net/ethernet/stmicro/stmmac/stmmac_main.c | 415 -- include/linux/stmmac.h| 8 +

[PATCH v1 net-next 4/5] stmmac: intel: add support for multi-vector msi and msi-x

2021-03-03 Thread Voon Weifeng
-vector interrupts. If it fails, then it will automatically fallback to request allocation for single interrupts. Signed-off-by: Ong Boon Leong Co-developed-by: Voon Weifeng Signed-off-by: Voon Weifeng --- .../net/ethernet/stmicro/stmmac/dwmac-intel.c | 112 +- 1 file changed

[PATCH v1 net-next] net: stmmac: Enable EEE HW LPI timer with auto SW/HW switching

2020-10-08 Thread Voon Weifeng
the driver will fallback to SW timer. Signed-off-by: Vineetha G. Jaya Kumaran Signed-off-by: Voon Weifeng --- drivers/net/ethernet/stmicro/stmmac/common.h | 3 ++ drivers/net/ethernet/stmicro/stmmac/dwmac4.h | 2 ++ .../net/ethernet/stmicro/stmmac/dwmac4_core.c | 24 ++ drivers/ne

RE: [PATCH v1 net-next] net: stmmac: Enable EEE HW LPI timer with auto SW/HW switching

2020-10-08 Thread Voon, Weifeng
alue is configured through ethtool. The driver will auto > select the LPI HW timer if the value in the HW timer supported range. > Else, the driver will fallback to SW timer. > > Signed-off-by: Vineetha G. Jaya Kumaran > Signed-off-by: Voon Weifeng Please help to review and comment. Thanks. Weifeng

[PATCH v2 net-next] net: stmmac: Enable EEE HW LPI timer with auto SW/HW switching

2020-10-15 Thread Voon Weifeng
the driver will fallback to SW timer. Signed-off-by: Vineetha G. Jaya Kumaran Signed-off-by: Voon Weifeng --- v2 changelog: -removed #define for LPI_ET_ENABLE and LPI_ET_DISABLE and directly use literals -removed not required function header in stmmac.h -renamed stmmac_lpi_entry_timer_e

[PATCH v3 net-next] net: stmmac: Enable EEE HW LPI timer with auto SW/HW switching

2020-10-15 Thread Voon Weifeng
the driver will fallback to SW timer. Signed-off-by: Vineetha G. Jaya Kumaran Signed-off-by: Voon Weifeng --- v3 changelog: -Changed stmmac_lpi_entry_timer_config() to static function v2 changelog: -removed #define for LPI_ET_ENABLE and LPI_ET_DISABLE and directly use literals -removed not require

RE: [PATCH net-next 1/2] net: stmmac: enable 2.5Gbps link speed

2021-04-02 Thread Voon, Weifeng
> > + /* 2.5G mode only support 2500baseT full duplex only */ > > + if (priv->plat->has_gmac4 && priv->plat->speed_2500_en) { > > + phylink_set(mac_supported, 2500baseT_Full); > > + phylink_set(mask, 10baseT_Half); > > + phylink_set(mask, 10baseT_Full); > > +

RE: [PATCH net-next 1/2] net: stmmac: enable 2.5Gbps link speed

2021-04-05 Thread Voon, Weifeng
> On Fri, Apr 02, 2021 at 07:45:04AM +0000, Voon, Weifeng wrote: > > > > + /* 2.5G mode only support 2500baseT full duplex only */ > > > > + if (priv->plat->has_gmac4 && priv->plat->speed_2500_en) { > > > >

[PATCH net-next] net: intel: Enable SERDES PHY rx clk for PSE

2021-04-05 Thread Voon Weifeng
EHL PSE SGMII mode requires to ungate the SERDES PHY rx clk for power up sequence and vice versa. Signed-off-by: Voon Weifeng --- drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c | 10 ++ drivers/net/ethernet/stmicro/stmmac/dwmac-intel.h | 1 + 2 files changed, 11 insertions(+) diff

[PATCH v2 net-next] stmmac: intel: Enable SERDES PHY rx clk for PSE

2021-04-05 Thread Voon Weifeng
EHL PSE SGMII mode requires to ungate the SERDES PHY rx clk for power up sequence and vice versa. Signed-off-by: Voon Weifeng --- Changes: v1 -> v2 -change subject from "net: intel" to "stmmac: intel" --- drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c | 10 +

RE: [PATCH net-next v2 0/2] Enable 2.5Gbps speed for stmmac

2021-04-06 Thread Voon, Weifeng
> > > You have a MAC and an PCS in the stmmac IP block. That then has some > > > sort of SERDES interface, running 1000BaseX, SGMII, SGMII > > > overclocked at 2.5G or 25000BaseX. Connected to the SERDES you have > > > a PHY which converts to copper, giving you 2500BaseT. > > > > > > You said earli

RE: [PATCH net-next v2 0/2] Enable 2.5Gbps speed for stmmac

2021-04-06 Thread Voon, Weifeng
> > The limitation is not on the MAC, PCS or the PHY. For Intel mgbe, the > > overclocking of 2.5 times clock rate to support 2.5G is only able to > > be configured in the BIOS during boot time. Kernel driver has no > > access to modify the clock rate for 1Gbps/2.5G mode. The way to > > determined

[RESEND v1 net-next 0/5] net: stmmac: enable multi-vector MSI

2021-03-16 Thread Voon Weifeng
This patchset adds support for multi MSI interrupts in addition to current single common interrupt implementation. Each MSI interrupt is tied to a newly introduce interrupt service routine(ISR). Hence, each interrupt will only go through the corresponding ISR. In order to increase the efficiency,

[RESEND v1 net-next 2/5] net: stmmac: make stmmac_interrupt() function more friendly to MSI

2021-03-16 Thread Voon Weifeng
From: Ong Boon Leong Refactor stmmac_interrupt() by introducing stmmac_common_interrupt() so that we prepare the ISR operation to be friendly to MSI later. Signed-off-by: Ong Boon Leong Signed-off-by: Voon Weifeng --- .../net/ethernet/stmicro/stmmac/stmmac_main.c | 59 +++ 1

[RESEND v1 net-next 3/5] net: stmmac: introduce MSI Interrupt routines for mac, safety, RX & TX

2021-03-16 Thread Voon Weifeng
ned-off-by: Ong Boon Leong Signed-off-by: Voon Weifeng --- drivers/net/ethernet/stmicro/stmmac/common.h | 15 + drivers/net/ethernet/stmicro/stmmac/stmmac.h | 16 + .../net/ethernet/stmicro/stmmac/stmmac_main.c | 415 -- include/linux/stmmac.h| 8 +

[RESEND v1 net-next 1/5] net: stmmac: introduce DMA interrupt status masking per traffic direction

2021-03-16 Thread Voon Weifeng
From: Ong Boon Leong In preparation to make stmmac support multi-vector MSI, we introduce the interrupt status masking according to RX, TX or RXTX. Default to use RXTX inside stmmac_dma_interrupt(), so there is no run-time logic difference now. Signed-off-by: Ong Boon Leong Signed-off-by: Voon

[RESEND v1 net-next 5/5] net: stmmac: use interrupt mode INTM=1 for multi-MSI

2021-03-16 Thread Voon Weifeng
ch TX intr and RX intr (TI/RI) will be handled by TX/RX ISR without the need of calling the common MAC ISR. Updated the TX/RX NORMAL interrupts status checking process as the NIS status bit is not asserted for any RI/TI events for INTM=1. Signed-off-by: Wong, Vee Khee Co-developed-by: Voon Weife

[RESEND v1 net-next 4/5] stmmac: intel: add support for multi-vector msi and msi-x

2021-03-16 Thread Voon Weifeng
-vector interrupts. If it fails, then it will automatically fallback to request allocation for single interrupts. Signed-off-by: Ong Boon Leong Co-developed-by: Voon Weifeng Signed-off-by: Voon Weifeng --- .../net/ethernet/stmicro/stmmac/dwmac-intel.c | 112 +- 1 file changed

RE: [RESEND v1 net-next 3/5] net: stmmac: introduce MSI Interrupt routines for mac, safety, RX & TX

2021-03-24 Thread Voon, Weifeng
> On Tue, 16 Mar 2021 20:18:21 +0800 Voon Weifeng wrote: > > From: Ong Boon Leong > > > > Now we introduce MSI interrupt service routines and hook these > > routines up if stmmac_open() sees valid irq line being requested:- > > > > stmmac_mac_interrupt()

[PATCH v2 net-next 1/5] net: stmmac: introduce DMA interrupt status masking per traffic direction

2021-03-25 Thread Voon Weifeng
From: Ong Boon Leong In preparation to make stmmac support multi-vector MSI, we introduce the interrupt status masking according to RX, TX or RXTX. Default to use RXTX inside stmmac_dma_interrupt(), so there is no run-time logic difference now. Signed-off-by: Ong Boon Leong Signed-off-by: Voon

[PATCH v2 net-next 2/5] net: stmmac: make stmmac_interrupt() function more friendly to MSI

2021-03-25 Thread Voon Weifeng
From: Ong Boon Leong Refactor stmmac_interrupt() by introducing stmmac_common_interrupt() so that we prepare the ISR operation to be friendly to MSI later. Signed-off-by: Ong Boon Leong Signed-off-by: Voon Weifeng --- Changes: v1 -> v2 -Remove defensive check for invalid dev poin

[PATCH v2 net-next 3/5] net: stmmac: introduce MSI Interrupt routines for mac, safety, RX & TX

2021-03-25 Thread Voon Weifeng
ned-off-by: Ong Boon Leong Signed-off-by: Voon Weifeng --- Changes: v1 -> v2 - Refactor out a huge if statement into separate subfunctions. - Removed the netdev_info for every successful request of IRQs. - Return 0 for each successful request of IRQs. --- drivers/net/ethernet/stmicro/stmma

[PATCH v2 net-next 4/5] stmmac: intel: add support for multi-vector msi and msi-x

2021-03-25 Thread Voon Weifeng
-vector interrupts. If it fails, then it will automatically fallback to request allocation for single interrupts. Signed-off-by: Ong Boon Leong Co-developed-by: Voon Weifeng Signed-off-by: Voon Weifeng --- Changes: v1 -> v2 - Moved the msi tx/rx base vector check before alloc irq - Restuctu

[PATCH v2 net-next 0/5] net: stmmac: enable multi-vector MSI

2021-03-25 Thread Voon Weifeng
This patchset adds support for multi MSI interrupts in addition to current single common interrupt implementation. Each MSI interrupt is tied to a newly introduce interrupt service routine(ISR). Hence, each interrupt will only go through the corresponding ISR. In order to increase the efficiency,

[PATCH v2 net-next 5/5] net: stmmac: use interrupt mode INTM=1 for multi-MSI

2021-03-25 Thread Voon Weifeng
ch TX intr and RX intr (TI/RI) will be handled by TX/RX ISR without the need of calling the common MAC ISR. Updated the TX/RX NORMAL interrupts status checking process as the NIS status bit is not asserted for any RI/TI events for INTM=1. Signed-off-by: Wong, Vee Khee Co-developed-by: Voon Weife

[RESEND v3 net-next] net: stmmac: Enable EEE HW LPI timer with auto SW/HW switching

2020-10-27 Thread Voon Weifeng
the driver will fallback to SW timer. Signed-off-by: Vineetha G. Jaya Kumaran Signed-off-by: Voon Weifeng --- v3 changelog: -Changed stmmac_lpi_entry_timer_config() to static function v2 changelog: -removed #define for LPI_ET_ENABLE and LPI_ET_DISABLE and directly use literals -removed not require

[PATCH v1 net] net: stmmac: removed enabling eee in EEE set callback

2020-09-23 Thread Voon Weifeng
e58ad6 ("net: stmmac: Fix a race in EEE enable callback") Signed-off-by: Voon Weifeng --- .../net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 15 --- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c b/drive

RE: [PATCH v2 net-next] net: stmmac: Add support for MDIO interrupts

2019-09-04 Thread Voon, Weifeng
> On Wed, Sep 04, 2019 at 10:02:54PM +0800, Voon Weifeng wrote: > > From: "Chuah, Kim Tatt" > > > > DW EQoS v5.xx controllers added capability for interrupt generation > > when MDIO interface is done (GMII Busy bit is cleared). > > This patch adds su

[PATCH v1 net-next] stmmac: intel: Adding ref clock 1us tic for LPI cntr

2020-09-28 Thread Voon Weifeng
From: Rusaimi Amira Ruslan Adding reference clock (1us tic) for all LPI timer on Intel platforms. The reference clock is derived from ptp clk. This also enables all LPI counter. Signed-off-by: Rusaimi Amira Ruslan Signed-off-by: Voon Weifeng --- drivers/net/ethernet/stmicro/stmmac/dwmac

[PATCH v1 net] net: stmmac: Modify configuration method of EEE timers

2020-09-28 Thread Voon Weifeng
h is not correct. Hence, this patch fixes the the configuration of LPI TW timer via module parameters instead of ethtool. And, "ethtool --set-eee tx-timer" should configure EEE LPI timer. Fixes: d765955d2ae0 ("stmmac: add the Energy Efficient Ethernet support") Signed-off-by: Vin

[PATCH v2 net] net: stmmac: Modify configuration method of EEE timers

2020-10-01 Thread Voon Weifeng
"stmmac: add the Energy Efficient Ethernet support") Signed-off-by: Vineetha G. Jaya Kumaran Signed-off-by: Voon Weifeng Changelog V2 *Not removing/modifying the eee_timer. *EEE LPI timer can be configured through ethtool and also the eee_timer module param. *EEE TW Timer will be configure

[PATCH v1 net-next] net: stmmac: Enable EEE HW LPI timer with auto SW/HW auto switch

2020-10-06 Thread Voon Weifeng
the driver will fallback to SW timer. Signed-off-by: Vineetha G. Jaya Kumaran Signed-off-by: Voon Weifeng --- drivers/net/ethernet/stmicro/stmmac/common.h | 3 ++ drivers/net/ethernet/stmicro/stmmac/dwmac4.h | 2 ++ .../net/ethernet/stmicro/stmmac/dwmac4_core.c | 24 +++ drivers/ne

[PATCH v1 net-next] net: stmmac: Enable EEE HW LPI timer with auto SW/HW switching

2020-10-06 Thread Voon Weifeng
the driver will fallback to SW timer. Signed-off-by: Vineetha G. Jaya Kumaran Signed-off-by: Voon Weifeng --- drivers/net/ethernet/stmicro/stmmac/common.h | 3 ++ drivers/net/ethernet/stmicro/stmmac/dwmac4.h | 2 ++ .../net/ethernet/stmicro/stmmac/dwmac4_core.c | 24 ++ drivers/ne

RE: [PATCH v1 net-next] net: stmmac: Enable EEE HW LPI timer with auto SW/HW auto switch

2020-10-06 Thread Voon, Weifeng
imer supported range. > Else, the driver will fallback to SW timer. > > Signed-off-by: Vineetha G. Jaya Kumaran > Signed-off-by: Voon Weifeng > --- Please drop this patch. Sorry for accidentally sending out this patch.