aboutsummaryrefslogtreecommitdiffstats
path: root/drivers (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-10-28wcn36xx: Remove warning message when dev is NULL for arm64 dma_alloc.yfw1-17/+17
arm64 has requirement that all the dma operations have actual device. Otherwise, following warnning message shown and dma allocation fails: WARNING: CPU: 0 PID: 954 at arch/arm64/mm/dma-mapping.c:106 __dma_alloc+0x24c/0x258() Use an actual device structure for DMA allocation Modules linked in: wcn36xx wcn36xx_platform CPU: 0 PID: 954 Comm: ifconfig Not tainted 4.0.0+ #14 Hardware name: Qualcomm Technologies, Inc. MSM 8916 MTP (DT) Call trace: [<ffffffc000089904>] dump_backtrace+0x0/0x124 [<ffffffc000089a38>] show_stack+0x10/0x1c [<ffffffc000627114>] dump_stack+0x80/0xc4 [<ffffffc0000b2e64>] warn_slowpath_common+0x98/0xd0 [<ffffffc0000b2ee8>] warn_slowpath_fmt+0x4c/0x58 [<ffffffc00009487c>] __dma_alloc+0x248/0x258 [<ffffffbffc009270>] wcn36xx_dxe_allocate_mem_pools+0xc4/0x108 [wcn36xx] [<ffffffbffc0079c4>] wcn36xx_start+0x38/0x240 [wcn36xx] [<ffffffc0005f161c>] ieee80211_do_open+0x1b0/0x9a4 [<ffffffc0005f1e68>] ieee80211_open+0x58/0x68 [<ffffffc00051693c>] __dev_open+0xb0/0x120 [<ffffffc000516c10>] __dev_change_flags+0x88/0x150 [<ffffffc000516cf4>] dev_change_flags+0x1c/0x5c [<ffffffc000570950>] devinet_ioctl+0x644/0x6f0 Signed-off-by: Yin, Fengwei <fengwei.yin@linaro.org> Acked-by: Bjorn Andersson <bjorn.andersson@sonymobile.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-10-28wcn36xx: introduce per-channel ring buffer locksBob Copeland2-8/+20
wcn36xx implements a ring buffer for transmitted frames for each (high and low priority) DMA channel. The ring buffers are lockless: new frames are inserted at the head of the queue, while finished packets are reaped from the tail. Unfortunately, the list manipulations are missing any kind of barriers so are susceptible to various races: for example, a TX completion handler might read an updated desc->ctrl before the head has actually advanced, and then null out the ctl->skb pointer while it is still being used in the TX path. Simplify things here by adding a spin lock when traversing the ring. This change increased stability for me without adding any noticeable overhead on my platform (xperia z). Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-10-28ath9k: fix phyerror codesZefir Kurtisi2-10/+22
Some of the ath9k_phyerr enums were wrong from the beginning (and even before). Most of the time the codes were used for counters to be displayed over debugfs, which made this a non-functional issue. Some (e.g. ATH9K_PHYERR_FALSE_RADAR_EXT) are used for radar detection and require the correct code to work as intended. This patch includes: a) fixes ATH9K_PHYERR_FALSE_RADAR_EXT: 24 => 36 ATH9K_PHYERR_CCK_LENGTH_ILLEGAL: 32 => 28 ATH9K_PHYERR_CCK_POWER_DROP: 33 => 29 ATH9K_PHYERR_HT_CRC_ERROR: 34 => 32 ATH9K_PHYERR_HT_LENGTH_ILLEGAL: 35 => 33 ATH9K_PHYERR_HT_RATE_ILLEGAL: 36 => 34 b) extensions ATH9K_PHYERR_CCK_BLOCKER = 24 ATH9K_PHYERR_HT_ZLF = 35 ATH9K_PHYERR_GREEN_FIELD = 37 Aside from the correction and completion made in the enum, the patch also extends the display of the related counters in the debugfs. Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-10-28orinoco_usb: return error in ezusb_probe when alloc_orinocodev failsJohn Linville1-0/+1
The current code exits after alloc_orinocodev, but fails to change the return value to something that indicates the failure. This patch changes the return value to -ENOMEM. https://bugzilla.kernel.org/show_bug.cgi?id=106181 Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-10-28airo: fix scan after SIOCSIWAP (airo_set_wap)Ondrej Zary1-3/+17
SIOCSIWAP (airo_set_wap) affects scan: only the AP specified by SIOCSIWAP is present in scan results. This makes NetworkManager work for the first time but then unable to find any other APs. Clear APList before starting scan and set it back after scan completes to work-around the problem. To avoid losing packets during scan, modify disable_MAC() to omit netif_carrier_off() call when lock == 2. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-10-28airo: Track APList_rid in struct airo_infoOndrej Zary1-38/+19
Instead of dynamically allocating APList, make it a member of struct airo_info to always track state of APList_rid. This simplifies suspend/resume and allows removal of readAPListRid. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2015-10-28Merge tag 'iwlwifi-next-for-kalle-2015-10-25' of https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-nextKalle Valo20-101/+296
* bug fix for TDLS * fixes and cleanups in scan * support of several scan plans * improvements in FTM * fixes in FW API * improvements in the failure paths when the bus is dead * other various small things here and there
2015-10-27net/mlx4: Copy/set only sizeof struct mlx4_eqe bytesCarol L Soto2-2/+2
When doing memcpy/memset of EQEs, we should use sizeof struct mlx4_eqe as the base size and not caps.eqe_size which could be bigger. If caps.eqe_size is bigger than the struct mlx4_eqe then we corrupt data in the master context. When using a 64 byte stride, the memcpy copied over 63 bytes to the slave_eq structure. This resulted in copying over the entire eqe of interest, including its ownership bit -- and also 31 bytes of garbage into the next WQE in the slave EQ -- which did NOT include the ownership bit (and therefore had no impact). However, once the stride is increased to 128, we are overwriting the ownership bits of *three* eqes in the slave_eq struct. This results in an incorrect ownership bit for those eqes, which causes the eq to seem to be full. The issue therefore surfaced only once 128-byte EQEs started being used in SRIOV and (overarchitectures that have 128/256 byte cache-lines such as PPC) - e.g after commit 77507aa249ae "net/mlx4_core: Enable CQE/EQE stride support". Fixes: 08ff32352d6f ('mlx4: 64-byte CQE/EQE support') Signed-off-by: Carol L Soto <clsoto@linux.vnet.ibm.com> Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-27net/mlx4_en: Explicitly set no vlan tags in WQE ctrl segment when no vlan is presentJack Morgenstein1-0/+2
We do not set the ins_vlan field to zero when no vlan id is present in the packet. Since WQEs in the TX ring are not zeroed out between uses, this oversight could result in having vlan flags present in the WQE ctrl segment when no vlan is preset. Fixes: e38af4faf01d ('net/mlx4_en: Add support for hardware accelerated 802.1ad vlan') Reported-by: Gideon Naim <gideonn@mellanox.com> Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-27vhost: fix performance on LE hostsMichael S. Tsirkin1-0/+7
commit 2751c9882b947292fcfb084c4f604e01724af804 ("vhost: cross-endian support for legacy devices") introduced a minor regression: even with cross-endian disabled, and even on LE host, vhost_is_little_endian is checking is_le flag so there's always a branch. To fix, simply check virtio_legacy_is_little_endian first. Cc: Greg Kurz <gkurz@linux.vnet.ibm.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Greg Kurz <gkurz@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-27net: hns: fixes the bug tested XGE by ethtool -pLi Peng1-8/+1
delete action of ETHTOOL_ID_ON/ETHTOOL_ID_OFF in XGE ethtool -p, so Hardware control the LED state instead of software. Signed-off-by: Li Peng <lipeng321@huawei.com> Signed-off-by: Yisen Zhuang <yisen.zhuang@huawei.com> Signed-off-by: yankejian <yankejian@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-27gianfar: Increase TX_TIMEOUT to 5HZAbhimanyu1-1/+1
Increased TX_TIMEOUT to 5HZ to accommodate worst case situation for traffic and CPU intensive use cases Signed-off-by: Priyanka Jain <Priyanka.Jain@freescale.com> Signed-off-by: Abhimanyu <abhimanyu@freescale.com> Acked-by: Claudiu Manoil <claudiu.manoil@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-27Merge tag 'wireless-drivers-next-for-davem-2015-10-27' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-nextDavid S. Miller367-728/+10073
Kalle Valo says: ==================== here's a bigger pull request for 4.4. The diffstat looks scary as we created a new directory realtek for all realtek drivers. In the future I'm planning to create similar directories for all vendors, currently we just have ath, mediatek and realtek. This change has been in linux-next for a couple of weeks so it should be safe, but of course you never know. There's also a new driver rtl8xxxu for few realtek USB devices. This just made it to the last linux-next build. Otherwise there's nothing really special, more info below. If time permits, and it's ok for you, I'm hoping to send you a one more pull request this week. brcmfmac * using netdev carrier state * add and rework some cfg80211 callbacks mainly for AP mode * use devcoredump when triggered by firmware event realtek * create new directory drivers/net/wireless/realtek/ for all realtek drivers, not visible to users (no kconfig changes etc) * add rtl8xxxu, a new mac80211 driver for RTL8723AU, RTL8188CU, RTL8188RU, RTL8191CU, RTL8192CU and hopefully more in the future ath10k * add board 2 API support for automatically choosing correct board file * data path optimisations * disable PCI power save for qca988x and QCA99x0 due to interop reasons wil6210 * BlockAckReq support * firmware crashdump using devcoredump * capture all frames with sniffer ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-27amd-xgbe: Fix race between access of desc and desc indexLendacky, Thomas2-1/+5
During Tx cleanup it's still possible for the descriptor data to be read ahead of the descriptor index. A memory barrier is required between the read of the descriptor index and the start of the Tx cleanup loop. This allows a change to a lighter-weight barrier in the Tx transmit routine just before updating the current descriptor index. Since the memory barrier does result in extra overhead on arm64, keep the previous change to not chase the current descriptor value. This prevents the execution of the barrier for each loop performed. Suggested-by: Alexander Duyck <alexander.duyck@gmail.com> Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-27forcedeth: fix unilateral interrupt disabling in netpoll pathNeil Horman1-13/+11
Forcedeth currently uses disable_irq_lockdep and enable_irq_lockdep, which in some configurations simply calls local_irq_disable. This causes errant warnings in the netpoll path as in netpoll_send_skb_on_dev, where we disable irqs using local_irq_save, leading to the following warning: WARNING: at net/core/netpoll.c:352 netpoll_send_skb_on_dev+0x243/0x250() (Not tainted) Hardware name: netpoll_send_skb_on_dev(): eth0 enabled interrupts in poll (nv_start_xmit_optimized+0x0/0x860 [forcedeth]) Modules linked in: netconsole(+) configfs ipv6 iptable_filter ip_tables ppdev parport_pc parport sg microcode serio_raw edac_core edac_mce_amd k8temp snd_hda_codec_realtek snd_hda_codec_generic forcedeth snd_hda_intel snd_hda_codec snd_hwdep snd_seq snd_seq_device snd_pcm snd_timer snd soundcore snd_page_alloc i2c_nforce2 i2c_core shpchp ext4 jbd2 mbcache sr_mod cdrom sd_mod crc_t10dif pata_amd ata_generic pata_acpi sata_nv dm_mirror dm_region_hash dm_log dm_mod [last unloaded: scsi_wait_scan] Pid: 1940, comm: modprobe Not tainted 2.6.32-573.7.1.el6.x86_64.debug #1 Call Trace: [<ffffffff8107bbc1>] ? warn_slowpath_common+0x91/0xe0 [<ffffffff8107bcc6>] ? warn_slowpath_fmt+0x46/0x60 [<ffffffffa00fe5b0>] ? nv_start_xmit_optimized+0x0/0x860 [forcedeth] [<ffffffff814b3593>] ? netpoll_send_skb_on_dev+0x243/0x250 [<ffffffff814b37c9>] ? netpoll_send_udp+0x229/0x270 [<ffffffffa02e3299>] ? write_msg+0x39/0x110 [netconsole] [<ffffffffa02e331b>] ? write_msg+0xbb/0x110 [netconsole] [<ffffffff8107bd55>] ? __call_console_drivers+0x75/0x90 [<ffffffff8107bdba>] ? _call_console_drivers+0x4a/0x80 [<ffffffff8107c445>] ? release_console_sem+0xe5/0x250 [<ffffffff8107d200>] ? register_console+0x190/0x3e0 [<ffffffffa02e71a6>] ? init_netconsole+0x1a6/0x216 [netconsole] [<ffffffffa02e7000>] ? init_netconsole+0x0/0x216 [netconsole] [<ffffffff810020d0>] ? do_one_initcall+0xc0/0x280 [<ffffffff810d4933>] ? sys_init_module+0xe3/0x260 [<ffffffff8100b0d2>] ? system_call_fastpath+0x16/0x1b ---[ end trace f349c7af88e6a6d5 ]--- console [netcon0] enabled netconsole: network logging started Fix it by modifying the forcedeth code to use disable_irq_nosync_lockdep_irqsavedisable_irq_nosync_lockdep_irqsave instead, which saves and restores irq state properly. This also saves us a little code in the process Tested by the reporter, with successful restuls Patch applies to the head of the net tree Signed-off-by: Neil Horman <nhorman@tuxdriver.com> CC: "David S. Miller" <davem@davemloft.net> Reported-by: Vasily Averin <vvs@sw.ru> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-27sfc: replace spinlocks with bit ops for busy poll lockingBert Kenward2-75/+58
This patch reduces the overhead of locking for busy poll. Previously the state was protected by a lock, whereas now it's manipulated solely with atomic operations. Signed-off-by: Shradha Shah <sshah@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-27qede: Add basic ethtool supportSudarsana Kalluru4-2/+596
This adds basic ethtool operations to the qed driver, allowing support in: - Statistics gathering [ethtool -S] - Setting of debug level [ethtool -s <interface> msglvl] - Getting basic information [ethtool, ethtool -i] In addition it adds the ability to change the MTU. Signed-off-by: Sudarsana Kalluru <Sudarsana.Kalluru@qlogic.com> Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-27qed: Add statistics supportManish Chopra5-1/+293
Device statistics can be gathered on-demand. This adds the qed support for reading the statistics [both function and port] from the device, and adds to the public API a method for requesting the current statistics. Signed-off-by: Manish Chopra <Manish.Chopra@qlogic.com> Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-27qede: Add support for linkSudarsana Kalluru1-0/+47
This adds basic link functionality to qede - driver still doesn't provide users with an API to change any link property, but it does request qed to initialize the link using default configuration, and registers a callback that allows it to get link notifications. This patch adds the ability of the driver to set the carrier as active and to enable traffic as a result of async. link notifications. Following this patch, driver should be capable of running traffic. Signed-off-by: Sudarsana Kalluru <Sudarsana.Kalluru@qlogic.com> Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-27qed: Add link supportYuval Mintz7-5/+1098
Physical link is handled by the management Firmware. This patch lays the infrastructure for attention handling in the driver, as link change notifications arrive via async. attentions, as well the handling of such notifications. This patch also extends the API with the protocol drivers by adding registered callbacks which the protocol driver passes to qed in order to be notified of async. events originating from the FW/HW. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-27qede: classification configurationSudarsana Kalluru2-0/+251
Add the ability to configure basic classification in driver by implementing ndo_set_mac_address() and ndo_set_rx_mode(). Signed-off-by: Sudarsana Kalluru <Sudarsana.Kalluru@qlogic.com> Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-27qede: Add basic network device supportYuval Mintz2-0/+1935
This patch includes the basic Rx/Tx support for the driver [although carrier will still never be turned on]. Following this patch the driver registers a network device, initializes it and prepares it for traffic. Signed-off-by: Sudarsana Kalluru <Sudarsana.Kalluru@qlogic.com> Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-27qed: Add slowpath L2 supportManish Chopra9-0/+2166
This patch adds to the qed the support to configure various L2 elements, such as channels and basic filtering conditions. It also enhances its public API to allow qede to later utilize this functionality. Signed-off-by: Manish Chopra <Manish.Chopra@qlogic.com> Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-27qede: Add basic Network driverYuval Mintz5-0/+436
The Qlogic Everest Driver for Ethernet is the Ethernet specific module for QL4xxx ethernet products by Qlogic. This patch adds a very minimal PCI driver, one that doesn't yet register a network device, but one that does interact with qed and does a basic initialization of the HW. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-27qed: Add basic L2 interfaceYuval Mintz5-1/+165
This patch adds a public API for a network driver to work on top of QED. The interface itself is very minimal - it's mostly infrastructure, as the only content it has after this patch is a query for HW-based information required for the creation of a network interface [I.e., no actual protocol-specific configurations are supported]. Signed-off-by: Manish Chopra <Manish.Chopra@qlogic.com> Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-27qed: Add module with basic common supportYuval Mintz23-0/+15010
The Qlogic Everest Driver is the backend module for the QL4xxx ethernet products by Qlogic. This module serves two main purposes: 1. It's responsible to contain all the common code that will be shared between the various drivers that would be used with said line of products. Flows such as chip initialization and de-initialization fall under this category. 2. It would abstract the protocol-specific HW & FW components, allowing the protocol drivers to have a clean APIs which is detached in its slowpath configuration from the actual HSI. This adds a very basic module without any protocol-specific bits. I.e., this adds a basic implementation that almost entirely falls under the first category. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-28Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-armLinus Torvalds1-1/+2
Pull ARM fixes from Russell King: "Two fixes for ARM and one for clkdev: - Fix another build issue with vdsomunge on non-glibc systems - Fix a randconfig build error caused by an invalid configuration - Fix a clkdev problem causing the Nokia n700 to no longer boot" * 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm: clkdev: fix clk_add_alias() with a NULL alias device name ARM: 8445/1: fix vdsomunge not to depend on glibc specific byteswap.h ARM: make RiscPC depend on MMU
2015-10-26Merge tag 'arcnet-for-4.4-rc1' of git://git.pengutronix.de/git/mgr/linuxDavid S. Miller5-18/+270
Michael Grzeschik says: ==================== This series includes code simplifaction. The main changes are the correct xceiver handling (enable/disable) of the com20020 cards. The driver now handles link status change detection. The EAE PCI-ARCNET cards now make use of the rotary encoded subdevice indexing and got support for led triggers on transmit and reconnection events. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-26net: mv643xx_eth: add missing of_node_putJulia Lawall1-1/+3
for_each_available_child_of_node performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows (http://coccinelle.lip6.fr): // <smpl> @@ expression root,e; local idexpression child; @@ for_each_available_child_of_node(root, child) { ... when != of_node_put(child) when != e = child ( return child; | + of_node_put(child); ? return ...; ) ... } // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-26ath6kl: add missing of_node_putJulia Lawall1-0/+1
for_each_compatible_node performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows (http://coccinelle.lip6.fr): // <smpl> @@ expression e; local idexpression n; @@ for_each_compatible_node(n,...) { ... when != of_node_put(n) when != e = n ( return n; | + of_node_put(n); ? return ...; ) ... } // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-26net: phy: mdio: add missing of_node_putJulia Lawall1-0/+2
for_each_available_child_of_node performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows (http://coccinelle.lip6.fr): // <smpl> @@ expression root,e; local idexpression child; @@ for_each_available_child_of_node(root, child) { ... when != of_node_put(child) when != e = child ( return child; | + of_node_put(child); ? return ...; ) ... } // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-26netdev/phy: add missing of_node_putJulia Lawall1-0/+1
for_each_available_child_of_node performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows (http://coccinelle.lip6.fr): // <smpl> @@ local idexpression r.n; expression r,e; @@ for_each_available_child_of_node(r,n) { ... ( of_node_put(n); | e = n | + of_node_put(n); ? break; ) ... } ... when != n // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-26net: netcp: add missing of_node_putJulia Lawall1-2/+6
for_each_child_of_node performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows (http://coccinelle.lip6.fr): // <smpl> @@ local idexpression r.n; expression r,e; @@ for_each_child_of_node(r,n) { ... ( of_node_put(n); | e = n | + of_node_put(n); ? break; ) ... } ... when != n // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-26net: thunderx: add missing of_node_putJulia Lawall1-1/+3
for_each_child_of_node performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows (http://coccinelle.lip6.fr): // <smpl> @@ local idexpression r.n; expression r,e; @@ for_each_child_of_node(r,n) { ... ( of_node_put(n); | e = n | + of_node_put(n); ? break; ) ... } ... when != n // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
2015-10-27NFC: nfcmrvl: update device tree bindings for Marvell NFCVincent Cuissard3-5/+9
Align NFC bindgins to use marvell instead of mrvl. Signed-off-by: Vincent Cuissard <cuissard@marvell.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2015-10-27NFC: nfcmrvl: add spi driverVincent Cuissard4-1/+246
This driver adds the support of SPI-based Marvell NFC controller. Signed-off-by: Vincent Cuissard <cuissard@marvell.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2015-10-27NFC: nfcmrvl: add i2c driverVincent Cuissard5-4/+311
This driver adds the support of I2C-based Marvell NFC controller. Signed-off-by: Vincent Cuissard <cuissard@marvell.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2015-10-27NFC: nfcmrvl: configure head/tail room values per low level driversVincent Cuissard4-9/+14
Low-level drivers may need to add some data before and/or after NCI packet. Signed-off-by: Vincent Cuissard <cuissard@marvell.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2015-10-27NFC: nfcmrvl: add firmware download supportVincent Cuissard7-10/+718
Implement firmware download protocol for Marvell NFC controllers. This protocol is based on NCI frames that's why parts of its implementation use some NCI generic functions. Signed-off-by: Vincent Cuissard <cuissard@marvell.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2015-10-27NFC: nfcmrvl: remove unneeded version definesVincent Cuissard2-9/+3
Signed-off-by: Vincent Cuissard <cuissard@marvell.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2015-10-27NFC: st21nfca: Add support for proprietary commandsChristophe Ricard5-3/+435
Add support for proprietary commands useful mainly for factory testings. Here is a list: - FACTORY_MODE: Allow to set the driver into a mode where no secure element are activated. It does not consider any NFC_ATTR_VENDOR_DATA. - HCI_CLEAR_ALL_PIPES: Allow to execute a HCI clear all pipes command. It does not consider any NFC_ATTR_VENDOR_DATA. - HCI_DM_PUT_DATA: Allow to configure specific CLF registry as for example RF trimmings or low level drivers configurations (I2C, SPI, SWP). - HCI_DM_UPDATE_AID: Allow to configure an AID routing into the CLF routing table following RF technology, CLF mode or protocol. - HCI_DM_GET_INFO: Allow to retrieve CLF information. - HCI_DM_GET_DATA: Allow to retrieve CLF configurable data such as low level drivers configurations or RF trimmings. - HCI_DM_LOAD: Allow to load a firmware into the CLF. A complete packet can be more than 8KB. - HCI_DM_RESET: Allow to run a CLF reset in order to "commit" CLF configuration changes without CLF power off. - HCI_GET_PARAM: Allow to retrieve an HCI CLF parameter (for example the white list). - HCI_DM_FIELD_GENERATOR: Allow to generate different kind of RF technology. When using this command to anti-collision is done. - HCI_LOOPBACK: Allow to echo a command and test the Dh to CLF connectivity. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2015-10-27NFC: st-nci: Replace st21nfcb by st_nci in makefileChristophe Ricard1-1/+1
Replace 1 missing st21nfcb by st_nci Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2015-10-27NFC: st-nci: remove duplicated skb dumpChristophe Ricard2-22/+0
Remove SPI_DUMP_SKB and I2C_DUMP_SKB as skb is already dumped in ndlc layer. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2015-10-27NFC: st-nci: Disable irq when powering the device upChristophe Ricard2-2/+14
Upon some conditions (timing, CLF errors, platform errors...), the irq might be already active when powering the device. Add irq_active variable as a guard to avoid kernel warning message Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2015-10-27NFC: st21nfca: Add error messages for unexpected HCI eventsChristophe Ricard3-0/+7
Potentially an unexpected HCI event may occur because of a firmware bug. It could be transparent for the user but we should at least log it. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2015-10-27NFC: st21nfca: Add few code style fixesChristophe Ricard3-3/+2
Add a minor code style fixes Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2015-10-27NFC: st-nci: Add few code style fixesChristophe Ricard2-2/+2
Add some few code style fixes. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2015-10-27NFC: netlink: Add mode parameter to deactivate_target functionsChristophe Ricard2-2/+2
In order to manage in a better way the nci poll mode state machine, add mode parameter to deactivate_target functions. This way we can manage different target state. mode parameter make sense only in nci core. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2015-10-27NFC: st21nfca: Fix host_list verification after SEactivationChristophe Ricard1-2/+5
A secure element can be activated in different order. The host_list is updated keeping a fixed order: <terminal_host_id><uicc_id><ese_id>. Cc: stable@vger.kernel.org Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2015-10-27NFC: st-nci: Fix host_list verification after SE activationChristophe Ricard1-2/+5
A secure element can be activated in different order. The host_list is updated keeping a fixed order: <terminal_host_id><uicc_id><ese_id>. Cc: stable@vger.kernel.org Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>