summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/arc
AgeCommit message (Collapse)Author
2014-01-15arc_emac: fix potential use after freeEric Dumazet
[ Upstream commit 37ec274e9713eafc2ba6c4471420f06cb8f68ecf ] Signed-off-by: Eric Dumazet <edumazet@google.com> skb_tx_timestamp(skb) should be called _before_ TX completion has a chance to trigger, otherwise it is too late and we access freed memory. Fixes: e4f2379db6c6 ("ethernet/arc/arc_emac - Add new driver") From: Eric Dumazet <edumazet@google.com> Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com> Cc: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-05ethernet/arc/arc_emac: Fix huge delays in large file copiesVineet Gupta
copying large files to a NFS mounted host was taking absurdly large time. Turns out that TX BD reclaim had a sublte bug. Loop starts off from @txbd_dirty cursor and stops when it hits a BD still in use by controller. However when it stops it needs to keep the cursor at that very BD to resume scanning in next iteration. However it was erroneously incrementing the cursor, causing the next scan(s) to fail too, unless the BD chain was completely drained out. [ARCLinux]$ ls -l -sh /disk/log.txt 17976 -rw-r--r-- 1 root root 17.5M Sep /disk/log.txt ========== Before ===================== [ARCLinux]$ time cp /disk/log.txt /mnt/. real 31m 7.95s user 0m 0.00s sys 0m 0.10s ========== After ===================== [ARCLinux]$ time cp /disk/log.txt /mnt/. real 0m 24.33s user 0m 0.00s sys 0m 0.19s Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Cc: Alexey Brodkin <abrodkin@synopsys.com> (commit_signer:3/4=75%) Cc: "David S. Miller" <davem@davemloft.net> (commit_signer:3/4=75%) Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: arc-linux-dev@synopsys.com Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-14ethernet/arc/arc_emac - fix NAPI "work > weight" warningAlexey Brodkin
Initially I improperly set a boundary for maximum number of input packets to process on NAPI poll ("work") so it might be more than expected amount ("weight"). This was really harmless but seeing WARN_ON_ONCE on every device boot is not nice. So trivial fix ("<" instead of "<=") is here. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Vineet Gupta <vgupta@synopsys.com> Cc: Mischa Jonker <mjonker@synopsys.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Grant Likely <grant.likely@linaro.org> Cc: Rob Herring <rob.herring@calxeda.com> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: linux-kernel@vger.kernel.org Signed-off-by: David S. Miller <davem@davemloft.net>
2013-06-26arc_emac: fix compile-time errors & warnings on PPC64Alexey Brodkin
As reported by "kbuild test robot" there were some errors and warnings on attempt to build kernel with "make ARCH=powerpc allmodconfig". And this patch addresses both errors and warnings. Below is a list of introduced changes: 1. Fix compile-time errors (misspellings in "dma_unmap_single") on PPC. 2. Use DMA address instead of "skb->data" as a pointer to data buffer. This fixed warnings on pointer to int conversion on 64-bit systems. 3. Re-implemented initial allocation of Rx buffers in "arc_emac_open" in the same way they're re-allocated during operation (receiving packets). So once again DMA address could be used instead of "skb->data". 4. Explicitly use EMAC_BUFFER_SIZE for Rx buffers allocation. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: netdev@vger.kernel.org Cc: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Francois Romieu <romieu@fr.zoreil.com> Cc: Joe Perches <joe@perches.com> Cc: Vineet Gupta <vgupta@synopsys.com> Cc: Mischa Jonker <mjonker@synopsys.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Grant Likely <grant.likely@linaro.org> Cc: Rob Herring <rob.herring@calxeda.com> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: linux-kernel@vger.kernel.org Cc: devicetree-discuss@lists.ozlabs.org Cc: Florian Fainelli <florian@openwrt.org> Cc: David Laight <david.laight@aculab.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-06-25ethernet/arc/arc_emac - Add new driverAlexey Brodkin
Driver for non-standard on-chip ethernet device ARC EMAC 10/100, instantiated in some legacy ARC (Synopsys) FPGA Boards such as ARCAngel4/ML50x. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Francois Romieu <romieu@fr.zoreil.com> Cc: Joe Perches <joe@perches.com> Cc: Vineet Gupta <vgupta@synopsys.com> Cc: Mischa Jonker <mjonker@synopsys.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Grant Likely <grant.likely@linaro.org> Cc: Rob Herring <rob.herring@calxeda.com> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: linux-kernel@vger.kernel.org Cc: devicetree-discuss@lists.ozlabs.org Cc: Florian Fainelli <florian@openwrt.org> Cc: David Laight <david.laight@aculab.com> Signed-off-by: David S. Miller <davem@davemloft.net>