* [PATCH (net.git) 1/2] stmmac: fix rx checksum programming @ 2014-08-25 12:56 Giuseppe Cavallaro 2014-08-25 12:56 ` [PATCH (net.git) 2/2] stmmac: set ptp_clock to NULL while unregister Giuseppe Cavallaro 2014-08-25 22:33 ` [PATCH (net.git) 1/2] stmmac: fix rx checksum programming David Miller 0 siblings, 2 replies; 4+ messages in thread From: Giuseppe Cavallaro @ 2014-08-25 12:56 UTC (permalink / raw) To: netdev; +Cc: Giuseppe Cavallaro This patch is to fix the IPC bit into the GMAC control register that must be done after the core initialization otherwise it will not have any effect. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 13 ++++++------- 1 files changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 08addd6..51a89d4 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -1637,6 +1637,12 @@ static int stmmac_hw_setup(struct net_device *dev) /* Initialize the MAC Core */ priv->hw->mac->core_init(priv->hw, dev->mtu); + ret = priv->hw->mac->rx_ipc(priv->hw); + if (!ret) { + pr_warn(" RX IPC Checksum Offload disabled\n"); + priv->plat->rx_coe = STMMAC_RX_COE_NONE; + } + /* Enable the MAC Rx/Tx */ stmmac_set_mac(priv->ioaddr, true); @@ -2592,7 +2598,6 @@ static const struct net_device_ops stmmac_netdev_ops = { */ static int stmmac_hw_init(struct stmmac_priv *priv) { - int ret; struct mac_device_info *mac; /* Identify the MAC HW device */ @@ -2649,12 +2654,6 @@ static int stmmac_hw_init(struct stmmac_priv *priv) /* To use alternate (extended) or normal descriptor structures */ stmmac_selec_desc_mode(priv); - ret = priv->hw->mac->rx_ipc(priv->hw); - if (!ret) { - pr_warn(" RX IPC Checksum Offload not configured.\n"); - priv->plat->rx_coe = STMMAC_RX_COE_NONE; - } - if (priv->plat->rx_coe) pr_info(" RX Checksum Offload Engine supported (type %d)\n", priv->plat->rx_coe); -- 1.7.4.4 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH (net.git) 2/2] stmmac: set ptp_clock to NULL while unregister 2014-08-25 12:56 [PATCH (net.git) 1/2] stmmac: fix rx checksum programming Giuseppe Cavallaro @ 2014-08-25 12:56 ` Giuseppe Cavallaro 2014-08-25 22:33 ` David Miller 2014-08-25 22:33 ` [PATCH (net.git) 1/2] stmmac: fix rx checksum programming David Miller 1 sibling, 1 reply; 4+ messages in thread From: Giuseppe Cavallaro @ 2014-08-25 12:56 UTC (permalink / raw) To: netdev; +Cc: Giuseppe Cavallaro This is to properly put to NULL the ptp_clock while un-register the PTP support. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> --- drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c index b7ad356..c5ee79d 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c @@ -206,6 +206,7 @@ void stmmac_ptp_unregister(struct stmmac_priv *priv) { if (priv->ptp_clock) { ptp_clock_unregister(priv->ptp_clock); + priv->ptp_clock = NULL; pr_debug("Removed PTP HW clock successfully on %s\n", priv->dev->name); } -- 1.7.4.4 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH (net.git) 2/2] stmmac: set ptp_clock to NULL while unregister 2014-08-25 12:56 ` [PATCH (net.git) 2/2] stmmac: set ptp_clock to NULL while unregister Giuseppe Cavallaro @ 2014-08-25 22:33 ` David Miller 0 siblings, 0 replies; 4+ messages in thread From: David Miller @ 2014-08-25 22:33 UTC (permalink / raw) To: peppe.cavallaro; +Cc: netdev From: Giuseppe Cavallaro <peppe.cavallaro@st.com> Date: Mon, 25 Aug 2014 14:56:19 +0200 > This is to properly put to NULL the ptp_clock while un-register the PTP support. > > Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Applied. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH (net.git) 1/2] stmmac: fix rx checksum programming 2014-08-25 12:56 [PATCH (net.git) 1/2] stmmac: fix rx checksum programming Giuseppe Cavallaro 2014-08-25 12:56 ` [PATCH (net.git) 2/2] stmmac: set ptp_clock to NULL while unregister Giuseppe Cavallaro @ 2014-08-25 22:33 ` David Miller 1 sibling, 0 replies; 4+ messages in thread From: David Miller @ 2014-08-25 22:33 UTC (permalink / raw) To: peppe.cavallaro; +Cc: netdev From: Giuseppe Cavallaro <peppe.cavallaro@st.com> Date: Mon, 25 Aug 2014 14:56:18 +0200 > This patch is to fix the IPC bit into the GMAC control register > that must be done after the core initialization otherwise it will > not have any effect. > > Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Applied. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-08-25 22:33 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-08-25 12:56 [PATCH (net.git) 1/2] stmmac: fix rx checksum programming Giuseppe Cavallaro 2014-08-25 12:56 ` [PATCH (net.git) 2/2] stmmac: set ptp_clock to NULL while unregister Giuseppe Cavallaro 2014-08-25 22:33 ` David Miller 2014-08-25 22:33 ` [PATCH (net.git) 1/2] stmmac: fix rx checksum programming David Miller
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox