--- /dev/null
+From ab2f336cb7e629de74d8af06bcaf6b15e4230e19 Mon Sep 17 00:00:00 2001
+From: Stefan Wahren <stefan.wahren@i2se.com>
+Date: Sun, 25 Feb 2018 15:10:52 +0100
+Subject: Bluetooth: hci_bcm: Make shutdown and device wake GPIO optional
+
+From: Stefan Wahren <stefan.wahren@i2se.com>
+
+commit ab2f336cb7e629de74d8af06bcaf6b15e4230e19 upstream.
+
+According to the devicetree binding the shutdown and device wake
+GPIOs are optional. Since commit 3e81a4ca51a1 ("Bluetooth: hci_bcm:
+Mandate presence of shutdown and device wake GPIO") this driver
+won't probe anymore on Raspberry Pi 3 and Zero W (no device wake GPIO
+connected). So fix this regression by reverting this commit partially.
+
+Fixes: 3e81a4ca51a1 ("Bluetooth: hci_bcm: Mandate presence of shutdown and device wake GPIO")
+Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
+Reviewed-by: Lukas Wunner <lukas@wunner.de>
+Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/bluetooth/hci_bcm.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+--- a/drivers/bluetooth/hci_bcm.c
++++ b/drivers/bluetooth/hci_bcm.c
+@@ -775,12 +775,13 @@ static int bcm_get_resources(struct bcm_
+
+ dev->clk = devm_clk_get(dev->dev, NULL);
+
+- dev->device_wakeup = devm_gpiod_get(dev->dev, "device-wakeup",
+- GPIOD_OUT_LOW);
++ dev->device_wakeup = devm_gpiod_get_optional(dev->dev, "device-wakeup",
++ GPIOD_OUT_LOW);
+ if (IS_ERR(dev->device_wakeup))
+ return PTR_ERR(dev->device_wakeup);
+
+- dev->shutdown = devm_gpiod_get(dev->dev, "shutdown", GPIOD_OUT_LOW);
++ dev->shutdown = devm_gpiod_get_optional(dev->dev, "shutdown",
++ GPIOD_OUT_LOW);
+ if (IS_ERR(dev->shutdown))
+ return PTR_ERR(dev->shutdown);
+
--- /dev/null
+From f24c606c21a8cb6f75adc20edcd80b6d851991bf Mon Sep 17 00:00:00 2001
+From: Rodrigo Vivi <rodrigo.vivi@intel.com>
+Date: Tue, 23 Jan 2018 09:40:50 -0800
+Subject: drm/i915/cnp: Ignore VBT request for know invalid DDC pin.
+
+From: Rodrigo Vivi <rodrigo.vivi@intel.com>
+
+commit f24c606c21a8cb6f75adc20edcd80b6d851991bf upstream.
+
+Let's ignore VBT request if the pin is clearly wrong.
+
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104139
+Cc: Kai Heng Feng <kai.heng.feng@canonical.com>
+Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
+Link: https://patchwork.freedesktop.org/patch/msgid/20180123174050.4261-1-rodrigo.vivi@intel.com
+Reviewed-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
+(cherry picked from commit a8e6f3888b05c1e7b685800a3371ce050720368f)
+Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/i915/intel_bios.c | 11 ++++++++---
+ 1 file changed, 8 insertions(+), 3 deletions(-)
+
+--- a/drivers/gpu/drm/i915/intel_bios.c
++++ b/drivers/gpu/drm/i915/intel_bios.c
+@@ -1115,9 +1115,14 @@ static const u8 cnp_ddc_pin_map[] = {
+
+ static u8 map_ddc_pin(struct drm_i915_private *dev_priv, u8 vbt_pin)
+ {
+- if (HAS_PCH_CNP(dev_priv) &&
+- vbt_pin > 0 && vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map))
+- return cnp_ddc_pin_map[vbt_pin];
++ if (HAS_PCH_CNP(dev_priv)) {
++ if (vbt_pin > 0 && vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map))
++ return cnp_ddc_pin_map[vbt_pin];
++ if (vbt_pin > GMBUS_PIN_4_CNP) {
++ DRM_DEBUG_KMS("Ignoring alternate pin: VBT claims DDC pin %d, which is not valid for this platform\n", vbt_pin);
++ return 0;
++ }
++ }
+
+ return vbt_pin;
+ }
--- /dev/null
+From 6e3322c226f15bc1838007f5a75566f1482b8e40 Mon Sep 17 00:00:00 2001
+From: Rodrigo Vivi <rodrigo.vivi@intel.com>
+Date: Thu, 25 Jan 2018 14:25:24 -0800
+Subject: drm/i915/cnp: Properly handle VBT ddc pin out of bounds.
+
+From: Rodrigo Vivi <rodrigo.vivi@intel.com>
+
+commit 6e3322c226f15bc1838007f5a75566f1482b8e40 upstream.
+
+If the table result is out of bounds on the array map
+there is something really wrong with VBT pin so we don't
+return that vbt_pin, but only return 0 instead.
+
+This basically reverts commit 'a8e6f3888b05 ("drm/i915/cnp:
+Ignore VBT request for know invalid DDC pin.")'
+
+Also this properly fixes commit 9c3b2689d01f ("drm/i915/cnl:
+Map VBT DDC Pin to BSpec DDC Pin.")
+
+v2: Do in a way that we don't break other platforms. (Jani)
+
+v3: Keep debug message (Jani)
+
+v4: Don't mess with 0 mapping was noticed by Jani and
+ addressed with a simple solution suggested by Lucas
+ that makes this even simpler.
+
+Fixes: a8e6f3888b05 ("drm/i915/cnp: Ignore VBT request for know invalid DDC pin.")
+Fixes: 9c3b2689d01f ("drm/i915/cnl: Map VBT DDC Pin to BSpec DDC Pin.")
+Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
+Cc: Jani Nikula <jani.nikula@intel.com>
+Cc: Kai Heng Feng <kai.heng.feng@canonical.com>
+Cc: Lucas De Marchi <lucas.demarchi@intel.com>
+Suggested-by: Lucas De Marchi <lucas.demarchi@intel.com>
+Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
+Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
+Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
+Link: https://patchwork.freedesktop.org/patch/msgid/20180125222524.22059-1-rodrigo.vivi@intel.com
+(cherry picked from commit 3393ce1ed8fc43dbdb83952facaf04e644ca1d54)
+Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/i915/intel_bios.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- a/drivers/gpu/drm/i915/intel_bios.c
++++ b/drivers/gpu/drm/i915/intel_bios.c
+@@ -1107,6 +1107,7 @@ static void sanitize_aux_ch(struct drm_i
+ }
+
+ static const u8 cnp_ddc_pin_map[] = {
++ [0] = 0, /* N/A */
+ [DDC_BUS_DDI_B] = GMBUS_PIN_1_BXT,
+ [DDC_BUS_DDI_C] = GMBUS_PIN_2_BXT,
+ [DDC_BUS_DDI_D] = GMBUS_PIN_4_CNP, /* sic */
+@@ -1116,9 +1117,9 @@ static const u8 cnp_ddc_pin_map[] = {
+ static u8 map_ddc_pin(struct drm_i915_private *dev_priv, u8 vbt_pin)
+ {
+ if (HAS_PCH_CNP(dev_priv)) {
+- if (vbt_pin > 0 && vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map))
++ if (vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map)) {
+ return cnp_ddc_pin_map[vbt_pin];
+- if (vbt_pin > GMBUS_PIN_4_CNP) {
++ } else {
+ DRM_DEBUG_KMS("Ignoring alternate pin: VBT claims DDC pin %d, which is not valid for this platform\n", vbt_pin);
+ return 0;
+ }
+++ /dev/null
-From foo@baz Mon Apr 9 10:16:32 CEST 2018
-From: Florian Westphal <fw@strlen.de>
-Date: Fri, 8 Dec 2017 17:01:54 +0100
-Subject: netfilter: core: only allow one nat hook per hook point
-
-From: Florian Westphal <fw@strlen.de>
-
-
-[ Upstream commit f92b40a8b2645af38bd6814651c59c1e690db53d ]
-
-The netfilter NAT core cannot deal with more than one NAT hook per hook
-location (prerouting, input ...), because the NAT hooks install a NAT null
-binding in case the iptables nat table (iptable_nat hooks) or the
-corresponding nftables chain (nft nat hooks) doesn't specify a nat
-transformation.
-
-Null bindings are needed to detect port collsisions between NAT-ed and
-non-NAT-ed connections.
-
-This causes nftables NAT rules to not work when iptable_nat module is
-loaded, and vice versa because nat binding has already been attached
-when the second nat hook is consulted.
-
-The netfilter core is not really the correct location to handle this
-(hooks are just hooks, the core has no notion of what kinds of side
- effects a hook implements), but its the only place where we can check
-for conflicts between both iptables hooks and nftables hooks without
-adding dependencies.
-
-So add nat annotation to hook_ops to describe those hooks that will
-add NAT bindings and then make core reject if such a hook already exists.
-The annotation fills a padding hole, in case further restrictions appar
-we might change this to a 'u8 type' instead of bool.
-
-iptables error if nft nat hook active:
-iptables -t nat -A POSTROUTING -j MASQUERADE
-iptables v1.4.21: can't initialize iptables table `nat': File exists
-Perhaps iptables or your kernel needs to be upgraded.
-
-nftables error if iptables nat table present:
-nft -f /etc/nftables/ipv4-nat
-/usr/etc/nftables/ipv4-nat:3:1-2: Error: Could not process rule: File exists
-table nat {
-^^
-
-Signed-off-by: Florian Westphal <fw@strlen.de>
-Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- include/linux/netfilter.h | 1 +
- net/ipv4/netfilter/iptable_nat.c | 4 ++++
- net/ipv6/netfilter/ip6table_nat.c | 4 ++++
- net/netfilter/core.c | 6 ++++++
- net/netfilter/nf_tables_api.c | 2 ++
- 5 files changed, 17 insertions(+)
-
---- a/include/linux/netfilter.h
-+++ b/include/linux/netfilter.h
-@@ -67,6 +67,7 @@ struct nf_hook_ops {
- struct net_device *dev;
- void *priv;
- u_int8_t pf;
-+ bool nat_hook;
- unsigned int hooknum;
- /* Hooks are ordered in ascending priority. */
- int priority;
---- a/net/ipv4/netfilter/iptable_nat.c
-+++ b/net/ipv4/netfilter/iptable_nat.c
-@@ -72,6 +72,7 @@ static const struct nf_hook_ops nf_nat_i
- {
- .hook = iptable_nat_ipv4_in,
- .pf = NFPROTO_IPV4,
-+ .nat_hook = true,
- .hooknum = NF_INET_PRE_ROUTING,
- .priority = NF_IP_PRI_NAT_DST,
- },
-@@ -79,6 +80,7 @@ static const struct nf_hook_ops nf_nat_i
- {
- .hook = iptable_nat_ipv4_out,
- .pf = NFPROTO_IPV4,
-+ .nat_hook = true,
- .hooknum = NF_INET_POST_ROUTING,
- .priority = NF_IP_PRI_NAT_SRC,
- },
-@@ -86,6 +88,7 @@ static const struct nf_hook_ops nf_nat_i
- {
- .hook = iptable_nat_ipv4_local_fn,
- .pf = NFPROTO_IPV4,
-+ .nat_hook = true,
- .hooknum = NF_INET_LOCAL_OUT,
- .priority = NF_IP_PRI_NAT_DST,
- },
-@@ -93,6 +96,7 @@ static const struct nf_hook_ops nf_nat_i
- {
- .hook = iptable_nat_ipv4_fn,
- .pf = NFPROTO_IPV4,
-+ .nat_hook = true,
- .hooknum = NF_INET_LOCAL_IN,
- .priority = NF_IP_PRI_NAT_SRC,
- },
---- a/net/ipv6/netfilter/ip6table_nat.c
-+++ b/net/ipv6/netfilter/ip6table_nat.c
-@@ -74,6 +74,7 @@ static const struct nf_hook_ops nf_nat_i
- {
- .hook = ip6table_nat_in,
- .pf = NFPROTO_IPV6,
-+ .nat_hook = true,
- .hooknum = NF_INET_PRE_ROUTING,
- .priority = NF_IP6_PRI_NAT_DST,
- },
-@@ -81,6 +82,7 @@ static const struct nf_hook_ops nf_nat_i
- {
- .hook = ip6table_nat_out,
- .pf = NFPROTO_IPV6,
-+ .nat_hook = true,
- .hooknum = NF_INET_POST_ROUTING,
- .priority = NF_IP6_PRI_NAT_SRC,
- },
-@@ -88,12 +90,14 @@ static const struct nf_hook_ops nf_nat_i
- {
- .hook = ip6table_nat_local_fn,
- .pf = NFPROTO_IPV6,
-+ .nat_hook = true,
- .hooknum = NF_INET_LOCAL_OUT,
- .priority = NF_IP6_PRI_NAT_DST,
- },
- /* After packet filtering, change source */
- {
- .hook = ip6table_nat_fn,
-+ .nat_hook = true,
- .pf = NFPROTO_IPV6,
- .hooknum = NF_INET_LOCAL_IN,
- .priority = NF_IP6_PRI_NAT_SRC,
---- a/net/netfilter/core.c
-+++ b/net/netfilter/core.c
-@@ -135,6 +135,12 @@ nf_hook_entries_grow(const struct nf_hoo
- ++i;
- continue;
- }
-+
-+ if (reg->nat_hook && orig_ops[i]->nat_hook) {
-+ kvfree(new);
-+ return ERR_PTR(-EEXIST);
-+ }
-+
- if (inserted || reg->priority > orig_ops[i]->priority) {
- new_ops[nhooks] = (void *)orig_ops[i];
- new->hooks[nhooks] = old->hooks[i];
---- a/net/netfilter/nf_tables_api.c
-+++ b/net/netfilter/nf_tables_api.c
-@@ -1400,6 +1400,8 @@ static int nf_tables_addchain(struct nft
- ops->hook = hookfn;
- if (afi->hook_ops_init)
- afi->hook_ops_init(ops, i);
-+ if (basechain->type->type == NFT_CHAIN_T_NAT)
-+ ops->nat_hook = true;
- }
-
- chain->flags |= NFT_BASE_CHAIN;
--- /dev/null
+From 5a1e59533380a3fd04593e4ab2d4633ebf7745c1 Mon Sep 17 00:00:00 2001
+From: Christoph Hellwig <hch@lst.de>
+Date: Thu, 22 Feb 2018 07:24:08 -0800
+Subject: nvme-fabrics: don't check for non-NULL module in nvmf_register_transport
+
+From: Christoph Hellwig <hch@lst.de>
+
+commit 5a1e59533380a3fd04593e4ab2d4633ebf7745c1 upstream.
+
+THIS_MODULE evaluates to NULL when used from code built into the kernel,
+thus breaking built-in transport modules. Remove the bogus check.
+
+Fixes: 0de5cd36 ("nvme-fabrics: protect against module unload during create_ctrl")
+Signed-off-by: Christoph Hellwig <hch@lst.de>
+Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
+Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
+Signed-off-by: Keith Busch <keith.busch@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/nvme/host/fabrics.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/nvme/host/fabrics.c
++++ b/drivers/nvme/host/fabrics.c
+@@ -493,7 +493,7 @@ EXPORT_SYMBOL_GPL(nvmf_should_reconnect)
+ */
+ int nvmf_register_transport(struct nvmf_transport_ops *ops)
+ {
+- if (!ops->create_ctrl || !ops->module)
++ if (!ops->create_ctrl)
+ return -EINVAL;
+
+ down_write(&nvmf_transports_rwsem);
blk-mq-fix-race-between-updating-nr_hw_queues-and-switching-io-sched.patch
backlight-tdo24m-fix-the-spi-cs-between-transfers.patch
nvme-fabrics-protect-against-module-unload-during-create_ctrl.patch
+nvme-fabrics-don-t-check-for-non-null-module-in-nvmf_register_transport.patch
pinctrl-baytrail-enable-glitch-filter-for-gpios-used-as-interrupts.patch
nvme_fcloop-disassocate-local-port-structs.patch
nvme_fcloop-fix-abort-race-condition.patch
perf-report-fix-a-no-annotate-browser-displayed-issue.patch
staging-lustre-disable-preempt-while-sampling-processor-id.patch
asoc-intel-sst-fix-the-return-value-of-sst_send_byte_stream_mrfld.patch
-netfilter-core-only-allow-one-nat-hook-per-hook-point.patch
power-supply-axp288_charger-properly-stop-work-on-probe-error-remove.patch
rt2x00-do-not-pause-queue-unconditionally-on-error-path.patch
wl1251-check-return-from-call-to-wl1251_acx_arp_ip_filter.patch
uio_hv_generic-check-that-host-supports-monitor-page.patch
bluetooth-hci_bcm-mandate-presence-of-shutdown-and-device-wake-gpio.patch
bluetooth-hci_bcm-validate-irq-before-using-it.patch
+bluetooth-hci_bcm-make-shutdown-and-device-wake-gpio-optional.patch
i40evf-don-t-rely-on-netif_running-outside-rtnl_lock.patch
drm-amd-powerplay-fix-memory-leakage-when-reload-v2.patch
cxgb4vf-fix-sge-fl-buffer-initialization-logic-for-64k-pages.patch
signal-arm-document-conflicts-with-si_user-and-sigfpe.patch
tcmu-release-blocks-for-partially-setup-cmds.patch
thermal-int3400_thermal-fix-error-handling-in-int3400_thermal_probe.patch
+drm-i915-cnp-ignore-vbt-request-for-know-invalid-ddc-pin.patch
+drm-i915-cnp-properly-handle-vbt-ddc-pin-out-of-bounds.patch