- 16 Nov, 2016 2 commits
-
-
Florian Fainelli authored
Utilize the generic phy_ethtool_nway_reset() helper function to implement an autonegotiation restart. Signed-off-by:
Florian Fainelli <f.fainelli@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Michael Weiser authored
The stmmac driver does not take into account the processor may be big endian when writing the DMA descriptors. This causes the ethernet interface not to be initialised correctly when running a big-endian kernel. Change the descriptors for DMA to use __le32 and ensure they are suitably swapped before writing. Tested successfully on the Cubieboard2. Signed-off-by:
Michael Weiser <michael.weiser@gmx.de> Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com> Cc: Alexandre Torgue <alexandre.torgue@st.com> Cc: netdev@vger.kernel.org Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 14 Nov, 2016 1 commit
-
-
Florian Fainelli authored
Commit 52f95bbf ("stmmac: fix adjust link call in case of a switch is attached") added some logic to avoid polling the fixed PHY and therefore invoking the adjust_link callback more than once, since this is a fixed PHY and link events won't be generated. This works fine the first time, because we start with phydev->irq = PHY_POLL, so we call adjust_link, then we set phydev->irq = PHY_IGNORE_INTERRUPT and we stop polling the PHY. Now, if we called ndo_close(), which calls both phy_stop() and does an explicit netif_carrier_off(), we end up with a link down. Upon calling ndo_open() again, despite starting the PHY state machine, we have PHY_IGNORE_INTERRUPT set, and we generate no link event at all, so the link is permanently down. Fixes: 52f95bbf ("stmmac: fix adjust link call in case of a switch is attached") Signed-off-by:
Florian Fainelli <f.fainelli@gmail.com> Acked-by:
Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 09 Nov, 2016 4 commits
-
-
Joachim Eastwood authored
Instead of adding hooks inside stmmac_platform it is better to just use the standard PM callbacks within the specific dwmac-driver. This only used by the dwmac-rk driver. This reverts commit cecbc556 ("stmmac: allow to split suspend/resume from init/exit callbacks"). Signed-off-by:
Joachim Eastwood <manabian@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Joachim Eastwood authored
Since the rk_gmac_init() only calls another function move this function call into probe so rk_gmac_init() can be removed. Since commit cecbc556 ("stmmac: allow to split suspend/resume from init/exit callbacks") the init hook is no longer used in dwmac-rk so this can be removed. Signed-off-by:
Joachim Eastwood <manabian@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Joachim Eastwood authored
Convert the exit hook into a standard driver remove function as the hook doesn't really buy us anything extra. Eventually the exit hook will be deprecated in favor of the driver remove function. Signed-off-by:
Joachim Eastwood <manabian@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Joachim Eastwood authored
Use standard PM resume/suspend callbacks instead of the hooks in stmmac_platform. This gives the driver more control and flexibility when implementing PM functionality. The hooks in stmmac_platform also doesn't buy us anything extra. Signed-off-by:
Joachim Eastwood <manabian@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 07 Nov, 2016 7 commits
-
-
Joachim Eastwood authored
The dev member of struct sti_dwmac is not used anywhere in the driver so lets just remove it. Signed-off-by:
Joachim Eastwood <manabian@gmail.com> Acked-by:
Giuseppe Cavallaro <peppe.cavallaro@st.com> Tested-by:
Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Joachim Eastwood authored
Rename sti_dwmac_init to sti_dwmac_set_mode which is a better description for what it really does. Signed-off-by:
Joachim Eastwood <manabian@gmail.com> Acked-by:
Giuseppe Cavallaro <peppe.cavallaro@st.com> Tested-by:
Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Joachim Eastwood authored
Add clock error handling to probe and in the process move clock enabling out of sti_dwmac_init() to make this easier. Signed-off-by:
Joachim Eastwood <manabian@gmail.com> Acked-by:
Giuseppe Cavallaro <peppe.cavallaro@st.com> Tested-by:
Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Joachim Eastwood authored
The sti_dwmac_init() function is called both from probe and resume. Since DT properties doesn't change between suspend/resume cycles move parsing of this parameter into sti_dwmac_parse_data() where it belongs. Signed-off-by:
Joachim Eastwood <manabian@gmail.com> Acked-by:
Giuseppe Cavallaro <peppe.cavallaro@st.com> Tested-by:
Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Joachim Eastwood authored
Implement PM callbacks and driver remove in the driver instead of relying on the init/exit hooks in stmmac_platform. This gives the driver more flexibility in how the code is organized. Eventually the init/exit callbacks will be deprecated in favor of the standard PM callbacks and driver remove function. Signed-off-by:
Joachim Eastwood <manabian@gmail.com> Acked-by:
Giuseppe Cavallaro <peppe.cavallaro@st.com> Tested-by:
Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Joachim Eastwood authored
Since sti_dwmac_parse_data() sets dwmac->clk to NULL if not clock was provided in DT and NULL is a valid clock there is no need to check for NULL before using this clock. Signed-off-by:
Joachim Eastwood <manabian@gmail.com> Acked-by:
Giuseppe Cavallaro <peppe.cavallaro@st.com> Tested-by:
Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Joachim Eastwood authored
Since dwmac-sti is a DT only driver checking for OF node is not necessary. Signed-off-by:
Joachim Eastwood <manabian@gmail.com> Acked-by:
Giuseppe Cavallaro <peppe.cavallaro@st.com> Tested-by:
Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 03 Nov, 2016 1 commit
-
-
Neil Armstrong authored
Add Synopsys Designware MAC Glue layer for the Oxford Semiconductor OX820. Acked-by:
Joachim Eastwood <manabian@gmail.com> Signed-off-by:
Neil Armstrong <narmstrong@baylibre.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 20 Oct, 2016 1 commit
-
-
Giuseppe CAVALLARO authored
It makes sense to display the descriptors even if DES0 is zero. This helps for example in case of it is needed to dump rx write-back descriptors to get timestamp status. Signed-off-by:
Giuseppe Cavallaro <peppe.cavallaro@st.com> Cc: Alexandre TORGUE <alexandre.torgue@st.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 19 Oct, 2016 1 commit
-
-
Giuseppe CAVALLARO authored
The commit commit 7086605a ("stmmac: fix error check when init ptp") breaks the procedure added by the commit efee95f4 ("ptp_clock: future-proofing drivers against PTP subsystem becoming optional") So this patch tries to re-import the logic added by the latest commit above: it makes sense to have the stmmac_ptp_register as void function and, inside the main, the stmmac_init_ptp can fails in case of the capability cannot be supported by the HW. Signed-off-by:
Giuseppe Cavallaro <peppe.cavallaro@st.com> Cc: Alexandre TORGUE <alexandre.torgue@st.com> Cc: Rayagond Kokatanur <rayagond@vayavyalabs.com> Cc: Dan Carpenter <dan.carpenter@oracle.com> Cc: Nicolas Pitre <nico@linaro.org> Acked-by:
Nicolas Pitre <nico@linaro.org> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 18 Oct, 2016 1 commit
-
-
Jarod Wilson authored
et131x: min_mtu 64, max_mtu 9216 altera_tse: min_mtu 64, max_mtu 1500 amd8111e: min_mtu 60, max_mtu 9000 bnad: min_mtu 46, max_mtu 9000 macb: min_mtu 68, max_mtu 1500 or 10240 depending on hardware capability xgmac: min_mtu 46, max_mtu 9000 cxgb2: min_mtu 68, max_mtu 9582 (pm3393) or 9600 (vsc7326) enic: min_mtu 68, max_mtu 9000 gianfar: min_mtu 50, max_mu 9586 hns_enet: min_mtu 68, max_mtu 9578 (v1) or 9706 (v2) ksz884x: min_mtu 60, max_mtu 1894 myri10ge: min_mtu 68, max_mtu 9000 natsemi: min_mtu 64, max_mtu 2024 nfp: min_mtu 68, max_mtu hardware-specific forcedeth: min_mtu 64, max_mtu 1500 or 9100, depending on hardware pch_gbe: min_mtu 46, max_mtu 10300 pasemi_mac: min_mtu 64, max_mtu 9000 qcaspi: min_mtu 46, max_mtu 1500 - remove qcaspi_netdev_change_mtu as it is now redundant rocker: min_mtu 68, max_mtu 9000 sxgbe: min_mtu 68, max_mtu 9000 stmmac: min_mtu 46, max_mtu depends on hardware tehuti: min_mtu 60, max_mtu 16384 - driver had no max mtu checking, but product docs say 16k jumbo packets are supported by the hardware netcp: min_mtu 68, max_mtu 9486 - remove netcp_ndo_change_mtu as it is now redundant via-velocity: min_mtu 64, max_mtu 9000 octeon: min_mtu 46, max_mtu 65370 CC: netdev@vger.kernel.org CC: Mark Einon <mark.einon@gmail.com> CC: Vince Bridgers <vbridger@opensource.altera.com> CC: Rasesh Mody <rasesh.mody@qlogic.com> CC: Nicolas Ferre <nicolas.ferre@atmel.com> CC: Santosh Raspatur <santosh@chelsio.com> CC: Hariprasad S <hariprasad@chelsio.com> CC: Christian Benvenuti <benve@cisco.com> CC: Sujith Sankar <ssujith@cisco.com> CC: Govindarajulu Varadarajan <_govind@gmx.com> CC: Neel Patel <neepatel@cisco.com> CC: Claudiu Manoil <claudiu.manoil@freescale.com> CC: Yisen Zhuang <yisen.zhuang@huawei.com> CC: Salil Mehta <salil.mehta@huawei.com> CC: Hyong-Youb Kim <hykim@myri.com> CC: Jakub Kicinski <jakub.kicinski@netronome.com> CC: Olof Johansson <olof@lixom.net> CC: Jiri Pirko <jiri@resnulli.us> CC: Byungho An <bh74.an@samsung.com> CC: Girish K S <ks.giri@samsung.com> CC: Vipul Pandya <vipul.pandya@samsung.com> CC: Giuseppe Cavallaro <peppe.cavallaro@st.com> CC: Alexandre Torgue <alexandre.torgue@st.com> CC: Andy Gospodarek <andy@greyhouse.net> CC: Wingman Kwok <w-kwok2@ti.com> CC: Murali Karicheri <m-karicheri2@ti.com> CC: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by:
Jarod Wilson <jarod@redhat.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 15 Oct, 2016 1 commit
-
-
Dan Carpenter authored
PTR_ERR(NULL) is success. We have to preserve the error code earlier. Fixes: 7086605a ("stmmac: fix error check when init ptp") Signed-off-by:
Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 13 Oct, 2016 2 commits
-
-
Giuseppe CAVALLARO authored
This patch fixes a problem when propagated the failure of ptp_clock_register to open function. Signed-off-by:
Giuseppe Cavallaro <peppe.cavallaro@st.com> Cc: Alexandre TORGUE <alexandre.torgue@st.com> Cc: Rayagond Kokatanur <rayagond@vayavyalabs.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Giuseppe CAVALLARO authored
The gmac 4.x version has not extended descriptors (that are available on 3.x instead of). While initializing the PTP module, the advanced PTP was enabled in case of extended descriptors. This cannot be applied for 4.x version where only the hardware capability register has to show if the feature is present. Patch also adds some extra netdev_(debug/inof) to better dump the configuration. Signed-off-by:
Giuseppe Cavallaro <peppe.cavallaro@st.com> Cc: Alexandre TORGUE <alexandre.torgue@st.com> Cc: Rayagond Kokatanur <rayagond@vayavyalabs.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 12 Oct, 2016 2 commits
-
-
Philippe Reynes authored
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by:
Philippe Reynes <tremyfr@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Philippe Reynes authored
The private structure contain a pointer to phydev, but the structure net_device already contain such pointer. So we can remove the pointer phydev in the private structure, and update the driver to use the one contained in struct net_device. Signed-off-by:
Philippe Reynes <tremyfr@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 22 Sep, 2016 1 commit
-
-
Nicolas Pitre authored
Drivers must be ready to accept NULL from ptp_clock_register() if the PTP clock subsystem is configured out. This patch documents that and ensures that all drivers cope well with a NULL return. Signed-off-by:
Nicolas Pitre <nico@linaro.org> Reviewed-by:
Eugenia Emantayev <eugenia@mellanox.com> Acked-by:
Richard Cochran <richardcochran@gmail.com> Acked-by:
Edward Cree <ecree@solarflare.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 19 Sep, 2016 1 commit
-
-
Giuseppe CAVALLARO authored
MAC devices use the RWKPKTEN and MGKPKTEN bits of the PMT Control/Status register to generate power management events. So this patch is to properly set the RWKPKTEN [BIT(2)] inside the PMT register (needed in case of global unicast). Reported-by:
Aditi SHARMA <aditi-hed.sharma@st.com> Signed-off-by:
Giuseppe Cavallaro <peppe.cavallaro@st.com> Cc: Alexandre TORGUE <alexandre.torgue@st.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 13 Sep, 2016 2 commits
-
-
Wei Yongjun authored
Fixes the following sparse warning: drivers/net/ethernet/stmicro/stmmac/dwmac-stm32.c:172:1: warning: symbol 'stm32_dwmac_pm_ops' was not declared. Should it be static? Signed-off-by:
Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Javier Martinez Canillas authored
The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either built-in or as a module, use that macro instead of open coding the same. Using the macro makes the code more readable by helping abstract away some of the Kconfig built-in and module enable details. Signed-off-by:
Javier Martinez Canillas <javier@osg.samsung.com> Reviewed-by:
Alexandre TORGUE <alexandre.torgue@st.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 07 Sep, 2016 3 commits
-
-
Martin Blumenstingl authored
The dwmac-meson glue driver supports Meson6 and Meson8 SoCs. Newer SoCs are supported by the dwmac-meson8b driver. Signed-off-by:
Martin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by:
Kevin Hilman <khilman@baylibre.com>
-
Martin Blumenstingl authored
The Ethernet controller available in Meson8b and GXBB SoCs is a Synopsys DesignWare MAC IP core which is already supported by the stmmac driver. In addition to the standard stmmac driver some Meson8b / GXBB specific registers have to be configured for the PHY clocks. These SoC specific registers are called PRG_ETHERNET_ADDR0 and PRG_ETHERNET_ADDR1 in the datasheet. These registers are not backwards compatible with those on Meson 6b, which is why a new glue driver is introduced. This worked for many boards because the bootloader programs the PRG_ETHERNET registers correctly. Additionally the meson6-dwmac driver only sets bit 1 of PRG_ETHERNET_ADDR0 which (according to the datasheet) is only used during reset. Currently all configuration values can be determined automatically, based on the configured phy-mode (which is mandatory for the stmmac driver). If required the tx-delay and the mux clock (so it supports the MPLL2 clock as well) can be made configurable in the future. Signed-off-by:
Martin Blumenstingl <martin.blumenstingl@googlemail.com> Tested-by:
Kevin Hilman <khilman@baylibre.com> Acked-by:
David S. Miller <davem@davemloft.net> Signed-off-by:
Kevin Hilman <khilman@baylibre.com>
-
Joachim Eastwood authored
Create a helper to retrieve dwmac private data from a dev pointer. This is useful in PM callbacks and driver remove. Signed-off-by:
Joachim Eastwood <manabian@gmail.com> Tested-by:
Martin Blumenstingl <martin.blumenstingl@googlemail.com> Acked-by:
David S. Miller <davem@davemloft.net> Signed-off-by:
Kevin Hilman <khilman@baylibre.com>
-
- 03 Sep, 2016 3 commits
-
-
David Wu authored
Add the gmac power domain support for rk3399, in order to save more power consumption. Signed-off-by:
David Wu <david.wu@rock-chips.com> Signed-off-by:
Caesar Wang <wxt@rock-chips.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Roger Chen authored
GMAC Power Domain(PD) will be disabled during suspend. That will causes GRF registers reset. So corresponding GRF registers for GMAC must be setup again. Signed-off-by:
Roger Chen <roger.chen@rock-chips.com> Signed-off-by:
Caesar Wang <wxt@rock-chips.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Roger Chen authored
Add constants and callback functions for the dwmac on rk3228/rk3229 socs. As can be seen, the base structure is the same, only registers and the bits in them moved slightly. Signed-off-by:
Roger Chen <roger.chen@rock-chips.com> Signed-off-by:
Caesar Wang <wxt@rock-chips.com> Reviewed-by:
Heiko Stuebner <heiko@sntech.de> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 01 Sep, 2016 2 commits
-
-
Alexandre TORGUE authored
Adds support of Synopsys 3.50a MAC IP in stmmac driver. Acked-by:
Giuseppe Cavallaro <peppe.cavallaro@st.com> Tested-by:
Maxime Coquelin <maxime.coquelin@st.com> Signed-off-by:
Alexandre TORGUE <alexandre.torgue@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Alexandre TORGUE authored
stm324xx family chips support Synopsys MAC 3.510 IP. This patch adds settings for logical glue logic: -clocks -mode selection MII or RMII. Reviewed-by:
Joachim Eastwood <manabian@gmail.com> Acked-by:
Giuseppe Cavallaro <peppe.cavallaro@st.com> Tested-by:
Maxime Coquelin <maxime.coquelin@st.com> Signed-off-by:
Alexandre TORGUE <alexandre.torgue@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 31 Aug, 2016 1 commit
-
-
Colin Ian King authored
Trivial fix to spelling mistake in dev_warn message. Signed-off-by:
Colin Ian King <colin.king@canonical.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 02 Aug, 2016 2 commits
-
-
Peter Chen authored
of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using. This commit fixes both local (in stmmac_axi_setup) and global (plat->phy_node) device_node for this issue, and using the correct device node when tries to put node at stmmac_probe_config_dt for error path. Signed-off-by:
Peter Chen <peter.chen@nxp.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Peter Chen authored
of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using. Signed-off-by:
Peter Chen <peter.chen@nxp.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 14 Jul, 2016 1 commit
-
-
Wei Yongjun authored
There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Signed-off-by:
Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 12 Jul, 2016 1 commit
-
-
Wei Yongjun authored
PTR_ERR should access the value just tested by IS_ERR, otherwise the wrong error code will be returned. Signed-off-by:
Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by:
David S. Miller <davem@davemloft.net>
-