1
0
Fork 0
Commit Graph

90683 Commits (cad87f097ca2d56093145c4becd487f5c186a612)

Author SHA1 Message Date
Hans de Goede a9df22c00d power: supply: max17042_battery: Add support for the STATUS property
Userspace prefers the driver having a status property over having to guess
itself. Specifically this will properly make the GNOME3 UI (and likely
others) properly show discharging / charging / full status, instead
of always showing discharging as status.

Note that in the case there is no charger driver supplying the max17042,
then a status of unknown will get returned. At least upower treats
this the same as not having a status attribute, so in this case nothing
changes from a userspace pov.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
2017-05-01 12:37:29 +02:00
Hans de Goede 917362135b power: supply: max17042_battery: Add default platform_data fallback data
Some x86 machines use a max17047 fuel-gauge and x86 might be missing
platform_data if not provided by SFI.

This commit adds default platform_data as fallback option so that the
driver can work on boards where no platform_data is provided.

Since not all boards have a thermistor hooked up, set temp_min to 0 and
change the health checks from temp <= temp_min to temp < temp_min to
not trigger on such boards (where temp reads 0).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
2017-05-01 12:37:25 +02:00
Sebastian Reichel ddaa00ee63 Merge remote-tracking branch 'chanwoo-extcon/ib-extcon-4.12' into psy-next 2017-04-14 01:41:45 +02:00
Hans de Goede 01c0e0a28d power: supply: bq24190_charger: Use i2c-core irq-mapping code
The i2c-core already maps of irqs before calling the driver's probe
function and there are no in tree users of
bq24190_platform_data->gpio_int.

Remove the redundant custom irq-mapping code and just use client->irq.

Cc: Liam Breck <kernel@networkimprov.net>
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
2017-04-14 01:41:34 +02:00
Chanwoo Choi 815429b39d extcon: Add new extcon_register_notifier_all() to monitor all external connectors
The extcon core already provides the extcon_register_notifier() function
in order to register the notifier block which is used to monitor
the state change for the specific external connector such as EXTCON_USB,
EXTCON_USB_HOST and so on. The extcon consumer uses the this function.

The extcon consumer might need to monitor the all supported external
connectors from the extcon device. In this case, The extcon consumer
should have each notifier_block structure for each external connector.

This patch adds the new extcon_register_notifier_all() function
that extcon consumer is able to monitor the state change of all
supported external connectors by using only one notifier_block structure.

- List of new added functions:
int extcon_register_notifier_all(struct extcon_dev *edev,
			struct notifier_block *nb);
int extcon_unregister_notifier_all(struct extcon_dev *edev,
			struct notifier_block *nb);
int devm_extcon_register_notifier_all(struct device *dev,
			struct extcon_dev *edev, struct notifier_block *nb);
void devm_extcon_unregister_notifier_all(struct device *dev,
			struct extcon_dev *edev, struct notifier_block *nb);

Suggested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Tested-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
2017-04-04 11:22:42 +09:00
Linus Torvalds 0dc82fa59b Char/Misc driver fixes for 4.11-rc4
A smattering of different small fixes for some random driver subsystems.
 Nothing all that major, just resolutions for reported issues and bugs.
 
 All have been in linux-next with no reported issues.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCWNedPQ8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ykY+wCeL0dFw/ney0sJ6s7HsmXu3uxFGyoAoIIXL7AP
 48YAht+BOOmBzagXIKbw
 =EFxm
 -----END PGP SIGNATURE-----

Merge tag 'char-misc-4.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc

Pull char/misc driver fixes from Greg KH:
 "A smattering of different small fixes for some random driver
  subsystems. Nothing all that major, just resolutions for reported
  issues and bugs.

  All have been in linux-next with no reported issues"

* tag 'char-misc-4.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (21 commits)
  extcon: int3496: Set the id pin to direction-input if necessary
  extcon: int3496: Use gpiod_get instead of gpiod_get_index
  extcon: int3496: Add dependency on X86 as it's Intel specific
  extcon: int3496: Add GPIO ACPI mapping table
  extcon: int3496: Rename GPIO pins in accordance with binding
  vmw_vmci: handle the return value from pci_alloc_irq_vectors correctly
  ppdev: fix registering same device name
  parport: fix attempt to write duplicate procfiles
  auxdisplay: img-ascii-lcd: add missing sentinel entry in img_ascii_lcd_matches
  Drivers: hv: vmbus: Don't leak memory when a channel is rescinded
  Drivers: hv: vmbus: Don't leak channel ids
  Drivers: hv: util: don't forget to init host_ts.lock
  Drivers: hv: util: move waiting for release to hv_utils_transport itself
  vmbus: remove hv_event_tasklet_disable/enable
  vmbus: use rcu for per-cpu channel list
  mei: don't wait for os version message reply
  mei: fix deadlock on mei reset
  intel_th: pci: Add Gemini Lake support
  intel_th: pci: Add Denverton SOC support
  intel_th: Don't leak module refcount on failure to activate
  ...
2017-03-26 11:15:54 -07:00
Linus Torvalds 53b4d5911d IIO fixes for 4.11-rc4
Here are some small IIO driver fixes for 4.11-rc4 that resolve a number
 of tiny reported issues.  All of these have been in linux-next for a
 while with no reported issues.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCWNeeCg8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ynXYwCcC+ZqoQ2zyAXI9NRNzADGqLgVLDkAoL5emrPe
 10VBu7ocPtuAI12QdcGI
 =xfgR
 -----END PGP SIGNATURE-----

Merge tag 'staging-4.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull IIO driver fixes from Greg KH:
 "Here are some small IIO driver fixes for 4.11-rc4 that resolve a
  number of tiny reported issues. All of these have been in linux-next
  for a while with no reported issues"

* tag 'staging-4.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
  iio: imu: st_lsm6dsx: fix FIFO_CTRL2 overwrite during watermark configuration
  iio: adc: ti_am335x_adc: fix fifo overrun recovery
  iio: sw-device: Fix config group initialization
  iio: magnetometer: ak8974: remove incorrect __exit markups
  iio: hid-sensor-trigger: Change get poll value function order to avoid sensor properties losing after resume from S3
2017-03-26 11:02:00 -07:00
Linus Torvalds e431e0e427 USB/PHY fixes for 4.11-rc4
Here are a number of small USB and PHY driver fixes for 4.11-rc4.
 Nothing major here, just an bunch of small fixes, and a handfull of good
 fixes from Johan for devices with crazy descriptors.  There are a few
 new device ids in here as well.
 
 All of these have been in linux-next with no reported issues.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCWNefwQ8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ykewwCg1P1HEZV2wLJSalsPxduIKIRLcmkAnRcE0H31
 2egrp1seSGQumYcGQUJ/
 =2fH+
 -----END PGP SIGNATURE-----

Merge tag 'usb-4.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB/PHY fixes from Greg KH:
 "Here are a number of small USB and PHY driver fixes for 4.11-rc4.

  Nothing major here, just an bunch of small fixes, and a handfull of
  good fixes from Johan for devices with crazy descriptors. There are a
  few new device ids in here as well.

  All of these have been in linux-next with no reported issues"

* tag 'usb-4.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (26 commits)
  usb: gadget: f_hid: fix: Don't access hidg->req without spinlock held
  usb: gadget: udc: remove pointer dereference after free
  usb: gadget: f_uvc: Sanity check wMaxPacketSize for SuperSpeed
  usb: gadget: f_uvc: Fix SuperSpeed companion descriptor's wBytesPerInterval
  usb: gadget: acm: fix endianness in notifications
  usb: dwc3: gadget: delay unmap of bounced requests
  USB: serial: qcserial: add Dell DW5811e
  usb: hub: Fix crash after failure to read BOS descriptor
  ACM gadget: fix endianness in notifications
  USB: usbtmc: fix probe error path
  USB: usbtmc: add missing endpoint sanity check
  USB: serial: option: add Quectel UC15, UC20, EC21, and EC25 modems
  usb: musb: fix possible spinlock deadlock
  usb: musb: dsps: fix iounmap in error and exit paths
  usb: musb: cppi41: don't check early-TX-interrupt for Isoch transfer
  usb-core: Add LINEAR_FRAME_INTR_BINTERVAL USB quirk
  uwb: i1480-dfu: fix NULL-deref at probe
  uwb: hwa-rc: fix NULL-deref at probe
  USB: wusbcore: fix NULL-deref at probe
  USB: uss720: fix NULL-deref at probe
  ...
2017-03-26 10:52:52 -07:00
Linus Torvalds a643f9054c A code cleanup and bugfix for fs/crypto.
-----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCAAdFiEEK2m5VNv+CHkogTfJ8vlZVpUNgaMFAljW4wYACgkQ8vlZVpUN
 gaPYugf9ExFbJhN+iYqUVbGXPvlr5VpEtDeVt7IfO3a37hqCEQ0IEPzksNIfUFul
 B8/rYXpz0B5gqCJeo66CGLkb1SVvSoSKCq9/BTQtugohxM7sGxDFTmdB+A+u0QJH
 leILfaMFuj0DhVOrdYVpGh7e1XPgSTUWy6/G42OJqf3SV2WxGRJtyBfmghZxEdiY
 XYCGqjq47yOIPvzB+ufKe1hnphKMgxlHeuPvByzPCvOs58GlxAYR3Ycuvjc/nz+8
 QVlAEPpGhf9ytEXELsxq/ZbsNj9xtXsNAzkAoMK+xZ2JCxIHRcS1ay/iAwxw+d9r
 bnlpI+8tQ79GIGCv3cusJSwq7j1iuQ==
 =wPlW
 -----END PGP SIGNATURE-----

Merge tag 'fscrypt-for-linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/fscrypt

Pull fscrypto fixes from Ted Ts'o:
 "A code cleanup and bugfix for fs/crypto"

* tag 'fscrypt-for-linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/fscrypt:
  fscrypt: eliminate ->prepare_context() operation
  fscrypt: remove broken support for detecting keyring key revocation
2017-03-25 15:36:56 -07:00
Linus Torvalds a00da40fc7 hwmon fixes for v4.11-rc4
Bug fixes in asus_atk0110, it87 and max31790 drivers.
 Added missing API definition to hwmon core.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJY1uZbAAoJEMsfJm/On5mB/vAP/1DjalKgmwB/rAHFNqmGzrmm
 nptUQWtpeeThT/8imZ+uMWkADq/CRTkCIXrNt/V5PgLUvDAgFOgw6OnfbHIbw4h3
 BG6XU959UmHoQCksSJ+r24xzMBXIZ3c+hlM1mAfFgA52r1m+S7L7a+5D3X2lfcqc
 TmaqslBL7VNvPKlKG1JzFM6ZTIia3zGFprUgO+j379akk4u4MKnTk2x8hVHjxLfK
 5t3gpCqCVTlycnl4qdnprxWVZg40nU7wU0Cr026aaFzzJGjDt6Zz5XFNJWRwnYrn
 5Anb62mFZLJui38wkIIKnq+o3pKjEy7lfN7Kx2dP31Q1OC38AsgjGoySsxgwrksR
 FektDrkNOoTK6kStXsgua0dGHuxLZHoABGzxx/FjKyrvlh0mUrMUzLxonpKDVyuS
 i3SPVJmg+b8xeam9XcA2JCKnd6g4GVOj+4EJD2LMHxUUFvGP9Ll9jMEMhYTcazhV
 gzu3lE/wyaRFByuh+kX3wuqqhkv3bAaJ0nsXDFBaP68/obpdPhBCm6R8wCuuI/Rt
 vCzjOqQLP247Awh4fAVjZ87BxobTok9vml58kiDSsbZ0fP0NshiIX2vCqLaOSeDG
 0HrbjEpH1UARa9Kzk+2rZvve/agnIXR7c2mw+ZKzfZhc7eGOxC440nPUGYeijJa0
 E8irmld7/poZuZ5LjBtb
 =XQKx
 -----END PGP SIGNATURE-----

Merge tag 'hwmon-for-linus-v4.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

Pull hwmon fixes from Guenter Roeck:

 - bug fixes in asus_atk0110, it87 and max31790 drivers

 - added missing API definition to hwmon core

* tag 'hwmon-for-linus-v4.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (asus_atk0110) fix uninitialized data access
  hwmon: Add missing HWMON_T_ALARM
  hwmon: (it87) Avoid registering the same chip on both SIO addresses
  hwmon: (max31790) Set correct PWM value
2017-03-25 15:31:50 -07:00
Linus Torvalds 4a01fa5e75 Fixups for -rc4 kernel
- Fix for dma_ops change in this kernel, resolving the s390, powerpc,
   and IOMMU operation
 - A few other oops fixes
 - The rest are all minor fixes
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJY1eNNAAoJELgmozMOVy/dS/MQAMK8z2j35Udiop19LQIoQM0B
 5BAmy7Khrz8F+rB5SaFnQfWGT4mg9qOwEeI6eWoKmrByrrIjErZOKLZGgVecxkFx
 agzTPsApD6O3U/h8CYmoED3Hgg+DibQWcdYpVHeBkcYd6ljDYPrh9F28oDVmYVFI
 z3mkBnTNS3wzGdTFAdhW18H4shUeUOQlweWuCNA4LdPjlstITl0WBo6TIe2WfilD
 FEHIH/mkoZwmKAU1GCmLWo0mw9s9ng2YtKN4wKuDWm+BOSSYRr3z/ClGEAjk0aat
 8JouAYZopcnATm5vvjMGeDPnbpgByydriQ7WinxzqFF5A7dg3CrHaN3DhhjowdXt
 ufJrZAcc1VZFhUOABAwmueUlGpLxF/oJD8FcjdvpRgHt/SY5njlQw/yhrqL/7Eew
 zvfFFw1GxLtyPXxB8olWHpaw3S9l7N5MoezlZlrZJvpc0416YGOUsljymyS4p7w1
 Mpfe0kmbn/Whp0Vt7uBJ5WJ1NguGOi0F9hJFQ99Jmf7mfdplCIoRjSnQzWGfkmOd
 NVLHaYnPjmX3lO8RYfKabKTQ+X2D/uBvH0PDn/kc9J9y1jMYwHIq8GHNb1q+QPLq
 Wvlfsvo33sMbo2G2JJu31QOigMlBLy+P88m+j9uHs/nPHLYWzsvPMUhikwtO9a7j
 txOeyoDW+oAPTaIq459u
 =6axB
 -----END PGP SIGNATURE-----

Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma

Pull rdma fixes from Doug Ledford:
 "This has been a slow -rc cycle for the RDMA subsystem. We really
  haven't had a lot of rc fixes come in. This pull request is the first
  of this entire rc cycle and it has all of the suitable fixes so far
  and it's still only about 20 patches. The fix for the minor breakage
  cause by the dma mapping patchset is in here, as well as a couple
  other potential oops fixes, but the rest is more minor.

  Summary:

   - fix for dma_ops change in this kernel, resolving the s390, powerpc,
     and IOMMU operation

   - a few other oops fixes

   - the rest are all minor fixes"

* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma:
  IB/qib: fix false-postive maybe-uninitialized warning
  RDMA/iser: Fix possible mr leak on device removal event
  IB/device: Convert ib-comp-wq to be CPU-bound
  IB/cq: Don't process more than the given budget
  IB/rxe: increment msn only when completing a request
  uapi: fix rdma/mlx5-abi.h userspace compilation errors
  IB/core: Restore I/O MMU, s390 and powerpc support
  IB/rxe: Update documentation link
  RDMA/ocrdma: fix a type issue in ocrdma_put_pd_num()
  IB/rxe: double free on error
  RDMA/vmw_pvrdma: Activate device on ethernet link up
  RDMA/vmw_pvrdma: Dont hardcode QP header page
  RDMA/vmw_pvrdma: Cleanup unused variables
  infiniband: Fix alignment of mmap cookies to support VIPT caching
  IB/core: Protect against self-requeue of a cq work item
  i40iw: Receive netdev events post INET_NOTIFIER state
2017-03-25 15:25:58 -07:00
Dmitry V. Levin 812755d69e uapi: fix rdma/mlx5-abi.h userspace compilation errors
Consistently use types from linux/types.h to fix the following
rdma/mlx5-abi.h userspace compilation errors:

/usr/include/rdma/mlx5-abi.h:69:25: error: 'u64' undeclared here (not in a function)
  MLX5_LIB_CAP_4K_UAR = (u64)1 << 0,
/usr/include/rdma/mlx5-abi.h:69:29: error: expected ',' or '}' before numeric constant
  MLX5_LIB_CAP_4K_UAR = (u64)1 << 0,

Include <linux/if_ether.h> to fix the following rdma/mlx5-abi.h
userspace compilation error:

/usr/include/rdma/mlx5-abi.h:286:12: error: 'ETH_ALEN' undeclared here (not in a function)
  __u8 dmac[ETH_ALEN];

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
2017-03-24 22:01:35 -04:00
Bart Van Assche 0957c29f78 IB/core: Restore I/O MMU, s390 and powerpc support
Avoid that the following error message is reported on the console
while loading an RDMA driver with I/O MMU support enabled:

DMAR: Allocating domain for mlx5_0 failed

Ensure that DMA mapping operations that use to_pci_dev() to
access to struct pci_dev see the correct PCI device. E.g. the s390
and powerpc DMA mapping operations use to_pci_dev() even with I/O
MMU support disabled.

This patch preserves the following changes of the DMA mapping updates
patch series:
- Introduction of dma_virt_ops.
- Removal of ib_device.dma_ops.
- Removal of struct ib_dma_mapping_ops.
- Removal of an if-statement from each ib_dma_*() operation.
- IB HW drivers no longer set dma_device directly.

Reported-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Reported-by: Parav Pandit <parav@mellanox.com>
Fixes: commit 99db949403 ("IB/core: Remove ib_device.dma_device")
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: parav@mellanox.com
Tested-by: parav@mellanox.com
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
2017-03-24 21:51:16 -04:00
Linus Torvalds 2056b7c7df ARM: SoC fixes for v4.11
- A couple of OMAP 4.11 regression fixes, including a boot regression for
   SmartReflex, hypervisor mode in thumb2 mode, and reference counting of
   device nodes
 
 - A fix for cpu_idle on at91
 
 - Minor DT fixes on across several platforms:
   sunxi, bcm53xx, at91, nsp, ns2, ux500, omap
 
 - A fix to correct an API change in the reset controllers
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIVAwUAWNWBrGCrR//JCVInAQJE/xAArSDx+6i7On53k3QfxkR1mONHrEOlXhlP
 VbTeBfkYtYB08Pgq99QVJE5qYK2N5w2664UNbgs+KKYnYJTNl0G6EW1l7oj+21M+
 xg3e6ctdfeztYeU34q7D2TxzP/EBRHdbpEuT+JHuQOWFYNfGAj2vSt2cdPUael/Q
 D4s4BgeM1dIOzN3z3AvuQpqIhLedVRFAGYAaalKXiwREYUVDgnqhHCPWChVnSQMR
 gnNDYcb5ZxCaELH9gkdVqyfdlScw9juKMg5v7e7KizhBUqOGBT0bguLC9Kfh3mDO
 tIJGwkuqWvc5tAKuAcGklIVOzP8Wtcq0ObrFzLczy6Waf+6aaQl5J8Uw85UR/zg4
 44AHzk++apXTCDlrRzQZIkvaN9TmOBr65qrW1rnqVN72FRS3arDuMV1rEFRdZy2x
 riXmJmENWo+sakst4fTS0QY+/GlPDB8Md4X++Vkl3DgWFgiiBTcPbJCEazsFVip+
 QQzWfXTSB98bCVUuYr5eZgMlPYHrd1ZQIbgzlzIkdUuZ4XCe4MGw88km6TqviBwf
 dduNKnFctkrLAgM3V8rXZBQsZqJHRDmpOfSZ+9XtGYggy83g5FLbkp9h6Ws66SbI
 KCgLzV0THCs/gKLMeDqFerO1xQzxN84pd+YKetnD1RU+5bo98DMUkqgFn+cZyCFA
 dlImlZcN7Pc=
 =zKIg
 -----END PGP SIGNATURE-----

Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Arnd Bergmann:

 - a couple of OMAP 4.11 regression fixes, including a boot regression
   for SmartReflex, hypervisor mode in thumb2 mode, and reference
   counting of device nodes

 - a fix for cpu_idle on at91

 - minor DT fixes on across several platforms: sunxi, bcm53xx, at91,
   nsp, ns2, ux500, omap

 - a fix to correct an API change in the reset controllers

* tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (22 commits)
  arm64: dts: NS2: Add dma-coherent to relevant DT entries
  reset: fix optional reset_control_get stubs to return NULL
  ARM: sun8i: a23/a33: drop bl_en_pin GPIO pinmux in reference design DTSI
  ARM: dts: sun7i: lamobo-r1: Fix CPU port RGMII settings
  ARM: dts: NSP: GPIO reboot open-source
  ARM: at91: pm: cpu_idle: switch DDR to power-down mode
  ARM: dts: add the AB8500 clocks to the device tree
  ARM: dts: imx6sx-udoo-neo: Fix reboot hang
  ARM: sun8i: Fix the mali clock rate
  ARM: dts: BCM5301X: Correct GIC_PPI interrupt flags
  ARM: dts: BCM5301X: Fix memory start address
  ARM: dts: BCM5301X: Fix UARTs on bcm953012k
  Revert "ARM: at91/dt: sama5d2: Use new compatible for ohci node"
  ARM: OMAP2+: Release device node after it is no longer needed.
  ARM: OMAP2+: Fix device node reference counts
  ARM: OMAP2+: Remove legacy gpmc-nand.c
  ARM: OMAP2+: gpmc-onenand: propagate error on initialization failure
  ARM: dts: am335x-pcm953: Fix legacy wakeup source binding
  ARM: omap2plus_defconfig: Enable INPUT_MOUSEDEV as loadable modules
  ARM: dts: am57xx-idk: tpic2810 is on I2C bus, not SPI
  ...
2017-03-24 14:32:21 -07:00
Linus Torvalds 69917da73a arm64 fixes:
- Fix mapping of kernel image under certain kaslr offsets
 
 - Hook up new statx syscall in asm-generic syscall table
 
 - Update compat syscall table to match arch/arm/ (pkeys and statx)
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABCgAGBQJY1P3eAAoJELescNyEwWM0L50H/0grxwPzCW8onOPmpoKafeTA
 dbbixNi1kc7m/kMiTEhw/+e7D03IXMNP7DsQzRjDCdUvQ28EiSl4+C3YVgDWknQi
 YwmIxU9tEAJbj6UJDZoau2pZmW9AxT4vVEarTf0hIAK1q19dH9eU7Fldp0elVFKk
 Vjt+xxrSki28GA33oEw3Ck5wzsiuOOC7+jKggOjXC7hzsl9yvHIuVJw1ydDwXByk
 PMjmFZu4+j6gkLcNGtcPfyRjDmvxy/GrYRWIpBrt+39XspMdN3Jfp2cCtyXIpk5A
 CZ8MZ2uqSWGHefpUJzvBPsYUgX6Ay550OmB8K5If7BXLhnGfOiTFaO+ImiVc2JI=
 =C/x/
 -----END PGP SIGNATURE-----

Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Pull arm64 fixes from Will Deacon:
 "There's a kaslr fix and then two patches to update our native and
  compat syscall tables. Arnd asked that we take the addition of statx
  to the asm-generic unistd.h via arm64, as he didn't have anything
  queued in the asm-generic tree.

  Summary:

   - Fix mapping of kernel image under certain kaslr offsets

   - Hook up new statx syscall in asm-generic syscall table

   - Update compat syscall table to match arch/arm/ (pkeys and statx)"

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64: kaslr: Fix up the kernel image alignment
  arm64: compat: Update compat syscalls
  generic syscalls: Wire up statx syscall
2017-03-24 14:21:09 -07:00
Linus Torvalds e8fe23ffc9 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fixes from Herbert Xu:
 "This fixes regressions in the crypto ccp driver and the hwrng drivers
  for amd and geode"

* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  hwrng: geode - Revert managed API changes
  hwrng: amd - Revert managed API changes
  crypto: ccp - Assign DMA commands to the channel's CCP
2017-03-24 14:11:36 -07:00
Linus Torvalds 213e4eb2da IOMMU Fixes for Linux v4.11-rc3
A few fixes piled up:
 
 	* Fix a NULL-ptr dereference that happens in VT-d on some
 	  platforms
 
 	* A fix for ARM MSI region reporting, so that a sane interface
 	  makes it to a released kernel
 
 	* Fixes for leaf-checking in ARM io-page-table code
 
 	* Two fixes for IO/TLB flushing code on ARM Exynos platforms
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJY1QLfAAoJECvwRC2XARrjiSUQAMS6l5kg+Fo6c8uq5oGgJ27C
 ddxjbI9NkvRAfnGzrHAVm80A7J9C15ik0/dp9hHVo9BjURWfhslxKXRp+9aBPjaY
 TzH7UD1avU9kwXvg8E+RYBaZrHY5on51Wz5IYcuFC2JHE3LYXGJgeNYupbXll8KI
 GM/sFhUfPcBODlwQwl+331fDqvSVL3/QaqojLsugGK2426dwYmovmNVrcFxT/01w
 fUrzG3DcHKSMJr1e2743A6Are3+Z+E7b435vclStl0ebUf+TKKAsQlluA99jyJ/y
 b0ZsddVK1OhJyoJafBuAbkQkcp5IuBV3R40MZORRv+IOqCOTe/8BkLnH+4TbRAui
 JmRmpREIfq4fxZbYepVis88dpbQriVu6ONI1FnGEEqdjDquhfnsC66cSAmgoRYEH
 Q913jMSvU4ehH0yRhBZdSi/giA5T48idEmtt2WjMOBx+Zq1ZLZkd02dq6rZH5j4x
 maIvyclg5N7nAG/KO8XJdqhET8K/0M2Fdp3H6YoBLMNyF2u2D52XFahOvIwV3Rf7
 4bW3fiy2Jv3sxlgeTy9yo8mtFwIGzCqjpB/PSvSRfrrE7G2EGNPd7sauTfALBU6w
 8z7HIj4/5DncFGbYIeEK3crrr5oqN9WtlJJGlm2qPPaKZMSJ78dKmtc2TKAxdFhU
 cqfL0qAZr3rRCYtZbLiq
 =EcLT
 -----END PGP SIGNATURE-----

Merge tag 'iommu-fixes-v4.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu

Pull IOMMU fixes from Joerg Roedel:
 "A few fixes piled up:

   - fix a NULL-ptr dereference that happens in VT-d on some platforms

   - a fix for ARM MSI region reporting, so that a sane interface makes
     it to a released kernel

   - fixes for leaf-checking in ARM io-page-table code

   - two fixes for IO/TLB flushing code on ARM Exynos platforms"

* tag 'iommu-fixes-v4.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
  iommu: Disambiguate MSI region types
  iommu/exynos: Workaround FLPD cache flush issues for SYSMMU v5
  iommu/exynos: Block SYSMMU while invalidating FLPD cache
  iommu/vt-d: Fix NULL pointer dereference in device_to_iommu
  iommu/io-pgtable-arm-v7s: Check for leaf entry before dereferencing it
  iommu/io-pgtable-arm: Check for leaf entry before dereferencing it
2017-03-24 13:42:17 -07:00
Linus Torvalds 86b7eab29d i915, amd, exynos and one fbdev regression
-----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJY1HHOAAoJEAx081l5xIa+sDMP/0jQXO3oPsGP4ifxlzv0vwrk
 JZD/CQZc66u65I7HLTFj1Yt5omxD0GpRPJ5JB75Ek9gTXuVDHDUCHgisKDtm4LWN
 IX+xmgzJxTtSN+T8S07TKlkGlqjNgwSUNnH0npJOKBkuVLOUfYudEKGi8RA0VoR3
 owaMqWyQMy0SyREyl1rW3yDazYP47tNWm6XubIoDu3Y9Op3gsEPzk1hV8qNhL4KA
 cKmvinlO53Pt6PHRPONjFJvLhXJOa8IpPltQuk2bC4rdbNzavj2w/EUJvUWNte+N
 pLlSCLa7QWlAzwDyFzQSDIAu11IU6oHiI+zERLEZ3Rqj0F0W76HLH0KmJtGf8FIh
 6sKsIFYV4F5xVFxNgds1ccrjTEcmntK1l+0tyuNdQ9vw0PnYPPXbN5ljV6kGyyFz
 H4uvcYNQSA3RwfjonDspbI0attA/BX7WH0sfS+YDFLTuelORY25J3aZeRZ82fBcz
 tfCkBW9BLIAalXdRGds/BWYUtY4SaX+xF4Tfzgpak5IhixBSgZXIwG8kMDJWW2qv
 5QMOHrhDNiH31XwjCk2Ccb+KEUTk2HgeLbznrUUNOSWKZ/QylfGQKYpmJfD0kGst
 skqBHhPpqbQQYZsoH0U0PBG7py6icw27DZFCmBV3x2V8yYoM/68+lWiD05QRKYp2
 SLPB9DrJJTcVCQUBn9SS
 =M2BT
 -----END PGP SIGNATURE-----

Merge tag 'drm-fixes-for-v4.11-rc4' of git://people.freedesktop.org/~airlied/linux

Pull drm fixes from Dave Airlie:

 - one core drm/fbdev regression fix

 - a set of i915 fixes including a few GVT related fixes, along with
   some reset fixes

 - one new PCI id for amdgpu, and some minor workaround regression
   fixes

 - .. and a set of exynos fixes, dropping support for an old unsupported
   SoC, some vblank timing fixes, and an info leak fix

* tag 'drm-fixes-for-v4.11-rc4' of git://people.freedesktop.org/~airlied/linux: (34 commits)
  drm/fb-helper: Allow var->x/yres(_virtual) < fb->width/height again
  drm/i915: make context status notifier head be per engine
  drm/i915: Avoid rcu_barrier() from reclaim paths (shrinker)
  drm/exynos/dsi: make te-gpios optional
  drm/exynos: Print kernel pointers in a restricted form
  drm/exynos/decon5433: fix software trigger mask
  drm/exynos/fimd: signal frame done interrupt at front porch
  drm/exynos/decon5433: signal frame done interrupt at front porch
  drm/exynos/decon5433: fix vblank event handling
  drm/exynos: move crtc event handling to drivers callbacks
  drm/exynos: Remove support for Exynos4415 (SoC not supported anymore)
  drm/exynos/decon5433: & vs | typo
  drm/amd/amdgpu: add POLARIS12 PCI ID
  drm/i915/gvt: Fix gvt scheduler interval time
  drm/i915/gvt: GVT pin/unpin shadow context
  drm/i915/gvt: scan shadow indirect context image when valid
  drm/i915/kvmgt: fix suspicious rcu dereference usage
  drm/i915/gvt: add enable_execlists check before enable gvt
  drm/i915/gvt: Remove bogus retry around i915_wait_request
  drm/i915/gvt: correct the ggtt valid bit check in pipe control command
  ...
2017-03-24 13:15:52 -07:00
Dave Airlie 8201f1e86b Merge branch 'exynos-drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes
Just several fixups,
   - fix page fault and vblank timeout issues due to delayed vblank handling.
   - fix panel driver probing to fail without te-gpios property.
   - fix potential security hole by using "%pK" format.
   - fix wrong if statement condition.

   And one cleanup which removes Exynos4415 SoC support which is not supported
   anymore.

* 'exynos-drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos:
  drm/exynos/dsi: make te-gpios optional
  drm/exynos: Print kernel pointers in a restricted form
  drm/exynos/decon5433: fix software trigger mask
  drm/exynos/fimd: signal frame done interrupt at front porch
  drm/exynos/decon5433: signal frame done interrupt at front porch
  drm/exynos/decon5433: fix vblank event handling
  drm/exynos: move crtc event handling to drivers callbacks
  drm/exynos: Remove support for Exynos4415 (SoC not supported anymore)
  drm/exynos/decon5433: & vs | typo
2017-03-24 11:04:08 +10:00
Greg Kroah-Hartman 5617c05d44 usb: fixes for v4.11-rc4
f_acm got an endianness fix by Oliver Neukum. This has been around for a
 long time but it's finally fixed.
 
 f_hid learned that it should never access hidg->req without first
 grabbing the spinlock.
 
 Roger Quadros fixed two bugs in the f_uvc function driver.
 
 Janusz Dziedzic fixed a very peculiar bug with EP0, one that's rather
 difficult to trigger. When we're dealing with bounced EP0 requests, we
 should delay unmap until after ->complete() is called.
 
 UDC class got a use-after-free fix.
 -----BEGIN PGP SIGNATURE-----
 
 iQJRBAABCAA7FiEElLzh7wn96CXwjh2IzL64meEamQYFAljTv0EdHGZlbGlwZS5i
 YWxiaUBsaW51eC5pbnRlbC5jb20ACgkQzL64meEamQbhehAAvauDyMvvL4S2PpCS
 zkarfhJfF4xOB8jzyewdz8oN57XogoUQIY6KOXFIIj9sWBt5Kx2zfA7uK3FBeflm
 lEaf2Mkbo3qXw9ChkrpUDEzpezYhnLPOpm7rMoXxseiVhew1Jt6AUjyzxMkOSG+I
 ng/bMRFvJY1Crp7V0kIba0PiR/owlVxZNTad5/C5Fi1wJQtpjd6Ry0cH7Pa/Eh1W
 KI5Mrdwgh0gZJUF8u8O1MZehyUXSTzkjvHeNV7lnL4TE19hoSGngQhvTYhnoU5lT
 XdphOntQ3m4p8rvNuEvqcwuS5BT2HQoW+BwyNdJF+FUtbbrNN2gUjbY5KD7ZuQtT
 cb67cLrQD04t0ig5zFo51SEZQiYei3rBfr8y0RXepY0RAqCzpqsSoXHxZJyfp1xb
 XzNnnYinbOe2bU3b/Ovs3mMQ4kfpygTHVDMT9iYsRJZmD7DGBhG9J6AR5jD+44Js
 etY82xW7pXiDazMm9OnQ4kuMii8nse3QDynhURU7H39Jw8ty4AdIgbngHgCjRvZA
 ulAeanjGtNNsDs0bsL9L3Q2gLUGiW/y5Ds+AQXKH6388FrwwoUYqCeqBIH5xI+wF
 LIErvqZyi3+Jd/SkmvKeubix3vTxgPZ72WY4xdO45vWznKWscyUWdj0OzXpdycLx
 gOK1mf6y9vRsyoyJ9l09JZ6CAsc=
 =BWuW
 -----END PGP SIGNATURE-----

Merge tag 'fixes-for-v4.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus

Felipe writes:

usb: fixes for v4.11-rc4

f_acm got an endianness fix by Oliver Neukum. This has been around for a
long time but it's finally fixed.

f_hid learned that it should never access hidg->req without first
grabbing the spinlock.

Roger Quadros fixed two bugs in the f_uvc function driver.

Janusz Dziedzic fixed a very peculiar bug with EP0, one that's rather
difficult to trigger. When we're dealing with bounced EP0 requests, we
should delay unmap until after ->complete() is called.

UDC class got a use-after-free fix.
2017-03-23 22:05:10 +01:00
Linus Torvalds 131fbf4f9c Merge branch 'for-linus-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs
Pull btrfs fixes from Chris Mason:
 "Zygo tracked down a very old bug with inline compressed extents.

  I didn't tag this one for stable because I want to do individual
  tested backports. It's a little tricky and I'd rather do some extra
  testing on it along the way"

* 'for-linus-4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  btrfs: add missing memset while reading compressed inline extents
  Btrfs: fix regression in lock_delalloc_pages
  btrfs: remove btrfs_err_str function from uapi/linux/btrfs.h
2017-03-23 11:39:33 -07:00
Linus Torvalds f341d9f08a Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller:

 1) Several netfilter fixes from Pablo and the crew:
      - Handle fragmented packets properly in netfilter conntrack, from
        Florian Westphal.
      - Fix SCTP ICMP packet handling, from Ying Xue.
      - Fix big-endian bug in nftables, from Liping Zhang.
      - Fix alignment of fake conntrack entry, from Steven Rostedt.

 2) Fix feature flags setting in fjes driver, from Taku Izumi.

 3) Openvswitch ipv6 tunnel source address not set properly, from Or
    Gerlitz.

 4) Fix jumbo MTU handling in amd-xgbe driver, from Thomas Lendacky.

 5) sk->sk_frag.page not released properly in some cases, from Eric
    Dumazet.

 6) Fix RTNL deadlocks in nl80211, from Johannes Berg.

 7) Fix erroneous RTNL lockdep splat in crypto, from Herbert Xu.

 8) Cure improper inflight handling during AF_UNIX GC, from Andrey
    Ulanov.

 9) sch_dsmark doesn't write to packet headers properly, from Eric
    Dumazet.

10) Fix SCM_TIMESTAMPING_OPT_STATS handling in TCP, from Soheil Hassas
    Yeganeh.

11) Add some IDs for Motorola qmi_wwan chips, from Tony Lindgren.

12) Fix nametbl deadlock in tipc, from Ying Xue.

13) GRO and LRO packets not counted correctly in mlx5 driver, from Gal
    Pressman.

14) Fix reset of internal PHYs in bcmgenet, from Doug Berger.

15) Fix hashmap allocation handling, from Alexei Starovoitov.

16) nl_fib_input() needs stronger netlink message length checking, from
    Eric Dumazet.

17) Fix double-free of sk->sk_filter during sock clone, from Daniel
    Borkmann.

18) Fix RX checksum offloading in aquantia driver, from Pavel Belous.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (85 commits)
  net:ethernet:aquantia: Fix for RX checksum offload.
  amd-xgbe: Fix the ECC-related bit position definitions
  sfc: cleanup a condition in efx_udp_tunnel_del()
  Bluetooth: btqcomsmd: fix compile-test dependency
  inet: frag: release spinlock before calling icmp_send()
  tcp: initialize icsk_ack.lrcvtime at session start time
  genetlink: fix counting regression on ctrl_dumpfamily()
  socket, bpf: fix sk_filter use after free in sk_clone_lock
  ipv4: provide stronger user input validation in nl_fib_input()
  bpf: fix hashmap extra_elems logic
  enic: update enic maintainers
  net: bcmgenet: remove bcmgenet_internal_phy_setup()
  ipv6: make sure to initialize sockc.tsflags before first use
  fjes: Do not load fjes driver if extended socket device is not power on.
  fjes: Do not load fjes driver if system does not have extended socket device.
  net/mlx5e: Count LRO packets correctly
  net/mlx5e: Count GSO packets correctly
  net/mlx5: Increase number of max QPs in default profile
  net/mlx5e: Avoid supporting udp tunnel port ndo for VF reps
  net/mlx5e: Use the proper UAPI values when offloading TC vlan actions
  ...
2017-03-23 11:29:49 -07:00
Xin Long 1511949c61 sctp: declare struct sctp_stream before using it
sctp_stream_free uses struct sctp_stream as a param, but struct sctp_stream
is defined after it's declaration.

This patch is to declare struct sctp_stream before sctp_stream_free.

Fixes: a83863174a ("sctp: prepare asoc stream for stream reconf")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-03-22 10:57:52 -07:00
Robin Murphy 9d3a4de4cb iommu: Disambiguate MSI region types
The introduction of reserved regions has left a couple of rough edges
which we could do with sorting out sooner rather than later. Since we
are not yet addressing the potential dynamic aspect of software-managed
reservations and presenting them at arbitrary fixed addresses, it is
incongruous that we end up displaying hardware vs. software-managed MSI
regions to userspace differently, especially since ARM-based systems may
actually require one or the other, or even potentially both at once,
(which iommu-dma currently has no hope of dealing with at all). Let's
resolve the former user-visible inconsistency ASAP before the ABI has
been baked into a kernel release, in a way that also lays the groundwork
for the latter shortcoming to be addressed by follow-up patches.

For clarity, rename the software-managed type to IOMMU_RESV_SW_MSI, use
IOMMU_RESV_MSI to describe the hardware type, and document everything a
little bit. Since the x86 MSI remapping hardware falls squarely under
this meaning of IOMMU_RESV_MSI, apply that type to their regions as well,
so that we tell the same story to userspace across all platforms.

Secondly, as the various region types require quite different handling,
and it really makes little sense to ever try combining them, convert the
bitfield-esque #defines to a plain enum in the process before anyone
gets the wrong impression.

Fixes: d30ddcaa7b ("iommu: Add a new type field in iommu_resv_region")
Reviewed-by: Eric Auger <eric.auger@redhat.com>
CC: Alex Williamson <alex.williamson@redhat.com>
CC: David Woodhouse <dwmw2@infradead.org>
CC: kvm@vger.kernel.org
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
2017-03-22 16:16:17 +01:00
Greg Kroah-Hartman 43c49938bf Thirds set of IIO fixes for the 4.11 cycle.
* core
   - iio sw-device - ensure configfs is enabled both when building as module
   and built in.
 * ak8974
   - drop incorrect __exit markup on remove.
 * hid-sensor-trigger
   - code reorganise to avoid losing settings if a power cycle occurs during S3.
 * lsm6dsx
   - fix incorrect overwrite of parts of FIFO_CTRL2 register during watermark
   configuration.
 * ti-am335x
   - fix a hard to hit bug when reenabling from a fifo overrun by waiting for
   current cycle to finish.
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEbilms4eEBlKRJoGxVIU0mcT0FogFAljRfW0RHGppYzIzQGtl
 cm5lbC5vcmcACgkQVIU0mcT0FojgdQ/+JG+UHX8rI56SCt8mm1Th97wCuS7+rsux
 UbrGp9m9et+0HuYiET1qDMoYmG1XDCSuOFwL60DVsQ9cbfO7yPHy6Kk2KICf7mim
 mtF0TFsDjA4W82bT37BBRCmvf/wUX0KZGMHGBxsd5OsohtL03k6a6/vJbfM53pu5
 Y2igyUi3tgLUm8Lof/nGJt7fNPLJVynwyALpvT2mE6/nIeDu0sccaNn/Qugd8afr
 JPO5n5exVGpFk0QLY4lNyFZY9rFASKicSnaGUB/Wxq7+ccTfAOaMWiCRDBKBHJTe
 FSr4TeYHIgzzMD49OSTbKDwPQE74kE4nO2lFbyXgealHGdLqObHpqvtSgtSj9K7O
 mHUMVCc8oTtUFsNjZ9UU9ZKt+NcpZyIrjjpwHhgjZHxd9oUyD8p5Jxr8rdYOibaK
 K0d81CSPq1VEFaeIuc1W8aFHe/g7pSIRuGXhCb1vAPOiSiWhfCFmXZDHuoSNLdXW
 pgN5VqYg9/VL1PE/O0IUUGjNJ6dMEC3KggnPodENEwPB4nX6PesRk+PMXjQSqoqI
 wYRlTTnK/6CZGV/zBx2vQvxLfeWnEXKSWNZt3oKPQCThh29eenJzyR71lgr79YbQ
 dLhpD4+0Nwa5AwOGXOv3TpABnIu0qRSV/V5vxPblW9Q2TR4jlX7A9F1Uk+j1F/BS
 /0WXSrZUZIQ=
 =WBtu
 -----END PGP SIGNATURE-----

Merge tag 'iio-fixes-for-4.11c' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus

Jonathan writes:

Thirds set of IIO fixes for the 4.11 cycle.

* core
  - iio sw-device - ensure configfs is enabled both when building as module
  and built in.
* ak8974
  - drop incorrect __exit markup on remove.
* hid-sensor-trigger
  - code reorganise to avoid losing settings if a power cycle occurs during S3.
* lsm6dsx
  - fix incorrect overwrite of parts of FIFO_CTRL2 register during watermark
  configuration.
* ti-am335x
  - fix a hard to hit bug when reenabling from a fifo overrun by waiting for
  current cycle to finish.
2017-03-22 12:02:01 +01:00
Peter Huewe a5023a9939 hwmon: Add missing HWMON_T_ALARM
Unfortunately the HWMON_T_ALARM define was missing,
although the associated entry was present in hwmon_temp_attributes.
This is needed to convert drivers to the new interface which use channel
based alarms.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2017-03-22 00:18:22 -07:00
Soheil Hassas Yeganeh 4ef1b28694 tcp: mark skbs with SCM_TIMESTAMPING_OPT_STATS
SOF_TIMESTAMPING_OPT_STATS can be enabled and disabled
while packets are collected on the error queue.
So, checking SOF_TIMESTAMPING_OPT_STATS in sk->sk_tsflags
is not enough to safely assume that the skb contains
OPT_STATS data.

Add a bit in sock_exterr_skb to indicate whether the
skb contains opt_stats data.

Fixes: 1c885808e4 ("tcp: SOF_TIMESTAMPING_OPT_STATS option for SO_TIMESTAMPING")
Reported-by: JongHwan Kim <zzoru007@gmail.com>
Signed-off-by: Soheil Hassas Yeganeh <soheil@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-03-21 18:44:17 -07:00
Xin Long 1f904495b7 sctp: define dst_pending_confirm as a bit in sctp_transport
As tp->dst_pending_confirm's value can only be set 0 or 1, this
patch is to change to define it as a bit instead of __u32.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-03-21 18:31:50 -07:00
Olof Johansson 6014ce8559 Reset controller fixes for v4.11
Fix optional reset_control_get_stubs to return NULL and remove warnings
 from reset_control_* stubs.
 This fixes commit bb475230b8 ("reset: make optional  functions really
 optional"), which was merged in reset-for-4.11, and would cause consumer
 drivers depending on the new behaviour of optional resets to fail probing
 if RESET_CONTROLLER Kconfig option is disabled.
 -----BEGIN PGP SIGNATURE-----
 
 iQJLBAABCAA1FiEEBsBxhV1FaKwXuCOBUMKIHHCeYOsFAljRYi0XHHAuemFiZWxA
 cGVuZ3V0cm9uaXguZGUACgkQUMKIHHCeYOvZrQ//XazJ6tZyJFjpMUKlsfn/akN5
 7YTuF2JhUSA1Ivqnit0JNbuyl5EAlZc5nuPp83QJVHugBLFfDwaw9t0bSP+UnkEh
 AY5erJYCetzSPO8IbaVVWwZPk7xUnw80z32SpAJYMFC3I9vPzHrq1yWJoK21pG9P
 YIOt8dmp4HSqhZVlhRKbF8w9Abx4kexjLF/nMLQofyffHEpWfSJGQS7qlle3hUBC
 vRE/89EMIV9gkiTnyuIVQxi2KK97hTmtN+T+aO0nwiNuaP+9bQUEQF7juEsS3szp
 dB8pkk1za+bsCUIJX6tU6CqGREKu+pJBgKuX120HQqOLlXGpv5n/dMwbOhSy1tdu
 hjqsbYBHBg88Bnr9k74D3eu1ntPgsyPwTmdauLVVaAgzNOWAOALdSHXOvNAsi03j
 aIL28QYtjevNA2Eoqjkz0sK5GcdCy59+IjbYpKHmMcqEsr/D3iWikgGyhv8kR7bH
 k//4zWxcVOkX9PN9Wq6Wmnb/PVd9obAwD9Z3Ec6KUFaxG/DSyTp21QauLfquU7Jo
 9KEqT2C1s+G7ZRvf3tDAvS21tP0VW7ynRo3VGdE0fvVCeLHFv4oh6gfmusT9qTlq
 EfxK73foYpJyIo557TRct6kPwu8/3xMmWG9/dGg81i7ecfBXG3mbw+f3iuDToF0k
 5KIWV1EHE1gyHX3qbZg=
 =dFNW
 -----END PGP SIGNATURE-----

Merge tag 'reset-fixes-for-4.11' of git://git.pengutronix.de/git/pza/linux into fixes

Reset controller fixes for v4.11

Fix optional reset_control_get_stubs to return NULL and remove warnings
from reset_control_* stubs.
This fixes commit bb475230b8 ("reset: make optional  functions really
optional"), which was merged in reset-for-4.11, and would cause consumer
drivers depending on the new behaviour of optional resets to fail probing
if RESET_CONTROLLER Kconfig option is disabled.

* tag 'reset-fixes-for-4.11' of git://git.pengutronix.de/git/pza/linux:
  reset: fix optional reset_control_get stubs to return NULL

Signed-off-by: Olof Johansson <olof@lixom.net>
2017-03-21 17:30:51 -07:00
Peng Tao 16320f363a vhost-vsock: add pkt cancel capability
To allow canceling all packets of a connection.

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Jorgen Hansen <jhansen@vmware.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-03-21 14:41:46 -07:00
Peng Tao 36d277bac8 vsock: track pkt owner vsock
So that we can cancel a queued pkt later if necessary.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-03-21 14:41:46 -07:00
Linus Torvalds 4719177780 GPIO fixes for the v4.11 series:
- Set the parent on the Altera A10SR driver, also fix
   high level IRQs.
 
 - Fix error path on the mockup driver.
 
 - Compilation noise about unused functions fixed.
 
 - Fix missed interrupts on the MCP23S08 expander, this is also
   tagged for stable.
 
 - Retire the interrim helpers devm_get_gpiod_from_child() used
   to smoothen merging in the merge window.
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJY0OCEAAoJEEEQszewGV1zHE8P/jKp3dGg+nfMrDTucBkutyW2
 BVs0cnTI3v27LglzDT8S5enoPs1yMvDQtIIk/Ma5Lspt4ewrfjr9C9ycDT9/NNRW
 bcHG1YyGhNeAPBug5ZoMIqVrEQvz0Ux4P//gkMXnLqHIS5r2Lk9LsQiKSfwh/zTa
 +rMzB3p6zTGtm1by/csBi8kej/i2HD5UJsNSCoW6zoK/nfwewma+rqjjMsmG8NNJ
 zwlEk4ee88r97F/DZ65ZlxBXATzJqP0WqOM+idRnrQG6BvyQk2pzoJNuJrtUIJLu
 Jbj1KqMMx+Z4xcvM0ofd/EJCgZWYZE8phGKLOqJAEnOOVuPHdWDtjc6RSQkKx+B1
 Kejo8TQQCvX4r1JIfGcAwXwicur3KYIN2eNQ/9uThCjibJghq6JfSZghVrKRaY2j
 ew4khCqRtDfTfdnssYV+Jd3rU/wfLsk+uwcNQS2idPj2X8wB4Dj0MuCV6GGLFdMx
 3ZlbbjOjnLU5K5lGoxIaHXjedpRkBx+34EaFxUJqeTuv54/Xpj7nZwXv471HWki4
 VM9N8ZlKnnP+OiG3jjPPF5j5c9nEcdlzkER5Af3DIXu3s1K+3EoePXBJexvShhEn
 VEu5ePW0xV2M3xp/4ur7eE8gk3rfLs9gTF9NvIV49g6gpKmngMMfBcejKytbw36B
 9mkWcmKDpxNfWak9jAgz
 =dTnd
 -----END PGP SIGNATURE-----

Merge tag 'gpio-v4.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio

Pull GPIO fixes from Linus Walleij:
 "Here is the first set of GPIO fixes for 4.11. It was delayed a bit
  beacuse I was chicken when linux-next was not rotating last week.

  This hits the ST serial driver in drivers/tty/serial and that has an
  ACK from Greg, he suggested to keep the old GPIO fwnode API around to
  smoothen things in the merge Windod and those have now served their
  purpose so we take them out and convert the last driver to the new
  API.

  Apart from that it's fixes as usual.

  Summary:

   - set the parent on the Altera A10SR driver, also fix high level
     IRQs.

   - fix error path on the mockup driver.

   - compilation noise about unused functions fixed.

   - fix missed interrupts on the MCP23S08 expander, this is also tagged
     for stable.

   - retire the interrim helpers devm_get_gpiod_from_child() used to
     smoothen merging in the merge window"

* tag 'gpio-v4.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
  gpio:mcp23s08 Fixed missing interrupts
  serial: st-asc: Use new GPIOD API to obtain RTS pin
  gpio: altera: Use handle_level_irq when configured as a level_high
  gpio: xgene: mark PM functions as __maybe_unused
  gpio: mockup: return -EFAULT if copy_from_user() fails
  gpio: altera-a10sr: Set gpio_chip parent property
2017-03-21 13:01:53 -07:00
Philipp Zabel 0ca10b60ce reset: fix optional reset_control_get stubs to return NULL
When RESET_CONTROLLER is not enabled, the optional reset_control_get
stubs should now also return NULL.

Since it is now valid for reset_control_assert/deassert/reset/status/put
to be called unconditionally, with NULL as an argument for optional
resets, the stubs are not allowed to warn anymore.

Fixes: bb475230b8 ("reset: make optional functions really optional")
Reported-by: Andrzej Hajda <a.hajda@samsung.com>
Tested-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Cc: Ramiro Oliveira <Ramiro.Oliveira@synopsys.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2017-03-21 18:19:43 +01:00
Andrzej Hajda f3cce673e1 drm/exynos/decon5433: signal frame done interrupt at front porch
DECON in case of video mode generates interrupt by default at start
of vertical back porch. As this interrupt is used to generate VBLANK
events more optimal point is start of vertical front porch.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
2017-03-21 13:17:22 +09:00
Andrzej Hajda 73488331eb drm/exynos/decon5433: fix vblank event handling
Current implementation of event handling assumes that vblank interrupt is
always called at the right time. It is not true, it can be delayed due to
various reasons. As a result different races can happen. The patch fixes
the issue by using hardware frame counter present in DECON to serialize
vblank and commit completion events.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2017-03-21 13:17:21 +09:00
Stafford Horne fdfe4a393e generic syscalls: Wire up statx syscall
The new syscall statx is implemented as generic code, so enable it
for architectures like openrisc which use the generic syscall table.

Fixes: a528d35e8b ("statx: Add a system call to make enhanced file info available")
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: David Howells <dhowells@redhat.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Stafford Horne <shorne@gmail.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2017-03-20 12:32:37 +00:00
Linus Torvalds 8aa3417255 Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
Pull SCSI target fixes from Nicholas Bellinger:
 "The bulk of the changes are in qla2xxx target driver code to address
  various issues found during Cavium/QLogic's internal testing (stable
  CC's included), along with a few other stability and smaller
  miscellaneous improvements.

  There are also a couple of different patch sets from Mike Christie,
  which have been a result of his work to use target-core ALUA logic
  together with tcm-user backend driver.

  Finally, a patch to address some long standing issues with
  pass-through SCSI export of TYPE_TAPE + TYPE_MEDIUM_CHANGER devices,
  which will make folks using physical (or virtual) magnetic tape happy"

* git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (28 commits)
  qla2xxx: Update driver version to 9.00.00.00-k
  qla2xxx: Fix delayed response to command for loop mode/direct connect.
  qla2xxx: Change scsi host lookup method.
  qla2xxx: Add DebugFS node to display Port Database
  qla2xxx: Use IOCB interface to submit non-critical MBX.
  qla2xxx: Add async new target notification
  qla2xxx: Export DIF stats via debugfs
  qla2xxx: Improve T10-DIF/PI handling in driver.
  qla2xxx: Allow relogin to proceed if remote login did not finish
  qla2xxx: Fix sess_lock & hardware_lock lock order problem.
  qla2xxx: Fix inadequate lock protection for ABTS.
  qla2xxx: Fix request queue corruption.
  qla2xxx: Fix memory leak for abts processing
  qla2xxx: Allow vref count to timeout on vport delete.
  tcmu: Convert cmd_time_out into backend device attribute
  tcmu: make cmd timeout configurable
  tcmu: add helper to check if dev was configured
  target: fix race during implicit transition work flushes
  target: allow userspace to set state to transitioning
  target: fix ALUA transition timeout handling
  ...
2017-03-19 18:06:31 -07:00
Mike Christie d7175373f2 target: fix ALUA transition timeout handling
The implicit transition time tells initiators the min time
to wait before timing out a transition. We currently schedule
the transition to occur in tg_pt_gp_implicit_trans_secs
seconds so there is no room for delays. If
core_alua_do_transition_tg_pt_work->core_alua_update_tpg_primary_metadata
needs to write out info to a remote file, then the initiator can
easily time out the operation.

Signed-off-by: Mike Christie <mchristi@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2017-03-18 14:47:28 -07:00
Mike Christie 530c6891b1 target: allow ALUA setup for some passthrough backends
This patch allows passthrough backends to use the core/base LIO
ALUA setup and state checks, but still handle the execution of
commands.

This will allow the target_core_user module to execute STPG and RTPG
in userspace, and not have to duplicate the ALUA state checks, path
information (needed so we can check if command is executable on
specific paths) and setup (rtslib sets/updates the configfs ALUA
interface like it does for iblock or file).

For STPG, the target_core_user userspace daemon, tcmu-runner will
still execute the STPG, and to update the core/base LIO state it
will use the existing configfs interface. For RTPG, tcmu-runner
will loop over configfs and/or cache the state.

Signed-off-by: Mike Christie <mchristi@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2017-03-18 14:47:25 -07:00
Linus Torvalds ae13373319 Merge branch 'x86-acpi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 acpi fixes from Thomas Gleixner:
 "This update deals with the fallout of the recent work to make
  cpuid/node mappings persistent.

  It turned out that the boot time ACPI based mapping tripped over ACPI
  inconsistencies and caused regressions. It's partially reverted and
  the fragile part replaced by an implementation which makes the mapping
  persistent when a CPU goes online for the first time"

* 'x86-acpi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  acpi/processor: Check for duplicate processor ids at hotplug time
  acpi/processor: Implement DEVICE operator for processor enumeration
  x86/acpi: Restore the order of CPU IDs
  Revert"x86/acpi: Enable MADT APIs to return disabled apicids"
  Revert "x86/acpi: Set persistent cpuid <-> nodeid mapping when booting"
2017-03-17 14:01:40 -07:00
Linus Torvalds 102ed8c35a amd, intel, tilcdc, omap, and malidp fixes.
-----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJYy2bCAAoJEAx081l5xIa+wDAQAJTrgKmSOu8Vqv8YZqAHc46r
 bnsYOs9Xs4YYId8QP2QXkqI8lzlDmNlecn9ARYRBLR/UfAVqnZzirWjolL66D5FI
 ZVj9R+WuujrN/8eimkZPwcZRfdi6RRgwHRbbXthMoiKXq/ydE5xnUtEv5rp9WHFb
 QZeUrhhDdNXNORiwOlCjpqu7DvolRQmfroOh7xaDgSQoCmhyCB9D3pRyFONGDbkf
 LSf5WUP4VFTYrGCKZLXCqZkfcve+k99sQcuFcEnX3Pg+XFjScrCTa5XAiBLiV3bR
 62JI2rcyZqKkLV9iqXDQp/P3Rbz9qero0xaDpF51aNWKJlsioW07V9BLsEemdxg2
 3wdG51jsGDZ2g9cQL37vfKXQH5r3V1KUaXD1HVdY2y4vWT3BBWc8I7UAddfeCCAF
 FBMzyAd9SjoI6PgkEZqshFAO1Z/QWux9wjpcZ7CWte8F/5Cul8QOl7ZO8Hg4bN5i
 VaKTxAT91FwvDgbfVSZ+L+EeVyns9WKRUDt19HRIPruKMwjLPBGmZrL4UChIzacz
 XJYkFdR1rOUQFsgcPnyWqkBQfjB0hiryJSuGGXMAIWKlsbsCUth/+ekUrwDtBNdP
 zbzyRBa0WMlNxCxeVcmNfCXMqNYJUlcD7lAMe3aKg/WUIQqVTcT6gyxcf8dkhVu9
 hosSva7b03GnK9ei44+y
 =0d8b
 -----END PGP SIGNATURE-----

Merge tag 'drm-fixes-for-v4.11-rc3' of git://people.freedesktop.org/~airlied/linux

Pull drm fixes from Dave Airlie:
 "Bunch of fixes across the drivers, in a St Patrick's day pull request
  (please turn terminal colors to green on black or black on green for
  full effect).

  On the arm side, tilcdc, omap and malidp got fixes, while amd has some
  powermanagement fixes, and intel has a set of fixes across the driver.

  Nothing seems to bad or scary at this point"

* tag 'drm-fixes-for-v4.11-rc3' of git://people.freedesktop.org/~airlied/linux: (27 commits)
  drm/amd/amdgpu:  Fix debugfs reg read/write address width
  drm/amdgpu/si: add dpm quirk for Oland
  drm/radeon/si: add dpm quirk for Oland
  drm: amd: remove broken include path
  drm/amd/powerplay: fix copy error in smu7_clockpoweragting.c
  drm/tilcdc: Set framebuffer DMA address to HW only if CRTC is enabled
  drm/tilcdc: Fix hardcoded fail-return value in tilcdc_crtc_create()
  drm/i915: Fix forcewake active domain tracking
  drm/i915: Nuke skl_update_plane debug message from the pipe update critical section
  drm/i915: use correct node for handling cache domain eviction
  uapi: fix drm/omap_drm.h userspace compilation errors
  drm/omap: fix dmabuf mmap for dma_alloc'ed buffers
  drm/amdgpu: fix parser init error path to avoid crash in parser fini
  drm/amd/amdgpu: Disable GFX_PG on Carrizo until compute issues solved
  drm: mali-dp: Fix smart layer not going to composition
  drm: mali-dp: Remove mclk rate management
  drm/i915: Drain the freed state from the tail of the next commit
  drm/i915: Nuke debug messages from the pipe update critical section
  drm/i915: Use pagecache write to prepopulate shmemfs from pwrite-ioctl
  drm/i915: Store a permanent error in obj->mm.pages
  ...
2017-03-17 11:19:52 -07:00
Jack Morgenstein 4cbe4dac82 net/mlx4_core: Avoid delays during VF driver device shutdown
Some Hypervisors detach VFs from VMs by instantly causing an FLR event
to be generated for a VF.

In the mlx4 case, this will cause that VF's comm channel to be disabled
before the VM has an opportunity to invoke the VF device's "shutdown"
method.

For such Hypervisors, there is a race condition between the VF's
shutdown method and its internal-error detection/reset thread.

The internal-error detection/reset thread (which runs every 5 seconds) also
detects a disabled comm channel. If the internal-error detection/reset
flow wins the race, we still get delays (while that flow tries repeatedly
to detect comm-channel recovery).

The cited commit fixed the command timeout problem when the
internal-error detection/reset flow loses the race.

This commit avoids the unneeded delays when the internal-error
detection/reset flow wins.

Fixes: d585df1c5c ("net/mlx4_core: Avoid command timeouts during VF driver device shutdown")
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Reported-by: Simon Xiao <sixiao@microsoft.com>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-03-16 20:14:51 -07:00
Heiko Carstens 15c9e10d9a drivers core: remove assert_held_device_hotplug()
The last caller of assert_held_device_hotplug() is gone, so remove it again.

Link: http://lkml.kernel.org/r/20170314125226.16779-3-heiko.carstens@de.ibm.com
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Acked-by: Dan Williams <dan.j.williams@intel.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Vladimir Davydov <vdavydov.dev@gmail.com>
Cc: Ben Hutchings <ben@decadent.org.uk>
Cc: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Sebastian Ott <sebott@linux.vnet.ibm.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-03-16 16:56:19 -07:00
Masami Hiramatsu 5be9b730b0 kasan: add a prototype of task_struct to avoid warning
Add a prototype of task_struct to fix below warning on arm64.

  In file included from arch/arm64/kernel/probes/kprobes.c:19:0:
  include/linux/kasan.h:81:132: error: 'struct task_struct' declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
   static inline void kasan_unpoison_task_stack(struct task_struct *task) {}

As same as other types (kmem_cache, page, and vm_struct) this adds a
prototype of task_struct data structure on top of kasan.h.

[arnd] A related warning was fixed before, but now appears in a
different line in the same file in v4.11-rc2.  The patch from Masami
Hiramatsu still seems appropriate, so let's take his version.

Fixes: 71af2ed5ee ("kasan, sched/headers: Remove <linux/sched.h> from <linux/kasan.h>")
Link: https://patchwork.kernel.org/patch/9569839/
Link: http://lkml.kernel.org/r/20170313141517.3397802-1-arnd@arndb.de
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Acked-by: Alexander Potapenko <glider@google.com>
Acked-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-03-16 16:56:18 -07:00
Gary R Hook 7c468447f4 crypto: ccp - Assign DMA commands to the channel's CCP
The CCP driver generally uses a round-robin approach when
assigning operations to available CCPs. For the DMA engine,
however, the DMA mappings of the SGs are associated with a
specific CCP. When an IOMMU is enabled, the IOMMU is
programmed based on this specific device.

If the DMA operations are not performed by that specific
CCP then addressing errors and I/O page faults will occur.

Update the CCP driver to allow a specific CCP device to be
requested for an operation and use this in the DMA engine
support.

Cc: <stable@vger.kernel.org> # 4.9.x-
Signed-off-by: Gary R Hook <gary.hook@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-03-16 17:43:08 +08:00
Dexuan Cui dad72a1d28 vmbus: remove hv_event_tasklet_disable/enable
With the recent introduction of per-channel tasklet, we need to update
the way we handle the 3 concurrency issues:

1. hv_process_channel_removal -> percpu_channel_deq vs.
   vmbus_chan_sched -> list_for_each_entry(..., percpu_list);

2. vmbus_process_offer -> percpu_channel_enq/deq vs. vmbus_chan_sched.

3. vmbus_close_internal vs. the per-channel tasklet vmbus_on_event;

The first 2 issues can be handled by Stephen's recent patch
"vmbus: use rcu for per-cpu channel list", and the third issue
can be handled by calling tasklet_disable in vmbus_close_internal here.

We don't need the original hv_event_tasklet_disable/enable since we
now use per-channel tasklet instead of the previous per-CPU tasklet,
and actually we must remove them due to the side effect now:
vmbus_process_offer -> hv_event_tasklet_enable -> tasklet_schedule will
start the per-channel callback prematurely, cauing NULL dereferencing
(the channel may haven't been properly configured to run the callback yet).

Fixes: 631e63a9f3 ("vmbus: change to per channel tasklet")

Signed-off-by: Dexuan Cui <decui@microsoft.com>
Cc: "K. Y. Srinivasan" <kys@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Stephen Hemminger <sthemmin@microsoft.com>
Tested-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-16 16:42:00 +09:00
Stephen Hemminger 8200f2085a vmbus: use rcu for per-cpu channel list
The per-cpu channel list is now referred to in the interrupt
routine. This is mostly safe since the host will not normally generate
an interrupt when channel is being deleted but if it did then there
would be a use after free problem.

To solve, this use RCU protection on ther per-cpu list.

Fixes: 631e63a9f3 ("vmbus: change to per channel tasklet")

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-16 16:42:00 +09:00
David S. Miller e11607aad5 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf
Pablo Neira Ayuso says:

====================
Netfilter fixes for net

The following patchset contains Netfilter fixes for your net tree, a
rather large batch of fixes targeted to nf_tables, conntrack and bridge
netfilter. More specifically, they are:

1) Don't track fragmented packets if the socket option IP_NODEFRAG is set.
   From Florian Westphal.

2) SCTP protocol tracker assumes that ICMP error messages contain the
   checksum field, what results in packet drops. From Ying Xue.

3) Fix inconsistent handling of AH traffic from nf_tables.

4) Fix new bitmap set representation with big endian. Fix mismatches in
   nf_tables due to incorrect big endian handling too. Both patches
   from Liping Zhang.

5) Bridge netfilter doesn't honor maximum fragment size field, cap to
   largest fragment seen. From Florian Westphal.

6) Fake conntrack entry needs to be aligned to 8 bytes since the 3 LSB
   bits are now used to store the ctinfo. From Steven Rostedt.

7) Fix element comments with the bitmap set type. Revert the flush
   field in the nft_set_iter structure, not required anymore after
   fixing up element comments.

8) Missing error on invalid conntrack direction from nft_ct, also from
   Liping Zhang.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2017-03-15 15:13:13 -07:00
Eric Biggers 94840e3c80 fscrypt: eliminate ->prepare_context() operation
The only use of the ->prepare_context() fscrypt operation was to allow
ext4 to evict inline data from the inode before ->set_context().
However, there is no reason why this cannot be done as simply the first
step in ->set_context(), and in fact it makes more sense to do it that
way because then the policy modes and flags get validated before any
real work is done.  Therefore, merge ext4_prepare_context() into
ext4_set_context(), and remove ->prepare_context().

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2017-03-15 14:15:47 -04:00
Linus Torvalds 95422dec6b SCSI fixes on 20170315
This is a rather large set of fixes.  The bulk are for lpfc correcting
 a lot of issues in the new NVME driver code which just went in in the
 merge window.  The others are: fix a hang in the vmware paravirt
 driver caused by incorrect handling of the new MSI vector allocation.
 A long standing bug in storvsc, which recent block changes turned from
 being a harmless annoyance into a hang and yet more fallout (in
 mpt3sas) from the changes to device blocking.  The remainder are small
 fixes and updates.
 
 Signed-off-by: James E.J. Bottomley <jejb@linux.vnet.ibm.com>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJYyXW+AAoJEAVr7HOZEZN4yzIP/R2qDzwoXw3dl5xHs2AQuxWU
 P7mbUqtN2meU0klIKNCaYq6WO797WvGblSldrPwB08M7QOg8vy7boNiCYmwdEs6W
 Ftihj99OwEp0598MldNw1hBtMqjJ1WSu/kLK/I3pjLjltyPbQunuvaEwSNvxD1r7
 8BRmngYLFPb3KQDSO74ILBdZ5DqsriIXDHlngKSKfrpjO5IWXHrmzhZTmU2qpE40
 H4C4+Kn3/iZKGRiMm4rsikRDEGty9aVo7f4CIrwWslLkaJWf/AS4Kf3rd5qqclRj
 crjP/axqXheuwggKaHNhnxX5oSGt61ZCH9lGMmSNV/q6pUtNsrhO2uZuBIP0vtDB
 y7Pfw0Z3MGnbsOmBhZLRnUYC9PgSZPysy3TuS6/BgGx2ZFPnFxXjA1T73YaUil9q
 zcCOV2E7WHjIFGrpF2jNmoGsh1360TUOjg8YXdLi8pC2sEqSU331nvB5W9xAw3EG
 ewusZFetumxV8pykSyuDknU5gAMVYhHv+I+eNP8SB0eUZTLeKlcZpWIt3QYSYRdJ
 KbCc4CSi28J+DghB86eRZC64QqFiYMP546zUPpD1Enh/HXtVrTYzRN9/Qwo2FJRZ
 s5E3aC6tPceSuOmqn4aL9+Il7NXDj1Y/M9Qwe6Dzjp7q8hLCb7J1TWY3G5ImBWI7
 TfdyBrvZerqpxga+6j5g
 =0mha
 -----END PGP SIGNATURE-----

Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
 "This is a rather large set of fixes. The bulk are for lpfc correcting
  a lot of issues in the new NVME driver code which just went in in the
  merge window.

  The others are:

   - fix a hang in the vmware paravirt driver caused by incorrect
     handling of the new MSI vector allocation

   - long standing bug in storvsc, which recent block changes turned
     from being a harmless annoyance into a hang

   - yet more fallout (in mpt3sas) from the changes to device blocking

  The remainder are small fixes and updates"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (34 commits)
  scsi: lpfc: Add shutdown method for kexec
  scsi: storvsc: Workaround for virtual DVD SCSI version
  scsi: lpfc: revise version number to 11.2.0.10
  scsi: lpfc: code cleanups in NVME initiator discovery
  scsi: lpfc: code cleanups in NVME initiator base
  scsi: lpfc: correct rdp diag portnames
  scsi: lpfc: remove dead sli3 nvme code
  scsi: lpfc: correct double print
  scsi: lpfc: Rename LPFC_MAX_EQ_DELAY to LPFC_MAX_EQ_DELAY_EQID_CNT
  scsi: lpfc: Rework lpfc Kconfig for NVME options
  scsi: lpfc: add transport eh_timed_out reference
  scsi: lpfc: Fix eh_deadline setting for sli3 adapters.
  scsi: lpfc: add NVME exchange aborts
  scsi: lpfc: Fix nvme allocation bug on failed nvme_fc_register_localport
  scsi: lpfc: Fix IO submission if WQ is full
  scsi: lpfc: Fix NVME CMD IU byte swapped word 1 problem
  scsi: lpfc: Fix RCTL value on NVME LS request and response
  scsi: lpfc: Fix crash during Hardware error recovery on SLI3 adapters
  scsi: lpfc: fix missing spin_unlock on sql_list_lock
  scsi: lpfc: don't dereference dma_buf->iocbq before null check
  ...
2017-03-15 10:44:19 -07:00