aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/tile (follow)
AgeCommit message (Collapse)AuthorFilesLines
2013-08-01tile: enable GRO in the tilegx network driverChris Metcalf1-1/+1
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-01tile: fix panic bug in napi support for tilegx network driverChris Metcalf1-32/+33
The code used to call napi_disable() in an interrupt handler (from smp_call_function), which in turn could call msleep(). Unfortunately you can't sleep in an interrupt context. Luckily it turns out all the NAPI support functions are just operating on data structures and not on any deeply per-cpu data, so we can arrange to set up and tear down all the NAPI state on the core driving the process, and just do the IRQ enable/disable as a smp_call_function thing. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-01tile: update dev->stats directly in tilegx network driverChris Metcalf1-21/+8
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-01tile: support jumbo frames in the tilegx network driverChris Metcalf1-159/+188
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-01tile: remove dead is_dup_ack() function from tilepro net driverChris Metcalf1-76/+0
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-01tile: avoid bug in tilepro net driver built with old hypervisorChris Metcalf1-3/+6
Building against headers from an older Tilera hypervisor can cause the frags[] array to be overrun. Don't enable TSO in that case. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-01tile: support rx_dropped/rx_errors in tilepro net driverChris Metcalf1-26/+15
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-01tile: set hw_features and vlan_features in setupChris Metcalf2-33/+25
This change allows the user to configure various features of the tile networking drivers on and off. There is no change to the default initialization state of either the tilegx or tilepro drivers. Neither driver needs the ndo_fix_features or ndo_set_features callbacks, since the generic code already handles the dependencies for fix_features, and there is no hardware state to tweak in set_features. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-07-30tile: handle 64-bit statistics in tilepro network driverChris Metcalf1-23/+54
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-05-02tile: support new Tilera hypervisorChris Metcalf1-1/+1
The Tilera hypervisor shipped in releases up through MDE 4.1 launches the client operating system (i.e. Linux) at privilege level 1 (PL1). Starting with MDE 4.2, as part of the work to enable KVM, the Tilera hypervisor launches Linux at PL2 instead. This commit makes the KERNEL_PL option default to 2 for tilegx, while still saying at 1 for tilepro, which doesn't have an updated hypervisor. It also explains how and when you might want to choose another value. In addition, we change a small buglet in the on-chip Ethernet driver, where we were failing to use the KERNEL_PL constant in an API call. To make the transition cleaner, this change also provides the updated hv_init() API for the new hypervisor that supports announcing Linux's compiled-in PL, so the hypervisor can generate a suitable error in the case of a mismatched hypervisor and Linux binary. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> Cc: stable@vger.linux.org
2013-01-03net: remove unnecessary NET_ADDR_RANDOM "bitclean"Jiri Pirko1-1/+0
NET_ADDR_SET is set in dev_set_mac_address() no need to alter dev->addr_assign_type value in drivers. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-16tilegx: request_irq with a non-null device nameSimon Marchi1-1/+1
This patch simply makes the tilegx net driver call request_irq with a non-null name. It makes the output in /proc/interrupts more obvious, but also helps tools that don't expect to find null there. Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca> Acked-by: Chris Metcalf <cmetcalf@tilera.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-26tilegx: fix some issues in the SW TSO supportChris Metcalf1-16/+19
This change correctly computes the header length and data length in the fragments to avoid a bug where we would end up with extremely slow performance. Also adopt use of skb_frag_size() accessor. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> Cc: stable@vger.kernel.org [v3.6] Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-18tilegx net: use eth_hw_addr_random(), not eth_random_addr()Chris Metcalf1-1/+1
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
2012-07-18tilegx net driver: handle payload data not in fragsChris Metcalf1-18/+18
The original driver implementation assumed that for TSO, all the payload data would be in the frags. This isn't always true; change the driver to support payload data at skb->data between "skb_transport_offset(skb) + tcp_hdrlen(skb)" and "skb->hdr_len", followed by the data in the frags. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
2012-07-18net: tilegx driver bugfix (be explicit about percpu queue number)Chris Metcalf1-8/+15
Avoid packets belonging to queue/cpu A trying to transmit on cpu B. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
2012-07-16ethernet: Use eth_random_addrJoe Perches1-1/+1
Convert the existing uses of random_ether_addr to the new eth_random_addr. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-06-11tilegx network driver: initial supportChris Metcalf3-2/+1902
This change adds support for the tilegx network driver based on the GXIO IORPC support in the tilegx software stack, using the on-chip mPIPE packet processing engine. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-10drivers/net: Convert compare_ether_addr to ether_addr_equalJoe Perches1-1/+1
Use the new bool function ether_addr_equal to add some clarity and reduce the likelihood for misuse of compare_ether_addr for sorting. Done via cocci script: $ cat compare_ether_addr.cocci @@ expression a,b; @@ - !compare_ether_addr(a, b) + ether_addr_equal(a, b) @@ expression a,b; @@ - compare_ether_addr(a, b) + !ether_addr_equal(a, b) @@ expression a,b; @@ - !ether_addr_equal(a, b) == 0 + ether_addr_equal(a, b) @@ expression a,b; @@ - !ether_addr_equal(a, b) != 0 + !ether_addr_equal(a, b) @@ expression a,b; @@ - ether_addr_equal(a, b) == 0 + !ether_addr_equal(a, b) @@ expression a,b; @@ - ether_addr_equal(a, b) != 0 + ether_addr_equal(a, b) @@ expression a,b; @@ - !!ether_addr_equal(a, b) + ether_addr_equal(a, b) Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-02drivers/net/ethernet/tile: fix netdev_alloc_skb() bombingChris Metcalf1-1/+1
Commit dae2e9f430c46c29e3f771110094bd3da3625aa4 changed dev_alloc_skb() to netdev_alloc_skb(), adding a dev pointer, but erroneously used "->" instead of "." for a struct member when accessing the dev pointer. This change fixes the build breakage. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
2012-04-02tilepro ethernet driver: fix a few minor issuesChris Metcalf1-25/+50
This commit fixes a number of issues seen with the driver: - Improve handling of return credits to the hardware shim - Use skb_frag_size() appropriately - Fix driver so it works properly with netpoll for console over UDP Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
2012-02-23ethernet: unify return value of .ndo_set_mac_address if address is invalidDanny Kukawka1-1/+1
Unify return value of .ndo_set_mac_address if the given address isn't valid. Return -EADDRNOTAVAIL as eth_mac_addr() already does if is_valid_ether_addr() fails. Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-15net: use eth_hw_addr_random() and reset addr_assign_typeDanny Kukawka1-1/+2
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: adapt to renamed eth_hw_addr_random() Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-08netdev: ethernet dev_alloc_skb to netdev_alloc_skbPradeep A. Dalvi1-2/+2
Replaced deprecating dev_alloc_skb with netdev_alloc_skb in drivers/net/ethernet - Removed extra skb->dev = dev after netdev_alloc_skb Signed-off-by: Pradeep A Dalvi <netdev@pradeepdalvi.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-09netdev: make net_device_ops conststephen hemminger1-2/+1
More drivers where net_device_ops should be const. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-23Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-4/+4
Conflicts: net/bluetooth/l2cap_core.c Just two overlapping changes, one added an initialization of a local variable, and another change added a new local variable. Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-19net: fix assignment of 0/1 to bool variables.Rusty Russell1-2/+2
DaveM said: Please, this kind of stuff rots forever and not using bool properly drives me crazy. Joe Perches <joe@perches.com> gave me the spatch script: @@ bool b; @@ -b = 0 +b = false @@ bool b; @@ -b = 1 +b = true I merely installed coccinelle, read the documentation and took credit. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-03arch/tile: use new generic {enable,disable}_percpu_irq() routinesChris Metcalf1-2/+2
We provided very similar routines internally, but now we can hook into the generic framework by supplying our routines as function pointers in the irq_chip structure instead. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
2011-12-03drivers/net/ethernet/tile: use skb_frag_page() APIChris Metcalf1-2/+2
This replaces raw access to the "page" field of the skb_frag_t. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> Acked-by: David S. Miller <davem@davemloft.net>
2011-10-25Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-nextLinus Torvalds3-0/+2490
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1745 commits) dp83640: free packet queues on remove dp83640: use proper function to free transmit time stamping packets ipv6: Do not use routes from locally generated RAs |PATCH net-next] tg3: add tx_dropped counter be2net: don't create multiple RX/TX rings in multi channel mode be2net: don't create multiple TXQs in BE2 be2net: refactor VF setup/teardown code into be_vf_setup/clear() be2net: add vlan/rx-mode/flow-control config to be_setup() net_sched: cls_flow: use skb_header_pointer() ipv4: avoid useless call of the function check_peer_pmtu TCP: remove TCP_DEBUG net: Fix driver name for mdio-gpio.c ipv4: tcp: fix TOS value in ACK messages sent from TIME_WAIT rtnetlink: Add missing manual netlink notification in dev_change_net_namespaces ipv4: fix ipsec forward performance regression jme: fix irq storm after suspend/resume route: fix ICMP redirect validation net: hold sock reference while processing tx timestamps tcp: md5: add more const attributes Add ethtool -g support to virtio_net ... Fix up conflicts in: - drivers/net/Kconfig: The split-up generated a trivial conflict with removal of a stale reference to Documentation/networking/net-modules.txt. Remove it from the new location instead. - fs/sysfs/dir.c: Fairly nasty conflicts with the sysfs rb-tree usage, conflicting with Eric Biederman's changes for tagged directories.
2011-10-19net: add skb frag size accessorsEric Dumazet1-1/+1
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>
2011-08-12tile: Move the Tilera driverJeff Kirsher3-0/+2490
Move the Tilera driver into drivers/net/ethernet/tile and make the necessary Kconfig and Makefile changes. Updated the Kconfig so that the options defualt to y if TILE kernel. CC: Chris Metcalf <cmetcalf@tilera.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>