]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Dec 2018 09:56:59 +0000 (10:56 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Dec 2018 09:56:59 +0000 (10:56 +0100)
added patches:
scsi-sd-use-mempool-for-discard-special-page.patch
scsi-t10-pi-return-correct-ref-tag-when-queue-has-no-integrity-profile.patch
ubifs-handle-re-linking-of-inodes-correctly-while-recovery.patch
usb-hso-fix-oob-memory-access-in-hso_probe-hso_get_config_data.patch
usb-serial-option-add-fibocom-nl668-series.patch
usb-serial-option-add-gosuncn-zte-welink-me3630.patch
usb-serial-option-add-hp-lt4132.patch
usb-serial-option-add-simcom-sim7500-sim7600-mbim-mode.patch
usb-serial-option-add-telit-ln940-series.patch
usb-xhci-fix-broken_suspend-placement-in-struct-xchi_hcd.patch
xhci-don-t-prevent-usb2-bus-suspend-in-state-check-intended-for-usb3-only.patch

12 files changed:
queue-4.19/scsi-sd-use-mempool-for-discard-special-page.patch [new file with mode: 0644]
queue-4.19/scsi-t10-pi-return-correct-ref-tag-when-queue-has-no-integrity-profile.patch [new file with mode: 0644]
queue-4.19/series
queue-4.19/ubifs-handle-re-linking-of-inodes-correctly-while-recovery.patch [new file with mode: 0644]
queue-4.19/usb-hso-fix-oob-memory-access-in-hso_probe-hso_get_config_data.patch [new file with mode: 0644]
queue-4.19/usb-serial-option-add-fibocom-nl668-series.patch [new file with mode: 0644]
queue-4.19/usb-serial-option-add-gosuncn-zte-welink-me3630.patch [new file with mode: 0644]
queue-4.19/usb-serial-option-add-hp-lt4132.patch [new file with mode: 0644]
queue-4.19/usb-serial-option-add-simcom-sim7500-sim7600-mbim-mode.patch [new file with mode: 0644]
queue-4.19/usb-serial-option-add-telit-ln940-series.patch [new file with mode: 0644]
queue-4.19/usb-xhci-fix-broken_suspend-placement-in-struct-xchi_hcd.patch [new file with mode: 0644]
queue-4.19/xhci-don-t-prevent-usb2-bus-suspend-in-state-check-intended-for-usb3-only.patch [new file with mode: 0644]

diff --git a/queue-4.19/scsi-sd-use-mempool-for-discard-special-page.patch b/queue-4.19/scsi-sd-use-mempool-for-discard-special-page.patch
new file mode 100644 (file)
index 0000000..eba7116
--- /dev/null
@@ -0,0 +1,140 @@
+From 61cce6f6eeced5ddd9cac55e807fe28b4f18c1ba Mon Sep 17 00:00:00 2001
+From: Jens Axboe <axboe@kernel.dk>
+Date: Wed, 12 Dec 2018 06:46:55 -0700
+Subject: scsi: sd: use mempool for discard special page
+
+From: Jens Axboe <axboe@kernel.dk>
+
+commit 61cce6f6eeced5ddd9cac55e807fe28b4f18c1ba upstream.
+
+When boxes are run near (or to) OOM, we have a problem with the discard
+page allocation in sd. If we fail allocating the special page, we return
+busy, and it'll get retried. But since ordering is honored for dispatch
+requests, we can keep retrying this same IO and failing. Behind that IO
+could be requests that want to free memory, but they never get the
+chance. This means you get repeated spews of traces like this:
+
+[1201401.625972] Call Trace:
+[1201401.631748]  dump_stack+0x4d/0x65
+[1201401.639445]  warn_alloc+0xec/0x190
+[1201401.647335]  __alloc_pages_slowpath+0xe84/0xf30
+[1201401.657722]  ? get_page_from_freelist+0x11b/0xb10
+[1201401.668475]  ? __alloc_pages_slowpath+0x2e/0xf30
+[1201401.679054]  __alloc_pages_nodemask+0x1f9/0x210
+[1201401.689424]  alloc_pages_current+0x8c/0x110
+[1201401.699025]  sd_setup_write_same16_cmnd+0x51/0x150
+[1201401.709987]  sd_init_command+0x49c/0xb70
+[1201401.719029]  scsi_setup_cmnd+0x9c/0x160
+[1201401.727877]  scsi_queue_rq+0x4d9/0x610
+[1201401.736535]  blk_mq_dispatch_rq_list+0x19a/0x360
+[1201401.747113]  blk_mq_sched_dispatch_requests+0xff/0x190
+[1201401.758844]  __blk_mq_run_hw_queue+0x95/0xa0
+[1201401.768653]  blk_mq_run_work_fn+0x2c/0x30
+[1201401.777886]  process_one_work+0x14b/0x400
+[1201401.787119]  worker_thread+0x4b/0x470
+[1201401.795586]  kthread+0x110/0x150
+[1201401.803089]  ? rescuer_thread+0x320/0x320
+[1201401.812322]  ? kthread_park+0x90/0x90
+[1201401.820787]  ? do_syscall_64+0x53/0x150
+[1201401.829635]  ret_from_fork+0x29/0x40
+
+Ensure that the discard page allocation has a mempool backing, so we
+know we can make progress.
+
+Cc: stable@vger.kernel.org
+Signed-off-by: Jens Axboe <axboe@kernel.dk>
+Reviewed-by: Christoph Hellwig <hch@lst.de>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/scsi/sd.c |   23 +++++++++++++++++++----
+ 1 file changed, 19 insertions(+), 4 deletions(-)
+
+--- a/drivers/scsi/sd.c
++++ b/drivers/scsi/sd.c
+@@ -132,6 +132,7 @@ static DEFINE_MUTEX(sd_ref_mutex);
+ static struct kmem_cache *sd_cdb_cache;
+ static mempool_t *sd_cdb_pool;
++static mempool_t *sd_page_pool;
+ static const char *sd_cache_types[] = {
+       "write through", "none", "write back",
+@@ -758,9 +759,10 @@ static int sd_setup_unmap_cmnd(struct sc
+       unsigned int data_len = 24;
+       char *buf;
+-      rq->special_vec.bv_page = alloc_page(GFP_ATOMIC | __GFP_ZERO);
++      rq->special_vec.bv_page = mempool_alloc(sd_page_pool, GFP_ATOMIC);
+       if (!rq->special_vec.bv_page)
+               return BLKPREP_DEFER;
++      clear_highpage(rq->special_vec.bv_page);
+       rq->special_vec.bv_offset = 0;
+       rq->special_vec.bv_len = data_len;
+       rq->rq_flags |= RQF_SPECIAL_PAYLOAD;
+@@ -791,9 +793,10 @@ static int sd_setup_write_same16_cmnd(st
+       u32 nr_sectors = blk_rq_sectors(rq) >> (ilog2(sdp->sector_size) - 9);
+       u32 data_len = sdp->sector_size;
+-      rq->special_vec.bv_page = alloc_page(GFP_ATOMIC | __GFP_ZERO);
++      rq->special_vec.bv_page = mempool_alloc(sd_page_pool, GFP_ATOMIC);
+       if (!rq->special_vec.bv_page)
+               return BLKPREP_DEFER;
++      clear_highpage(rq->special_vec.bv_page);
+       rq->special_vec.bv_offset = 0;
+       rq->special_vec.bv_len = data_len;
+       rq->rq_flags |= RQF_SPECIAL_PAYLOAD;
+@@ -821,9 +824,10 @@ static int sd_setup_write_same10_cmnd(st
+       u32 nr_sectors = blk_rq_sectors(rq) >> (ilog2(sdp->sector_size) - 9);
+       u32 data_len = sdp->sector_size;
+-      rq->special_vec.bv_page = alloc_page(GFP_ATOMIC | __GFP_ZERO);
++      rq->special_vec.bv_page = mempool_alloc(sd_page_pool, GFP_ATOMIC);
+       if (!rq->special_vec.bv_page)
+               return BLKPREP_DEFER;
++      clear_highpage(rq->special_vec.bv_page);
+       rq->special_vec.bv_offset = 0;
+       rq->special_vec.bv_len = data_len;
+       rq->rq_flags |= RQF_SPECIAL_PAYLOAD;
+@@ -1287,7 +1291,7 @@ static void sd_uninit_command(struct scs
+       u8 *cmnd;
+       if (rq->rq_flags & RQF_SPECIAL_PAYLOAD)
+-              __free_page(rq->special_vec.bv_page);
++              mempool_free(rq->special_vec.bv_page, sd_page_pool);
+       if (SCpnt->cmnd != scsi_req(rq)->cmd) {
+               cmnd = SCpnt->cmnd;
+@@ -3635,6 +3639,13 @@ static int __init init_sd(void)
+               goto err_out_cache;
+       }
++      sd_page_pool = mempool_create_page_pool(SD_MEMPOOL_SIZE, 0);
++      if (!sd_page_pool) {
++              printk(KERN_ERR "sd: can't init discard page pool\n");
++              err = -ENOMEM;
++              goto err_out_ppool;
++      }
++
+       err = scsi_register_driver(&sd_template.gendrv);
+       if (err)
+               goto err_out_driver;
+@@ -3642,6 +3653,9 @@ static int __init init_sd(void)
+       return 0;
+ err_out_driver:
++      mempool_destroy(sd_page_pool);
++
++err_out_ppool:
+       mempool_destroy(sd_cdb_pool);
+ err_out_cache:
+@@ -3668,6 +3682,7 @@ static void __exit exit_sd(void)
+       scsi_unregister_driver(&sd_template.gendrv);
+       mempool_destroy(sd_cdb_pool);
++      mempool_destroy(sd_page_pool);
+       kmem_cache_destroy(sd_cdb_cache);
+       class_unregister(&sd_disk_class);
diff --git a/queue-4.19/scsi-t10-pi-return-correct-ref-tag-when-queue-has-no-integrity-profile.patch b/queue-4.19/scsi-t10-pi-return-correct-ref-tag-when-queue-has-no-integrity-profile.patch
new file mode 100644 (file)
index 0000000..d13e1ce
--- /dev/null
@@ -0,0 +1,47 @@
+From 60a89a3ce0cce515dc663bc1b45ac89202ad6c79 Mon Sep 17 00:00:00 2001
+From: "Martin K. Petersen" <martin.petersen@oracle.com>
+Date: Tue, 4 Dec 2018 20:58:33 -0500
+Subject: scsi: t10-pi: Return correct ref tag when queue has no integrity profile
+
+From: Martin K. Petersen <martin.petersen@oracle.com>
+
+commit 60a89a3ce0cce515dc663bc1b45ac89202ad6c79 upstream.
+
+Commit ddd0bc756983 ("block: move ref_tag calculation func to the block
+layer") moved ref tag calculation from SCSI to a library function. However,
+this change broke returning the correct ref tag for devices operating in
+DIF mode since these do not have an associated block integrity profile.
+This in turn caused read/write failures on PI-formatted disks attached to
+an mpt3sas controller.
+
+Fixes: ddd0bc756983 ("block: move ref_tag calculation func to the block layer")
+Cc: stable@vger.kernel.org # 4.19+
+Reported-by: John Garry <john.garry@huawei.com>
+Tested-by: Xiang Chen <chenxiang66@hisilicon.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ include/linux/t10-pi.h |    9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+--- a/include/linux/t10-pi.h
++++ b/include/linux/t10-pi.h
+@@ -39,12 +39,13 @@ struct t10_pi_tuple {
+ static inline u32 t10_pi_ref_tag(struct request *rq)
+ {
++      unsigned int shift = ilog2(queue_logical_block_size(rq->q));
++
+ #ifdef CONFIG_BLK_DEV_INTEGRITY
+-      return blk_rq_pos(rq) >>
+-              (rq->q->integrity.interval_exp - 9) & 0xffffffff;
+-#else
+-      return -1U;
++      if (rq->q->integrity.interval_exp)
++              shift = rq->q->integrity.interval_exp;
+ #endif
++      return blk_rq_pos(rq) >> (shift - SECTOR_SHIFT) & 0xffffffff;
+ }
+ extern const struct blk_integrity_profile t10_pi_type1_crc;
index 206d72082c359961ba686195c47a35a3fa6f63b3..b185439103d386b7ee064c2d68a8141c6542a545 100644 (file)
@@ -1,2 +1,13 @@
 iomap-revert-fs-iomap.c-get-put-the-page-in-iomap_pa.patch
 revert-vfs-allow-userns-root-to-call-mknod-on-owned-filesystems.patch
+usb-hso-fix-oob-memory-access-in-hso_probe-hso_get_config_data.patch
+xhci-don-t-prevent-usb2-bus-suspend-in-state-check-intended-for-usb3-only.patch
+usb-xhci-fix-broken_suspend-placement-in-struct-xchi_hcd.patch
+usb-serial-option-add-gosuncn-zte-welink-me3630.patch
+usb-serial-option-add-hp-lt4132.patch
+usb-serial-option-add-simcom-sim7500-sim7600-mbim-mode.patch
+usb-serial-option-add-fibocom-nl668-series.patch
+usb-serial-option-add-telit-ln940-series.patch
+ubifs-handle-re-linking-of-inodes-correctly-while-recovery.patch
+scsi-t10-pi-return-correct-ref-tag-when-queue-has-no-integrity-profile.patch
+scsi-sd-use-mempool-for-discard-special-page.patch
diff --git a/queue-4.19/ubifs-handle-re-linking-of-inodes-correctly-while-recovery.patch b/queue-4.19/ubifs-handle-re-linking-of-inodes-correctly-while-recovery.patch
new file mode 100644 (file)
index 0000000..0c5e026
--- /dev/null
@@ -0,0 +1,97 @@
+From e58725d51fa8da9133f3f1c54170aa2e43056b91 Mon Sep 17 00:00:00 2001
+From: Richard Weinberger <richard@nod.at>
+Date: Wed, 7 Nov 2018 23:04:43 +0100
+Subject: ubifs: Handle re-linking of inodes correctly while recovery
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Richard Weinberger <richard@nod.at>
+
+commit e58725d51fa8da9133f3f1c54170aa2e43056b91 upstream.
+
+UBIFS's recovery code strictly assumes that a deleted inode will never
+come back, therefore it removes all data which belongs to that inode
+as soon it faces an inode with link count 0 in the replay list.
+Before O_TMPFILE this assumption was perfectly fine. With O_TMPFILE
+it can lead to data loss upon a power-cut.
+
+Consider a journal with entries like:
+0: inode X (nlink = 0) /* O_TMPFILE was created */
+1: data for inode X /* Someone writes to the temp file */
+2: inode X (nlink = 0) /* inode was changed, xattr, chmod, … */
+3: inode X (nlink = 1) /* inode was re-linked via linkat() */
+
+Upon replay of entry #2 UBIFS will drop all data that belongs to inode X,
+this will lead to an empty file after mounting.
+
+As solution for this problem, scan the replay list for a re-link entry
+before dropping data.
+
+Fixes: 474b93704f32 ("ubifs: Implement O_TMPFILE")
+Cc: stable@vger.kernel.org
+Cc: Russell Senior <russell@personaltelco.net>
+Cc: Rafał Miłecki <zajec5@gmail.com>
+Reported-by: Russell Senior <russell@personaltelco.net>
+Reported-by: Rafał Miłecki <zajec5@gmail.com>
+Tested-by: Rafał Miłecki <rafal@milecki.pl>
+Signed-off-by: Richard Weinberger <richard@nod.at>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/ubifs/replay.c |   37 +++++++++++++++++++++++++++++++++++++
+ 1 file changed, 37 insertions(+)
+
+--- a/fs/ubifs/replay.c
++++ b/fs/ubifs/replay.c
+@@ -210,6 +210,38 @@ static int trun_remove_range(struct ubif
+ }
+ /**
++ * inode_still_linked - check whether inode in question will be re-linked.
++ * @c: UBIFS file-system description object
++ * @rino: replay entry to test
++ *
++ * O_TMPFILE files can be re-linked, this means link count goes from 0 to 1.
++ * This case needs special care, otherwise all references to the inode will
++ * be removed upon the first replay entry of an inode with link count 0
++ * is found.
++ */
++static bool inode_still_linked(struct ubifs_info *c, struct replay_entry *rino)
++{
++      struct replay_entry *r;
++
++      ubifs_assert(c, rino->deletion);
++      ubifs_assert(c, key_type(c, &rino->key) == UBIFS_INO_KEY);
++
++      /*
++       * Find the most recent entry for the inode behind @rino and check
++       * whether it is a deletion.
++       */
++      list_for_each_entry_reverse(r, &c->replay_list, list) {
++              ubifs_assert(c, r->sqnum >= rino->sqnum);
++              if (key_inum(c, &r->key) == key_inum(c, &rino->key))
++                      return r->deletion == 0;
++
++      }
++
++      ubifs_assert(c, 0);
++      return false;
++}
++
++/**
+  * apply_replay_entry - apply a replay entry to the TNC.
+  * @c: UBIFS file-system description object
+  * @r: replay entry to apply
+@@ -236,6 +268,11 @@ static int apply_replay_entry(struct ubi
+                       {
+                               ino_t inum = key_inum(c, &r->key);
++                              if (inode_still_linked(c, r)) {
++                                      err = 0;
++                                      break;
++                              }
++
+                               err = ubifs_tnc_remove_ino(c, inum);
+                               break;
+                       }
diff --git a/queue-4.19/usb-hso-fix-oob-memory-access-in-hso_probe-hso_get_config_data.patch b/queue-4.19/usb-hso-fix-oob-memory-access-in-hso_probe-hso_get_config_data.patch
new file mode 100644 (file)
index 0000000..0baf8b9
--- /dev/null
@@ -0,0 +1,67 @@
+From 5146f95df782b0ac61abde36567e718692725c89 Mon Sep 17 00:00:00 2001
+From: Hui Peng <benquike@gmail.com>
+Date: Wed, 12 Dec 2018 12:42:24 +0100
+Subject: USB: hso: Fix OOB memory access in hso_probe/hso_get_config_data
+
+From: Hui Peng <benquike@gmail.com>
+
+commit 5146f95df782b0ac61abde36567e718692725c89 upstream.
+
+The function hso_probe reads if_num from the USB device (as an u8) and uses
+it without a length check to index an array, resulting in an OOB memory read
+in hso_probe or hso_get_config_data.
+
+Add a length check for both locations and updated hso_probe to bail on
+error.
+
+This issue has been assigned CVE-2018-19985.
+
+Reported-by: Hui Peng <benquike@gmail.com>
+Reported-by: Mathias Payer <mathias.payer@nebelwelt.net>
+Signed-off-by: Hui Peng <benquike@gmail.com>
+Signed-off-by: Mathias Payer <mathias.payer@nebelwelt.net>
+Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/usb/hso.c |   18 ++++++++++++++++--
+ 1 file changed, 16 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/usb/hso.c
++++ b/drivers/net/usb/hso.c
+@@ -2807,6 +2807,12 @@ static int hso_get_config_data(struct us
+               return -EIO;
+       }
++      /* check if we have a valid interface */
++      if (if_num > 16) {
++              kfree(config_data);
++              return -EINVAL;
++      }
++
+       switch (config_data[if_num]) {
+       case 0x0:
+               result = 0;
+@@ -2877,10 +2883,18 @@ static int hso_probe(struct usb_interfac
+       /* Get the interface/port specification from either driver_info or from
+        * the device itself */
+-      if (id->driver_info)
++      if (id->driver_info) {
++              /* if_num is controlled by the device, driver_info is a 0 terminated
++               * array. Make sure, the access is in bounds! */
++              for (i = 0; i <= if_num; ++i)
++                      if (((u32 *)(id->driver_info))[i] == 0)
++                              goto exit;
+               port_spec = ((u32 *)(id->driver_info))[if_num];
+-      else
++      } else {
+               port_spec = hso_get_config_data(interface);
++              if (port_spec < 0)
++                      goto exit;
++      }
+       /* Check if we need to switch to alt interfaces prior to port
+        * configuration */
diff --git a/queue-4.19/usb-serial-option-add-fibocom-nl668-series.patch b/queue-4.19/usb-serial-option-add-fibocom-nl668-series.patch
new file mode 100644 (file)
index 0000000..fdb15f2
--- /dev/null
@@ -0,0 +1,66 @@
+From 30360224441ce89a98ed627861e735beb4010775 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?J=C3=B6rgen=20Storvist?= <jorgen.storvist@gmail.com>
+Date: Wed, 12 Dec 2018 21:47:36 +0100
+Subject: USB: serial: option: add Fibocom NL668 series
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Jörgen Storvist <jorgen.storvist@gmail.com>
+
+commit 30360224441ce89a98ed627861e735beb4010775 upstream.
+
+Added USB serial option driver support for Fibocom NL668 series cellular
+modules. Reserved USB endpoints 4, 5 and 6 for network + ADB interfaces.
+
+usb-devices output (QMI mode)
+T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 16 Spd=480 MxCh= 0
+D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
+P:  Vendor=1508 ProdID=1001 Rev=03.18
+S:  Manufacturer=Nodecom NL668 Modem
+S:  Product=Nodecom NL668-CN Modem
+S:  SerialNumber=
+C:  #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=500mA
+I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
+I:  If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
+I:  If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
+I:  If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
+I:  If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
+I:  If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none)
+
+usb-devices output (ECM mode)
+T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 17 Spd=480 MxCh= 0
+D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
+P:  Vendor=1508 ProdID=1001 Rev=03.18
+S:  Manufacturer=Nodecom NL668 Modem
+S:  Product=Nodecom NL668-CN Modem
+S:  SerialNumber=
+C:  #Ifs= 7 Cfg#= 1 Atr=a0 MxPwr=500mA
+I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
+I:  If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
+I:  If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
+I:  If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
+I:  If#= 4 Alt= 0 #EPs= 1 Cls=02(commc) Sub=06 Prot=00 Driver=cdc_ether
+I:  If#= 5 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether
+I:  If#= 6 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none)
+
+Signed-off-by: Jörgen Storvist <jorgen.storvist@gmail.com>
+Cc: stable <stable@vger.kernel.org>
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/option.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/usb/serial/option.c
++++ b/drivers/usb/serial/option.c
+@@ -1949,6 +1949,8 @@ static const struct usb_device_id option
+       { USB_DEVICE_AND_INTERFACE_INFO(0x03f0, 0xa31d, 0xff, 0x06, 0x13) },
+       { USB_DEVICE_AND_INTERFACE_INFO(0x03f0, 0xa31d, 0xff, 0x06, 0x14) },
+       { USB_DEVICE_AND_INTERFACE_INFO(0x03f0, 0xa31d, 0xff, 0x06, 0x1b) },
++      { USB_DEVICE(0x1508, 0x1001),                                           /* Fibocom NL668 */
++        .driver_info = RSVD(4) | RSVD(5) | RSVD(6) },
+       { } /* Terminating entry */
+ };
+ MODULE_DEVICE_TABLE(usb, option_ids);
diff --git a/queue-4.19/usb-serial-option-add-gosuncn-zte-welink-me3630.patch b/queue-4.19/usb-serial-option-add-gosuncn-zte-welink-me3630.patch
new file mode 100644 (file)
index 0000000..92ccb74
--- /dev/null
@@ -0,0 +1,70 @@
+From 70a7444c550a75584ffcfae95267058817eff6a7 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?J=C3=B6rgen=20Storvist?= <jorgen.storvist@gmail.com>
+Date: Tue, 11 Dec 2018 18:28:28 +0100
+Subject: USB: serial: option: add GosunCn ZTE WeLink ME3630
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Jörgen Storvist <jorgen.storvist@gmail.com>
+
+commit 70a7444c550a75584ffcfae95267058817eff6a7 upstream.
+
+Added USB serial option driver support for GosunCn ZTE WeLink ME3630
+series cellular modules for USB modes ECM/NCM and MBIM.
+
+usb-devices output MBIM mode:
+T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 10 Spd=480 MxCh= 0
+D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
+P:  Vendor=19d2 ProdID=0602 Rev=03.18
+S:  Manufacturer=Android
+S:  Product=Android
+S:  SerialNumber=
+C:  #Ifs= 5 Cfg#= 1 Atr=a0 MxPwr=500mA
+I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
+I:  If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
+I:  If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
+I:  If#= 3 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0e Prot=00 Driver=cdc_mbim
+I:  If#= 4 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
+
+usb-devices output ECM/NCM mode:
+T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 11 Spd=480 MxCh= 0
+D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
+P:  Vendor=19d2 ProdID=1476 Rev=03.18
+S:  Manufacturer=Android
+S:  Product=Android
+S:  SerialNumber=
+C:  #Ifs= 5 Cfg#= 1 Atr=a0 MxPwr=500mA
+I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
+I:  If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
+I:  If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
+I:  If#= 3 Alt= 0 #EPs= 1 Cls=02(commc) Sub=06 Prot=00 Driver=cdc_ether
+I:  If#= 4 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether
+
+Signed-off-by: Jörgen Storvist <jorgen.storvist@gmail.com>
+Cc: stable <stable@vger.kernel.org>
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/option.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/usb/serial/option.c
++++ b/drivers/usb/serial/option.c
+@@ -1328,6 +1328,7 @@ static const struct usb_device_id option
+         .driver_info = RSVD(4) },
+       { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0414, 0xff, 0xff, 0xff) },
+       { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0417, 0xff, 0xff, 0xff) },
++      { USB_DEVICE_INTERFACE_CLASS(ZTE_VENDOR_ID, 0x0602, 0xff) },    /* GosunCn ZTE WeLink ME3630 (MBIM mode) */
+       { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1008, 0xff, 0xff, 0xff),
+         .driver_info = RSVD(4) },
+       { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1010, 0xff, 0xff, 0xff),
+@@ -1531,6 +1532,7 @@ static const struct usb_device_id option
+         .driver_info = RSVD(2) },
+       { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1428, 0xff, 0xff, 0xff),  /* Telewell TW-LTE 4G v2 */
+         .driver_info = RSVD(2) },
++      { USB_DEVICE_INTERFACE_CLASS(ZTE_VENDOR_ID, 0x1476, 0xff) },    /* GosunCn ZTE WeLink ME3630 (ECM/NCM mode) */
+       { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1533, 0xff, 0xff, 0xff) },
+       { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1534, 0xff, 0xff, 0xff) },
+       { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1535, 0xff, 0xff, 0xff) },
diff --git a/queue-4.19/usb-serial-option-add-hp-lt4132.patch b/queue-4.19/usb-serial-option-add-hp-lt4132.patch
new file mode 100644 (file)
index 0000000..4abf0d0
--- /dev/null
@@ -0,0 +1,83 @@
+From d57ec3c83b5153217a70b561d4fb6ed96f2f7a25 Mon Sep 17 00:00:00 2001
+From: Tore Anderson <tore@fud.no>
+Date: Sat, 8 Dec 2018 19:05:12 +0100
+Subject: USB: serial: option: add HP lt4132
+
+From: Tore Anderson <tore@fud.no>
+
+commit d57ec3c83b5153217a70b561d4fb6ed96f2f7a25 upstream.
+
+The HP lt4132 is a rebranded Huawei ME906s-158 LTE modem.
+
+The interface with protocol 0x16 is "CDC ECM & NCM" according to the *.inf
+files included with the Windows driver. Attaching the option driver to it
+doesn't result in a /dev/ttyUSB* device being created, so I've excluded it.
+Note that it is also excluded for corresponding Huawei-branded devices, cf.
+commit d544db293a44 ("USB: support new huawei devices in option.c").
+
+T:  Bus=01 Lev=01 Prnt=01 Port=02 Cnt=02 Dev#=  3 Spd=480 MxCh= 0
+D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=ff MxPS=64 #Cfgs=  3
+P:  Vendor=03f0 ProdID=a31d Rev=01.02
+S:  Manufacturer=HP Inc.
+S:  Product=HP lt4132 LTE/HSPA+ 4G Module
+S:  SerialNumber=0123456789ABCDEF
+C:  #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=2mA
+I:  If#=0x0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=06 Prot=10 Driver=option
+I:  If#=0x1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=06 Prot=13 Driver=option
+I:  If#=0x2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=06 Prot=12 Driver=option
+I:  If#=0x3 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=06 Prot=16 Driver=(none)
+I:  If#=0x4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=06 Prot=14 Driver=option
+I:  If#=0x5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=06 Prot=1b Driver=option
+
+T:  Bus=01 Lev=01 Prnt=01 Port=02 Cnt=02 Dev#=  3 Spd=480 MxCh= 0
+D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=ff MxPS=64 #Cfgs=  3
+P:  Vendor=03f0 ProdID=a31d Rev=01.02
+S:  Manufacturer=HP Inc.
+S:  Product=HP lt4132 LTE/HSPA+ 4G Module
+S:  SerialNumber=0123456789ABCDEF
+C:  #Ifs= 7 Cfg#= 2 Atr=a0 MxPwr=2mA
+I:  If#=0x0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=06 Prot=00 Driver=cdc_ether
+I:  If#=0x1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=06 Prot=00 Driver=cdc_ether
+I:  If#=0x2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=06 Prot=10 Driver=option
+I:  If#=0x3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=06 Prot=13 Driver=option
+I:  If#=0x4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=06 Prot=12 Driver=option
+I:  If#=0x5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=06 Prot=14 Driver=option
+I:  If#=0x6 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=06 Prot=1b Driver=option
+
+T:  Bus=01 Lev=01 Prnt=01 Port=02 Cnt=02 Dev#=  3 Spd=480 MxCh= 0
+D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=ff MxPS=64 #Cfgs=  3
+P:  Vendor=03f0 ProdID=a31d Rev=01.02
+S:  Manufacturer=HP Inc.
+S:  Product=HP lt4132 LTE/HSPA+ 4G Module
+S:  SerialNumber=0123456789ABCDEF
+C:  #Ifs= 3 Cfg#= 3 Atr=a0 MxPwr=2mA
+I:  If#=0x0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0e Prot=00 Driver=cdc_mbim
+I:  If#=0x1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
+I:  If#=0x2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=06 Prot=14 Driver=option
+
+Signed-off-by: Tore Anderson <tore@fud.no>
+Cc: stable@vger.kernel.org
+[ johan: drop id defines ]
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/option.c |    7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/serial/option.c
++++ b/drivers/usb/serial/option.c
+@@ -1942,7 +1942,12 @@ static const struct usb_device_id option
+       { USB_DEVICE_AND_INTERFACE_INFO(WETELECOM_VENDOR_ID, WETELECOM_PRODUCT_WMD200, 0xff, 0xff, 0xff) },
+       { USB_DEVICE_AND_INTERFACE_INFO(WETELECOM_VENDOR_ID, WETELECOM_PRODUCT_6802, 0xff, 0xff, 0xff) },
+       { USB_DEVICE_AND_INTERFACE_INFO(WETELECOM_VENDOR_ID, WETELECOM_PRODUCT_WMD300, 0xff, 0xff, 0xff) },
+-      { USB_DEVICE_AND_INTERFACE_INFO(0x03f0, 0x421d, 0xff, 0xff, 0xff) }, /* HP lt2523 (Novatel E371) */
++      { USB_DEVICE_AND_INTERFACE_INFO(0x03f0, 0x421d, 0xff, 0xff, 0xff) },    /* HP lt2523 (Novatel E371) */
++      { USB_DEVICE_AND_INTERFACE_INFO(0x03f0, 0xa31d, 0xff, 0x06, 0x10) },    /* HP lt4132 (Huawei ME906s-158) */
++      { USB_DEVICE_AND_INTERFACE_INFO(0x03f0, 0xa31d, 0xff, 0x06, 0x12) },
++      { USB_DEVICE_AND_INTERFACE_INFO(0x03f0, 0xa31d, 0xff, 0x06, 0x13) },
++      { USB_DEVICE_AND_INTERFACE_INFO(0x03f0, 0xa31d, 0xff, 0x06, 0x14) },
++      { USB_DEVICE_AND_INTERFACE_INFO(0x03f0, 0xa31d, 0xff, 0x06, 0x1b) },
+       { } /* Terminating entry */
+ };
+ MODULE_DEVICE_TABLE(usb, option_ids);
diff --git a/queue-4.19/usb-serial-option-add-simcom-sim7500-sim7600-mbim-mode.patch b/queue-4.19/usb-serial-option-add-simcom-sim7500-sim7600-mbim-mode.patch
new file mode 100644 (file)
index 0000000..b3de812
--- /dev/null
@@ -0,0 +1,49 @@
+From cc6730df08a291e51e145bc65e24ffb5e2f17ab6 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?J=C3=B6rgen=20Storvist?= <jorgen.storvist@gmail.com>
+Date: Wed, 12 Dec 2018 08:39:39 +0100
+Subject: USB: serial: option: add Simcom SIM7500/SIM7600 (MBIM mode)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Jörgen Storvist <jorgen.storvist@gmail.com>
+
+commit cc6730df08a291e51e145bc65e24ffb5e2f17ab6 upstream.
+
+Added USB serial option driver support for Simcom SIM7500/SIM7600 series
+cellular modules exposing MBIM interface (VID 0x1e0e,PID 0x9003)
+
+T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 14 Spd=480 MxCh= 0
+D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
+P:  Vendor=1e0e ProdID=9003 Rev=03.18
+S:  Manufacturer=SimTech, Incorporated
+S:  Product=SimTech, Incorporated
+S:  SerialNumber=0123456789ABCDEF
+C:  #Ifs= 7 Cfg#= 1 Atr=a0 MxPwr=500mA
+I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
+I:  If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
+I:  If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
+I:  If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
+I:  If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
+I:  If#= 5 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0e Prot=00 Driver=cdc_mbim
+I:  If#= 6 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
+
+Signed-off-by: Jörgen Storvist <jorgen.storvist@gmail.com>
+Cc: stable <stable@vger.kernel.org>
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/option.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/usb/serial/option.c
++++ b/drivers/usb/serial/option.c
+@@ -1760,6 +1760,7 @@ static const struct usb_device_id option
+       { USB_DEVICE_AND_INTERFACE_INFO(ALINK_VENDOR_ID, ALINK_PRODUCT_3GU, 0xff, 0xff, 0xff) },
+       { USB_DEVICE(ALINK_VENDOR_ID, SIMCOM_PRODUCT_SIM7100E),
+         .driver_info = RSVD(5) | RSVD(6) },
++      { USB_DEVICE_INTERFACE_CLASS(0x1e0e, 0x9003, 0xff) },   /* Simcom SIM7500/SIM7600 MBIM mode */
+       { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_X060S_X200),
+         .driver_info = NCTRL(0) | NCTRL(1) | RSVD(4) },
+       { USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_X220_X500D),
diff --git a/queue-4.19/usb-serial-option-add-telit-ln940-series.patch b/queue-4.19/usb-serial-option-add-telit-ln940-series.patch
new file mode 100644 (file)
index 0000000..8089cc2
--- /dev/null
@@ -0,0 +1,66 @@
+From 28a86092b1753b802ef7e3de8a4c4a69a9c1bb03 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?J=C3=B6rgen=20Storvist?= <jorgen.storvist@gmail.com>
+Date: Thu, 13 Dec 2018 17:32:08 +0100
+Subject: USB: serial: option: add Telit LN940 series
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Jörgen Storvist <jorgen.storvist@gmail.com>
+
+commit 28a86092b1753b802ef7e3de8a4c4a69a9c1bb03 upstream.
+
+Added USB serial option driver support for Telit LN940 series cellular
+modules. Covering both QMI and MBIM modes.
+
+usb-devices output (0x1900):
+T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 21 Spd=480 MxCh= 0
+D:  Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
+P:  Vendor=1bc7 ProdID=1900 Rev=03.10
+S:  Manufacturer=Telit
+S:  Product=Telit LN940 Mobile Broadband
+S:  SerialNumber=0123456789ABCDEF
+C:  #Ifs= 5 Cfg#= 1 Atr=a0 MxPwr=500mA
+I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
+I:  If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
+I:  If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
+I:  If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
+I:  If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
+
+usb-devices output (0x1901):
+T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 20 Spd=480 MxCh= 0
+D:  Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
+P:  Vendor=1bc7 ProdID=1901 Rev=03.10
+S:  Manufacturer=Telit
+S:  Product=Telit LN940 Mobile Broadband
+S:  SerialNumber=0123456789ABCDEF
+C:  #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=500mA
+I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
+I:  If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
+I:  If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
+I:  If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
+I:  If#= 4 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0e Prot=00 Driver=cdc_mbim
+I:  If#= 5 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
+
+Signed-off-by: Jörgen Storvist <jorgen.storvist@gmail.com>
+Cc: stable <stable@vger.kernel.org>
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/option.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/usb/serial/option.c
++++ b/drivers/usb/serial/option.c
+@@ -1164,6 +1164,10 @@ static const struct usb_device_id option
+       { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, TELIT_PRODUCT_LE920A4_1213, 0xff) },
+       { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE920A4_1214),
+         .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) | RSVD(3) },
++      { USB_DEVICE(TELIT_VENDOR_ID, 0x1900),                          /* Telit LN940 (QMI) */
++        .driver_info = NCTRL(0) | RSVD(1) },
++      { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1901, 0xff),    /* Telit LN940 (MBIM) */
++        .driver_info = NCTRL(0) },
+       { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF622, 0xff, 0xff, 0xff) }, /* ZTE WCDMA products */
+       { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0002, 0xff, 0xff, 0xff),
+         .driver_info = RSVD(1) },
diff --git a/queue-4.19/usb-xhci-fix-broken_suspend-placement-in-struct-xchi_hcd.patch b/queue-4.19/usb-xhci-fix-broken_suspend-placement-in-struct-xchi_hcd.patch
new file mode 100644 (file)
index 0000000..834a065
--- /dev/null
@@ -0,0 +1,46 @@
+From 2419f30a4a4fcaa5f35111563b4c61f1b2b26841 Mon Sep 17 00:00:00 2001
+From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
+Date: Mon, 17 Dec 2018 14:37:40 +0100
+Subject: USB: xhci: fix 'broken_suspend' placement in struct xchi_hcd
+
+From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
+
+commit 2419f30a4a4fcaa5f35111563b4c61f1b2b26841 upstream.
+
+As commented in the struct's definition there shouldn't be anything
+underneath its 'priv[0]' member as it would break some macros.
+
+The patch converts the broken_suspend into a bit-field and relocates it
+next to to the rest of bit-fields.
+
+Fixes: a7d57abcc8a5 ("xhci: workaround CSS timeout on AMD SNPS 3.0 xHC")
+Reported-by: Oliver Neukum  <oneukum@suse.com>
+Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
+Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>
+Cc: stable <stable@vger.kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/host/xhci.h |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/usb/host/xhci.h
++++ b/drivers/usb/host/xhci.h
+@@ -1860,6 +1860,8 @@ struct xhci_hcd {
+       unsigned                sw_lpm_support:1;
+       /* support xHCI 1.0 spec USB2 hardware LPM */
+       unsigned                hw_lpm_support:1;
++      /* Broken Suspend flag for SNPS Suspend resume issue */
++      unsigned                broken_suspend:1;
+       /* cached usb2 extened protocol capabilites */
+       u32                     *ext_caps;
+       unsigned int            num_ext_caps;
+@@ -1877,8 +1879,6 @@ struct xhci_hcd {
+       void                    *dbc;
+       /* platform-specific data -- must come last */
+       unsigned long           priv[0] __aligned(sizeof(s64));
+-      /* Broken Suspend flag for SNPS Suspend resume issue */
+-      u8                      broken_suspend;
+ };
+ /* Platform specific overrides to generic XHCI hc_driver ops */
diff --git a/queue-4.19/xhci-don-t-prevent-usb2-bus-suspend-in-state-check-intended-for-usb3-only.patch b/queue-4.19/xhci-don-t-prevent-usb2-bus-suspend-in-state-check-intended-for-usb3-only.patch
new file mode 100644 (file)
index 0000000..210a0ba
--- /dev/null
@@ -0,0 +1,39 @@
+From 45f750c16cae3625014c14c77bd9005eda975d35 Mon Sep 17 00:00:00 2001
+From: Mathias Nyman <mathias.nyman@linux.intel.com>
+Date: Fri, 14 Dec 2018 10:54:43 +0200
+Subject: xhci: Don't prevent USB2 bus suspend in state check intended for USB3 only
+
+From: Mathias Nyman <mathias.nyman@linux.intel.com>
+
+commit 45f750c16cae3625014c14c77bd9005eda975d35 upstream.
+
+The code to prevent a bus suspend if a USB3 port was still in link training
+also reacted to USB2 port polling state.
+This caused bus suspend to busyloop in some cases.
+USB2 polling state is different from USB3, and should not prevent bus
+suspend.
+
+Limit the USB3 link training state check to USB3 root hub ports only.
+The origial commit went to stable so this need to be applied there as well
+
+Fixes: 2f31a67f01a8 ("usb: xhci: Prevent bus suspend if a port connect change or polling state is detected")
+Cc: stable@vger.kernel.org
+Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/host/xhci-hub.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/host/xhci-hub.c
++++ b/drivers/usb/host/xhci-hub.c
+@@ -1507,7 +1507,8 @@ int xhci_bus_suspend(struct usb_hcd *hcd
+               portsc_buf[port_index] = 0;
+               /* Bail out if a USB3 port has a new device in link training */
+-              if ((t1 & PORT_PLS_MASK) == XDEV_POLLING) {
++              if ((hcd->speed >= HCD_USB3) &&
++                  (t1 & PORT_PLS_MASK) == XDEV_POLLING) {
+                       bus_state->bus_suspended = 0;
+                       spin_unlock_irqrestore(&xhci->lock, flags);
+                       xhci_dbg(xhci, "Bus suspend bailout, port in polling\n");