aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/altera/altera_sgdma.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-05-30treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 201Thomas Gleixner1-12/+1
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms and conditions of the gnu general public license version 2 as published by the free software foundation this program is distributed in the hope it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details you should have received a copy of the gnu general public license along with this program if not see http www gnu org licenses extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 228 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Steve Winslow <swinslow@gmail.com> Reviewed-by: Richard Fontana <rfontana@redhat.com> Reviewed-by: Alexios Zavras <alexios.zavras@intel.com> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190528171438.107155473@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-12net: eth: altera: Remove sgdmadesclen member from altera_tse_privateTobias Klauser1-5/+3
altera_tse_private->sgdmadesclen is always assigned assigned the same value and never changes during runtime. Remove the struct member and use a new define for sizeof(struct sgdma_descrip) instead. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-05-24Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-89/+90
Conflicts: drivers/net/bonding/bond_alb.c drivers/net/ethernet/altera/altera_msgdma.c drivers/net/ethernet/altera/altera_sgdma.c net/ipv6/xfrm6_output.c Several cases of overlapping changes. The xfrm6_output.c has a bug fix which overlaps the renaming of skb->local_df to skb->ignore_df. In the Altera TSE driver cases, the register access cleanups in net-next overlapped with bug fixes done in net. Similarly a bug fix to send ALB packets in the bonding driver using the right source address overlaps with cleanups in net-next. Signed-off-by: David S. Miller <davem@davemloft.net>
2014-05-15Altera TSE: Fix sparse errors and warningsVince Bridgers1-91/+90
This patch fixes the many sparse errors and warnings contained in the initial submission of the Altera Triple Speed Ethernet driver, and a few minor cppcheck warnings. Changes are tested on ARM and NIOS2 example designs, and compile tested against multiple architectures. Typical issues addressed were as follows: altera_tse_ethtool.c:136:19: warning: incorrect type in argument 1 (different address spaces) altera_tse_ethtool.c:136:19: expected void const volatile [noderef] <asn:2>*addr altera_tse_ethtool.c:136:19: got unsigned int *<noident> ... altera_sgdma.c:129:31: warning: cast removes address space of expression Signed-off-by: Vince Bridgers <vbridgers2013@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-05-12Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-73/+106
Conflicts: drivers/net/ethernet/altera/altera_sgdma.c net/netlink/af_netlink.c net/sched/cls_api.c net/sched/sch_api.c The netlink conflict dealt with moving to netlink_capable() and netlink_ns_capable() in the 'net' tree vs. supporting 'tc' operations in non-init namespaces. These were simple transformations from netlink_capable to netlink_ns_capable. The Altera driver conflict was simply code removal overlapping some void pointer cast cleanups in net-next. Signed-off-by: David S. Miller <davem@davemloft.net>
2014-04-30Altera TSE: Fix DMA secriptor length initializationTobias Klauser1-37/+37
sgdma_descrip is a function name as well as the name of a struct. In sgdma_initialize(), we should initialize the descriptor length field with the actual length of a descriptor not with the size of the function. In order to prevent such things from happening in the future, rename the function to sgdma_setup_descrip(). Found by sparse which yields the following warning: drivers/net/ethernet/altera/altera_sgdma.c:74:30: warning: expression using sizeof on a function Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-04-26Altera TSE: Work around unaligned DMA receive packet issue with Altera SGDMAVince Bridgers1-36/+69
This patch works around a recently discovered unaligned receive dma problem with the Altera SGMDA. The Altera SGDMA component cannot be configured to DMA data to unaligned addresses for receive packet operations from the Triple Speed Ethernet component because of a potential data transfer corruption that can occur. This patch addresses this issue by utilizing the shift 16 bits feature of the Altera Triple Speed Ethernet component and modifying the receive buffer physical addresses accordingly such that the target receive DMA address is always aligned on a 32-bit boundary. Signed-off-by: Vince Bridgers <vbridgers2013@gmail.com> Tested-by: Matthew Gerlach <mgerlach@altera.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-04-24Altera TSE: Remove unnecessary cast of void pointersTobias Klauser1-20/+17
No need to cast void pointers. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-03-24Altera TSE: Correct two typos in original submissionVince Bridgers1-3/+3
This patch addresses two typos in the original driver submission. One derived from a cut & paste error, and another is a misspelling. Signed-off-by: Vince Bridgers <vbridgers2013@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-03-24Altera TSE: Correct typecast issue detected by kbuild test robotVince Bridgers1-6/+4
This patch addresses a portable pointer arithmetic issue in the original submission found by the kbuild test robot. config: make ARCH=i386 allyesconfig altera_sgdma.c: In function 'sgdma_txphysaddr': >> altera_sgdma.c:393:33: warning: cast from >> pointer to integer of different size [-Wpointer-to-int-cast] dma_addr_t offs = (dma_addr_t)((dma_addr_t)desc - ^ >> altera_sgdma.c:394:5: warning: cast from >> pointer to integer of different size [-Wpointer-to-int-cast] (dma_addr_t)priv->tx_dma_desc); ^ altera_sgdma.c: In function 'sgdma_rxphysaddr': >> altera_sgdma.c:403:33: warning: cast from >> pointer to integer of different size [-Wpointer-to-int-cast] dma_addr_t offs = (dma_addr_t)((dma_addr_t)desc - ^ >> altera_sgdma.c:404:5: warning: cast from >> pointer to integer of different size [-Wpointer-to-int-cast] (dma_addr_t)priv->rx_dma_desc); ^ Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Vince Bridgers <vbridgers2013@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-03-17Altera TSE: Add Altera Ethernet Driver SGDMA file componentsVince Bridgers1-0/+511
This patch adds the SGDMA soft IP support for the Altera Triple Speed Ethernet driver. Signed-off-by: Vince Bridgers <vbridgers2013@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>