summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2014-11-24new helper: memcpy_from_msg()Al Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-23enic: use netdev_rss_key_fill() helperEric Dumazet
Use of well known RSS key might increase attack surface. Switch to a random one, using generic helper so that all ports share a common key. Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Christian Benvenuti <benve@cisco.com> Cc: Govindarajulu Varadarajan <_govind@gmx.com> Cc: Sujith Sankar <ssujith@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-23enic: use spin_lock(wq_lock) instead of spin_lock_irqsave(wq_lock)Govindarajulu Varadarajan
All the access to wq has been moved out of hardirq context. We no longer need to use spin_lock_irqsave. Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-23enic: use napi_schedule_irqoff()Govindarajulu Varadarajan
enic_isr_legacy(), enic_isr_msix() & enic_isr_msi() run from hard interrupt context. They can use napi_schedule_irqoff() instead of napi_schedule() Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-23mlx4: fix mlx4_en_set_rxfh()Eric Dumazet
mlx4_en_set_rxfh() can crash if no RSS indir table is provided. While we are at it, allow RSS key to be changed with ethtool -X Tested: myhost:~# cat /proc/sys/net/core/netdev_rss_key b6:89:91:f3:b2:c3:c2:90:11:e8:ce:45:e8:a9:9d:1c:f2:f6:d4:53:61:8b:26:3a:b3:9a:57:97:c3:b6:79:4d:2e:d9:66:5c:72:ed:b6:8e:c5:5d:4d:8c:22:67:30:ab:8a:6e:c3:6a myhost:~# ethtool -x eth0 RX flow hash indirection table for eth0 with 8 RX ring(s): 0: 0 1 2 3 4 5 6 7 RSS hash key: b6:89:91:f3:b2:c3:c2:90:11:e8:ce:45:e8:a9:9d:1c:f2:f6:d4:53:61:8b:26:3a:b3:9a:57:97:c3:b6:79:4d:2e:d9:66:5c:72:ed:b6:8e myhost:~# ethtool -X eth0 hkey \ 03:0e:e2:43:fa:82:0e:73:14:2d:c0:68:21:9e:82:99:b9:84:d0:22:e2:b3:64:9f:4a:af:00:fa:cc:05:b4:4a:17:05:14:73:76:58:bd:2f myhost:~# ethtool -x eth0 RX flow hash indirection table for eth0 with 8 RX ring(s): 0: 0 1 2 3 4 5 6 7 RSS hash key: 03:0e:e2:43:fa:82:0e:73:14:2d:c0:68:21:9e:82:99:b9:84:d0:22:e2:b3:64:9f:4a:af:00:fa:cc:05:b4:4a:17:05:14:73:76:58:bd:2f Reported-by: Ben Hutchings <ben@decadent.org.uk> Fixes: b9d1ab7eb42e ("mlx4: use netdev_rss_key_fill() helper") Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Amir Vadai <amirv@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-22RDMA/cxgb4/cxgb4vf/csiostor: Cleanup macros/register defines related to ↵Hariprasad Shenai
PCIE, RSS and FW This patch cleanups all PCIE, RSS & FW related macros/register defines that are defined in t4fw_api.h and the affected files. Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-22cxgb4/cxgb4vf/csiostor: Cleanup macros/register defines related to port and VIHariprasad Shenai
This patch cleanups all port and VI related macros/register defines that are defined in t4fw_api.h and the affected files. Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-22cxgb4/cxgb4vf/csiostor: Cleanup macros/register defines related to queuesHariprasad Shenai
This patch cleanups all queue related macros/register defines that are defined in t4fw_api.h and the affected files. Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-22RDMA/cxgb4/csiostor: Cleansup FW related macros/register defines for PF/VF ↵Hariprasad Shenai
and LDST This patch cleanups PF/VF and LDST related macros/register defines that are defined in t4fw_api.h and the affected files. Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-22RDMA/cxgb4: Cleanup Filter related macros/register definesHariprasad Shenai
This patch cleanups all filter related macros/register defines that are defined in t4fw_api.h and the affected files. Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-22i40e: enable fdb add code, remove unused codeJesse Brandeburg
The original FDB code submission wasn't correct and the code wasn't enabled. This removes some dead code (can use the common kernel code for fdb_del and fdb_dump) and correctly enables the fdb_add function pointer. The fdb_add functionality is important to i40e because it is needed for a workaround to allow bridges to work correctly on the i40e hardware. Reported-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Acked-by: Greg Rose <gregory.v.rose@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-21Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller
Conflicts: drivers/net/ieee802154/fakehard.c A bug fix went into 'net' for ieee802154/fakehard.c, which is removed in 'net-next'. Add build fix into the merge from Stephen Rothwell in openvswitch, the logging macros take a new initial 'log' argument, a new call was added in 'net' so when we merge that in here we have to explicitly add the new 'log' arg to it else the build fails. Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-21Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netLinus Torvalds
Pull networking fixes from David Miller: 1) Fix BUG when decrypting empty packets in mac80211, from Ronald Wahl. 2) nf_nat_range is not fully initialized and this is copied back to userspace, from Daniel Borkmann. 3) Fix read past end of b uffer in netfilter ipset, also from Dan Carpenter. 4) Signed integer overflow in ipv4 address mask creation helper inet_make_mask(), from Vincent BENAYOUN. 5) VXLAN, be2net, mlx4_en, and qlcnic need ->ndo_gso_check() methods to properly describe the device's capabilities, from Joe Stringer. 6) Fix memory leaks and checksum miscalculations in openvswitch, from Pravin B SHelar and Jesse Gross. 7) FIB rules passes back ambiguous error code for unreachable routes, making behavior confusing for userspace. Fix from Panu Matilainen. 8) ieee802154fake_probe() doesn't release resources properly on error, from Alexey Khoroshilov. 9) Fix skb_over_panic in add_grhead(), from Daniel Borkmann. 10) Fix access of stale slave pointers in bonding code, from Nikolay Aleksandrov. 11) Fix stack info leak in PPP pptp code, from Mathias Krause. 12) Cure locking bug in IPX stack, from Jiri Bohac. 13) Revert SKB fclone memory freeing optimization that is racey and can allow accesses to freed up memory, from Eric Dumazet. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (71 commits) tcp: Restore RFC5961-compliant behavior for SYN packets net: Revert "net: avoid one atomic operation in skb_clone()" virtio-net: validate features during probe cxgb4 : Fix DCB priority groups being returned in wrong order ipx: fix locking regression in ipx_sendmsg and ipx_recvmsg openvswitch: Don't validate IPv6 label masks. pptp: fix stack info leak in pptp_getname() brcmfmac: don't include linux/unaligned/access_ok.h cxgb4i : Don't block unload/cxgb4 unload when remote closes TCP connection ipv6: delete protocol and unregister rtnetlink when cleanup net/mlx4_en: Add VXLAN ndo calls to the PF net device ops too bonding: fix curr_active_slave/carrier with loadbalance arp monitoring mac80211: minstrel_ht: fix a crash in rate sorting vxlan: Inline vxlan_gso_check(). can: m_can: update to support CAN FD features can: m_can: fix incorrect error messages can: m_can: add missing delay after setting CCCR_INIT bit can: m_can: fix not set can_dlc for remote frame can: m_can: fix possible sleep in napi poll can: m_can: add missing message RAM initialization ...
2014-11-21Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds
Pull drm fixes from Dave Airlie: "Just two radeon and two intel fixes: endian and regression fixes" * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: drm/radeon: fix endian swapping in vbios fetch for tdp table drm/radeon: disable native backlight control on pre-r6xx asics (v2) drm/i915: Kick fbdev before vgacon drm/i915: drop WaSetupGtModeTdRowDispatch:snb
2014-11-21Merge tag 'pm+acpi-3.18-rc6' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI power management fix from Rafael Wysocki: "This is just a one-liner fixing a regression introduced in 3.13 that broke system suspend on some Chromebooks. On those machines there are ACPI device objects for some I2C devices that can wake up the system from sleep states, but that is done via a platform-specific mechanism and the ACPI objects don't contain any wakeup-related information. When we started to use ACPI power management with those devices (which happened during the 3.13 cycle), their configuration confused the ACPI PM layer that returned error codes from suspend callbacks for them causing system suspend to fail. However, the ACPI PM layer can safely ignore the wakeup setting from a device driver if the ACPI object corresponding to the device in question doesn't contain wakeup information in which case the driver itself is responsible for setting up the device for system wakeup" * tag 'pm+acpi-3.18-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI / PM: Ignore wakeup setting if the ACPI companion can't wake up
2014-11-21Merge tag 'devicetree-fixes-for-3.18' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree fixes from Rob Herring: "DeviceTree fixes for 3.18: - two fixes for OF selftest code - fix for PowerPC address parsing to disable work-around except on old PowerMACs - fix a crash when earlycon is enabled, but no device is found - DT documentation fixes and missing vendor prefixes All but the doc updates are also for stable" * tag 'devicetree-fixes-for-3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: of/selftest: Fix testing when /aliases is missing of/selftest: Fix off-by-one error in removal path documentation: pinctrl bindings: Fix trivial typo 'abitrary' devicetree: bindings: Add vendor prefix for Micron Technology, Inc. of: Add vendor prefix for Chips&Media, Inc. of/base: Fix PowerPC address parsing hack devicetree: vendor-prefixes.txt: fix whitespace of: Fix crash if an earlycon driver is not found of/irq: Drop obsolete 'interrupts' vs 'interrupts-extended' text of: Spelling s/stucture/structure/ devicetree: bindings: add sandisk to the vendor prefixes
2014-11-21Merge tag 'pci-v3.18-fixes-3' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fixes from Bjorn Helgaas: "These are fixes for an issue with 64-bit PCI bus addresses on 32-bit PAE kernels, an APM X-Gene problem (it depended on a generic change we removed before merging), a fix for my hotplug device configuration changes, and a devicetree documentation update. Resource management: - Support 64-bit bridge windows if we have 64-bit dma_addr_t (Yinghai Lu) PCI device hotplug: - Apply _HPX Link Control settings to all devices with a link (Yinghai Lu) Generic host bridge driver: - Add DT binding for "linux,pci-domain" property (Lucas Stach) APM X-Gene: - Assign resources to bus before adding new devices (Duc Dang)" * tag 'pci-v3.18-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI: Support 64-bit bridge windows if we have 64-bit dma_addr_t PCI: Apply _HPX Link Control settings to all devices with a link PCI: Add missing DT binding for "linux,pci-domain" property PCI: xgene: Assign resources to bus before adding new devices
2014-11-21Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pendingLinus Torvalds
Pull SCSI target fixes from Nicholas Bellinger: "Here are the target-pending fixes queued for v3.18-rc6. The highlights include: - target-core OOPs fix with tcm_qla2xxx + vxworks FC initiators + zero length SCSI commands having a transfer direction set. (Roland + Craig Watson) - vhost-scsi OOPs fix to explicitly prevent WWPN endpoint configfs group removal while qemu still has an active reference. (Paolo + nab) - ib_srpt fix for RDMA hardware with lower srp_sq_size limits. (Bart) - two ib_isert work-arounds for running on ocrdma hardware (Or + Sagi + Chris) - iscsi-target discovery portal typo + SPC-3 PR Preempt SA key matching fix (Steve)" * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: IB/isert: Adjust CQ size to HW limits target: return CONFLICT only when SA key unmatched iser-target: Handle DEVICE_REMOVAL event on network portal listener correctly ib_isert: Add max_send_sge=2 minimum for control PDU responses srp-target: Retry when QP creation fails with ENOMEM iscsi-target: return the correct port in SendTargets vhost-scsi: Take configfs group dependency during VHOST_SCSI_SET_ENDPOINT target: Don't call TFO->write_pending if data_length == 0
2014-11-21Merge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dmaLinus Torvalds
Pull dmaengine fixes from Vinod Koul: "We have couple of fixes for dmaengine queued up: - dma mempcy fix for dma configuration of sun6i by Maxime - pl330 fixes: First the fixing allocation for data buffers by Liviu and then Jon's fixe for fifo width and usage" * 'fixes' of git://git.infradead.org/users/vkoul/slave-dma: dmaengine: Fix allocation size for PL330 data buffer depth. dmaengine: pl330: Limit MFIFO usage for memcpy to avoid exhausting entries dmaengine: pl330: Align DMA memcpy operations to MFIFO width dmaengine: sun6i: Fix memcpy operation
2014-11-21Merge tag 'master-2014-11-20' of ↵David S. Miller
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next John W. Linville says: ==================== pull request: wireless-next 2014-11-21 Please pull this batch of updates intended for the 3.19 stream... For the mac80211 bits, Johannes says: "It has been a while since my last pull request, so we accumulated another relatively large set of changes: * TDLS off-channel support set from Arik/Liad, with some support patches I did * custom regulatory fixes from Arik * minstrel VHT fix (and a small optimisation) from Felix * add back radiotap vendor namespace support (myself) * random MAC address scanning for cfg80211/mac80211/hwsim (myself) * CSA improvements (Luca) * WoWLAN Net Detect (wake on network found) support (Luca) * and lots of other smaller changes from many people" For the Bluetooth bits, Johan says: "Here's another set of patches for 3.19. Most of it is again fixes and cleanups to ieee802154 related code from Alexander Aring. We've also got better handling of hardware error events along with a proper API for HCI drivers to notify the HCI core of such situations. There's also a minor fix for mgmt events as well as a sparse warning fix. The code for sending HCI commands synchronously also gets a fix where we might loose the completion event in the case of very fast HW (particularly easily reproducible with an emulated HCI device)." And... "Here's another bluetooth-next pull request for 3.19. We've got: - Various fixes, cleanups and improvements to ieee802154/mac802154 - Support for a Broadcom BCM20702A1 variant - Lots of lockdep fixes - Fixed handling of LE CoC errors that should trigger SMP" For the Atheros bits, Kalle says: "One ath6kl patch and rest for ath10k, but nothing really major which stands out. Most notable: o fix resume (Bartosz) o firmware restart is now faster and more reliable (Michal) o it's now possible to test hardware restart functionality without crashing the firmware using hw-restart parameter with simulate_fw_crash debugfs file (Michal)" On top of that...both ath9k and mwifiex get their usual level of updates. Of note is the ath9k spectral scan work from Oleksij Rempel. I also pulled from the wireless tree in order to avoid some merge issues. Please let me know if there are problems! ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-21defxx: Clean up DEFEA resource managementMaciej W. Rozycki
Reserve DEFEA resources according to actual use. There are three regions, for the ESIC ASIC's CSRs, for the discrete Burst Holdoff register, and for the PDQ ASIC's CSRs. The latter is mapped in the memory or port I/O address space depending on configuration. The two formers are hardwired and always mapped in the port I/O address space. Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-21defxx: Disable DEFEA's ESIC I/O decoding on shutdownMaciej W. Rozycki
Make sure the option card does not respond after shutdown by disabling it via ESIC's Expansion Board Control register. Also disable memory and port I/O decoders, the latter in particular to disable slot-specific I/O decoding that otherwise remains active even in the board is disabled. Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-21defxx: Correct DEFEA's ESIC MMIO decodingMaciej W. Rozycki
Use ESIC's memory area 1 (MEMCS1) and its Memory Address High Compare and Memory Address Low Compare registers to set up the MMIO range for decoding accesses to PDQ ASIC registers. Previously the PDQ ASIC was thought to be addressable with the memory area 0 (MEMCS0) and its Memory Address Compare and Memory Address Mask registers. The MMIO range allocated for the option card is preset via ECU (EISA Configuration Utility) and can be disabled, so handle such a case gracefully too. Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-21defxx: Fix DEFPA enable error propagationMaciej W. Rozycki
Correctly propagate the error code from `pci_enable_device' if non zero. Currently a failure of this function is correctly recognized and device initialization abandoned, however a successful completion code returned. Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-21Merge branch 'master' of ↵David S. Miller
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2014-11-20 This series contains updates to ixgbevf, i40e and i40evf. Emil updates ixgbevf with much of the work that Alex Duyck did while at Intel. First updates the driver to clear the status bits on allocation instead of in the cleanup routine, this way we can leave the recieve descriptor rings as a read only memory block until we actually have buffers to give back to the hardware. Clean up ixgbevf_clean_rx_irq() by creating ixgbevf_process_skb_field() to merge several similar operations into this new function. Cleanup temporary variables within the receive hot-path and reducing the scope of variables that do not need to exist outside the main loop. Save on stack space by just storing our updated values back in next_to_clean instead of using a stack variable, which also collapses the size the function. Improve performace on IOMMU enabled systems and reduce cache misses by changing the basic receive patch for ixgbevf so that instead of receiving the data into an skb, it is received into a double buffered page. Add netpoll support by creating ixgbevf_netpoll(), which is a callback for .ndo_poll_controller to allow for the VF interface to be used with netconsole. Mitch provides several cleanups and trivial fixes for i40e and i40evf. First is a fix the overloading of the msg_size field in the arq_event_info struct by splitting the field into two and renaming to indicate the actual function of each field. Updates code comments to match the actual function. Cleanup several checkpatch.pl warnings by adding or removing blank lines, aligning function parameters, and correcting over-long lines (which makes the code more readable). Shannon provides a patch for i40e to write the extra bits that will turn off the ITR wait for the interrupt, since we want the SW INT to go off as soon as possible. v2: updated patch 07 based on feedback from Alex Duyck by - adding pfmemalloc check to a new function for reusable page - moved atomic_inc outside of #if/else in ixgbevf_add_rx_frag() - reverted the removal of the API check in ixgbevf_change_mtu() ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-21amd-xgbe: Add support for the skb->xmit_more flagLendacky, Thomas
Add support to delay telling the hardware about data that is ready to be transmitted if the skb->xmit_more flag is set. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-21amd-xgbe: Perform Tx coalescing on a packet basisLendacky, Thomas
The current form of Tx coalescing works on a descriptor basis instead of on a packet basis and doesn't take into account TSO packets. Update the Tx coalescing support to work on a packet basis, taking into account the number of packets associated with a TSO transmit. Also, only activate the Tx timer if a timer value is set. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-21amd-xgbe: Remove unused variableLendacky, Thomas
The tso_header variable in the xgbe_tx_ring_data structure is not used, remove it. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-21amd-xgbe: Add BQL supportLendacky, Thomas
Call the appropriate BQL functions to track the number of bytes queued during Tx processing and to track the number of packets and bytes that have been transmitted during Tx complete processing. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-21amd-xgbe: Separate Tx/Rx ring data fields into new structsLendacky, Thomas
Move the Tx and Rx related fields within the xgbe_ring_data struct into their own structs in order to more easily see what fields are used for each operation. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-21amd-xgbe: Incorporate Smatch coding suggestionLendacky, Thomas
The Smatch tool indicated that one of the if statements in xgbe-dev.c could be rewritten to remove a redundant check for the 'err' variable in an if statement. Change the statement as suggested and add a comment to help clarify. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-21amd-xgbe: Tx engine must not be active before stopping itLendacky, Thomas
If the Tx engine is told to stop while it is actively processing Tx descriptors it is possible that the Tx descriptor(s) will not be closed out properly. When the Tx engine is restarted this could result in the driver being stuck on the improperly closed descriptor. Update the driver to wait for the Tx engine to be in a stopped or suspended state before issuing the stop command. This has not been an issue to date, but it's a good safe-guard to have. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-21amd-xgbe: Add a read memory barrier to Tx/Rx pathLendacky, Thomas
Add a read memory barrier to the Tx and Rx paths where the ownership bit is checked to be sure that all descriptor fields are read after having read the ownership bit for the descriptor. This has not been an issue to date, but it's a good safe-guard to have. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-21net: USB: Deletion of unnecessary checks before the function call "kfree"Markus Elfring
The kfree() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-21net: Xilinx: Deletion of unnecessary checks before two function callsMarkus Elfring
The functions kfree() and of_node_put() test whether their argument is NULL and then return immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Reviewed-by: Soren Brinkmann <soren.brinkmann@xilinx.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-21IBM-EMAC: Deletion of unnecessary checks before the function call "of_dev_put"Markus Elfring
The of_dev_put() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-21net/mlx4_en: mlx4_en_set_settings() always fails when autoneg is setSaeed Mahameed
Fix ethtool set settings to not check AUTONEG_ENABLE mlx4_en_set_settings should not check if cmd->autoneg == AUTONEG_ENABLE, cmd->autoneg can be enabled by default and this check will fail other settings requests. mlx4_en driver doesn't support changing autoneg value, but shouldn't fail the request in case cmd->autoneg was set. Fixes: d48b3ab ("net/mlx4_en: Use PTYS register to set ethtool settings (Speed)") Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: Amir Vadai <amirv@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-21drivers: atm: eni: Add pci_dma_mapping_error() callTina Johnson
Added a pci_dma_mapping_error() call to check for mapping errors before further using the dma handle. In case of error, control goes to a new label where the incoming skb is freed. Unchecked dma handles were found using Coccinelle: @rule1@ expression e1; identifier x; @@ *x = pci_map_single(...); ... when != pci_dma_mapping_error(e1,x) Signed-off-by: Tina Johnson <tinajohnson.1234@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-21macvtap: advance iov iterator when needed in macvtap_put_user()Jason Wang
When mergeable buffer is used, vnet_hdr_sz is greater than sizeof struct virtio_net_hdr. So we need advance the iov iterators in this case. Fixes 6c36d2e26cda1ad3e2c4b90dd843825fc62fe5b4 ("macvtap: Use iovec iterators") Cc: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Jason Wang <jasowang@redhat.com> Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-21mlx4: don't duplicate kvfree()Al Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Acked-by: Amir Vadai <amirv@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-21mlx5: don't duplicate kvfree()Al Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Acked-by: Eli Cohen <eli@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-21r8152: adjust rtl_start_rxhayeswang
If there is a error for r8152_submit_rx(), add the remaining rx buffers to the list. Then the remaining rx buffers could be submitted later. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-21r8152: adjust r8152_submit_rxhayeswang
The behavior of handling the returned status from r8152_submit_rx() is almost same, so let r8152_submit_rx() deal with the error directly. This could avoid the duplicate code. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-21net: bcmgenet: log RX buffer allocation and RX/TX dma failuresFlorian Fainelli
To help troubleshoot heavy memory pressure conditions, add a bunch of statistics counter to log RX buffer allocation and RX/TX DMA mapping failures. These are reported like any other counters through the ethtool stats interface. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-21net: systemport: log RX buffer allocation and RX/TX DMA failuresFlorian Fainelli
To help troubleshoot heavy memory pressure conditions, add a bunch of statistics counter to log RX buffer allocation and RX/TX DMA mapping failures. These are reported like any other counters through the ethtool stats interface. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-21vlan: introduce *vlan_hwaccel_push_inside helpersJiri Pirko
Use them to push skb->vlan_tci into the payload and avoid code duplication. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Acked-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-21vlan: rename __vlan_put_tag to vlan_insert_tag_set_protoJiri Pirko
Name fits better. Plus there's going to be introduced __vlan_insert_tag later on. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Acked-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-21vlan: kill vlan_put_tag helperJiri Pirko
Since both tx and rx paths work with skb->vlan_tci, there's no need for this function anymore. Switch users directly to __vlan_hwaccel_put_tag. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-21vlan: make __vlan_hwaccel_put_tag return voidJiri Pirko
Always returns the same skb it gets, so change to void. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Acked-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-11-21net: phy: micrel: add copyright entryJohan Hovold
Add myself to the list of copyright holders. Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>