aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2013-02-04ipcomp: Mark as netns_ok.David S. Miller1-0/+1
This module is namespace aware, netns_ok was just disabled by default for sanity. Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-04net: fec: fix miss init spinlockFrank Li1-0/+1
BUG: spinlock bad magic on CPU#1, swapper/0/1 lock: 0xbfae0f8c, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0 Backtrace: [<80011d54>] (dump_backtrace+0x0/0x10c) from [<804e7800>] (dump_stack+0x18/0x1c) r6:bfae0000 r5:bfae0f8c r4:00000000 r3:806c1310 [<804e77e8>] (dump_stack+0x0/0x1c) from [<804e9f20>] (spin_dump+0x80/0x94) [<804e9ea0>] (spin_dump+0x0/0x94) from [<804e9f60>] (spin_bug+0x2c/0x30) r5:805f6f8c r4:bfae0f8c [<804e9f34>] (spin_bug+0x0/0x30) from [<80257984>] (do_raw_spin_lock+0x170/0x1b0 ) r5:806b4950 r4:bfae0f8c [<80257814>] (do_raw_spin_lock+0x0/0x1b0) from [<804ed15c>] (_raw_spin_lock_irqs ave+0x18/0x20) [<804ed144>] (_raw_spin_lock_irqsave+0x0/0x20) from [<8033c694>] (fec_ptp_start_ cyclecounter+0x3c/0x120) r4:bfae0f8c r3:00000002 [<8033c658>] (fec_ptp_start_cyclecounter+0x0/0x120) from [<80339e08>] (fec_resta rt+0x56c/0x5f8) r8:00000000 r7:806e6f48 r6:00000112 r5:806b4950 r4:bfae0000 [<8033989c>] (fec_restart+0x0/0x5f8) from [<8033b9e4>] (fec_probe+0x508/0xa48) Signed-off-by: Frank Li <Frank.Li@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-04team: ab: set active port option as changed when port is leavingJiri Pirko1-1/+12
In case port is leaving the team, set the option "activeport" as changed so the change can be properly propagated to userspace Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-04team: move netlink event notifiers after team_port_leave()Jiri Pirko1-4/+6
In team_port_del(), there is need to be do all the cleanup related things first and netlink event notifiers should be called after that. This fixes two problems: team carrier is now correctly set (port is removed from list first) mode can set option as changed in .port_leave op Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-04team: handle sending port list in the same way option list is sentJiri Pirko1-84/+93
Essentially do the same thing with port list as with option list. Multipart netlink message. Side effect is that port event message can send port which is not longer in team->port_list. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-04net/mlx4_en: Fix compilation error when CONFIG_INET isn't definedHadar Hen Zion1-0/+4
ip_eth_mc_map function can't be used when CONFIG_INET isn't defined. Fixed compilation error by adding CONFIG_INET define check before using the function. Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-04net/mlx4_en: Fix error propagation for ethtool helper functionHadar Hen Zion1-18/+34
Propagate return value of mlx4_en_ethtool_add_mac_rule_by_ipv4 in case of failure. Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-04mcast: do not check 'rv' twice in a rowJean Sacren1-4/+2
With the loop, don't check 'rv' twice in a row. Without the loop, 'rv' doesn't even need to be checked. Make the comment more grammar-friendly. Signed-off-by: Jean Sacren <sakiwit@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-04net: remove redundant check for timer pending state before del_timerYing Xue11-38/+21
As in del_timer() there has already placed a timer_pending() function to check whether the timer to be deleted is pending or not, it's unnecessary to check timer pending state again before del_timer() is called. Signed-off-by: Ying Xue <ying.xue@windriver.com> Cc: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-04be2net: update driver version to 4.6.xSathya Perla1-1/+1
Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-04be2net: fix re-loaded PF driver to re-gain control of its VFsSathya Perla3-64/+153
Currently, when the PF driver is unloaded and re-loaded while VFs are attached to VMs, it loses control of its VFs. The PF driver now uses the newly defined/created GET_IFACE_LIST cmd (available in FW ver >= 4.6) to query the if_id of the VFs (enabled in its previous life). The PF driver then uses the if_id for further VF configuration. The GET_IFACE_MAC_LIST cmd has also implemented in BE3 FW for PF to query pmac-ids used by its VFs. Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-04drivers:net:misc: Remove unnecessary alloc/OOM messagesJoe Perches3-12/+3
alloc failures already get standardized OOM messages and a dump_stack. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-04wireless: Remove unnecessary alloc/OOM messages, alloc cleanupsJoe Perches22-133/+50
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. Remove now unused variables. Remove unnecessary memset after kzalloc->kcalloc. Whitespace cleanups for these changes. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-04wimax: Remove unnecessary alloc/OOM messages, alloc cleanupsJoe Perches2-12/+5
alloc failures already get standardized OOM messages and a dump_stack. Convert kzalloc's with multiplies to kcalloc. Remove now unused size variables. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-04wan: Remove unnecessary alloc/OOM messagesJoe Perches4-15/+10
alloc failures already get standardized OOM messages and a dump_stack. Hoist assigns from if tests. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-04drivers: net: usb: Remove unnecessary alloc/OOM messagesJoe Perches6-41/+17
alloc failures already get standardized OOM messages and a dump_stack. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-04ethernet: Remove unnecessary alloc/OOM messages, alloc cleanupsJoe Perches38-197/+97
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>
2013-02-04can: Remove unnecessary alloc/OOM messagesJoe Perches8-20/+3
alloc failures already get standardized OOM messages and a dump_stack. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-04caif: Remove unnecessary alloc/OOM messagesJoe Perches1-6/+0
alloc failures already get standardized OOM messages and a dump_stack. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-04sctp: sctp_close: fix release of bindings for deferred call_rcu'sDaniel Borkmann1-4/+5
It seems due to RCU usage, i.e. within SCTP's address binding list, a, say, ``behavioral change'' was introduced which does actually not conform to the RFC anymore. In particular consider the following (fictional) scenario to demonstrate this: do: Two SOCK_SEQPACKET-style sockets are opened (S1, S2) S1 is bound to 127.0.0.1, port 1024 [server] S2 is bound to 127.0.0.1, port 1025 [client] listen(2) is invoked on S1 From S2 we call one sendmsg(2) with msg.msg_name and msg.msg_namelen parameters set to the server's address S1, S2 are closed goto do The first pass of this loop passes successful, while the second round fails during binding of S1 (address still in use). What is happening? In the first round, the initial handshake is being done, and, at the time close(2) is called on S1, a non-graceful shutdown is performed via ABORT since in S1's receive queue an unprocessed packet is present, thus stating an error condition. This can be considered as a correct behavior. During close also all bound addresses are freed, thus nothing *must* be active anymore. In reference to RFC2960: After checking the Verification Tag, the receiving endpoint shall remove the association from its record, and shall report the termination to its upper layer. (9.1 Abort of an Association) Also, no half-open states are supported, thus after an ungraceful shutdown, we leave nothing behind. However, this seems not to be happening though. In a real-world scenario, this is exactly where it breaks the lksctp-tools functional test suite, *for instance*: ./test_sockopt test_sockopt.c 1 PASS : getsockopt(SCTP_STATUS) on a socket with no assoc test_sockopt.c 2 PASS : getsockopt(SCTP_STATUS) test_sockopt.c 3 PASS : getsockopt(SCTP_STATUS) with invalid associd test_sockopt.c 4 PASS : getsockopt(SCTP_STATUS) with NULL associd test_sockopt.c 5 BROK : bind: Address already in use The underlying problem is that sctp_endpoint_destroy() hasn't been triggered yet while the next bind attempt is being done. It will be triggered eventually (but too late) by sctp_transport_destroy_rcu() after one RCU grace period: sctp_transport_destroy() sctp_transport_destroy_rcu() ----. sctp_association_put() [*] <--+--> sctp_packet_free() sctp_association_destroy() [...] sctp_endpoint_put() skb->destructor sctp_endpoint_destroy() sctp_wfree() sctp_bind_addr_free() sctp_association_put() [*] Thus, we move out the condition with sctp_association_put() as well as the sctp_packet_free() invocation and the issue can be solved. We also better free the SCTP chunks first before putting the ref of the association. With this patch, the example above (which simulates a similar scenario as in the implementation of this test case) and therefore also the test suite run successfully through. Tested by myself. Cc: Vlad Yasevich <vyasevich@gmail.com> Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Acked-by: Vlad Yasevich <vyasevich@gmail.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-04cxgb3: Update VLAN extraction stats in the GRO pathVipul Pandya1-1/+3
Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: Vipul Pandya <vipul@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-04netns: bond: allow unprivileged users to control bond deviceGao feng1-2/+5
reduce the permission check of bond device's ioctl. allow the userns root to control the bond device. Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-04netns: bridge: allow unprivileged users add/delete mdb entryGao feng1-3/+0
since the mdb table is belong to bridge device,and the bridge device can only be seen in one netns. So it's safe to allow unprivileged user which is the creator of userns and netns to modify the mdb table. Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-04netns: ebtable: allow unprivileged users to operate ebtablesGao feng1-10/+14
ebt_table is a private resource of netns, operating ebtables in one netns will not affect other netns, we can allow the creator user of userns and netns to change the ebtables. Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-04netns: fdb: allow unprivileged users to add/del fdb entriesGao feng1-6/+0
Right now,only ixgdb,macvlan,vxlan and bridge implement fdb_add/fdb_del operations. these operations only operate the private data of net device. So allowing the unprivileged users who creates the userns and netns to add/del fdb entries will do no harm to other netns. Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-03stmmac: don't return zero on failure path in stmmac_pci_probe()Alexey Khoroshilov1-0/+1
If stmmac_dvr_probe() fails in stmmac_pci_probe(), it breaks off initialization, deallocates all resources, but returns zero. The patch adds -ENODEV as return value in this case. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-02Merge branch 'delete-wanrouter' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linuxDavid S. Miller21-4483/+11
Paul Gortmaker says: ==================== The removal of wanrouter code was originally listed in the (now gone) feature removal file since May 2012, and an RFC of the deletion was posted[1] in late 2012. The overall concept was given an OK, but defconfig contamination, build failures, etc. meant that it didn't quite make it into mainline for 3.8. Since that time, Dan discovered (via code audit) a runtime bug that proves nobody has been using this for over four years[2]. With that new information, I think it makes sense for someone to follow through on Joe's original RFC and get this done for the 3.9 release. In addition to resolving the build failures of the RFC by keeping stub headers, this also splits the change into two parts, just like the token ring removal did. Part #1 decouples the mainline kernel from the expired subsystem, and part #2 does the large scale deletion of the subsystem content. The advantage of the above, is that a "git blame" will never lead you to a 4000+ line deletion commit. The large scale deletion will never show up in a "git blame" and hence the same advantages that we get from the "--irreversible-delete" in the review stage of "git format-patch" are also embedded into the git history itself. This may seem like a moot point to some, but for those who spend a considerable amount of time data mining in the git history, this is probably worth doing. I have done build tests of all[mod/yes]config for both the stage 1 (Makefile and Kconfig) and stage 2 (full driver delete) as a sanity check, and the issues with the previously posted RFC should be gone. Speaking of "--irreversible-delete" -- these patches were created with that option, so if you want to use them locally, you are going to have to pull (location below) the content instead of doing a "git am" of the mailed out content. [1] http://patchwork.ozlabs.org/patch/198794/ [2] http://www.spinics.net/lists/netdev/msg218670.html ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-02qlcnic: silence false positive overflow warningDan Carpenter1-1/+1
We actually store the MAC address as well as the board_name here. The longest board_name is 75 characters so there is more than enough room to hold the 17 character MAC and the ": " divider. But making this buffer larger silences a static checker warning. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-By: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-02bnx2x: Force link UP when the interface is in LOOPBACK modeMahesh Bandewar1-0/+6
When the interface does not have carrier but when it's put into loopback mode (for tests), it does not make sense to not have the carrier. So force it! Signed-off-by: Mahesh Bandewar <maheshb@google.com> Acked-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-02Merge branch 'intel'David S. Miller20-381/+283
Jeff Kirsher says: ==================== This series contains updates to ixgbe and e1000e. The ixgbe patches are a mix of fixes, cleanup and added functionality. The first fix is for traffic classes, where if the mapping has changed reset the NIC. The other ixgbe fix resolves an issue where the device lookup neglected to do a pci_dev_put() to decrement the device reference count. The ixgbe cleanup was done by Josh, where the auto-negotiation variables were renamed/cleaned up and refactored. The remaining patches are from Bruce to do additional cleanup on e1000e as well as bump the driver version. Most notably is the cleanup to use the kernel IEEE MII definitions where possible instead of the local MII definitions. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-31e1000e: use generic IEEE MII definitionsBruce Allan9-204/+138
For standard IEEE MII-compatible transceivers, the kernel has generic register and bit definitions. Use those instead of redundant local defines. Do not replace references of MII_CR_SPEED_10 with BMCR_SPEED10 (0x0000) when it is not necessary (i.e. when it is bitwise OR'ed with another value). Some whitespace issues in the surrounding context of the above changes are also cleaned up. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-01-31e1000e: resolve -Wunused-parameter compile warningsBruce Allan6-33/+31
Remove the unused parameter when possible, otherwise use __always_unused attribute. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-01-31e1000e: update driver version stringBruce Allan1-1/+1
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-01-31e1000e: cleanup some whitespace and indentation issuesBruce Allan7-48/+49
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-01-31e1000e: cleanup: group OR'ed bit settings with parensBruce Allan1-2/+3
For clarity, wrap OR'ed bit settings with parentheses. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-01-31e1000e: cleanup defines.hBruce Allan1-21/+0
Remove redundant defines which are defined elsewhere. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-01-31ixgbe: autoneg variable refactoringJosh Hay6-35/+19
Removes the autoneg parameter from the setup_link functions. Adds local variable autoneg to setup_link functions to be passed to get_link_capabilities functions if needed. Signed-off-by: Josh Hay <joshua.a.hay@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
2013-01-31ixgbe: removed unused variable from setup_link_speedJosh Hay6-8/+4
Removes the autoneg parameter from the setup_link_speed functions. These functions do nothing with this parameter. Signed-off-by: Josh Hay <joshua.a.hay@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-01-31ixgbe: rename autoneg variablesJosh Hay2-29/+28
Renames some autoneg/speed variables to be more consistent with check_link, get_link_capabilities, and setup_link function calls. Initializes instances of autoneg. Signed-off-by: Josh Hay <joshua.a.hay@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-01-31ixgbe: Fix device ref count bugGreg Rose1-0/+2
The device lookup neglected to do a pci_dev_put() to decrement the device reference count. Reported-by: Elena Gurevich <elena.gurevich@toganetworks.com> Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-01-31ixgbe: Reset the NIC if up2tc has changedAmir Hanania1-4/+12
Check for up2tc change and call ixgbe_dcbnl_devreset() if the mapping has changed but the number of TC's in use has not changed. Signed-off-by: Amir Hanania <amir.hanania@intel.com> Tested-by: Jack Morgan <jack.morgan@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-01-31wanrouter: delete now orphaned header content, files/driversPaul Gortmaker12-4417/+8
The wanrouter support was identified earlier as unused for years, and so the previous commit totally decoupled it from the kernel, leaving the related wanrouter files present, but totally inert. Here we take the final step in that cleanup, by doing a wholesale removal of these files. The two step process is used so that the large deletion is decoupled from the git history of files that we still care about. The drivers deleted here all were dependent on the Kconfig setting CONFIG_WAN_ROUTER_DRIVERS. A stub wanrouter.h header (kernel & uapi) are left behind so that drivers/isdn/i4l/isdn_x25iface.c continues to compile, and so that we don't accidentally break userspace that expected these defines. Cc: Joe Perches <joe@perches.com> Cc: Dan Carpenter <dan.carpenter@oracle.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2013-01-31wanrouter: completely decouple obsolete code from kernel.Paul Gortmaker9-66/+3
The original suggestion to delete wanrouter started earlier with the mainline commit f0d1b3c2bcc5de8a17af5f2274f7fcde8292b5fc ("net/wanrouter: Deprecate and schedule for removal") in May 2012. More importantly, Dan Carpenter found[1] that the driver had a fundamental breakage introduced back in 2008, with commit 7be6065b39c3 ("netdevice wanrouter: Convert directly reference of netdev->priv"). So we know with certainty that the code hasn't been used by anyone willing to at least take the effort to send an e-mail report of breakage for at least 4 years. This commit does a decouple of the wanrouter subsystem, by going after the Makefile/Kconfig and similar files, so that these mainline files that we are keeping do not have the big wanrouter file/driver deletion commit tied into their history. Once this commit is in place, we then can remove the obsolete cyclomx drivers and similar that have a dependency on CONFIG_WAN_ROUTER_DRIVERS. [1] http://www.spinics.net/lists/netdev/msg218670.html Originally-by: Joe Perches <joe@perches.com> Cc: Dan Carpenter <dan.carpenter@oracle.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2013-01-31Merge branch 'mlx4'David S. Miller10-81/+152
Merge mlx4 bug fixes from Amir Vadai. Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-31net/mlx4_en: Fix transmit timeout when driver restarts portAmir Vadai3-8/+14
Under heavy CPU load, changing, ring size/mtu/etc. could result in transmit timeout, since stop-start port might take more than 10 seconds. Calling netif_detach_device to prevent tx queue transmit timeout. netif_detach_device() is not called under ndo_stop, because netif_carrier_off will prevent the timeout, and device should not be marked as not present, or else user won't be able to start it later on. CC: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Eugenia Emantayev <eugenia@mellanox.com> Signed-off-by: Amir Vadai <amirv@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-31net/mlx4_en: Don't reassign port mac address on firmware that supports itMatan Barak3-3/+10
Mac reassignments should only be done when not supported by the firmware. To accomplish that, checking firmware capability bit to know whether we should reassign macs in the driver. Signed-off-by: Matan Barak <matanb@mellanox.com> Signed-off-by: Amir Vadai <amirv@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-31net/mlx4_core: Use firmware driven flow steering hash modeHadar Hen Zion4-24/+2
The Firmware dynamically changes flow steering hash configuration from covering L2 only to "full" L2/L3/L4 mode needed. The dynamic change allows the driver to set hard coded hash configuration which is changed by the firmware from L2 to L2/L3/L4 when attaching the first L3/L4 flow steering rule and back to L2 when there are no more such rules. Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com> Signed-off-by: Amir Vadai <amirv@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-31net/mlx4_en: Fix ethtool rules leftovers after module unloadedHadar Hen Zion3-0/+21
As part of the driver unload flow, all steering rules must be deleted, make sure to remove the rules that were set through ethtool. Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com> Signed-off-by: Amir Vadai <amirv@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-31net/mlx4_en: Block insertion of ethtool steering rules while the interface is downHadar Hen Zion1-2/+4
Attaching steering rules while the interface is down is an invalid operation, block it. Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com> Signed-off-by: Amir Vadai <amirv@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-31net/mlx4_en: Fix vlan mask for ethtool steering rulesHadar Hen Zion1-4/+9
The vlan mask field should be validated and assigned according to the field size which is 12 bits. Also replace the numeric 0xfff mask with existing kernel macro. Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com> Signed-off-by: Amir Vadai <amirv@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>