History log of /drivers/net/ethernet/xilinx/ll_temac_main.c
Revision Date Author Comments
3c87dcbfb36ce6d3d9087f0163c02ba5690d9a85 01-Oct-2014 Subbaraya Sundeep Bhatta <subbaraya.sundeep.bhatta@xilinx.com> net: ll_temac: Remove unnecessary ether_setup after alloc_etherdev

Calling ether_setup is redundant since alloc_etherdev calls it.

Signed-off-by: Subbaraya Sundeep Bhatta <sbhatta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
fdd42e4400fcb5fe837a20a8d837ef094d5a26fb 13-Aug-2014 Michal Simek <michal.simek@xilinx.com> net: xilinx: Remove .owner field for driver

There is no need to init .owner field.

Based on the patch from Peter Griffin <peter.griffin@linaro.org>
"mmc: remove .owner field for drivers using module_platform_driver"

This patch removes the superflous .owner field for drivers which
use the module_platform_driver API, as this is overriden in
platform_driver_register anyway."

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
6a3e6aa10bf516c5c507292489e4d1fddeb2901b 08-Aug-2014 Julia Lawall <Julia.Lawall@lip6.fr> ll_temac: delete unneeded test before of_node_put

Of_node_put supports NULL as its argument, so the initial test is not
necessary.

Suggested by Uwe Kleine-König.

The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression e;
@@

-if (e)
of_node_put(e);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Reviewed-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9f8b93cb32e088d3377c86fabb666b884bac0f12 22-Jun-2014 Manuel Schölling <manuel.schoelling@gmx.de> xilinx: Fix compiler warning

The time comparsion functions require arguments of type unsigned long
instead of (signed) long.

Signed-off-by: Manuel Schölling <manuel.schoelling@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
3aeea53f0a372a8adbfc150b37319bff3d24fd04 22-May-2014 Manuel Schölling <manuel.schoelling@gmx.de> xilinx: Use time_before_eq()

To be future-proof and for better readability the time comparisons are modified
to use time_before_eq() instead of plain, error-prone math.

Signed-off-by: Manuel Schölling <manuel.schoelling@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
ceffc4acfc8c4cf4badaa93921f00e2b34e24a97 12-Mar-2014 Joe Perches <joe@perches.com> xilinx: Convert uses of __constant_<foo> to <foo>

The use of __constant_<foo> has been unnecessary for quite awhile now.

Make these uses consistent with the rest of the kernel.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
a81ab36bf52d0ca3a32251a923be1dbced726141 08-Jan-2014 Paul Gortmaker <paul.gortmaker@windriver.com> drivers/net: delete non-required instances of include <linux/init.h>

None of these files are actually using any __init type directives
and hence don't need to include <linux/init.h>. Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.

This covers everything under drivers/net except for wireless, which
has been submitted separately.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
28e24c62ab3062e965ef1b3bcc244d50aee7fa85 02-Dec-2013 Eric Dumazet <edumazet@google.com> net: do not pretend FRAGLIST support

Few network drivers really supports frag_list : virtual drivers.

Some drivers wrongly advertise NETIF_F_FRAGLIST feature.

If skb with a frag_list is given to them, packet on the wire will be
corrupt.

Remove this flag, as core networking stack will make sure to
provide packets that can be sent without corruption.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Cc: Anirudha Sarangi <anirudh@xilinx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
5c9f303e996516dd0dcc2ce8c2b95504d3137b19 07-Sep-2013 Rob Herring <rob.herring@calxeda.com> microblaze: clean-up prom.h implicit includes

While powerpc is a mess of implicit includes by prom.h, microblaze just
copied this and is easily fixed. Add the necessary explicit includes and
remove unnecessary includes and other parts from prom.h

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Acked-by: Grant Likely <grant.likely@linaro.org>
Cc: Michal Simek <monstr@monstr.eu>
Cc: microblaze-uclinux@itee.uq.edu.au
Cc: netdev@vger.kernel.org
7167cf0e8cd10287b7912b9ffcccd9616f382922 01-Oct-2013 Ricardo Ribalda <ricardo.ribalda@gmail.com> ll_temac: Reset dma descriptors indexes on ndo_open

The dma descriptors indexes are only initialized on the probe function.

If a packet is on the buffer when temac_stop is called, the dma
descriptors indexes can be left on a incorrect state where no other
package can be sent.

So an interface could be left in an usable state after ifdow/ifup.

This patch makes sure that the descriptors indexes are in a proper
status when the device is open.

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
ede23fa8161c1a04aa1b3bf5447812ca14b3fef1 27-Aug-2013 Joe Perches <joe@perches.com> drivers:net: Convert dma_alloc_coherent(...__GFP_ZERO) to dma_zalloc_coherent

__GFP_ZERO is an uncommon flag and perhaps is better
not used. static inline dma_zalloc_coherent exists
so convert the uses of dma_alloc_coherent with __GFP_ZERO
to the more common kernel style with zalloc.

Remove memset from the static inline dma_zalloc_coherent
and add just one use of __GFP_ZERO instead.

Trivially reduces the size of the existing uses of
dma_zalloc_coherent.

Realign arguments as appropriate.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8513fbd880093f00a47e85a552f14ca2de8d84d6 23-May-2013 Jingoo Han <jg1.han@samsung.com> net: ethernet: use platform_{get,set}_drvdata()

Use the wrapper functions for getting and setting the driver data using
platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev,
so we can directly pass a struct platform_device.

Also, unnecessary dev_set_drvdata() is removed, because the driver core
clears the driver data to NULL after device_release or on probe failure.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
f646968f8f7c624587de729115d802372b9063dd 19-Apr-2013 Patrick McHardy <kaber@trash.net> net: vlan: rename NETIF_F_HW_VLAN_* feature flags to NETIF_F_HW_VLAN_CTAG_*

Rename the hardware VLAN acceleration features to include "CTAG" to indicate
that they only support CTAGs. Follow up patches will introduce 802.1ad
server provider tagging (STAGs) and require the distinction for hardware not
supporting acclerating both.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
1f9061d27d3d2028805549c4a306324a48209057 15-Mar-2013 Joe Perches <joe@perches.com> drivers:net: dma_alloc_coherent: use __GFP_ZERO instead of memset(, 0)

Reduce the number of calls required to alloc
a zeroed block of memory.

Trivially reduces overall object size.

Other changes around these removals
o Neaten call argument alignment
o Remove an unnecessary OOM message after dma_alloc_coherent failure
o Remove unnecessary gfp_t stack variable

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
d0320f750093d012d3ed69fc1e8b385f654523d5 14-Mar-2013 Joe Perches <joe@perches.com> drivers:net: Remove dma_alloc_coherent OOM messages

I believe these error messages are already logged
on allocation failure by warn_alloc_failed and so
get a dump_stack on OOM.

Remove the unnecessary additional error logging.

Around these deletions:

o Alignment neatening.
o Remove unnecessary casts of dma_alloc_coherent.
o Hoist assigns from ifs.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
720a43efd30f04a0a492c85fb997361c44fbae05 08-Mar-2013 Joe Perches <joe@perches.com> drivers:net: Remove unnecessary OOM messages after netdev_alloc_skb

Emitting netdev_alloc_skb and netdev_alloc_skb_ip_align OOM
messages is unnecessary as there is already a dump_stack
after allocation failures.

Other trivial changes around these removals:

Convert a few comparisons of pointer to 0 to !pointer.
Change flow to remove unnecessary label.
Remove now unused variable.
Hoist assignment from if.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
b2adaca92c63b9bb8beb021d554f656e387a7648 03-Feb-2013 Joe Perches <joe@perches.com> ethernet: Remove unnecessary alloc/OOM messages, alloc cleanups

alloc failures already get standardized OOM
messages and a dump_stack.

Convert kzalloc's with multiplies to kcalloc.
Convert kmalloc's with multiplies to kmalloc_array.
Fix a few whitespace defects.
Convert a constant 6 to ETH_ALEN.
Use parentheses around sizeof.
Convert vmalloc/memset to vzalloc.
Remove now unused size variables.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
04e406dcc54cfd84d333ea673fa986fb5a1840e7 01-Jan-2013 Jiri Pirko <jiri@resnulli.us> ll_temac: fix mac address setting

Previously, when invalid address was passed to ndo_set_mac_address,
random mac was generated and set. Fix this by returning -EADDRNOTAVAIL
in this situation.

Also polish the code around a bit.

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
06b0e68327d499c3588c954d2a2d86458d451c4b 03-Dec-2012 Bill Pemberton <wfp5p@virginia.edu> net/xilinx: remove __dev* attributes

CONFIG_HOTPLUG is going away as an option. As result the __dev*
markings will be going away.

Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst,
and __devexit.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
0b43b9a7038609e038eb0329ec800e85d02dacbd 09-Jul-2012 Jon Mason <jdmason@kudzu.us> ll_temac: remove unnecessary setting of skb->dev

skb->dev is being unnecessarily set by the driver on packet recieve.
eth_type_trans already sets skb->dev to the proper value and it is not
referenced anywhere else in the dirver, thus making its setting unnecessary.

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
49ce9c2cda18f62b13055dc715e7b514157c2da8 10-Jul-2012 Ben Hutchings <bhutchings@solarflare.com> drivers/net/ethernet: Fix (nearly-)kernel-doc comments for various functions

Fix incorrect start markers, wrapped summary lines, missing section
breaks, incorrect separators, and some name mismatches. Delete
a few that are content-free.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
f85e5ea28f5c1d31b22ae5777a1a08ebd76ff7e1 04-Apr-2012 Richard Cochran <richardcochran@gmail.com> ll_temac: Support the get_ts_info ethtool method.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
5277f7a6c2f322f11e8deed48530296d70bc5d5f 20-Feb-2012 David S. Miller <davem@davemloft.net> ll_temac: Fix build.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
5a5e7c36448664a58d13aab5a9006b01f6a58910 17-Feb-2012 Danny Kukawka <danny.kukawka@bisect.de> xilinx ll_temac: use eth_hw_addr_random() instead of random_ether_addr()

Use eth_hw_addr_random() instead of calling random_ether_addr()
to set addr_assign_type correctly to NET_ADDR_RANDOM.

Reset the state to NET_ADDR_PERM as soon as the MAC get
changed via .ndo_set_mac_address.

v2: reworked to prevent using an extra variable

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
41de8d4cff21a2e81e3d9ff66f5f7c903f9c3ab1 29-Jan-2012 Joe Perches <joe@perches.com> drivers/net: Remove alloc_etherdev error messages

alloc_etherdev has a generic OOM/unable to alloc message.
Remove the duplicative messages after alloc_etherdev calls.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
4e68ea26e76273cc62a981a414a8319a7f4c1077 21-Dec-2011 Michal Simek <monstr@monstr.eu> net: ethernet: xilinx: Don't use NO_IRQ in xilinx

Fix ll_temac and emaclite drivers. Only Microblaze and Xilinx PPC
use then and both use NO_IRQ as 0. It will be removed in near future.

Signed-off-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: David S. Miller <davem@davemloft.net>
ddf98e6d30a966dbd6e675c90e2caa5b9486e519 02-Dec-2011 Thomas Meyer <thomas@m3y3r.de> ll_temac: Use kcalloc instead of kzalloc to allocate array

The advantage of kcalloc is, that will prevent integer overflows which could
result from the multiplication of number of elements and size and it is also
a bit nicer to read.

The semantic patch that makes this change is available
in https://lkml.org/lkml/2011/11/25/107

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
db62f684deeb291ab2533b99843d5df9a36b1f19 27-Nov-2011 Axel Lin <axel.lin@gmail.com> net/ethernet: convert drivers/net/ethernet/* to use module_platform_driver()

This patch converts the drivers in drivers/net/ethernet/* to use the
module_platform_driver() macro which makes the code smaller and a bit
simpler.

Cc: "David S. Miller" <davem@davemloft.net>
Cc: Pantelis Antoniou <pantelis.antoniou@gmail.com>
Cc: Vitaly Bordug <vbordug@ru.mvista.com>
Cc: Wan ZongShun <mcuos.com@gmail.com>
Cc: Nicolas Pitre <nico@fluxnic.net>
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Cc: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Cc: Jiri Pirko <jpirko@redhat.com>
Cc: Daniel Hellstrom <daniel@gaisler.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Tobias Klauser <tklauser@distanz.ch>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Richard Cochran <richard.cochran@omicron.at>
Cc: Jonas Bonn <jonas@southpole.se>
Cc: Sebastian Poehn <sebastian.poehn@belden.com>
Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Cc: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Cc: "Michał Mirosław" <mirq-linux@rere.qmqm.pl>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Wan ZongShun <mcuos.com@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
f79d7e6f6ae397caf219cef1392ca39b3ff10833 08-Nov-2011 Ricardo Ribalda <ricardo.ribalda@gmail.com> net/ll_temac: FIX : Wait for indirect wait to end

While tracing down a connectivity problem on the temac I connected a
probe to the Cross bar irq, and it was triggered when doing
ifdown->ifup.

This is fixed once waiting for the indirect write to end. Since it is
not on the hot path there is no performance loss.

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
50ec1538fac0e39078d45ca5f8a5186621830058 08-Nov-2011 Ricardo Ribalda <ricardo.ribalda@gmail.com> net/temac: FIX segfault when process old irqs

Do not enable the irq until the scatter gather registers are ready to
handle the data. Otherwise an irq from a packet send/received before
last close can lead to an access to an invalid memory region on the irq
handler.

Also, stop the dma engine on close.

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
8d8bdfe8034399357df58b5f3e4da638a9e9a257 08-Nov-2011 Ricardo Ribalda <ricardo.ribalda@gmail.com> ll_temac: Add support for phy_mii_ioctl

This patch enables the ioctl support for the driver. So userspace
programs like mii-tool can work.

Resend in merge window

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2edcd4ca43df3c1d1d392753531cc73a53e709ba 02-Nov-2011 Stephen Rothwell <sfr@canb.auug.org.au> net: fix typo in drivers/net/ethernet/xilinx/ll_temac_main.c

Commit 9e903e085262 ("net: add skb frag size accessors") used frag_size
instead of skb_frag_size in this file.

Fixes this build error:

drivers/net/ethernet/xilinx/ll_temac_main.c: In function 'temac_start_xmit':
drivers/net/ethernet/xilinx/ll_temac_main.c:717:3: error: implicit declaration of function 'frag_size' [-Werror=implicit-function-declaration]

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
9eac2d4d5312d2ea05c0dbba8051b868fe9961a4 18-Oct-2011 Ricardo <ricardo.ribalda@gmail.com> ll_temac: Add support for ethtool

This patch enables the ethtool interface. The implementation is done
using the libphy helper functions.

Signed-off-by: David S. Miller <davem@davemloft.net>
9e903e085262ffbf1fc44a17ac06058aca03524a 18-Oct-2011 Eric Dumazet <eric.dumazet@gmail.com> net: add skb frag size accessors

To ease skb->truesize sanitization, its better to be able to localize
all references to skb frags size.

Define accessors : skb_frag_size() to fetch frag size, and
skb_frag_size_{set|add|sub}() to manipulate it.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3ed6f6958c0ac21958285d8648f14d34da4bbcb3 10-Oct-2011 Ian Campbell <Ian.Campbell@citrix.com> ll_temac: convert to SKB paged frag API.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
afc4b13df143122f99a0eb10bfefb216c2806de0 16-Aug-2011 Jiri Pirko <jpirko@redhat.com> net: remove use of ndo_set_multicast_list in drivers

replace it by ndo_set_rx_mode

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
b13ad8f498793dc582b7f42f27b8f44490bd608d 15-Jun-2011 Jeff Kirsher <jeffrey.t.kirsher@intel.com> xilinx/ll_temac: Move the Xilinx drivers

Move the Xilinx drivers into drivers/net/ethernet/xilinx/ and
make the necessary Kconfig and Makefile changes.

CC: John Williams <john.williams@petalogix.com>
CC: "David H. Lynch Jr." <dhlii@dlasys.net>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>