--- /dev/null
+From 4cd3b6ebff8510b2139d64024411207090cfe0a9 Mon Sep 17 00:00:00 2001
+From: Bill Kuzeja <William.Kuzeja@stratus.com>
+Date: Thu, 25 May 2017 15:26:31 -0400
+Subject: scsi: qla2xxx: Fix extraneous ref on sp's after adapter break
+
+From: Bill Kuzeja <William.Kuzeja@stratus.com>
+
+commit 4cd3b6ebff8510b2139d64024411207090cfe0a9 upstream.
+
+Hung task timeouts can result if a qlogic board breaks unexpectedly
+while running I/O. These tasks become hung because command srb reference
+counts are not going to zero, hence the affected srbs and commands do
+not get freed. This fix accounts for this extra reference in the srbs in
+the case of a board failure.
+
+Fixes: a465537ad1a4 ("qla2xxx: Disable the adapter and skip error recovery in case of register disconnect")
+Signed-off-by: Bill Kuzeja <william.kuzeja@stratus.com>
+Acked-by: Himanshu Madhani <himanshu.madhani@cavium.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/scsi/qla2xxx/qla_os.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+--- a/drivers/scsi/qla2xxx/qla_os.c
++++ b/drivers/scsi/qla2xxx/qla_os.c
+@@ -1443,7 +1443,7 @@ qla2x00_loop_reset(scsi_qla_host_t *vha)
+ void
+ qla2x00_abort_all_cmds(scsi_qla_host_t *vha, int res)
+ {
+- int que, cnt;
++ int que, cnt, status;
+ unsigned long flags;
+ srb_t *sp;
+ struct qla_hw_data *ha = vha->hw;
+@@ -1473,8 +1473,12 @@ qla2x00_abort_all_cmds(scsi_qla_host_t *
+ */
+ sp_get(sp);
+ spin_unlock_irqrestore(&ha->hardware_lock, flags);
+- qla2xxx_eh_abort(GET_CMD_SP(sp));
++ status = qla2xxx_eh_abort(GET_CMD_SP(sp));
+ spin_lock_irqsave(&ha->hardware_lock, flags);
++ /* Get rid of extra reference if immediate exit
++ * from ql2xxx_eh_abort */
++ if (status == FAILED && (qla2x00_isp_reg_stat(ha)))
++ atomic_dec(&sp->ref_count);
+ }
+ req->outstanding_cmds[cnt] = NULL;
+ sp->done(vha, sp, res);
scsi-sg-only-check-for-dxfer_len-greater-than-256m.patch
btrfs-alloc_chunk-fix-dup-stripe-size-handling.patch
btrfs-fix-use-after-free-when-cleaning-up-fs_devs-with-a-single-stale-device.patch
+scsi-qla2xxx-fix-extraneous-ref-on-sp-s-after-adapter-break.patch
+usb-gadget-udc-add-missing-platform_device_put-on-error-in-bdc_pci_probe.patch
+usb-dwc3-fix-gdbgfifospace_type-values.patch
+usb-gadget-bdc-64-bit-pointer-capability-check.patch
--- /dev/null
+From b16ea8b9492e99e03b1269fe93ebdbf8e4eabf8a Mon Sep 17 00:00:00 2001
+From: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
+Date: Fri, 2 Feb 2018 13:21:35 -0800
+Subject: usb: dwc3: Fix GDBGFIFOSPACE_TYPE values
+
+From: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
+
+commit b16ea8b9492e99e03b1269fe93ebdbf8e4eabf8a upstream.
+
+The FIFO/Queue type values are incorrect. Correct them according to
+DWC_usb3 programming guide section 1.2.27 (or DWC_usb31 section 1.2.25).
+
+Additionally, this patch includes ProtocolStatusQ and AuxEventQ types.
+
+Fixes: cf6d867d3b57 ("usb: dwc3: core: add fifo space helper")
+Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
+Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/dwc3/core.h | 16 +++++++++-------
+ 1 file changed, 9 insertions(+), 7 deletions(-)
+
+--- a/drivers/usb/dwc3/core.h
++++ b/drivers/usb/dwc3/core.h
+@@ -159,13 +159,15 @@
+ #define DWC3_GDBGFIFOSPACE_TYPE(n) (((n) << 5) & 0x1e0)
+ #define DWC3_GDBGFIFOSPACE_SPACE_AVAILABLE(n) (((n) >> 16) & 0xffff)
+
+-#define DWC3_TXFIFOQ 1
+-#define DWC3_RXFIFOQ 3
+-#define DWC3_TXREQQ 5
+-#define DWC3_RXREQQ 7
+-#define DWC3_RXINFOQ 9
+-#define DWC3_DESCFETCHQ 13
+-#define DWC3_EVENTQ 15
++#define DWC3_TXFIFOQ 0
++#define DWC3_RXFIFOQ 1
++#define DWC3_TXREQQ 2
++#define DWC3_RXREQQ 3
++#define DWC3_RXINFOQ 4
++#define DWC3_PSTATQ 5
++#define DWC3_DESCFETCHQ 6
++#define DWC3_EVENTQ 7
++#define DWC3_AUXEVENTQ 8
+
+ /* Global RX Threshold Configuration Register */
+ #define DWC3_GRXTHRCFG_MAXRXBURSTSIZE(n) (((n) & 0x1f) << 19)
--- /dev/null
+From c8e4e5bdb62a5ac6f860ebcaaf7b467b62f453f1 Mon Sep 17 00:00:00 2001
+From: Srinath Mannam <srinath.mannam@broadcom.com>
+Date: Thu, 15 Jun 2017 14:39:22 +0530
+Subject: usb: gadget: bdc: 64-bit pointer capability check
+
+From: Srinath Mannam <srinath.mannam@broadcom.com>
+
+commit c8e4e5bdb62a5ac6f860ebcaaf7b467b62f453f1 upstream.
+
+Corrected the register to check the 64-bit pointer
+capability state. 64-bit pointer implementation capability
+was checking in wrong register, which causes the BDC
+enumeration failure in 64-bit memory address.
+
+Fixes: efed421a94e6 ("usb: gadget: Add UDC driver for
+Broadcom USB3.0 device controller IP BDC")
+
+Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
+Signed-off-by: Srinath Mannam <srinath.mannam@broadcom.com>
+Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/gadget/udc/bdc/bdc_core.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/gadget/udc/bdc/bdc_core.c
++++ b/drivers/usb/gadget/udc/bdc/bdc_core.c
+@@ -475,7 +475,7 @@ static int bdc_probe(struct platform_dev
+ bdc->dev = dev;
+ dev_dbg(bdc->dev, "bdc->regs: %p irq=%d\n", bdc->regs, bdc->irq);
+
+- temp = bdc_readl(bdc->regs, BDC_BDCSC);
++ temp = bdc_readl(bdc->regs, BDC_BDCCAP1);
+ if ((temp & BDC_P64) &&
+ !dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64))) {
+ dev_dbg(bdc->dev, "Using 64-bit address\n");
--- /dev/null
+From 8874ae5f15f3feef3b4a415b9aed51edcf449aa1 Mon Sep 17 00:00:00 2001
+From: Wei Yongjun <weiyongjun1@huawei.com>
+Date: Tue, 23 Jan 2018 09:35:14 +0000
+Subject: USB: gadget: udc: Add missing platform_device_put() on error in bdc_pci_probe()
+
+From: Wei Yongjun <weiyongjun1@huawei.com>
+
+commit 8874ae5f15f3feef3b4a415b9aed51edcf449aa1 upstream.
+
+Add the missing platform_device_put() before return from bdc_pci_probe()
+in the platform_device_add_resources() error handling case.
+
+Fixes: efed421a94e6 ("usb: gadget: Add UDC driver for Broadcom USB3.0 device controller IP BDC")
+Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
+Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/gadget/udc/bdc/bdc_pci.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/usb/gadget/udc/bdc/bdc_pci.c
++++ b/drivers/usb/gadget/udc/bdc/bdc_pci.c
+@@ -82,6 +82,7 @@ static int bdc_pci_probe(struct pci_dev
+ if (ret) {
+ dev_err(&pci->dev,
+ "couldn't add resources to bdc device\n");
++ platform_device_put(bdc);
+ return ret;
+ }
+