aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/ibm/ehea/ehea_main.c
AgeCommit message (Collapse)AuthorFilesLines
2013-04-19net: vlan: prepare for 802.1ad VLAN filtering offloadPatrick McHardy1-2/+2
Change the rx_{add,kill}_vid callbacks to take a protocol argument in preparation of 802.1ad support. The protocol argument used so far is always htons(ETH_P_8021Q). Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-04-19net: vlan: rename NETIF_F_HW_VLAN_* feature flags to NETIF_F_HW_VLAN_CTAG_*Patrick McHardy1-4/+4
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-03-09drivers:net: Remove unnecessary OOM messages after netdev_alloc_skbJoe Perches1-7/+2
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-02-18net: ehea module param description fixDave Young1-4/+4
In ehea.h the minimal entries is 2^7 - 1: #define EHEA_MIN_ENTRIES_QP 127 Thus change the module param description accordinglly Signed-off-by: Dave Young <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2013-02-04ethernet: Remove unnecessary alloc/OOM messages, alloc cleanupsJoe Perches1-3/+1
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-12-07drivers/net: fix up function prototypes after __dev* removalsGreg Kroah-Hartman1-2/+2
The __dev* removal patches for the network drivers ended up messing up the function prototypes for a bunch of drivers. This patch fixes all of them back up to be properly aligned. Bonus is that this almost removes 100 lines of code, always a nice surprise. Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-12-03ehea: remove __dev* attributesBill Pemberton1-5/+5
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 <[email protected]> Cc: Thadeu Lima de Souza Cascardo <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-11-19ehea: Remove remnants of LRO supportBen Hutchings1-1/+1
Commit 2cb1deb56f5bf413da83491e0cb5a0474393c8ef ('ehea: Remove LRO support') left behind the Kconfig depends/select and feature flag. Signed-off-by: Ben Hutchings <[email protected]> Signed-off-by: David S. Miller <[email protected]>
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
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 <[email protected]> Cc: Breno Leitao <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-04-26ehea: fix allmulticast supportThadeu Lima de Souza Cascardo1-9/+15
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
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 <[email protected]>
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 <[email protected]> Cc: Anton Blanchard <[email protected]> Cc: Thadeu Lima de Souza Cascardo <[email protected]> Acked-by: Thadeu Lima de Souza Cascardo <[email protected]> Tested-by: Thadeu Lima de Souza Cascardo <[email protected]> Signed-off-by: David S. Miller <[email protected]>
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-01-30drivers/net: fix up stale paths from driver reorgPaul Gortmaker1-1/+1
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 <[email protected]> CC: Jeff Kirsher <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-01-17ehea: make some functions and variables staticThadeu Lima de Souza Cascardo1-16/+16
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
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 <[email protected]> Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-10-17ehea: Remove unused tcp_end field in send WQAnton Blanchard1-2/+0
The tcp_end field is not actually used by the hardware, so there is no need to set it. Signed-off-by: Anton Blanchard <[email protected]> Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]> Signed-off-by: David S. Miller <[email protected]>
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 <[email protected]> Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-10-17ehea: Remove LRO supportAnton Blanchard1-60/+1
In preparation for adding GRO to ehea, remove LRO. v3: [cascardo] fixed conflict with vlan cleanup Signed-off-by: Anton Blanchard <[email protected]> Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-10-17ehea: Add 64bit statisticsAnton Blanchard1-4/+4
Switch to using ndo_get_stats64 to get 64bit statistics. v3: [cascardo] use rtnl_link_stats64 as port stats Signed-off-by: Anton Blanchard <[email protected]> Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]> Signed-off-by: David S. Miller <[email protected]>
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 <[email protected]> Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]> Signed-off-by: David S. Miller <[email protected]>
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 <[email protected]> Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]> Signed-off-by: David S. Miller <[email protected]>
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 <[email protected]> Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]> Signed-off-by: David S. Miller <[email protected]>
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 <[email protected]> Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]> Signed-off-by: David S. Miller <[email protected]>
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 <[email protected]> Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-10-17ehea: Remove num_tx_qps module optionAnton Blanchard1-33/+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 <[email protected]> Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-10-17ehea: Remove force_irq logic in napi poll routineAnton Blanchard1-10/+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 <[email protected]> Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-10-17ehea: Update multiqueue supportAnton Blanchard1-53/+39
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 <[email protected]> Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-10-17ehea: Remove NETIF_F_LLTXAnton Blanchard1-10/+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 <[email protected]> Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-10-10ehea: convert to SKB paged frag APIIan Campbell1-8/+3
Signed-off-by: Ian Campbell <[email protected]> Cc: Breno Leitao <[email protected]> Cc: [email protected] Signed-off-by: David S. Miller <[email protected]>
2011-09-27ehea: Remove sleep at .ndo_get_stats[email protected]1-23/+36
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 <[email protected]> Acked-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-08-11ehea/ibm*: Move the IBM driversJeff Kirsher1-0/+3768
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 <[email protected]> CC: Santiago Leon <[email protected]> CC: Benjamin Herrenschmidt <[email protected]> CC: David Gibson <[email protected]> CC: Kyle Lucke <[email protected]> CC: Michael Ellerman <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>