aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-01-02usb: dwc3: ep0: explicitly call dwc3_ep0_prepare_one_trb()Felipe Balbi1-13/+15
Let's call dwc3_ep0_prepare_one_trb() explicitly because there are occasions where we will need more than one TRB to handle an EP0 transfer. A follow-up patch will fix one bug related to multiple-TRB Data Phases when it comes to mapping/unmapping requests for DMA. Cc: <[email protected]> Reported-by: Janusz Dziedzic <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2017-01-02usb: dwc3: ep0: add dwc3_ep0_prepare_one_trb()Felipe Balbi1-10/+16
For now this is just a cleanup patch, no functional changes. We will be using the new function to fix a bug introduced long ago by commit 0416e494ce7d ("usb: dwc3: ep0: correct cache sync issue in case of ep0_bounced") and further worsened by commit c0bd5456a470 ("usb: dwc3: ep0: handle non maxpacket aligned transfers > 512") Cc: <[email protected]> Reported-by: Janusz Dziedzic <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2017-01-02usb: dwc2: gadget: fix default value for gadget-dma-descStefan Wahren1-1/+1
The current default for gadget DMA descriptor results on bcm2835 in a unnecessary error message: Invalid value 1 for param gadget-dma-desc So fix this by using hw->dma_desc_enable as default value. Fixes: dec4b55677e ("usb: dwc2: gadget: Add descriptor DMA parameter") Acked-by: John Youn <[email protected]> Signed-off-by: Stefan Wahren <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2017-01-02usb: dwc2: fix default value for DMA supportStefan Wahren1-2/+2
The current defaults for DMA results on a non-DMA platform in a unnecessary error message: Invalid value 0 for param gadget-dma So fix this by using dma_capable as default value. Fixes: 9962b62f1be ("usb: dwc2: Deprecate g-use-dma binding") Acked-by: John Youn <[email protected]> Signed-off-by: Stefan Wahren <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2017-01-02usb: dwc2: fix dwc2_get_device_property for u8 and u16Stefan Wahren1-12/+0
According to the Devicetree ePAPR [1] the datatypes u8 and u16 are not defined. So using device_property_read_u16() would result in a partial read of a 32-bit big-endian integer which is not intended. So we better read the complete 32-bit value. This fixes a regression on bcm2835 where the values for g-rx-fifo-size and g-np-tx-fifo-size always read as zero: Invalid value 0 for param g-rx-fifo-size Invalid value 0 for param g-np-tx-fifo-size [1] - http://elinux.org/images/c/cf/Power_ePAPR_APPROVED_v1.1.pdf Fixes: 05ee799f202 ("usb: dwc2: Move gadget settings into core_params") Acked-by: John Youn <[email protected]> Signed-off-by: Stefan Wahren <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2017-01-02usb: dwc2: Do not set host parameter in peripheral modeStefan Wahren1-6/+6
Since commit "usb: dwc2: Improve handling of host and device hwparams" the host mode specific hardware parameter aren't initialized in peripheral mode from the register settings anymore. So we better do not set them in this case which avoids the following warnings on bcm2835: 256 invalid for host_nperio_tx_fifo_size. Check HW configuration. 512 invalid for host_perio_tx_fifo_size. Check HW configuration. Fixes: 55e1040e424b ("usb: dwc2: Improve handling of host and device hwparams") Acked-by: John Youn <[email protected]> Signed-off-by: Stefan Wahren <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2017-01-02ARM: i.MX: remove map_io callbackVladimir Murzin1-1/+0
There is no need to define map_io only for debug_ll_io_init() since it is already called in devicemaps_init() if map_io is NULL. Apart from that, for NOMMU build debug_ll_io_init() is a nop which leads to following error: CC arch/arm/mach-imx/mach-imx1.o arch/arm/mach-imx/mach-imx1.c:40:13: error: 'debug_ll_io_init' undeclared here (not in a function) .map_io = debug_ll_io_init, ^ make[1]: *** [arch/arm/mach-imx/mach-imx1.o] Error 1 Cc: Alexander Shiyan <[email protected]> Cc: Sascha Hauer <[email protected]> Cc: Fabio Estevam <[email protected]> Signed-off-by: Vladimir Murzin <[email protected]> Signed-off-by: Shawn Guo <[email protected]>
2017-01-02ARM: dts: vf610-zii-dev-rev-b: Add missing newlineAndreas Färber1-1/+2
Found while reviewing Marvell dsa bindings usage. Fixes: f283745b3caf ("arm: vf610: zii devel b: Add support for switch interrupts") Cc: Andrew Lunn <[email protected]> Cc: David S. Miller <[email protected]> Signed-off-by: Andreas Färber <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Signed-off-by: Shawn Guo <[email protected]>
2017-01-02ARM: dts: imx6qdl-nitrogen6x: remove duplicate iomux entryGary Bisson1-1/+0
The NANDF_CS2 pad is also part of the wlan-vmmcgrp iomux group. Removing is from the usdhc2grp group avoids the following error: imx6q-pinctrl 20e0000.iomuxc: pin MX6Q_PAD_NANDF_CS2 already requested by regulators:regulator@4; cannot claim for 2194000.usdhc imx6q-pinctrl 20e0000.iomuxc: pin-187 (2194000.usdhc) status -22 imx6q-pinctrl 20e0000.iomuxc: could not request pin 187 (MX6Q_PAD_NANDF_CS2) from group usdhc2grp on device 20e0000.iomuxc Signed-off-by: Gary Bisson <[email protected]> Signed-off-by: Shawn Guo <[email protected]>
2017-01-02ARM: dts: imx31: fix AVIC base addressVladimir Zapolskiy1-2/+2
On i.MX31 AVIC interrupt controller base address is at 0x68000000. The problem was shadowed by the AVIC driver, which takes the correct base address from a SoC specific header file. Fixes: d2a37b3d91f4 ("ARM i.MX31: Add devicetree support") Signed-off-by: Vladimir Zapolskiy <[email protected]> Reviewed-by: Fabio Estevam <[email protected]> Signed-off-by: Shawn Guo <[email protected]>
2017-01-01Merge branch 'l2tp-socket-lookup-fixes'David S. Miller2-29/+14
Guillaume Nault says: ==================== l2tp: socket lookup fixes for l2tp_ip and l2tp_ip6 There are still some cases that aren't correctly handled in the socket lookup functions of l2tp_ip and l2tp_ip6. This series fixes lookups for connected sockets and for sockets bound to the IPv6 unspecified address. bind() and connect() should now work as expected on IPPROTO_L2TP sockets. Extra features, like SO_REUSEADDR, remain unsupported. The matching conditions in __l2tp_ip6_bind_lookup() and __l2tp_ip_bind_lookup() are getting hard to read. I've kept the single test approach to make the intend of the patches clear. I'll split the conditionals once these fixes reach net-next. ==================== Signed-off-by: David S. Miller <[email protected]>
2017-01-01l2tp: take remote address into account in l2tp_ip and l2tp_ip6 socket lookupsGuillaume Nault2-27/+12
For connected sockets, __l2tp_ip{,6}_bind_lookup() needs to check the remote IP when looking for a matching socket. Otherwise a connected socket can receive traffic not originating from its peer. Drop l2tp_ip_bind_lookup() and l2tp_ip6_bind_lookup() instead of updating their prototype, as these functions aren't used. Signed-off-by: Guillaume Nault <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2017-01-01l2tp: consider '::' as wildcard address in l2tp_ip6 socket lookupGuillaume Nault1-2/+2
An L2TP socket bound to the unspecified address should match with any address. If not, it can't receive any packet and __l2tp_ip6_bind_lookup() can't prevent another socket from binding on the same device/tunnel ID. While there, rename the 'addr' variable to 'sk_laddr' (local addr), to make following patch clearer. Signed-off-by: Guillaume Nault <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2017-01-01drop_monitor: add missing call to genlmsg_endReiter Wolfgang1-9/+24
Update nlmsg_len field with genlmsg_end to enable userspace processing using nlmsg_next helper. Also adds error handling. Signed-off-by: Reiter Wolfgang <[email protected]> Acked-by: Neil Horman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2017-01-02openrisc: Add _text symbol to fix ksym build errorStafford Horne1-0/+2
The build robot reports: .tmp_kallsyms1.o: In function `kallsyms_relative_base': >> (.rodata+0x8a18): undefined reference to `_text' This is when using 'make alldefconfig'. Adding this _text symbol to mark the start of the kernel as in other architecture fixes this. Signed-off-by: Stafford Horne <[email protected]> Acked-by: Jonas Bonn <[email protected]>
2017-01-01Linux 4.10-rc2Linus Torvalds1-1/+1
2017-01-01fscrypt: factor out bio specific functionsRichard Weinberger6-147/+184
That way we can get rid of the direct dependency on CONFIG_BLOCK. Fixes: d475a507457b ("ubifs: Add skeleton for fscrypto") Reported-by: Arnd Bergmann <[email protected]> Reported-by: Randy Dunlap <[email protected]> Reviewed-by: Eric Biggers <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: David Gstir <[email protected]> Signed-off-by: Richard Weinberger <[email protected]> Signed-off-by: Theodore Ts'o <[email protected]>
2017-01-01Merge branch 'libnvdimm-fixes' of ↵Linus Torvalds5-143/+229
git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull DAX updates from Dan Williams: "The completion of Jan's DAX work for 4.10. As I mentioned in the libnvdimm-for-4.10 pull request, these are some final fixes for the DAX dirty-cacheline-tracking invalidation work that was merged through the -mm, ext4, and xfs trees in -rc1. These patches were prepared prior to the merge window, but we waited for 4.10-rc1 to have a stable merge base after all the prerequisites were merged. Quoting Jan on the overall changes in these patches: "So I'd like all these 6 patches to go for rc2. The first three patches fix invalidation of exceptional DAX entries (a bug which is there for a long time) - without these patches data loss can occur on power failure even though user called fsync(2). The other three patches change locking of DAX faults so that ->iomap_begin() is called in a more relaxed locking context and we are safe to start a transaction there for ext4" These have received a build success notification from the kbuild robot, and pass the latest libnvdimm unit tests. There have not been any -next releases since -rc1, so they have not appeared there" * 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: ext4: Simplify DAX fault path dax: Call ->iomap_begin without entry lock during dax fault dax: Finish fault completely when loading holes dax: Avoid page invalidation races and unnecessary radix tree traversals mm: Invalidate DAX radix tree entries only if appropriate ext2: Return BH_New buffers for zeroed blocks
2017-01-01net: socket: don't set sk_uid to garbage value in ->setattr()Eric Biggers1-1/+1
->setattr() was recently implemented for socket files to sync the socket inode's uid to the new 'sk_uid' member of struct sock. It does this by copying over the ia_uid member of struct iattr. However, ia_uid is actually only valid when ATTR_UID is set in ia_valid, indicating that the uid is being changed, e.g. by chown. Other metadata operations such as chmod or utimes leave ia_uid uninitialized. Therefore, sk_uid could be set to a "garbage" value from the stack. Fix this by only copying the uid over when ATTR_UID is set. Fixes: 86741ec25462 ("net: core: Add a UID field to struct sock.") Signed-off-by: Eric Biggers <[email protected]> Tested-by: Lorenzo Colitti <[email protected]> Acked-by: Lorenzo Colitti <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-12-31fscrypt: pass up error codes from ->get_context()Eric Biggers1-31/+23
It was possible for the ->get_context() operation to fail with a specific error code, which was then not returned to the caller of FS_IOC_SET_ENCRYPTION_POLICY or FS_IOC_GET_ENCRYPTION_POLICY. Make sure to pass through these error codes. Also reorganize the code so that ->get_context() only needs to be called one time when setting an encryption policy, and handle contexts of unrecognized sizes more appropriately. Signed-off-by: Eric Biggers <[email protected]> Signed-off-by: Theodore Ts'o <[email protected]>
2016-12-31fscrypt: remove user-triggerable warning messagesEric Biggers1-13/+2
Several warning messages were not rate limited and were user-triggerable from FS_IOC_SET_ENCRYPTION_POLICY. These shouldn't really have been there in the first place, but either way they aren't as useful now that the error codes have been improved. So just remove them. Signed-off-by: Eric Biggers <[email protected]> Signed-off-by: Theodore Ts'o <[email protected]>
2016-12-31fscrypt: use EEXIST when file already uses different policyEric Biggers1-1/+1
As part of an effort to clean up fscrypt-related error codes, make FS_IOC_SET_ENCRYPTION_POLICY fail with EEXIST when the file already uses a different encryption policy. This is more descriptive than EINVAL, which was ambiguous with some of the other error cases. I am not aware of any users who might be relying on the previous error code of EINVAL, which was never documented anywhere. This failure case will be exercised by an xfstest. Signed-off-by: Eric Biggers <[email protected]> Signed-off-by: Theodore Ts'o <[email protected]>
2016-12-31fscrypt: use ENOTDIR when setting encryption policy on nondirectoryEric Biggers1-1/+1
As part of an effort to clean up fscrypt-related error codes, make FS_IOC_SET_ENCRYPTION_POLICY fail with ENOTDIR when the file descriptor does not refer to a directory. This is more descriptive than EINVAL, which was ambiguous with some of the other error cases. I am not aware of any users who might be relying on the previous error code of EINVAL, which was never documented anywhere, and in some buggy kernels did not exist at all as the S_ISDIR() check was missing. This failure case will be exercised by an xfstest. Signed-off-by: Eric Biggers <[email protected]> Signed-off-by: Theodore Ts'o <[email protected]>
2016-12-31fscrypt: use ENOKEY when file cannot be created w/o keyEric Biggers5-7/+12
As part of an effort to clean up fscrypt-related error codes, make attempting to create a file in an encrypted directory that hasn't been "unlocked" fail with ENOKEY. Previously, several error codes were used for this case, including ENOENT, EACCES, and EPERM, and they were not consistent between and within filesystems. ENOKEY is a better choice because it expresses that the failure is due to lacking the encryption key. It also matches the error code returned when trying to open an encrypted regular file without the key. I am not aware of any users who might be relying on the previous inconsistent error codes, which were never documented anywhere. This failure case will be exercised by an xfstest. Signed-off-by: Eric Biggers <[email protected]> Signed-off-by: Theodore Ts'o <[email protected]>
2016-12-31PM / domains: Fix 'may be used uninitialized' build warningAugusto Mecking Caringi1-0/+1
This patch fixes the following gcc warning: drivers/base/power/domain.c: In function ‘genpd_runtime_resume’: drivers/base/power/domain.c:642:14: warning: ‘time_start’ may be used uninitialized in this function [-Wmaybe-uninitialized] elapsed_ns = ktime_to_ns(ktime_sub(ktime_get(), time_start) The same problem (in another function in this same file) was fixed in commit d33d5a6c88fc (avoid spurious "may be used uninitialized" warning) Signed-off-by: Augusto Mecking Caringi <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2016-12-31cpufreq: intel_pstate: Always keep all limits settings in syncRafael J. Wysocki1-16/+14
Make intel_pstate update per-logical-CPU limits when the global settings are changed to ensure that they are always in sync and users will not see confusing values in per-logical-CPU sysfs attributes. This also fixes the problem that setting the "no_turbo" global attribute to 1 in the "passive" mode (ie. when intel_pstate acts as a regular cpufreq driver) when scaling_governor is set to "performance" has no effect. Signed-off-by: Rafael J. Wysocki <[email protected]> Acked-by: Srinivas Pandruvada <[email protected]>
2016-12-31cpufreq: intel_pstate: Use locking in intel_cpufreq_verify_policy()Rafael J. Wysocki1-0/+4
Race conditions are possible if intel_cpufreq_verify_policy() is executed in parallel with global limits updates from sysfs, so the invocation of intel_pstate_update_perf_limits() in it should be carried out under intel_pstate_limits_lock. Make that happen. Signed-off-by: Rafael J. Wysocki <[email protected]> Acked-by: Srinivas Pandruvada <[email protected]>
2016-12-31cpufreq: intel_pstate: Use locking in intel_pstate_resume()Rafael J. Wysocki1-1/+9
Theoretically, intel_pstate_resume() may be executed in parallel with intel_pstate_set_policy(), if the latter is invoked via cpufreq_update_policy() as a result of a notification, so use intel_pstate_limits_lock in there too to avoid race conditions. Signed-off-by: Rafael J. Wysocki <[email protected]> Acked-by: Srinivas Pandruvada <[email protected]>
2016-12-31iio: accel: st_accel: fix LIS3LV02 reading and scalingLinus Walleij3-2/+31
The LIS3LV02 has a special bit that need to be set to get the read values left aligned. Before this patch we get gibberish like this: iio_generic_buffer -a -c10 -n lis3lv02dl_accel (...) 0.000000 -0.010042 -0.642688 19155832931907 0.000000 -0.010042 -0.642688 19155858751073 Which is because we read a raw value for 1g as 64 which is the nominal 1024 for 1g shifted 4 bits to the left by being right-aligned rather than left aligned. Since all other sensors are left aligned, add some code to set the special DAS (data alignment setting) bit to 1 so that the right value is now read like this: iio_generic_buffer -a -c10 -n lis3lv02dl_accel (...) 0.000000 -0.147095 -10.120135 24761614364956 -0.029419 -0.176514 -10.120135 24761631624540 The scaling was weird as well: we have a gain of 1000 for 1g and 3000 for 6g. I don't even remember how I came up with the old values but they are wrong. Fixes: 3acddf74f807 ("iio: st-sensors: add support for lis3lv02d accelerometer") Cc: Lorenzo Bianconi <[email protected]> Cc: Giuseppe Barba <[email protected]> Cc: Denis Ciocca <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2016-12-31iio: common: st_sensors: fix channel data parsingLorenzo Bianconi2-2/+6
Using realbits as i2c/spi read len, when that value is not byte aligned (e.g 12 bits), lead to skip msb part of out data registers. Fix this taking into account scan_type.shift in addition to scan_type.realbits as read length: read_len = DIV_ROUND_UP(realbits + shift, 8) This fix has been tested on 8, 12, 16, 24 bit sensors Fixes: e7385de5291e ("iio:st_sensors: align on storagebits boundaries") Signed-off-by: Lorenzo Bianconi <[email protected]> Tested-by: Linus Walleij <[email protected]> Cc: <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2016-12-31fscrypt: fix renaming and linking special filesEric Biggers1-0/+5
Attempting to link a device node, named pipe, or socket file into an encrypted directory through rename(2) or link(2) always failed with EPERM. This happened because fscrypt_has_permitted_context() saw that the file was unencrypted and forbid creating the link. This behavior was unexpected because such files are never encrypted; only regular files, directories, and symlinks can be encrypted. To fix this, make fscrypt_has_permitted_context() always return true on special files. This will be covered by a test in my encryption xfstests patchset. Fixes: 9bd8212f981e ("ext4 crypto: add encryption policy and password salt support") Signed-off-by: Eric Biggers <[email protected]> Reviewed-by: Richard Weinberger <[email protected]> Cc: [email protected] Signed-off-by: Theodore Ts'o <[email protected]>
2016-12-30iio: max44000: correct value in illuminance_integration_time_availableAkinobu Mita1-1/+1
According to the datasheet, the shortest available integration time for ALS ADC conversion is 1.5625ms but illuminance_integration_time_available sysfs file shows wrong value. Cc: Crestez Dan Leonard <[email protected]> Cc: Jonathan Cameron <[email protected]> Cc: Hartmut Knaack <[email protected]> Cc: Lars-Peter Clausen <[email protected]> Cc: Peter Meerwald-Stadler <[email protected]> Signed-off-by: Akinobu Mita <[email protected]> Fixes: d5d8f49b6 ("max44000: Expose ambient sensor scaling") Cc: <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2016-12-30ARM: dts: am572x-idk: Add gpios property to control PCIE_RESETnKishon Vijay Abraham I1-0/+4
Add 'gpios' property to pcie1 dt node and populate it with GPIO3_23 in order to drive PCIE_RESETn high. This gets PCIe cards to be detected in AM572X IDK board. Signed-off-by: Kishon Vijay Abraham I <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
2016-12-30Merge tag 'docs-4.10-rc1-fix' of git://git.lwn.net/linuxLinus Torvalds2-2/+2
Pull documentation fixes from Jonathan Corbet: "Two small fixes: - A merge error on my part broke the DocBook build. I've requisitioned one of tglx's frozen sharks for appropriate disciplinary action and resolved to be more careful about testing the DocBook stuff as long as it's still around. - Fix an error in unaligned-memory-access.txt" * tag 'docs-4.10-rc1-fix' of git://git.lwn.net/linux: Documentation/unaligned-memory-access.txt: fix incorrect comparison operator docs: Fix build failure
2016-12-30Merge branch 'linus' of ↵Linus Torvalds1-2/+28
git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fix from Herbert Xu: "This fixes a boot failure on some platforms when crypto self test is enabled along with the new acomp interface" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: testmgr - Use heap buffer for acomp test input
2016-12-30iio: adc: TI_AM335X_ADC should depend on HAS_DMAGeert Uytterhoeven1-1/+1
If NO_DMA=y: ERROR: "bad_dma_ops" [drivers/iio/adc/ti_am335x_adc.ko] undefined! Add a dependency on HAS_DMA to fix this. Signed-off-by: Geert Uytterhoeven <[email protected]> Fixes: f438b9da (" drivers: iio: ti_am335x_adc: add dma support") Cc: <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2016-12-30arm64: dts: vexpress: Support GICC_DIR operationsSudeep Holla1-1/+1
The GICv2 CPU interface registers span across 8K, not 4K as indicated in the DT. Only the GICC_DIR register is located after the initial 4K boundary, leaving a functional system but without support for separately EOI'ing and deactivating interrupts. After this change the system supports split priority drop and interrupt deactivation. This patch is based on similar one from Christoffer Dall: commit 368400e242dc ("ARM: dts: vexpress: Support GICC_DIR operations") Signed-off-by: Sudeep Holla <[email protected]>
2016-12-30vfio-pci: use 32-bit comparisons for register address for gcc-4.5Arnd Bergmann1-1/+4
Using ancient compilers (gcc-4.5 or older) on ARM, we get a link failure with the vfio-pci driver: ERROR: "__aeabi_lcmp" [drivers/vfio/pci/vfio-pci.ko] undefined! The reason is that the compiler tries to do a comparison of a 64-bit range. This changes it to convert to a 32-bit number explicitly first, as newer compilers do for themselves. Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Alex Williamson <[email protected]>
2016-12-30vfio-mdev: Make mdev_device private and abstract interfacesAlex Williamson5-45/+71
Abstract access to mdev_device so that we can define which interfaces are public rather than relying on comments in the structure. Cc: Zhenyu Wang <[email protected]> Cc: Zhi Wang <[email protected]> Signed-off-by: Alex Williamson <[email protected]> Reviewed-by: Jike Song <[email protected]> Reviewed by: Kirti Wankhede <[email protected]>
2016-12-30vfio-mdev: Make mdev_parent privateAlex Williamson6-15/+23
Rather than hoping for good behavior by marking some elements internal, enforce it by making the entire structure private and creating an accessor function for the one useful external field. Cc: Zhenyu Wang <[email protected]> Cc: Zhi Wang <[email protected]> Cc: Jike Song <[email protected]> Signed-off-by: Alex Williamson <[email protected]> Reviewed by: Kirti Wankhede <[email protected]>
2016-12-30vfio-mdev: de-polute the namespace, rename parent_device & parent_opsAlex Williamson8-49/+49
Add an mdev_ prefix so we're not poluting the namespace so much. Cc: Zhenyu Wang <[email protected]> Cc: Zhi Wang <[email protected]> Cc: Jike Song <[email protected]> Signed-off-by: Alex Williamson <[email protected]> Reviewed by: Kirti Wankhede <[email protected]>
2016-12-30vfio-mdev: Fix remove raceAlex Williamson1-2/+34
Using the mtty mdev sample driver we can generate a remove race by starting one shell that continuously creates mtty devices and several other shells all attempting to remove devices, in my case four remove shells. The fault occurs in mdev_remove_sysfs_files() where the passed type arg is NULL, which suggests we've received a struct device in mdev_device_remove() but it's in some sort of teardown state. The solution here is to make use of the accidentally unused list_head on the mdev_device such that the mdev core keeps a list of all the mdev devices. This allows us to validate that we have a valid mdev before we start removal, remove it from the list to prevent others from working on it, and if the vendor driver refuses to remove, we can re-add it to the list. Cc: Kirti Wankhede <[email protected]> Signed-off-by: Alex Williamson <[email protected]>
2016-12-30vfio/type1: Restore mapping performance with mdev supportAlex Williamson1-47/+51
As part of the mdev support, type1 now gets a task reference per vfio_dma and uses that to get an mm reference for the task while working on accounting. That's correct, but it's not fast. For some paths, like vfio_pin_pages_remote(), we know we're only called from user context, so we can restore the lighter weight calls. In other cases, we're effectively already testing whether we're in the stored task context elsewhere, extend this vfio_lock_acct() as well. Signed-off-by: Alex Williamson <[email protected]> Reviewed by: Kirti Wankhede <[email protected]>
2016-12-30vfio-mdev: Fix mtty sample driver buildingAlex Williamson3-14/+10
This sample driver was originally under Documentation/ and was moved to samples, but build support was never adjusted for the new location. Signed-off-by: Alex Williamson <[email protected]> Reviewed-by: Eric Auger <[email protected]> Tested-by: Eric Auger <[email protected]> Reviewed-by: Kirti Wankhede <[email protected]>
2016-12-30ARM: dts: vexpress: Support GICC_DIR operationsChristoffer Dall2-2/+2
The GICv2 CPU interface registers span across 8K, not 4K as indicated in the DT. Only the GICC_DIR register is located after the initial 4K boundary, leaving a functional system but without support for separately EOI'ing and deactivating interrupts. After this change the system supports split priority drop and interrupt deactivation. Acked-by: Marc Zyngier <[email protected]> Signed-off-by: Christoffer Dall <[email protected]> [[email protected]: included same fix for tc1 platform too] Signed-off-by: Sudeep Holla <[email protected]>
2016-12-30firmware: arm_scpi: fix reading sensor values on pre-1.0 SCPI firmwaresMartin Blumenstingl1-2/+8
The pre-1.0 SCPI firmwares are using single __le32 as sensor value, while the SCPI v1.0 protocol uses two __le32 as sensor values(64bit) split into 32bit upper and 32bit lower value. Using an "struct sensor_value" to read the sensor value on a pre-1.0 SCPI firmware gives garbage in the "hi_val" field. This patch fixes the issue by reading only the lower 32-bit value for all pre-1.0 SCPI versions. Suggested-by: Sudeep Holla <[email protected]> Signed-off-by: Martin Blumenstingl <[email protected]> [[email protected]: updated the commit log to reflect the implementation] Signed-off-by: Sudeep Holla <[email protected]>
2016-12-30pinctrl: samsung: Fix the width of PINCFG_TYPE_DRV bitfields for Exynos5433Chanwoo Choi2-40/+82
This patch fixes the wrong width of PINCFG_TYPE_DRV bitfields for Exynos5433 because PINCFG_TYPE_DRV of Exynos5433 has 4bit fields in the *_DRV registers. Usually, other Exynos have 2bit field for PINCFG_TYPE_DRV. Fixes: 3c5ecc9ed353 ("pinctrl: exynos: Add support for Exynos5433") Cc: [email protected] Cc: Tomasz Figa <[email protected]> Cc: Krzysztof Kozlowski <[email protected]> Cc: Sylwester Nawrocki <[email protected]> Cc: Linus Walleij <[email protected]> Cc: Kukjin Kim <[email protected]> Cc: Javier Martinez Canillas <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2016-12-30iio: bmi160: Fix time needed to sleep after command executionMarcin Niestroj1-19/+6
Datasheet specifies typical and maximum execution times for which CMD register is occupied after previous command execution. We took these values as minimum and maximum time for usleep_range() call before making a new command execution. To be sure, that the CMD register is no longer occupied we need to wait *at least* the maximum time specified by datasheet. Signed-off-by: Marcin Niestroj <[email protected]> Cc: <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
2016-12-29net: ipv4: dst for local input routes should use l3mdev if relevantDavid Ahern1-1/+2
IPv4 output routes already use l3mdev device instead of loopback for dst's if it is applicable. Change local input routes to do the same. This fixes icmp responses for unreachable UDP ports which are directed to the wrong table after commit 9d1a6c4ea43e4 because local_input routes use the loopback device. Moving from ingress device to loopback loses the L3 domain causing responses based on the dst to get to lost. Fixes: 9d1a6c4ea43e4 ("net: icmp_route_lookup should use rt dev to determine L3 domain") Signed-off-by: David Ahern <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2016-12-29sh_eth: fix branch prediction in sh_eth_interrupt()Sergei Shtylyov1-1/+1
IIUC, likely()/unlikely() should apply to the whole *if* statement's expression, not a part of it -- fix such expression in sh_eth_interrupt() accordingly... Fixes: 283e38db65e7 ("sh_eth: Fix serialisation of interrupt disable with interrupt & NAPI handlers") Signed-off-by: Sergei Shtylyov <[email protected]> Signed-off-by: David S. Miller <[email protected]>