aboutsummaryrefslogtreecommitdiffstats
path: root/drivers (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-08-23NET: nps_enet: drop control framesNoam Camus1-4/+4
We set controller to drop control frames and not trying to pass them on. This is only needed for debug reasons. Signed-off-by: Noam Camus <noamc@ezchip.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-23NET: nps_enet: TX done race conditionNoam Camus1-7/+3
We need to set tx_skb pointer before send frame. If we receive interrupt before we set pointer we will try to free SKB with wrong pointer. Now we are sure that SKB pointer will never be NULL during handling TX done and check is removed. Signed-off-by: Noam Camus <noamc@ezchip.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-23NET: nps_enet: replace use of cause registerNoam Camus2-24/+5
When interrupt is received we read directly from control register for RX/TX instead of reading cause register since this register fails to indicate TX done when TX interrupt is "edge mode". Signed-off-by: Noam Camus <noamc@ezchip.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-23vxlan: GRO support at tunnel layerTom Herbert1-2/+7
Add calls to gro_cells infrastructure to do GRO when receiving on a tunnel. Testing: Ran 200 netperf TCP_STREAM instance - With fix (GRO enabled on VXLAN interface) Verify GRO is happening. 9084 MBps tput 3.44% CPU utilization - Without fix (GRO disabled on VXLAN interface) Verified no GRO is happening. 9084 MBps tput 5.54% CPU utilization Signed-off-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-23gro: Fix remcsum offload to deal with frags in GROTom Herbert1-14/+9
The remote checksum offload GRO did not consider the case that frag0 might be in use. This patch fixes that by accessing headers using the skb_gro functions and not saving offsets relative to skb->head. Signed-off-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-23net/xen-netfront: only clean up queues if presentChas Williams1-2/+3
If you simply load and unload the module without starting the interfaces, the queues are never created and you get a bad pointer dereference. Signed-off-by: Chas Williams <3chas3@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-23net: dsa: mv88e6xxx: set 802.1Q mode to FallbackVivien Didelot1-1/+1
The current Secure port mode requires the port-based VLANs to also be valid in the 802.1Q VLAN Table Unit. The current hardware bridging support only configures the port-based VLANs, thus is broken. A new patchset is required to adapt the hardware bridging code to fully support the Secure port mode. In the meantime, change the 802.1Q mode of every ports to Fallback, which filtering is more permissive, and doesn't add this restriction to handle port-based and tagged-based VLANs. Fixes: 8efdda4a1b60 ("net: dsa: mv88e6xxx: use port 802.1Q mode Secure") Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-21Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller44-490/+366
Conflicts: drivers/net/usb/qmi_wwan.c Overlapping additions of new device IDs to qmi_wwan.c Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-21enic: Fix build failure with SRIOV disabled.David S. Miller1-1/+1
err_out_vnic_unregister is used regardless of whether SRIOV is enabled or not. Reported-by: Jesse Brandeburg <jesse.brangeburg@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-20Merge tag 'pm+acpi-4.2-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pmLinus Torvalds2-5/+17
Pull power management and ACPI fixes from Rafael Wysocki: "These fix a recent regression in the ACPI backlight code and a memory leak in the Exynos cpufreq driver. Specifics: - Fix a recently introduced issue in the ACPI backlight code which causes lockdep to complain about a circular lock dependency during initialization (Hans de Goede). - Fix a possible memory during initialization in the Exynos cpufreq driver (Shailendra Verma)" * tag 'pm+acpi-4.2-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: exynos: Fix for memory leak in case SoC name does not match ACPI / video: Fix circular lock dependency issue in the video-detect code
2015-08-20vxlan: metadata based tunneling for IPv6Jiri Benc1-29/+40
Support metadata based (formerly flow based) tunneling also for IPv6. This complements commit ee122c79d422 ("vxlan: Flow based tunneling"). Signed-off-by: Jiri Benc <jbenc@redhat.com> Acked-by: Thomas Graf <tgraf@suug.ch> Acked-by: Alexei Starovoitov <ast@plumgrid.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-20vxlan: do not shadow flags variableJiri Benc1-4/+4
The 'flags' variable is already defined in the outer scope. Signed-off-by: Jiri Benc <jbenc@redhat.com> Acked-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-20vxlan: provide access function for vxlan socket address familyJiri Benc1-4/+4
Signed-off-by: Jiri Benc <jbenc@redhat.com> Acked-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-20route: move lwtunnel state to dst_entryJiri Benc2-3/+2
Currently, the lwtunnel state resides in per-protocol data. This is a problem if we encapsulate ipv6 traffic in an ipv4 tunnel (or vice versa). The xmit function of the tunnel does not know whether the packet has been routed to it by ipv4 or ipv6, yet it needs the lwtstate data. Moving the lwtstate data to dst_entry makes such inter-protocol tunneling possible. As a bonus, this brings a nice diffstat. Signed-off-by: Jiri Benc <jbenc@redhat.com> Acked-by: Roopa Prabhu <roopa@cumulusnetworks.com> Acked-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-20ip_tunnels: use tos and ttl fields also for IPv6Jiri Benc1-4/+4
Rename the ipv4_tos and ipv4_ttl fields to just 'tos' and 'ttl', as they'll be used with IPv6 tunnels, too. Signed-off-by: Jiri Benc <jbenc@redhat.com> Acked-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-20ip_tunnels: add IPv6 addresses to ip_tunnel_keyJiri Benc1-3/+3
Add the IPv6 addresses as an union with IPv4 ones. When using IPv4, the newly introduced padding after the IPv4 addresses needs to be zeroed out. Signed-off-by: Jiri Benc <jbenc@redhat.com> Acked-by: Thomas Graf <tgraf@suug.ch> Acked-by: Alexei Starovoitov <ast@plumgrid.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-21Merge branches 'acpi-video' and 'cpufreq-fixes'Rafael J. Wysocki2-5/+17
* acpi-video: ACPI / video: Fix circular lock dependency issue in the video-detect code * cpufreq-fixes: cpufreq: exynos: Fix for memory leak in case SoC name does not match
2015-08-20net: xgene Remove xgene specific phy and MAC lookup functionsJeremy Linton1-36/+2
Convert the xgene_get_mac_address to device_get_mac_address(), and xgene_get_phy_mode() to device_get_phy_mode(). Signed-off-by: Jeremy Linton <jeremy.linton@arm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-20smsc911x: Remove dev==NULL check.Jeremy Linton1-3/+0
The dev==NULL check in smsc911x_probe_config is useless and isn't providing any additional protection. If a fwnode doesn't exist then an appropriate error should be returned by device_get_phy_mode() covering the original case of a missing of/fwnode. Signed-off-by: Jeremy Linton <jeremy.linton@arm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-20device property: Add ETH_ALEN check, update comments.Jeremy Linton1-8/+13
This patch adds MAC address length check back into the device_get_mac_addr() function before calling is_valid_ether_addr() similar to the way the OF routine does it. Update the comments for the two new functions. Signed-off-by: Jeremy Linton <jeremy.linton@arm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-20Merge tag 'wireless-drivers-next-for-davem-2015-08-19' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-nextDavid S. Miller192-2794/+7123
Kalle Valo says: ==================== Major changes: ath10k: * add support for qca99x0 family of devices * improve performance of tx_lock * add support for raw mode (802.11 frame format) and software crypto engine enabled via a module parameter ath9k: * add fast-xmit support wil6210: * implement TSO support * support bootloader v1 and onwards iwlwifi: * Deprecate -10.ucode * Clean ups towards multiple Rx queues * Add support for longer CMD IDs. This will be required by new firmwares since we are getting close to the u8 limit. * bugfixes for the D0i3 power state * Add basic support for FTM * polish the Miracast operation * fix a few power consumption issues * scan cleanup * fixes for D0i3 system state * add paging for devices that support it * add again the new RBD allocation model * add more options to the firmware debug system * add support for frag SKBs in Tx ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-20rt2x00: use DECLARE_EWMAJohannes Berg3-15/+10
Instead of using the out-of-line EWMA calculation, use DECLARE_EWMA() to create static inlines. On x86/64 this results in code that's one byte larger (for me), but reduces struct link_ant and struct link size by the two unsigned long values that store the parameters each. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-20ath5k: use DECLARE_EWMAJohannes Berg5-7/+8
This reduces code size slightly (at least on x86/64) while also removing memory consumption by two unsigned long values for each ath5k device. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-20virtio_net: use DECLARE_EWMAJohannes Berg2-12/+11
Instead of using the out-of-line EWMA calculation, use DECLARE_EWMA() to create static inlines. On x86/64 this results in no change in code size for me, but reduces the struct receive_queue size by the two unsigned long values that store the parameters. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-20bnx2x: Fix vxlan endianity issueYuval Mintz1-1/+1
Commit f34fa14cc033 ("bnx2x: Add vxlan RSS support") has introduced an endianity issue when passing the vxlan UDP port to the HW. Reported-by: <fengguang.wu@intel.com> Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-20vrf: ndo_add|del_slave drop unnecessary checksNikolay Aleksandrov1-5/+1
When ndo_add|del_slave ops are used, they're taken from the respective master device's netdev ops, so if the master device is a VRF only then the VRF ops will get called thus no need to check the type of the master. Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-20vrf: move vrf_insert_slave so we can drop a goto labelNikolay Aleksandrov1-6/+2
We can simplify do_vrf_add_slave by moving vrf_insert_slave in the end of the enslaving and thus eliminate an error goto label. It always succeeds and isn't needed before that anyway. Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-20vrf: remove unnecessary duplicate checkNikolay Aleksandrov1-8/+0
The upper/lower functions already check for duplicate slaves so no need to do it again. Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-20vrf: don't panic on cache create failureNikolay Aleksandrov1-1/+1
It's pointless to panic on cache create failure when that case is handled and even more so since it's not a kernel-wide fatal problem so don't panic. Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-20vrf: plug skb leaksNikolay Aleksandrov1-3/+10
Currently whenever a packet different from ETH_P_IP is sent through the VRF device it is leaked so plug the leaks and properly drop these packets. Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Acked-by: David Ahern <dsa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-20Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netLinus Torvalds7-57/+83
Pull networking fixes from David Miller: 1) Out of bounds array access in 802.11 minstrel code, from Adrien Schildknecht. 2) Don't use skb_get() in IGMP/MLD code paths, as this makes pskb_may_pull() BUG. From Linus Luessing. 3) Fix off by one in ipv4 route dumping code, from Andy Whitcroft. 4) Fix deadlock in reqsk_queue_unlink(), from Eric Dumazet. 5) Fix ppp device deregistration wrt. netns deletion, from Guillaume Nault. 6) Fix deadlock when creating per-cpu ipv6 routes, from Martin KaFai Lau. 7) Fix memory leak in batman-adv code, from Sven Eckelmann. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: batman-adv: Fix memory leak on tt add with invalid vlan net: phy: fix semicolon.cocci warnings net: qmi_wwan: add HP lt4111 LTE/EV-DO/HSPA+ Gobi 4G Module be2net: avoid vxlan offloading on multichannel configs ipv6: Fix a potential deadlock when creating pcpu rt ipv6: Add rt6_make_pcpu_route() ipv6: Remove un-used argument from ip6_dst_alloc() net: phy: workaround for buggy cable detection by LAN8700 after cable plugging net: ethernet: micrel: fix an error code ppp: fix device unregistration upon netns deletion net: phy: fix PHY_RUNNING in phy_state_machine Revert "net: limit tcp/udp rmem/wmem to SOCK_{RCV,SND}BUF_MIN" inet: fix potential deadlock in reqsk_queue_unlink() gianfar: Restore link state settings after MAC reset ipv4: off-by-one in continuation handling in /proc/net/route net: fix wrong skb_get() usage / crash in IGMP/MLD parsing code mac80211: fix invalid read in minstrel_sort_best_tp_rates()
2015-08-20Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pendingLinus Torvalds4-23/+44
Pull SCSI target fixes from Nicholas Bellinger: "This contains a v4.2-rc specific RCU module unload regression bug-fix, a long-standing iscsi-target bug-fix for duplicate target_xfer_tags during NOP processing from Alexei, and two more small REPORT_LUNs emulation related patches to make Solaris FC host LUN scanning happy from Roland. There is also one patch not included that allows target-core to limit the number of fabric driver SGLs per I/O request using residuals, that is currently required as a work-around for FC hosts which don't honor EVPD block-limits settings. At this point, it will most likely become for-next material" * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: target: Fix handling of small allocation lengths in REPORT LUNS target: REPORT LUNS should return LUN 0 even for dynamic ACLs target/iscsi: Fix double free of a TUR followed by a solicited NOPOUT target: Perform RCU callback barrier before backend/fabric unload
2015-08-20Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermalLinus Torvalds2-33/+48
Pull thermal fixes from Eduardo Valentin: "Last minute fixes on the thermal-soc tree. There is a fix of a long lasting bug in cpu cooling device, thanks for RMK for being pushing this" * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal: thermal/cpu_cooling: update policy limits if clipped_freq < policy->max thermal/cpu_cooling: rename max_freq as clipped_freq in notifier thermal/cpu_cooling: rename cpufreq_val as clipped_freq thermal/cpu_cooling: convert 'switch' block to 'if' block in notifier thermal/cpu_cooling: quit early after updating policy thermal/cpu_cooling: No need to initialize max_freq to 0 thermal: cpu_cooling: fix lockdep problems in cpu_cooling thermal: power_allocator: do not use devm* interfaces
2015-08-18target: Fix handling of small allocation lengths in REPORT LUNSRoland Dreier1-16/+16
REPORT LUNS should not fail just because the allocation length is less than 16. The relevant section of SPC-4 is: 4.2.5.6 Allocation length The ALLOCATION LENGTH field specifies the maximum number of bytes or blocks that an application client has allocated in the Data-In Buffer. The ALLOCATION LENGTH field specifies bytes unless a different requirement is stated in the command definition. An allocation length of zero specifies that no data shall be transferred. This condition shall not be considered an error. So we should just truncate our response rather than return an error. Signed-off-by: Roland Dreier <roland@purestorage.com> Signed-off-by: Spencer Baugh <sbaugh@catern.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2015-08-18Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queueDavid S. Miller14-59/+236
Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2015-08-18 This series contains updates to igb, e100, e1000e and ixgbe. Shota Suzuki provides a fix for a possible overflow in igb_set_interrupt_capability() which leads to an oops. When changing the number of queues by "ethtool -L", set IGB_FLAG_QUEUE_PAIRS in the same manner as when initializing the igb driver. Vasily Averin provides a fix for a missing rtnl_unlock() for when we error out due to not being able to allocate memory for our queues. Stefan Assman provides a couple of fixes for igb/igbvf. First changes the igb driver in probe to simply call igb_enable_sriov() instead of igb_sriov_reinit() since we are starting from scratch. Then in igbvf, fix the driver where it does not clear the buffer_info->dma in all cases after calling dma_unmap_single(), which was found by changing the MTU twice. Richard Cochran implements the periodic output function using the programmable clock outputs available in i210 when possible, falling back to the target time for longer periods. Todd adds support for the Marvell PHY 1512 which is required for i354 devices. Then updates igb to make sure SR-IOV init uses the correct number of queues, since recent changes could result in the PF holding onto all of the queues. Alex Williamson provides a fix in the case where a guest OS does not support hot-unplug, so disable SR-IOV prior to unregister_netdev() to avoid the problem. Jia-Ju Bai provides several patches, first knocks some collecting dust off an old e100 driver to add a check to avoid a null pointer dereference. Then cleans up a possible resource leak by releasing the skb buffer allocated when the e100_xmit_prepare() runs into an issue in the DMA mapping. In igb, add a missing rtnl_unlock() for when we error out due to igb_sriov_reinit() in the igb_init_interrupt_scheme(). Provides a e1000e fix, based on suggestions from Alex Duyck to move head/tail register writing to e1000_configure_tx/rx() to avoid a possible null pointer dereference (similar to igb driver). Lastly, fix a possible memory leak in igb_probe(), where the memory shadow_vfta allocated by kcalloc in igb_sw_init() is not freed. Mark simplifies port-specific macros for ixgbe by eliminating explicit comparisons with 0 and enclose formal parameters in parens to eliminate the risk of an operator precedence issue. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-18vrf: simplify the netdev notifier functionNikolay Aleksandrov1-3/+2
We can drop the check because if vrf_ptr is present then we must have the vrf device as a master and since we're running with rtnl it can't go away. Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-18vrf: don't check for dstats and rth in uninit pathNikolay Aleksandrov1-4/+2
dstats and rth are always present because we fail the device registration if they can't be allocated in vrf_init() (ndo_init) so drop the unnecessary checks. Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-18vrf: drop unused num_slaves memberNikolay Aleksandrov1-2/+0
slave_queue has a num_slaves member which is unused, drop it. Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-18vrf: drop unnecessary dev refcnt changesNikolay Aleksandrov1-2/+0
netdev_master_upper_dev_link/unlink already do a dev_hold/put on the devices being linked, so no need to take another reference. Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-18hv_netvsc: Fix dereference of nvdev before checkAndrew Schwartzmeyer1-2/+5
Passes static analysis by Smatch. Signed-off-by: Andrew Schwartzmeyer <andschwa@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-18cxgb4: memory corruption in debugfsDan Carpenter1-5/+6
You can't use kstrtoul() with an int or it causes memory corruption. Also j should be unsigned or we have underflow bugs. I considered changing "j" to unsigned long but everything fits in a u32. Fixes: 8e3d04fd7d70 ('cxgb4: Add MPS tracing support') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-18enic: Fix namespace pollution causing build errors.David S. Miller3-7/+7
drivers/net/built-in.o: In function `.vnic_wq_devcmd2_alloc': (.text+0x49fe40): multiple definition of `.vnic_wq_devcmd2_alloc' drivers/scsi/built-in.o:(.text+0xb4318): first defined here drivers/net/built-in.o:(.opd+0x2af00): multiple definition of `vnic_wq_devcmd2_alloc' drivers/scsi/built-in.o:(.opd+0xad70): first defined here drivers/net/built-in.o: In function `.vnic_wq_init_start': (.text+0x49f9c0): multiple definition of `.vnic_wq_init_start' drivers/scsi/built-in.o:(.text+0xb3b58): first defined here drivers/net/built-in.o:(.opd+0x2ae88): multiple definition of `vnic_wq_init_start' drivers/scsi/built-in.o:(.opd+0xace0): first defined here Rename these to 'enic_*' to avoid the conflict with the functiosn of the same name in the snic scsi driver. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-18bnx2x: Add vxlan RSS supportRajesh Borundia4-0/+123
Latest FW submission added some vxlan offload capabilities to our device. This patch adds the ability to connect to the vxlan NDOs and configure the UDP port associated with it in the HW. The device would now be capable of performing RSS according to the inner headers of the vxlan packets. Signed-off-by: Rajesh Borundia <Rajesh.Borundia@qlogic.com> Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-18dsa: mv88e6xxx: Set DSA mode based on chip abilitiesAndrew Lunn1-5/+8
Older devices only support a single DSA frame format, where as newer devices have two. Take this into account when configuring a DSA port. The port needs to be in plain old DSA mode, since this is a DSA link, where as the newer format can be used for the CPU port. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-18net: dsa: Add dsa_is_dsa_port() helperAndrew Lunn1-3/+2
Add an inline helper for determining is a port is a DSA port. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-08-18ixgbe: TRIVIAL fix up double 'the' and comment styleJacob Keller1-2/+1
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-08-18ixgbe: Simplify port-specific macrosMark Rustad1-9/+9
Simplify port-specific macros by eliminating explicit comparison with 0. More importantly, enclose formal parameter in parens to eliminate the risk of an operator precedence surprise. Signed-off-by: Mark Rustad <mark.d.rustad@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-08-18igb: make sure SR-IOV init uses the right number of queuesTodd Fujinaka1-2/+7
Recent changes to igb_probe_vfs() could lead to the PF holding onto all of the queues. Reorder igb_probe_vfs() to be before gb_init_queue_configuration() and add some more error checking. Signed-off-by: Todd Fujinaka <todd.fujinaka@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-08-18igbvf: clear buffer_info->dma after dma_unmap_single()Stefan Assmann1-0/+1
The driver doesn't clear buffer_info->dma after calling dma_unmap_single() in all cases. This has been discovered by changing the mtu twice, which caused the following backtrace. [ 68.569280] WARNING: CPU: 2 PID: 1860 at drivers/iommu/intel-iommu.c:3517 intel_unmap+0x20c/0x220() [ 68.579392] Driver unmaps unmatched page at PFN fffc2a40 [ 68.585322] Modules linked in: igbvf ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_nat_ipv4 nf_nat kvm_intel kvm igb megs [ 68.599163] CPU: 2 PID: 1860 Comm: ifconfig Not tainted 4.2.0-rc4+ #147 [ 68.606543] Hardware name: IBM -[546025Z]-/00Y7630, BIOS -[VVE134TUS-1.51]- 10/17/2013 [ 68.615473] 0000000000000dbd ffff88046441bb08 ffffffff81a5ad0b ffffffff81e2f9ea [ 68.623775] ffff88046441bb58 ffff88046441bb48 ffffffff81056b55 ffff88047fc583c0 [ 68.632075] 0000000000000000 ffff880469a8e600 00000000fffc2a40 ffff880465b32098 [ 68.640375] Call Trace: [ 68.643109] [<ffffffff81a5ad0b>] dump_stack+0x48/0x5d [ 68.648844] [<ffffffff81056b55>] warn_slowpath_common+0x95/0xe0 [ 68.655549] [<ffffffff81056c56>] warn_slowpath_fmt+0x46/0x70 [ 68.661960] [<ffffffff8158a614>] ? find_iova+0x54/0x90 [ 68.667791] [<ffffffff815988dc>] intel_unmap+0x20c/0x220 [ 68.673815] [<ffffffff8159891e>] intel_unmap_page+0xe/0x10 [ 68.680038] [<ffffffffa0067536>] igbvf_clean_rx_ring+0x96/0x370 [igbvf] [ 68.687516] [<ffffffffa0067915>] igbvf_down+0x105/0x110 [igbvf] [ 68.694219] [<ffffffffa0067beb>] igbvf_change_mtu+0x16b/0x180 [igbvf] [...] Signed-off-by: Stefan Assmann <sassmann@kpanic.de> Acked-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-08-18igb: Fix a memory leak in igb_probeJia-Ju Bai1-0/+1
In error handling code of igb_probe, the memory adapter->shadow_vfta allocated by kcalloc in igb_sw_init is not freed. So when register_netdev or igb_init_i2c is failed, a memory leak will occur. This patch adds kfree to fix it. Signed-off-by: Jia-Ju Bai <baijiaju1990@163.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>