An error occurred fetching the project authors.
- 30 May, 2018 1 commit
-
-
Niklas Cassel authored
[ Upstream commit a6b25da5 ] According to Documentation/memory-barriers.txt, we need to use a dma_rmb() after reading the status/own bit, to ensure that all descriptor fields are read after reading the own bit. This way, we ensure that the DMA engine is done with the DMA descriptor before we read the other descriptor fields, e.g. reading the tx hardware timestamp (if PTP is enabled). Signed-off-by:
Niklas Cassel <niklas.cassel@axis.com> Signed-off-by:
David S. Miller <davem@davemloft.net> Signed-off-by:
Sasha Levin <alexander.levin@microsoft.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 03 Mar, 2018 1 commit
-
-
Fredrik Hallenberg authored
[ Upstream commit a1762456 ] As noted in dwmac4_wrback_get_rx_timestamp_status the timestamp is found in the context descriptor following the current descriptor. However the current code looks for the context descriptor in the current descriptor, which will always fail. Signed-off-by:
Fredrik Hallenberg <megahallon@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net> Signed-off-by:
Sasha Levin <alexander.levin@verizon.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 17 Jan, 2018 1 commit
-
-
Jerome Brunet authored
[ Upstream commit 879626e3 ] Note in the databook - Section 4.4 - EEE : " The EEE feature is not supported when the MAC is configured to use the TBI, RTBI, SMII, RMII or SGMII single PHY interface. Even if the MAC supports multiple PHY interfaces, you should activate the EEE mode only when the MAC is operating with GMII, MII, or RGMII interface." Applying this restriction solves a stability issue observed on Amlogic gxl platforms operating with RMII interface and the internal PHY. Fixes: 83bf79b6 ("stmmac: disable at run-time the EEE if not supported") Signed-off-by:
Jerome Brunet <jbrunet@baylibre.com> Tested-by:
Arnaud Patard <arnaud.patard@rtp-net.org> Signed-off-by:
David S. Miller <davem@davemloft.net> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 17 Dec, 2017 1 commit
-
-
Lars Persson authored
[ Upstream commit 45ab4b13 ] The mss variable tracks the last max segment size sent to the TSO engine. We do not update the hardware as long as we receive skb:s with the same value in gso_size. During a network device down/up cycle (mapped to stmmac_release() and stmmac_open() callbacks) we issue a reset to the hardware and it forgets the setting for mss. However we did not zero out our mss variable so the next transmission of a gso packet happens with an undefined hardware setting. This triggers a hang in the TSO engine and eventuelly the netdev watchdog will bark. Fixes: f748be53 ("stmmac: support new GMAC4") Signed-off-by:
Lars Persson <larper@axis.com> Signed-off-by:
David S. Miller <davem@davemloft.net> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 22 Oct, 2017 3 commits
-
-
Bernd Edlinger authored
This is the possible reason for different hard to reproduce problems on my ARMv7-SMP test system. The symptoms are in recent kernels imprecise external aborts, and in older kernels various kinds of network stalls and unexpected page allocation failures. My testing indicates that the trouble started between v4.5 and v4.6 and prevails up to v4.14. Using the dirty_tx before acquiring the spin lock is clearly wrong and was first introduced with v4.6. Fixes: e3ad57c9 ("stmmac: review RX/TX ring management") Signed-off-by:
Bernd Edlinger <bernd.edlinger@hotmail.de> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Jose Abreu authored
When using GMAC4 the valid timestamp is from CTX next desc but we are passing the previous desc to get_rx_timestamp_status() callback. Fix this and while at it rework a little bit the function logic. Signed-off-by:
Jose Abreu <joabreu@synopsys.com> Cc: David S. Miller <davem@davemloft.net> Cc: Joao Pinto <jpinto@synopsys.com> Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com> Cc: Alexandre Torgue <alexandre.torgue@st.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Jose Abreu authored
When RX HW timestamp is enabled and a frame is discarded we are not freeing the skb but instead only setting to NULL the entry. Add a call to dev_kfree_skb_any() so that skb entry is correctly freed. Signed-off-by:
Jose Abreu <joabreu@synopsys.com> Cc: David S. Miller <davem@davemloft.net> Cc: Joao Pinto <jpinto@synopsys.com> Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com> Cc: Alexandre Torgue <alexandre.torgue@st.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 19 Jul, 2017 1 commit
-
-
Eugeniy Paltsev authored
Unconditional reset dwmac before HW init if reset controller is present. In existing implementation we reset dwmac only after second module probing: (module load -> unload -> load again [reset happens]) Now we reset dwmac at every module load: (module load [reset happens] -> unload -> load again [reset happens]) Also some reset controllers have only reset callback instead of assert + deassert callbacks pair, so handle this case. Signed-off-by:
Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 11 Jul, 2017 3 commits
-
-
Christophe Jaillet authored
'alloc_dma_[rt]x_desc_resources()' functions look very close. Remove a useless initialization and use the same label name for error handling path in order to get them even closer. Signed-off-by:
Christophe JAILLET <christophe.jaillet@wanadoo.fr> Acked-by:
Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Christophe Jaillet authored
If the first 'kmalloc_array' within the loop fails, we should free what as already been allocated, as done in all other error handling path. Fixes: ce736788 ("net: stmmac: adding multiple buffers for TX") Signed-off-by:
Christophe JAILLET <christophe.jaillet@wanadoo.fr> Acked-by:
Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Christophe Jaillet authored
If the first 'kmalloc_array' within the loop fails, we should free what as already been allocated, as done in all other error handling path. Fixes: 54139cf3 ("net: stmmac: adding multiple buffers for rx") Signed-off-by:
Christophe JAILLET <christophe.jaillet@wanadoo.fr> Acked-by:
Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 20 Jun, 2017 2 commits
-
-
Niklas Cassel authored
When having the skb pointer in the first descriptor, stmmac_tx_clean can get called at a moment where the IP has only cleared the own bit of the first descriptor, thus freeing the skb, even though there can be several descriptors whose buffers point into the same skb. By simply moving the skb pointer from the first descriptor to the last descriptor, a skb will get freed only when the IP has cleared the own bit of all the descriptors that are using that skb. Signed-off-by:
Niklas Cassel <niklas.cassel@axis.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Niklas Cassel authored
There is nothing in the IP that prevents us from enabling TSO for IPv6. Before patch: ftp fe80::2aa:bbff:fecc:1336%eth0 ftp> get /dev/zero 882512708 bytes received in 00:14 (56.11 MiB/s) After patch: ftp fe80::2aa:bbff:fecc:1336%eth0 ftp> get /dev/zero 1203326784 bytes received in 00:12 (94.52 MiB/s) Signed-off-by:
Niklas Cassel <niklas.cassel@axis.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 09 Jun, 2017 2 commits
-
-
Mario Molitor authored
1.) Bugfix of function stmmac_get_tx_hwtstamp. Corrected the tx timestamp available check (same as 4.8 and older) Change printout from info syslevel to debug. 2.) Bugfix of function stmmac_get_rx_hwtstamp. Corrected the rx timestamp available check (same as 4.8 and older) Change printout from info syslevel to debug. Fixes: ba1ffd74 ("stmmac: fix PTP support for GMAC4") Signed-off-by:
Mario Molitor <mario_molitor@web.de> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Mario Molitor authored
According the CYCLON V documention only the bit 16 of snaptypesel should set. (more information see Table 17-20 (cv_5v4.pdf) : Timestamp Snapshot Dependency on Register Bits) Fixes: d2042052 ("stmmac: update the PTP header file") Signed-off-by:
Mario Molitor <mario_molitor@web.de> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 06 Jun, 2017 3 commits
-
-
Colin Ian King authored
The check that queue is less or equal to zero is always true because queue is a u32; queue is decremented and will wrap around and never go -ve. Fix this by making queue an int. Detected by CoverityScan, CID#1428988 ("Unsigned compared against 0") Signed-off-by:
Colin Ian King <colin.king@canonical.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Niklas Cassel authored
stmmac_tso_allocator can fail to set the Last Descriptor bit on a descriptor that actually was the last descriptor. This happens when the buffer of the last descriptor ends up having a size of exactly TSO_MAX_BUFF_SIZE. When the IP eventually reaches the next last descriptor, which actually has the bit set, the DMA will hang. When the DMA hangs, we get a tx timeout, however, since stmmac does not do a complete reset of the IP in stmmac_tx_timeout, we end up in a state with completely hung TX. Signed-off-by:
Niklas Cassel <niklas.cassel@axis.com> Acked-by:
Giuseppe Cavallaro <peppe.cavallaro@st.com> Acked-by:
Alexandre TORGUE <alexandre.torgue@st.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Colin Ian King authored
The current comparison of entry < 0 will never be true since entry is an unsigned integer. Make entry an int to ensure -ve error return values from the call to jumbo_frm are correctly being caught. Detected by CoverityScan, CID#1238760 ("Macro compares unsigned to 0") Signed-off-by:
Colin Ian King <colin.king@canonical.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 01 Jun, 2017 2 commits
-
-
LABBE Corentin authored
The dwmac-sun8i is a heavy hacked version of stmmac hardware by allwinner. In fact the only common part is the descriptor management and the first register function. Signed-off-by:
Corentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
LABBE Corentin authored
Instead of adding more ifthen logic for adding a new mac_device_info setup function, it is easier to add a function pointer to the function needed. Signed-off-by:
Corentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 25 May, 2017 5 commits
-
-
LABBE Corentin authored
The current stmmac_adjust_link() part which handle speed have some if (has_platform) code and my dwmac-sun8i will add more of them. So we need to handle better speed selection. Moreover the struct link member speed and port are hard to guess their purpose. And their unique usage are to be combined for writing speed. So this patch replace speed/port by simpler speed10/speed100/speed1000/speed_mask variables. In dwmac4_core_init and dwmac1000_core_init, port/speed value was used directly without using the struct link. This patch convert also their usage to speedxxx. Signed-off-by:
Corentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
LABBE Corentin authored
This patch convert old_link from int to bool since it store only 1 or 0 Signed-off-by:
Corentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
LABBE Corentin authored
Signed-off-by:
Corentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
LABBE Corentin authored
Signed-off-by:
Corentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
LABBE Corentin authored
This patch convert new_state from int to bool since it store only 1 or 0 Signed-off-by:
Corentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 21 May, 2017 2 commits
-
-
Miroslav Lichvar authored
Some drivers were calling the skb_tx_timestamp() function only when a hardware timestamp was not requested. Now that applications can use the SOF_TIMESTAMPING_OPT_TX_SWHW option to request both software and hardware timestamps, the drivers need to be modified to unconditionally call skb_tx_timestamp(). CC: Richard Cochran <richardcochran@gmail.com> CC: Willem de Bruijn <willemb@google.com> Signed-off-by:
Miroslav Lichvar <mlichvar@redhat.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Miroslav Lichvar authored
Include HWTSTAMP_FILTER_NTP_ALL in net_hwtstamp_validate() as a valid filter and update drivers which can timestamp all packets, or which explicitly list unsupported filters instead of using a default case, to handle the filter. CC: Richard Cochran <richardcochran@gmail.com> CC: Willem de Bruijn <willemb@google.com> Signed-off-by:
Miroslav Lichvar <mlichvar@redhat.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 15 May, 2017 1 commit
-
-
Niklas Cassel authored
There are two pointers in sysfs_display_ring, one that increments if using normal dma descriptors, another if using extended dma descriptors. When printing the normal dma descriptors, the wrong pointer is used, thus the printed descriptor addresses are incorrect. Signed-off-by:
Niklas Cassel <niklas.cassel@axis.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 13 Apr, 2017 1 commit
-
-
Niklas Cassel authored
Field FL/TPL in register TDES3 is not correctly set on GMAC4. TX appears to be functional on GMAC 4.10a even if this field is not set, however, to avoid relying on undefined behavior, set the length in TDES3. The field has a different meaning depending on if the TSE bit in TDES3 is set or not (TSO). However, regardless of the TSE bit, the field is not optional. The field is already set correctly when the TSE bit is set. Since there is no limit for the number of descriptors that can be used for a single packet, the field should be set to the sum of the buffers contained in: [<desc with First Descriptor bit set> ... <desc n> ... <desc with Last Descriptor bit set>], which should be equal to skb->len. Signed-off-by:
Niklas Cassel <niklas.cassel@axis.com> Acked-by:
Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 12 Apr, 2017 1 commit
-
-
Joao Pinto authored
In the submission of the lastest multiple buffer patch set, this fix was lost. I am sending this patch to put it right again. The fix was originally proposed by Arnd Bergmann. Signed-off-by:
Arnd Bergmann <arnd@arndb.de> Signed-off-by:
Joao Pinto <jpinto@synopsys.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 07 Apr, 2017 4 commits
-
-
Joao Pinto authored
This patch adds the napi variable to the stmmac_rx_queue structure and forces that operations like netif_queue_stopped, netif_wake_queue, netif_stop_queue, netdev_reset_queue and netdev_sent_queue be made by queue. Signed-off-by:
Joao Pinto <jpinto@synopsys.com> Tested-by:
Niklas Cassel <niklas.cassel@axis.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Joao Pinto authored
This patch adds the structure stmmac_tx_queue which contains tx queues specific data (previously in stmmac_priv). Signed-off-by:
Joao Pinto <jpinto@synopsys.com> Tested-by:
Niklas Cassel <niklas.cassel@axis.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Joao Pinto authored
This patch adds the structure stmmac_rx_queue which contains rx queues specific data (previously in stmmac_priv). Signed-off-by:
Joao Pinto <jpinto@synopsys.com> Tested-by:
Niklas Cassel <niklas.cassel@axis.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Joao Pinto authored
This patch breaks several functions into RX and TX scopes, which will be useful when adding multiple buffers mechanism. Signed-off-by:
Joao Pinto <jpinto@synopsys.com> Tested-by:
Niklas Cassel <niklas.cassel@axis.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 05 Apr, 2017 1 commit
-
-
Joao Pinto authored
In hardware configurations where multiple queues are active, the rx queue needs to be mapped into a dma channel, even if a single rx queue is used. Signed-off-by:
Joao Pinto <jpinto@synopsys.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 03 Apr, 2017 1 commit
-
-
Joao Pinto authored
Sending again, because forgot to include net-dev. The QoS IP does not accept AVB capabilities to default/queue 0, this way we guarantee 75% bandwidth for AVB. This patch assures that only queues >= 1 gets CBS confgured. Additional info was also added to stmmac.txt. Reported-by:
Niklas Cassel <niklas.cassel@axis.com> Signed-off-by:
Joao Pinto <jpinto@synopsys.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 30 Mar, 2017 1 commit
-
-
LABBE Corentin authored
The commit aff3d9ef ("net: stmmac: enable multiple buffers") breaks numerous boards. while some patch exists for fixing some of it, dwmac-sunxi is still broken with it. Since this patch is very huge, it will be better to split it in smaller part. Signed-off-by:
Corentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 29 Mar, 2017 1 commit
-
-
Arnd Bergmann authored
A driver must not access the two fields directly but should instead use the helper functions to set the values and keep a consistent internal state: ethernet/stmicro/stmmac/stmmac_main.c: In function 'stmmac_dvr_probe': ethernet/stmicro/stmmac/stmmac_main.c:4083:8: error: 'struct net_device' has no member named 'real_num_rx_queues'; did you mean 'real_num_tx_queues'? Fixes: a8f5102a ("net: stmmac: TX and RX queue priority configuration") Signed-off-by:
Arnd Bergmann <arnd@arndb.de> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 24 Mar, 2017 1 commit
-
-
LABBE Corentin authored
Two different set_mac functions exists but stmmac_dwmac4_set_mac() is only used for enabling and never for disabling. So on dwmac4, the MAC RX/TX is never disabled. This patch add a generic function pointer set_mac() to stmmac_ops and replace all call to stmmac_set_mac/stmmac_dwmac4_set_mac by a call to this pointer. Since dwmac4_ops is const, set_mac cannot be modified after, and so dwmac4_ops is duplioacted like dwmac4_dma_ops. Signed-off-by:
Corentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- 22 Mar, 2017 1 commit
-
-
Joao Pinto authored
The dma operation mode configuration routine was wrongly moved to a function (stmmac_mtl_configuration) that is only executed if the core version is >= 4.00. Fixes: 6deee222 ("net: stmmac: prepare dma op mode config for multiple queues") Reported-by:
Corentin Labbe <clabbe.montjoie@gmail.com> Reviewed-by:
Thierry Reding <thierry.reding@gmail.com> Signed-off-by:
Joao Pinto <jpinto@synopsys.com> Tested-by:
Corentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-