aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2013-08-25ipip: potential race in ip_tunnel_init_net()Dan Carpenter1-6/+4
Eric Dumazet says that my previous fix for an ERR_PTR dereference (ea857f28ab 'ipip: dereferencing an ERR_PTR in ip_tunnel_init_net()') could be racy and suggests the following fix instead. Reported-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-25bonding: fix error return code in bond_enslave()Wei Yongjun1-1/+2
Fix to return a negative error code in the add bond vlan ids error handling case instead of 0, as done elsewhere in this function. Introduced by commit 1ff412ad7714f6952f76ffd77f0a7f2f563288a1. (bonding: change the bond's vlan syncing functions with the standard ones) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Nikolay Aleksandrov <nikolay@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-25Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc-nextDavid S. Miller20-1278/+1130
Merge SFC driver changes from Ben Hutchings. Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-23net: Add NEXTHDR_SCTP to ipv6.hJoe Stringer1-0/+1
Signed-off-by: Joe Stringer <joe@wand.net.nz> Signed-off-by: Jesse Gross <jesse@nicira.com>
2013-08-23openvswitch: Mega flow implementationAndy Zhou7-513/+1171
Add wildcarded flow support in kernel datapath. Wildcarded flow can improve OVS flow set up performance by avoid sending matching new flows to the user space program. The exact performance boost will largely dependent on wildcarded flow hit rate. In case all new flows hits wildcard flows, the flow set up rate is within 5% of that of linux bridge module. Pravin has made significant contributions to this patch. Including API clean ups and bug fixes. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: Andy Zhou <azhou@nicira.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
2013-08-23openvswitch: check CONFIG_OPENVSWITCH_GRE in makefileCong Wang2-4/+4
Cc: Jesse Gross <jesse@nicira.com> Cc: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: Cong Wang <amwang@redhat.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
2013-08-23openvswitch: Fix argument descriptions in vport.c.Justin Pettit1-1/+2
Signed-off-by: Justin Pettit <jpettit@nicira.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
2013-08-23openvswitch:: link upper device for port devicesJiri Pirko1-1/+19
Link upper device properly. That will make IFLA_MASTER filled up. Set the master to port 0 of the datapath under which the port belongs. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: Jesse Gross <jesse@nicira.com>
2013-08-23openvswitch: Use non rcu hlist_del() flow table entry.Pravin B Shelar1-1/+1
Flow table destroy is done in rcu call-back context. Therefore there is no need to use rcu variant of hlist_del(). Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
2013-08-23openvswitch: Use RCU lock for dp dump operation.Pravin B Shelar1-6/+7
RCUfy dp-dump operation which is already read-only. This makes all ovs dump operations lockless. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
2013-08-23openvswitch: Use RCU lock for flow dump operation.Pravin B Shelar1-8/+9
Flow dump operation is read-only operation. There is no need to take ovs-lock. Following patch use rcu-lock for dumping flows. Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
2013-08-23Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netLinus Torvalds36-175/+282
Merge networking fixes from David Miller: 1) Revert Johannes Berg's genetlink locking fix, because it causes regressions. Johannes and Pravin Shelar are working on fixing things properly. 2) Do not drop ipv6 ICMP messages without a redirected header option, they are legal. From Duan Jiong. 3) Missing error return propagation in probing of via-ircc driver. From Alexey Khoroshilov. 4) Do not clear out broadcast/multicast/unicast/WOL bits in r8169 when initializing, from Peter Wu. 5) realtek phy driver programs wrong interrupt status bit, from Giuseppe CAVALLARO. 6) Fix statistics regression in AF_PACKET code, from Willem de Bruijn. 7) Bridge code uses wrong bitmap length, from Toshiaki Makita. 8) SFC driver uses wrong indexes to look up MAC filters, from Ben Hutchings. 9) Don't pass stack buffers into usb control operations in hso driver, from Daniel Gimpelevich. 10) Multiple ipv6 fragmentation headers in one packet is illegal and such packets should be dropped, from Hannes Frederic Sowa. 11) When TCP sockets are "repaired" as part of checkpoint/restart, the timestamp field of SKBs need to be refreshed otherwise RTOs can be wildly off. From Andrey Vagin. 12) Fix memcpy args (uses 'address of pointer' instead of 'pointer') in hostp driver. From Dan Carpenter. 13) nl80211hdr_put() doesn't return an ERR_PTR, but some code believes it does. From Dan Carpenter. 14) Fix regression in wireless SME disconnects, from Johannes Berg. 15) Don't use a stack buffer for DMA in zd1201 USB wireless driver, from Jussi Kivilinna. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (33 commits) ipv4: expose IPV4_DEVCONF ipv6: handle Redirect ICMP Message with no Redirected Header option be2net: fix disabling TX in be_close() Revert "genetlink: fix family dump race" hso: Fix stack corruption on some architectures hso: Earlier catch of error condition sfc: Fix lookup of default RX MAC filters when steered using ethtool bridge: Use the correct bit length for bitmap functions in the VLAN code packet: restore packet statistics tp_packets to include drops net: phy: rtl8211: fix interrupt on status link change r8169: remember WOL preferences on driver load via-ircc: don't return zero if via_ircc_open() failed macvtap: Ignore tap features when VNET_HDR is off macvtap: Correctly set tap features when IFF_VNET_HDR is disabled. macvtap: simplify usage of tap_features tcp: set timestamps for restored skb-s bnx2x: set VF DMAE when first function has 0 supported VFs bnx2x: Protect against VFs' ndos when SR-IOV is disabled bnx2x: prevent VF benign attentions bnx2x: Consider DCBX remote error ...
2013-08-23Merge branch 'akpm' (patches from Andrew Morton)Linus Torvalds8-14/+12
Merge fixes from Andrew Morton: "A few fixes. One is a licensing change and I don't do licensing, so please eyeball that one" Licensing eye-balled. * emailed patches from Andrew Morton <akpm@linux-foundation.org>: lib/lz4: correct the LZ4 license memcg: get rid of swapaccount leftovers nilfs2: fix issue with counting number of bio requests for BIO_EOPNOTSUPP error detection nilfs2: remove double bio_put() in nilfs_end_bio_write() for BIO_EOPNOTSUPP error drivers/platform/olpc/olpc-ec.c: initialise earlier
2013-08-23lib/lz4: correct the LZ4 licenseRichard Laager3-7/+7
The LZ4 code is listed as using the "BSD 2-Clause License". Signed-off-by: Richard Laager <rlaager@wiktel.com> Acked-by: Kyungsik Lee <kyungsik.lee@lge.com> Cc: Chanho Min <chanho.min@lge.com> Cc: Richard Yao <ryao@gentoo.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> [ The 2-clause BSD can be just converted into GPL, but that's rude and pointless, so don't do it - Linus ] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-08-23memcg: get rid of swapaccount leftoversMichal Hocko3-3/+2
The swapaccount kernel parameter without any values has been removed by commit a2c8990aed5a ("memsw: remove noswapaccount kernel parameter") but it seems that we didn't get rid of all the left overs. Make sure that menuconfig help text and kernel-parameters.txt are clear about value for the paramter and remove the stalled comment which is not very much useful on its own. Signed-off-by: Michal Hocko <mhocko@suse.cz> Reported-by: Gergely Risko <gergely@risko.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-08-23nilfs2: fix issue with counting number of bio requests for BIO_EOPNOTSUPP error detectionVyacheslav Dubeyko1-1/+1
Fix the issue with improper counting number of flying bio requests for BIO_EOPNOTSUPP error detection case. The sb_nbio must be incremented exactly the same number of times as complete() function was called (or will be called) because nilfs_segbuf_wait() will call wail_for_completion() for the number of times set to sb_nbio: do { wait_for_completion(&segbuf->sb_bio_event); } while (--segbuf->sb_nbio > 0); Two functions complete() and wait_for_completion() must be called the same number of times for the same sb_bio_event. Otherwise, wait_for_completion() will hang or leak. Signed-off-by: Vyacheslav Dubeyko <slava@dubeyko.com> Cc: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Tested-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-08-23nilfs2: remove double bio_put() in nilfs_end_bio_write() for BIO_EOPNOTSUPP errorVyacheslav Dubeyko1-2/+1
Remove double call of bio_put() in nilfs_end_bio_write() for the case of BIO_EOPNOTSUPP error detection. The issue was found by Dan Carpenter and he suggests first version of the fix too. Signed-off-by: Vyacheslav Dubeyko <slava@dubeyko.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Tested-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-08-23drivers/platform/olpc/olpc-ec.c: initialise earlierDaniel Drake1-1/+1
Being a low-level component, various drivers (e.g. olpc-battery) assume that it is ok to communicate with the OLPC Embedded Controller during probe. Therefore the OLPC EC driver must be initialised before other drivers try to use it. This was the case until it was recently moved out of arch/x86 and restructured around commits ac2504151f5a ("Platform: OLPC: turn EC driver into a platform_driver") and 85f90cf6ca56 ("x86: OLPC: switch over to using new EC driver on x86"). Use arch_initcall so that olpc-ec is readied earlier, matching the previous behaviour. Fixes a regression introduced in Linux-3.6 where various drivers such as olpc-battery and olpc-xo1-sci failed to load due to an inability to communicate with the EC. The user-visible effect was a lack of battery monitoring, missing ebook/lid switch input devices, etc. Signed-off-by: Daniel Drake <dsd@laptop.org> Cc: Andres Salomon <dilinger@queued.net> Cc: Paul Fox <pgf@laptop.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-08-22fs_enet: cleanup clock API useGerhard Sittig2-0/+23
make the Freescale ethernet driver get, prepare and enable the FEC clock during probe(); disable and unprepare the clock upon remove(), put is done by the devm approach; hold a reference to the clock over the period of use. clock lookup is non-fatal as not all platforms provide clock specs in their device tree; failure to enable specified clocks is fatal. Signed-off-by: Gerhard Sittig <gsi@denx.de> Signed-off-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-22fs_enet: silence a build warning (unused variable)Gerhard Sittig1-1/+0
Since commit 720a43efd30f04a0a492c85fb997361c44fbae05 (drivers:net: Remove unnecessary OOM messages after netdev_alloc_skb) there is a build warning: drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c: In function 'tx_skb_align_workaround': drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c:586:26: warning: unused variable 'fep' Fix it. Signed-off-by: Gerhard Sittig <gsi@denx.de> Signed-off-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-22net: sctp_probe: simplify code by using %pISc format specifierDaniel Borkmann1-7/+2
We can simply use the %pISc format specifier that was recently added and thus remove some code that distinguishes between IPv4 and IPv6. Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-22Merge branch 'for-davem' of git://gitorious.org/linux-can/linux-can-next into cpswDavid S. Miller3-3/+3
Marc Kleine-Budde says: ==================== another pull-request for net-next. It consists of two patches by Libo Chen, the at91 and flexcan driver make use of platform_set_drvdata() rather than open coding it. Chen Gang improves the error checking in the c_can_platform driver's probe function. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-22net: ethernet: davinci_cpdma: export cpdma_chan_get_statsDaniel Mack1-0/+1
This is needed when the cpsw driver is built as module. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-22ipv4: expose IPV4_DEVCONFstephen hemminger2-33/+35
IP sends device configuration (see inet_fill_link_af) as an array in the netlink information, but the indices in that array are not exposed to userspace through any current santized header file. It was available back in 2.6.32 (in /usr/include/linux/sysctl.h) but was broken by: commit 02291680ffba92e5b5865bc0c5e7d1f3056b80ec Author: Eric W. Biederman <ebiederm@xmission.com> Date: Sun Feb 14 03:25:51 2010 +0000 net ipv4: Decouple ipv4 interface parameters from binary sysctl numbers Eric was solving the sysctl problem but then the indices were re-exposed by a later addition of devconf support for IPV4 commit 9f0f7272ac9506f4c8c05cc597b7e376b0b9f3e4 Author: Thomas Graf <tgraf@infradead.org> Date: Tue Nov 16 04:32:48 2010 +0000 ipv4: AF_INET link address family Putting them in /usr/include/linux/ip.h seemed the logical match for the DEVCONF_ definitions for IPV6 in /usr/include/linux/ip6.h Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-22ipv6: handle Redirect ICMP Message with no Redirected Header optionDuan Jiong3-1/+26
rfc 4861 says the Redirected Header option is optional, so the kernel should not drop the Redirect Message that has no Redirected Header option. In this patch, the function ip6_redirect_no_header() is introduced to deal with that condition. Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com> Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
2013-08-22be2net: fix disabling TX in be_close()Sathya Perla1-1/+1
commit fba875591 ("disable TX in be_close()") disabled TX in be_close() to protect be_xmit() from touching freed up queues in the AER recovery flow. But, TX must be disabled *before* cleaning up TX completions in the close() path, not after. This allows be_tx_compl_clean() to free up all TX-req skbs that were notified to the HW. Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-22net: tcp_probe: add IPv6 supportDaniel Borkmann1-10/+44
The tcp_probe currently only supports analysis of IPv4 connections. Therefore, it would be nice to have IPv6 supported as well. Since we have the recently added %pISpc specifier that is IPv4/IPv6 generic, build related sockaddress structures from the flow information and pass this to our format string. Tested with SSH and HTTP sessions on IPv4 and IPv6. Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-22net: tcp_probe: kprobes: adapt jtcp_rcv_established signatureDaniel Borkmann1-1/+8
This patches fixes a rather unproblematic function signature mismatch as the const specifier was missing for the th variable; and next to that it adds a build-time assertion so that future function signature mismatches for kprobes will not end badly, similarly as commit 22222997 ("net: sctp: add build check for sctp_sf_eat_sack_6_2/jsctp_sf_eat_sack") did it for SCTP. Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-22net: tcp_probe: also include rcv_wnd next to snd_wndDaniel Borkmann1-2/+4
It is helpful to sometimes know the TCP window sizes of an established socket e.g. to confirm that window scaling is working or to tweak the window size to improve high-latency connections, etc etc. Currently the TCP snooper only exports the send window size, but not the receive window size. Therefore, also add the receive window size to the end of the output line. Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-22Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-nextDavid S. Miller4-21/+14
Steffen Klassert says: ==================== 1) Some constifications, from Mathias Krause. 2) Catch bugs if a hold timer is still active when xfrm_policy_destroy() is called, from Fan Du. 3) Remove a redundant address family checking, from Fan Du. 4) Make xfrm_state timer monotonic to be independent of system clock changes, from Fan Du. 5) Remove an outdated comment on returning -EREMOTE in the xfrm_lookup(), from Rami Rosen. Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-22ethernet: broadcom: remove unnecessary platform_set_drvdata()Jingoo Han1-1/+0
The driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-22ethernet: moxa: remove unnecessary platform_set_drvdata()Jingoo Han1-1/+0
The driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-22tcp: increase throughput when reordering is highYuchung Cheng1-12/+20
The stack currently detects reordering and avoid spurious retransmission very well. However the throughput is sub-optimal under high reordering because cwnd is increased only if the data is deliverd in order. I.e., FLAG_DATA_ACKED check in tcp_ack(). The more packet are reordered the worse the throughput is. Therefore when reordering is proven high, cwnd should advance whenever the data is delivered regardless of its ordering. If reordering is low, conservatively advance cwnd only on ordered deliveries in Open state, and retain cwnd in Disordered state (RFC5681). Using netperf on a qdisc setup of 20Mbps BW and random RTT from 45ms to 55ms (for reordering effect). This change increases TCP throughput by 20 - 25% to near bottleneck BW. A special case is the stretched ACK with new SACK and/or ECE mark. For example, a receiver may receive an out of order or ECN packet with unacked data buffered because of LRO or delayed ACK. The principle on such an ACK is to advance cwnd on the cummulative acked part first, then reduce cwnd in tcp_fastretrans_alert(). Signed-off-by: Yuchung Cheng <ycheng@google.com> Acked-by: Neal Cardwell <ncardwell@google.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-22Merge branch 'sfc-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfcDavid S. Miller1-1/+1
Merge in a fix for RX MAC address filter programming bug in the sfc driver. Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-22SolutionEngine7724: fix typo in Ether platform dataSergei Shtylyov1-1/+1
Commit bd61224b1cbec096694e89c4187119c8576fe186 (SolutionEngine7724: fix Ether support) has a typo in the 'phy_interface' field name of the platform data which causes build error -- fix it. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-22SH7619: fix typo in Ether platform dataSergei Shtylyov1-1/+1
Commit 06a64f91da72cb5827e2bedef2ead60a123fd66e (SH7619: fix Ether support) has a typo in the 'phy_interface' field name of the platform data which causes build error -- fix it. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-22r8169: fix invalid register dumpPeter Wu1-1/+5
For some reason, my PCIe RTL8111E onboard NIC on a GA-Z68X-UD3H-B3 motherboard reads as FFs when reading from MMIO with a block size larger than 7. Therefore change to reading blocks of four bytes. Ben Hutchings noted that the buffer is large enough to hold all registers, so now all registers are read. Signed-off-by: Peter Wu <lekensteyn@gmail.com> Acked-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-22Revert "genetlink: fix family dump race"Johannes Berg1-7/+0
This reverts commit 58ad436fcf49810aa006016107f494c9ac9013db. It turns out that the change introduced a potential deadlock by causing a locking dependency with netlink's cb_mutex. I can't seem to find a way to resolve this without doing major changes to the locking, so revert this. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Acked-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-22Merge branch 'linux-next' of git://cavan.codon.org.uk/platform-drivers-x86Linus Torvalds2-18/+6
Pull x86 platform driver fixes from Matthew Garrett: "Three trivial fixes - the first reverts a patch that's broken some other devices (again - I'm trying to figure out a clean way to implement this), the other two fix minor issues in the sony-laptop driver" * 'linux-next' of git://cavan.codon.org.uk/platform-drivers-x86: Revert "hp-wmi: Enable hotkeys on some systems" sony-laptop: Fix reporting of gfx_switch_status sony-laptop: return a negative error code in sonypi_compat_init()
2013-08-22Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-nextDavid S. Miller14-240/+476
Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates This series contains updates to igb and e1000e. Akeem provides 3 igb patches, the first resets the link when EEE is enabled or disabled if the link is up. His second patch changes a register read which normally stores of the read value to "just-read" so that hardware can accurately latch the register read. Lastly, he adds rcu_lock to avoid a possible race condition with igb_update_stats function. Mitch provides a fix for SR-IOV, where MSI-X interrupts are required, so make sure that MSI-X is enabled before allowing the user to turn on SR-IOV. Alex's igb patch make it so that we limit the lower bound for max_frame_size to the size of a standard Ethernet frame. This allows for feature parity with other Intel based drivers such as ixgbe. Carolyn adds a SKU for a flashless i210 device and a fix for get_fw_version() so that it works for all parts for igb. In addition, she has 2 igb patches to refactor NVM code to accommodate devices with no flash. Lastly, she adds code to check for the failure of pci_disable_link_state() to attempt to work around a problem found with some systems. Laura provides the remaining 2 igb patches. One removing the hard-coded value for the size of the RETA indirection table, and creates a macro instead for the RETA indirection table. The second adds the ethtool callbacks necessary to change the RETA indirection table from userspace. Bruce fixes a whitespace issue in a recent commit and resolves a jiffies comparison warning by using time_after(). Li provides a fix for e1000e to avoid a kernel crash on shutdown by adding one more check in e1000e_shutdown(). This is due to e1000e_shutdown() trying to clear correctable errors on the upstream P2P bridge, when under some cases we do not have the upstream P2P bridge. v2: - fixed patch 11 conditional statement from < to <= based on feedback from Ben Hutchings - fixed patch 12 patch description (adding the commit summary) based on feedback from Sergei Shtylyov ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2013-08-22sfc: Eliminate struct efx_mtdBen Hutchings2-160/+120
Currently we use struct efx_mtd to represent a physical NVRAM device and struct efx_mtd_partition to represent a partition on that device. But this only really makes sense for Falcon, as we don't know or care whether MC-managed NVRAM partitions are on one or more physical devices. It complicates iteration and provides little benefit. Therefore: - Replace the pointer to efx_mtd in mtd_info::priv with a pointer to efx_nic - Move the falcon_spi_device pointer into the union in struct efx_mtd_partition - Move the device name to efx_mtd_partition::dev_type_name - Move the efx_mtd_ops pointer to efx_nic::mtd_ops - Make efx_nic::mtd_list a list of partitions Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-08-22sfc: Rename SPI stuff to show that it is Falcon-specificBen Hutchings4-47/+47
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-08-22sfc: Cleanup Falcon-arch simple MAC filter stateBen Hutchings7-44/+52
On Falcon we implement MAC filtering requested by the stack using the MAC wrapper's single unicast filter and multicast hash filter. Siena is very similar, though MAC configuration is mediated by the MC. Since MCDI operations may sleep, reconfiguration is deferred from ndo_set_rx_mode to a work item. However, it still updates the private variables describing the filter state synchronously. Contrary to comments, the later use of these variables is not protected using the address lock, resulting in race conditions. Move the state update to a new function efx_farch_filter_sync_rx_mode() and make the Falcon-arch MAC configuration functions call that, so that its use is consistently serialised by the mac_lock. Invert and rename the promiscuous flag to the more accurate unicast_filter, and comment that both this and multicast_hash are not used on EF10. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-08-22sfc: Define and use MCDI_POPULATE_DWORD_{1,2,3,4,5,6,7}Ben Hutchings2-10/+62
There is only one user now, but we're about to add many more. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-08-22sfc: Add flag for stack-owned RX MAC filtersBen Hutchings2-17/+37
MAC filters inserted on request from the stack (ndo_set_rx_mode) should allow manual steering but not removal. Currently we have a special case for Siena's all-multicast and all-unicast MAC filters, but on EF10 we need to allow for steering of precise MAC filters as well. The EFX_FILTER_FLAG_RX_STACK flag changes the behaviour of replacement and removal requests: - Replacement *of* a filter with this flag never clears the flag but does change steering and saved priority - Replacement *by* a filter with this flag only sets the flag but does not change steering - Removal with priority < EFX_FILTER_PRI_REQUIRED really resets RX steering and saved priority This could support precise MAC filtering on Siena in future. As a side-benefit, the default MAC filters are hidden from ethtool until they are steered. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-08-22sfc: Refactor Falcon-arch filter removalBen Hutchings1-34/+40
Move the special case for removal of default filters from efx_farch_filter_table_clear_entry() into a wrapper function, efx_farch_filter_table_remove(). Move the existence and priority checks into the latter and use it where appropriate. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-08-22sfc: Make most filter operations NIC-type-specificBen Hutchings10-1267/+1448
Aside from accelerated RFS, there is almost nothing that can be shared between the filter table implementations for the Falcon architecture and EF10. Move the few shared functions into efx.c and rx.c and the rest into farch.c. Introduce efx_nic_type operations for the implementation and inline wrapper functions that call these. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-08-22sfc: Refactor Falcon-arch search limit resetBen Hutchings1-29/+30
Currently every call to efx_farch_filter_table_clear_entry() is shortly followed by a conditional reset of the table limits. The new limits (0) are not pushed to hardware until the next filter insertion. Move both the reset and the hardware reconfiguration into efx_farch_filter_table_clear_entry(), and add an explanatory comment. Also, make consistent use of the term 'search limit' for the maximum number of probes the NIC must make when searching for a filter of a particular type. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-08-22sfc: Split Falcon-arch-specific and common filter stateBen Hutchings2-55/+58
Move the common state from struct efx_filter_state into struct efx_nic. Rename struct efx_filter_state to efx_farch_filter_state and change the type of efx_nic::filter_state to void *. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
2013-08-22sfc: Extend and abstract efx_filter_spec to cover Huntington/EF10Ben Hutchings3-392/+494
Replace type field with match_flags. Add rss_context and match values covering of most of what is now in the MCDI protocol. Change some fields into bitfields so that the structure size doesn't grow beyond 64 bytes. Ditch the filter decoding functions as it is now easier to pick apart the abstract structure. Rewrite ethtool NFC rule functions to set/get filter match flags and values directly. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>