aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/ibm/ehea (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-09-05ehea: Remove uses of virt_to_abs() and abs_to_virt()Michael Ellerman3-14/+13
abs_to_virt() simply calls __va() and we'd like to get rid of it, so replace all abs_to_virt() uses with __va(). Similarly virt_to_abs() just calls __pa(). Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2012-07-10drivers/net/ethernet: Fix non-kernel-doc comments with kernel-doc start markersBen Hutchings1-3/+1
Convert doxygen (or similar) formatted comments to kernel-doc or unformatted comment. 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>
2012-05-10ehea: fix losing of NEQ events when one event occurred earlyThadeu Lima de Souza Cascardo1-0/+2
The NEQ interrupt is only triggered when there was no previous pending interrupt. If we request irq handling after an interrupt has occurred, we will never get an interrupt until we call H_RESET_EVENTS. Events seem to be cleared when we first register the NEQ. So, when we requested irq handling right after registering it, a possible race with an interrupt was much less likely. Now, there is a chance we may lose this race and never get any events. The fix here is to poll and acknowledge any events that might have happened right after registering the irq handler. Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-26ehea: fix promiscuous modeThadeu Lima de Souza Cascardo1-5/+1
commit a4910b744486254cfa61995954c118fb2283c4fd has broken promiscuous mode, which is never set. port->promisc just reflects the last setting of PROMISCUOUS mode to avoid doing an extra hypercall when it's already set. However, since it may fail because of hypervisor permissions, we should still respect the multicast settings and not simply exit after setting promiscuous mode. Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> Cc: Breno Leitao <leitao@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-26ehea: fix allmulticast supportThadeu Lima de Souza Cascardo2-10/+16
There was a bug in the mask of regtype parameter for registering a multicast filter. It was ignoring the scope bit, which was wrongly being used for all filters. The SCOPE_ALL value adds a filter that allows all multicast packets and ignores the MAC parameter, just what allmulticast needs. The normals filters, however, should not use SCOPE_ALL. Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-24ehea: only register irq after setting up portsThadeu Lima de Souza Cascardo1-12/+18
If we receive an interrupt too early before we set up ports in the probe function, there won't be any port ready to handle it. Only registering the irq after the ports are setup fixes the problem, and works fine without losing any interrupts. This causes crashes in some situations: [c000000f7ff7fd60] d000000008e223f0 .ehea_neq_tasklet+0x78/0x148 [ehea] [c000000f7ff7fe00] c0000000000b6cac .tasklet_hi_action+0xdc/0x210 [c000000f7ff7fea0] c0000000000b7cc8 .__do_softirq+0x178/0x300 [c000000f7ff7ff90] c000000000022694 .call_do_softirq+0x14/0x24 [c000000f68ee7900] c000000000010e04 .do_softirq+0xec/0x110 [c000000f68ee79a0] c0000000000b789c .irq_exit+0xac/0xe0 [c000000f68ee7a20] c0000000000110bc .do_IRQ+0x114/0x2a8 [c000000f68ee7ae0] c00000000000553c hardware_interrupt_entry+0x18/0x1c Signed-off-by: David S. Miller <davem@davemloft.net>
2012-03-09Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-1/+3
2012-03-08ehea: restore multicast and rx_errors fieldsEric Dumazet1-1/+3
Commit 239c562c94d (ehea: Add 64bit statistics) added a regression, since we no longer report multicast & rx_errors fields, taken from port->stats structure. These fields are updated in ehea_update_stats() every second. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Cc: Anton Blanchard <anton@samba.org> Cc: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> Tested-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-31drivers/net: Remove alloc_etherdev error messagesJoe Perches1-1/+0
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>
2012-01-30drivers/net: fix up stale paths from driver reorgPaul Gortmaker8-8/+8
The reorganization of the driver layout in drivers/net left behind some stale paths in comments and in Kconfig help text. Bring them up to date. No actual change to any code takes place here. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-17ehea: make some functions and variables staticThadeu Lima de Souza Cascardo3-25/+23
Some functions and variables in ehea are only used in their own file, so they should be static. One particular function had a very generic name, print_error_data. Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-08net: make vlan ndo_vlan_rx_[add/kill]_vid return error valueJiri Pirko1-5/+16
Let caller know the result of adding/removing vlan id to/from vlan filter. In some drivers I make those functions to just return 0. But in those where there is able to see if hw setup went correctly, return value is set appropriately. Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-23ehea: Use round_jiffies_relative to align workqueueAnton Blanchard1-2/+4
Use round_jiffies_relative to align the ehea workqueue and avoid extra wakeups. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-11-23ehea: Reduce memory usage in buffer poolsAnton Blanchard1-2/+2
Now that we enable multiqueue by default the ehea driver is using quite a lot of memory for its buffer pools. With 4 queues we consume 64MB in the jumbo packet ring, 16MB in the medium packet ring and 16MB in the tiny packet ring. We should only fill the jumbo ring once the MTU is increased but for now halve it's size so it consumes 32MB. Also reduce the tiny packet ring, with 4 queues we had 16k entries which is overkill. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-10-25ehea: fix skb_frag_size typoEric Dumazet1-1/+1
Commit 9e903e085262 ("net: add skb frag size accessors") introduced a typo in ehea driver. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-10-19net: add skb frag size accessorsEric Dumazet1-2/+2
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-10-17ehea: Remove unused tcp_end field in send WQAnton Blanchard2-3/+1
The tcp_end field is not actually used by the hardware, so there is no need to set it. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-10-17ehea: Add GRO supportAnton Blanchard1-10/+5
Add GRO support to the ehea driver. v3: [cascardo] no need to enable GRO, since it's enabled by default [cascardo] vgrp was removed in the vlan cleanup Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-10-17ehea: Remove LRO supportAnton Blanchard3-83/+1
In preparation for adding GRO to ehea, remove LRO. v3: [cascardo] fixed conflict with vlan cleanup Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-10-17ehea: Add 64bit statisticsAnton Blanchard2-5/+5
Switch to using ndo_get_stats64 to get 64bit statistics. v3: [cascardo] use rtnl_link_stats64 as port stats Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-10-17ehea: Remove some unused definitionsAnton Blanchard1-25/+0
The queue macros are many levels deep and it makes it harder to work your way through them when many of the versions are unused. Remove the unused versions. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-10-17ehea: Simplify type 3 transmit routineAnton Blanchard1-16/+3
If a nonlinear skb fits within the immediate area, use skb_copy_bits instead of copying the frags by hand. v3: [cascardo] fixed conflict with use of skb frag API Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-10-17ehea: Merge swqe2 TSO and non TSO pathsAnton Blanchard1-55/+21
write_swqe2_TSO and write_swqe2_nonTSO are almost identical. For TSO we have to set the TSO and mss bits in the wqe and we only put the header in the immediate area, no data. Collapse both functions into write_swqe2_immediate. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-10-17ehea: Simplify ehea_xmit2 and ehea_xmit3Anton Blanchard1-101/+36
Based on a patch from Michael Ellerman, clean up a significant portion of the transmit path. There was a lot of duplication here. Even worse, we were always checksumming tx packets and ignoring the skb->ip_summed field. Also remove NETIF_F_FRAGLIST from dev->features, I'm not sure why it was enabled. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-10-17ehea: Allocate large enough skbs to avoid partial cacheline DMA writesAnton Blanchard1-2/+2
The ehea adapter has a mode where it will avoid partial cacheline DMA writes on receive by always padding packets to fall on a cacheline boundary. Unfortunately we currently aren't allocating enough space for a full ethernet MTU packet to be rounded up, so this optimisation doesn't hit. It's unfortunate that the next largest packet size exposed by the hypervisor interface is 2kB, meaning our skb allocation comes out of a 4kB SLAB. However the performance increase due to this optimisation is quite large and my TCP stream numbers increase from 900MB to 1000MB/sec. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-10-17ehea: Add vlan_featuresAnton Blanchard1-0/+2
We weren't enabling any VLAN features so we missed out on checksum offload and TSO when using VLANs. Enable them. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-10-17ehea: Dont check NETIF_F_TSO in TX pathAnton Blanchard1-1/+1
It seems like the ehea xmit routine and an ethtool change of TSO mode could race, resulting in corrupt packets. Checking gso_size is enough and we can use the helper function. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-10-17ehea: Remove num_tx_qps module optionAnton Blanchard2-36/+18
The num_tx_qps module option allows a user to configure a different number of tx and rx queues. Now the networking stack is multiqueue aware it makes little sense just to enable the tx queues and not the rx queues so remove the option. v3: [cascardo] fixed conflict with get_stats change Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-10-17ehea: Remove force_irq logic in napi poll routineAnton Blanchard2-11/+3
commit 18604c548545 (ehea: NAPI multi queue TX/RX path for SMP) added driver specific logic for exiting napi mode. I'm not sure what it was trying to solve and it should be up to the network stack to decide when we are done polling so remove it. v3: [cascardo] Fixed extra parentheses. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-10-17ehea: Update multiqueue supportAnton Blanchard3-62/+49
The ehea driver had some multiqueue support but was missing the last few years of networking stack improvements: - Use skb_record_rx_queue to record which queue an skb came in on. - Remove the driver specific netif_queue lock and use the networking stack transmit lock instead. - Remove the driver specific transmit queue hashing and use skb_get_queue_mapping instead. - Use netif_tx_{start|stop|wake}_queue where appropriate. We can also remove pr->queue_stopped and just check the queue status directly. - Print all 16 queues in the ethtool stats. We now enable multiqueue by default since it is a clear win on all my testing so far. v3: [cascardo] fixed use_mcs parameter description [cascardo] set ehea_ethtool_stats_keys as const Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-10-17ehea: Remove NETIF_F_LLTXAnton Blanchard2-11/+2
Remove the deprecated NETIF_F_LLTX feature. Since the network stack now provides the locking we can remove the driver specific pr->xmit_lock. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-10-10ehea: convert to SKB paged frag APIIan Campbell1-8/+3
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Cc: Breno Leitao <leitao@linux.vnet.ibm.com> Cc: netdev@vger.kernel.org Signed-off-by: David S. Miller <davem@davemloft.net>
2011-09-27ehea: Remove sleep at .ndo_get_statsbrenohl@br.ibm.com2-23/+37
Currently ehea ndo_get_stats can sleep in two places, in a hcall and in a GFP_KERNEL alloc, which is not correct. This patch creates a delayed workqueue that grabs the information each 1 sec from the hardware, and place it into the device structure, so that, .ndo_get_stats quickly returns the device structure statistics block. Signed-off-by: Breno Leitao <brenohl@br.ibm.com> Acked-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-17net: remove use of ndo_set_multicast_list in driversJiri Pirko1-1/+1
replace it by ndo_set_rx_mode Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-11ehea/ibm*: Move the IBM driversJeff Kirsher9-0/+7393
Move the IBM drivers into drivers/net/ethernet/ibm/ and make the necessary Kconfig and Makefile changes. - Renamed ibm_new_emac to emac - Cleaned up Makefile and Kconfig options which referred to IBM_NEW_EMAC to IBM_EMAC - ibmlana driver is a National Semiconductor SONIC driver so it was not moved CC: Christoph Raisch <raisch@de.ibm.com> CC: Santiago Leon <santil@linux.vnet.ibm.com> CC: Benjamin Herrenschmidt <benh@kernel.crashing.org> CC: David Gibson <dwg@au1.ibm.com> CC: Kyle Lucke <klucke@us.ibm.com> CC: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>