]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Jan 2020 09:39:05 +0000 (10:39 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Jan 2020 09:39:05 +0000 (10:39 +0100)
added patches:
ath9k-fix-storage-endpoint-lookup.patch
brcmfmac-fix-interface-sanity-check.patch
cifs-fix-memory-allocation-in-__smb2_handle_cancelled_cmd.patch
component-do-not-dereference-opaque-pointer-in-debugfs.patch
crypto-chelsio-fix-writing-tfm-flags-to-wrong-place.patch
iio-st_gyro-correct-data-for-lsm9ds0-gyro.patch
mei-me-add-comet-point-lake-h-device-ids.patch
orinoco_usb-fix-interface-sanity-check.patch
rsi_91x_usb-fix-interface-sanity-check.patch
rtl8xxxu-fix-interface-sanity-check.patch
serial-8250_bcm2835aux-fix-line-mismatch-on-driver-unbind.patch
staging-most-net-fix-buffer-overflow.patch
staging-vt6656-correct-packet-types-for-cts-protect-mode.patch
staging-vt6656-fix-false-tx-excessive-retries-reporting.patch
staging-vt6656-use-nullfuction-stack-on-mac80211.patch
staging-wlan-ng-ensure-error-return-is-actually-returned.patch
usb-dwc3-pci-add-id-for-the-intel-comet-lake-v-variant.patch
usb-dwc3-turn-off-vbus-when-leaving-host-mode.patch
usb-serial-ir-usb-add-missing-endpoint-sanity-check.patch
usb-serial-ir-usb-fix-irlap-framing.patch
usb-serial-ir-usb-fix-link-speed-handling.patch
zd1211rw-fix-storage-endpoint-lookup.patch

22 files changed:
queue-4.19/ath9k-fix-storage-endpoint-lookup.patch [new file with mode: 0644]
queue-4.19/brcmfmac-fix-interface-sanity-check.patch [new file with mode: 0644]
queue-4.19/cifs-fix-memory-allocation-in-__smb2_handle_cancelled_cmd.patch [new file with mode: 0644]
queue-4.19/component-do-not-dereference-opaque-pointer-in-debugfs.patch [new file with mode: 0644]
queue-4.19/crypto-chelsio-fix-writing-tfm-flags-to-wrong-place.patch [new file with mode: 0644]
queue-4.19/iio-st_gyro-correct-data-for-lsm9ds0-gyro.patch [new file with mode: 0644]
queue-4.19/mei-me-add-comet-point-lake-h-device-ids.patch [new file with mode: 0644]
queue-4.19/orinoco_usb-fix-interface-sanity-check.patch [new file with mode: 0644]
queue-4.19/rsi_91x_usb-fix-interface-sanity-check.patch [new file with mode: 0644]
queue-4.19/rtl8xxxu-fix-interface-sanity-check.patch [new file with mode: 0644]
queue-4.19/serial-8250_bcm2835aux-fix-line-mismatch-on-driver-unbind.patch [new file with mode: 0644]
queue-4.19/staging-most-net-fix-buffer-overflow.patch [new file with mode: 0644]
queue-4.19/staging-vt6656-correct-packet-types-for-cts-protect-mode.patch [new file with mode: 0644]
queue-4.19/staging-vt6656-fix-false-tx-excessive-retries-reporting.patch [new file with mode: 0644]
queue-4.19/staging-vt6656-use-nullfuction-stack-on-mac80211.patch [new file with mode: 0644]
queue-4.19/staging-wlan-ng-ensure-error-return-is-actually-returned.patch [new file with mode: 0644]
queue-4.19/usb-dwc3-pci-add-id-for-the-intel-comet-lake-v-variant.patch [new file with mode: 0644]
queue-4.19/usb-dwc3-turn-off-vbus-when-leaving-host-mode.patch [new file with mode: 0644]
queue-4.19/usb-serial-ir-usb-add-missing-endpoint-sanity-check.patch [new file with mode: 0644]
queue-4.19/usb-serial-ir-usb-fix-irlap-framing.patch [new file with mode: 0644]
queue-4.19/usb-serial-ir-usb-fix-link-speed-handling.patch [new file with mode: 0644]
queue-4.19/zd1211rw-fix-storage-endpoint-lookup.patch [new file with mode: 0644]

diff --git a/queue-4.19/ath9k-fix-storage-endpoint-lookup.patch b/queue-4.19/ath9k-fix-storage-endpoint-lookup.patch
new file mode 100644 (file)
index 0000000..908a3cd
--- /dev/null
@@ -0,0 +1,37 @@
+From 0ef332951e856efa89507cdd13ba8f4fb8d4db12 Mon Sep 17 00:00:00 2001
+From: Johan Hovold <johan@kernel.org>
+Date: Tue, 10 Dec 2019 12:44:20 +0100
+Subject: ath9k: fix storage endpoint lookup
+
+From: Johan Hovold <johan@kernel.org>
+
+commit 0ef332951e856efa89507cdd13ba8f4fb8d4db12 upstream.
+
+Make sure to use the current alternate setting when verifying the
+storage interface descriptors to avoid submitting an URB to an invalid
+endpoint.
+
+Failing to do so could cause the driver to misbehave or trigger a WARN()
+in usb_submit_urb() that kernels with panic_on_warn set would choke on.
+
+Fixes: 36bcce430657 ("ath9k_htc: Handle storage devices")
+Cc: stable <stable@vger.kernel.org>     # 2.6.39
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/wireless/ath/ath9k/hif_usb.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/wireless/ath/ath9k/hif_usb.c
++++ b/drivers/net/wireless/ath/ath9k/hif_usb.c
+@@ -1216,7 +1216,7 @@ err_fw:
+ static int send_eject_command(struct usb_interface *interface)
+ {
+       struct usb_device *udev = interface_to_usbdev(interface);
+-      struct usb_host_interface *iface_desc = &interface->altsetting[0];
++      struct usb_host_interface *iface_desc = interface->cur_altsetting;
+       struct usb_endpoint_descriptor *endpoint;
+       unsigned char *cmd;
+       u8 bulk_out_ep;
diff --git a/queue-4.19/brcmfmac-fix-interface-sanity-check.patch b/queue-4.19/brcmfmac-fix-interface-sanity-check.patch
new file mode 100644 (file)
index 0000000..77c7a17
--- /dev/null
@@ -0,0 +1,46 @@
+From 3428fbcd6e6c0850b1a8b2a12082b7b2aabb3da3 Mon Sep 17 00:00:00 2001
+From: Johan Hovold <johan@kernel.org>
+Date: Tue, 10 Dec 2019 12:44:22 +0100
+Subject: brcmfmac: fix interface sanity check
+
+From: Johan Hovold <johan@kernel.org>
+
+commit 3428fbcd6e6c0850b1a8b2a12082b7b2aabb3da3 upstream.
+
+Make sure to use the current alternate setting when verifying the
+interface descriptors to avoid binding to an invalid interface.
+
+Failing to do so could cause the driver to misbehave or trigger a WARN()
+in usb_submit_urb() that kernels with panic_on_warn set would choke on.
+
+Fixes: 71bb244ba2fd ("brcm80211: fmac: add USB support for bcm43235/6/8 chipsets")
+Cc: stable <stable@vger.kernel.org>     # 3.4
+Cc: Arend van Spriel <arend@broadcom.com>
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
+@@ -1357,7 +1357,7 @@ brcmf_usb_probe(struct usb_interface *in
+               goto fail;
+       }
+-      desc = &intf->altsetting[0].desc;
++      desc = &intf->cur_altsetting->desc;
+       if ((desc->bInterfaceClass != USB_CLASS_VENDOR_SPEC) ||
+           (desc->bInterfaceSubClass != 2) ||
+           (desc->bInterfaceProtocol != 0xff)) {
+@@ -1370,7 +1370,7 @@ brcmf_usb_probe(struct usb_interface *in
+       num_of_eps = desc->bNumEndpoints;
+       for (ep = 0; ep < num_of_eps; ep++) {
+-              endpoint = &intf->altsetting[0].endpoint[ep].desc;
++              endpoint = &intf->cur_altsetting->endpoint[ep].desc;
+               endpoint_num = usb_endpoint_num(endpoint);
+               if (!usb_endpoint_xfer_bulk(endpoint))
+                       continue;
diff --git a/queue-4.19/cifs-fix-memory-allocation-in-__smb2_handle_cancelled_cmd.patch b/queue-4.19/cifs-fix-memory-allocation-in-__smb2_handle_cancelled_cmd.patch
new file mode 100644 (file)
index 0000000..8e2b483
--- /dev/null
@@ -0,0 +1,62 @@
+From 0a5a98863c9debc02387b3d23c46d187756f5e2b Mon Sep 17 00:00:00 2001
+From: "Paulo Alcantara (SUSE)" <pc@cjr.nz>
+Date: Mon, 13 Jan 2020 17:46:59 -0300
+Subject: cifs: Fix memory allocation in __smb2_handle_cancelled_cmd()
+
+From: Paulo Alcantara (SUSE) <pc@cjr.nz>
+
+commit 0a5a98863c9debc02387b3d23c46d187756f5e2b upstream.
+
+__smb2_handle_cancelled_cmd() is called under a spin lock held in
+cifs_mid_q_entry_release(), so make its memory allocation GFP_ATOMIC.
+
+This issue was observed when running xfstests generic/028:
+
+[ 1722.589204] CIFS VFS: \\192.168.30.26 Cancelling wait for mid 72064 cmd: 5
+[ 1722.590687] CIFS VFS: \\192.168.30.26 Cancelling wait for mid 72065 cmd: 17
+[ 1722.593529] CIFS VFS: \\192.168.30.26 Cancelling wait for mid 72066 cmd: 6
+[ 1723.039014] BUG: sleeping function called from invalid context at mm/slab.h:565
+[ 1723.040710] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 30877, name: cifsd
+[ 1723.045098] CPU: 3 PID: 30877 Comm: cifsd Not tainted 5.5.0-rc4+ #313
+[ 1723.046256] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.12.0-59-gc9ba527-rebuilt.opensuse.org 04/01/2014
+[ 1723.048221] Call Trace:
+[ 1723.048689]  dump_stack+0x97/0xe0
+[ 1723.049268]  ___might_sleep.cold+0xd1/0xe1
+[ 1723.050069]  kmem_cache_alloc_trace+0x204/0x2b0
+[ 1723.051051]  __smb2_handle_cancelled_cmd+0x40/0x140 [cifs]
+[ 1723.052137]  smb2_handle_cancelled_mid+0xf6/0x120 [cifs]
+[ 1723.053247]  cifs_mid_q_entry_release+0x44d/0x630 [cifs]
+[ 1723.054351]  ? cifs_reconnect+0x26a/0x1620 [cifs]
+[ 1723.055325]  cifs_demultiplex_thread+0xad4/0x14a0 [cifs]
+[ 1723.056458]  ? cifs_handle_standard+0x2c0/0x2c0 [cifs]
+[ 1723.057365]  ? kvm_sched_clock_read+0x14/0x30
+[ 1723.058197]  ? sched_clock+0x5/0x10
+[ 1723.058838]  ? sched_clock_cpu+0x18/0x110
+[ 1723.059629]  ? lockdep_hardirqs_on+0x17d/0x250
+[ 1723.060456]  kthread+0x1ab/0x200
+[ 1723.061149]  ? cifs_handle_standard+0x2c0/0x2c0 [cifs]
+[ 1723.062078]  ? kthread_create_on_node+0xd0/0xd0
+[ 1723.062897]  ret_from_fork+0x3a/0x50
+
+Signed-off-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
+Fixes: 9150c3adbf24 ("CIFS: Close open handle after interrupted close")
+Cc: Stable <stable@vger.kernel.org>
+Signed-off-by: Steve French <stfrench@microsoft.com>
+Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ fs/cifs/smb2misc.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/fs/cifs/smb2misc.c
++++ b/fs/cifs/smb2misc.c
+@@ -750,7 +750,7 @@ __smb2_handle_cancelled_close(struct cif
+ {
+       struct close_cancelled_open *cancelled;
+-      cancelled = kzalloc(sizeof(*cancelled), GFP_KERNEL);
++      cancelled = kzalloc(sizeof(*cancelled), GFP_ATOMIC);
+       if (!cancelled)
+               return -ENOMEM;
diff --git a/queue-4.19/component-do-not-dereference-opaque-pointer-in-debugfs.patch b/queue-4.19/component-do-not-dereference-opaque-pointer-in-debugfs.patch
new file mode 100644 (file)
index 0000000..f80f01f
--- /dev/null
@@ -0,0 +1,46 @@
+From ef9ffc1e5f1ac73ecd2fb3b70db2a3b2472ff2f7 Mon Sep 17 00:00:00 2001
+From: Lubomir Rintel <lkundrak@v3.sk>
+Date: Mon, 18 Nov 2019 12:54:31 +0100
+Subject: component: do not dereference opaque pointer in debugfs
+
+From: Lubomir Rintel <lkundrak@v3.sk>
+
+commit ef9ffc1e5f1ac73ecd2fb3b70db2a3b2472ff2f7 upstream.
+
+The match data does not have to be a struct device pointer, and indeed
+very often is not. Attempt to treat it as such easily results in a
+crash.
+
+For the components that are not registered, we don't know which device
+is missing. Once it it is there, we can use the struct component to get
+the device and whether it's bound or not.
+
+Fixes: 59e73854b5fd ('component: add debugfs support')
+Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
+Cc: stable <stable@vger.kernel.org>
+Cc: Arnaud Pouliquen <arnaud.pouliquen@st.com>
+Link: https://lore.kernel.org/r/20191118115431.63626-1-lkundrak@v3.sk
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/base/component.c |    8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/drivers/base/component.c
++++ b/drivers/base/component.c
+@@ -74,11 +74,11 @@ static int component_devices_show(struct
+       seq_printf(s, "%-40s %20s\n", "device name", "status");
+       seq_puts(s, "-------------------------------------------------------------\n");
+       for (i = 0; i < match->num; i++) {
+-              struct device *d = (struct device *)match->compare[i].data;
++              struct component *component = match->compare[i].component;
+-              seq_printf(s, "%-40s %20s\n", dev_name(d),
+-                         match->compare[i].component ?
+-                         "registered" : "not registered");
++              seq_printf(s, "%-40s %20s\n",
++                         component ? dev_name(component->dev) : "(unknown)",
++                         component ? (component->bound ? "bound" : "not bound") : "not registered");
+       }
+       mutex_unlock(&component_mutex);
diff --git a/queue-4.19/crypto-chelsio-fix-writing-tfm-flags-to-wrong-place.patch b/queue-4.19/crypto-chelsio-fix-writing-tfm-flags-to-wrong-place.patch
new file mode 100644 (file)
index 0000000..0c23946
--- /dev/null
@@ -0,0 +1,92 @@
+From bd56cea012fc2d6381e8cd3209510ce09f9de8c9 Mon Sep 17 00:00:00 2001
+From: Eric Biggers <ebiggers@google.com>
+Date: Mon, 30 Dec 2019 21:19:31 -0600
+Subject: crypto: chelsio - fix writing tfm flags to wrong place
+
+From: Eric Biggers <ebiggers@google.com>
+
+commit bd56cea012fc2d6381e8cd3209510ce09f9de8c9 upstream.
+
+The chelsio crypto driver is casting 'struct crypto_aead' directly to
+'struct crypto_tfm', which is incorrect because the crypto_tfm isn't the
+first field of 'struct crypto_aead'.  Consequently, the calls to
+crypto_tfm_set_flags() are modifying some other field in the struct.
+
+Also, the driver is setting CRYPTO_TFM_RES_BAD_KEY_LEN in
+->setauthsize(), not just in ->setkey().  This is incorrect since this
+flag is for bad key lengths, not for bad authentication tag lengths.
+
+Fix these bugs by removing the broken crypto_tfm_set_flags() calls from
+->setauthsize() and by fixing them in ->setkey().
+
+Fixes: 324429d74127 ("chcr: Support for Chelsio's Crypto Hardware")
+Cc: <stable@vger.kernel.org> # v4.9+
+Cc: Atul Gupta <atul.gupta@chelsio.com>
+Signed-off-by: Eric Biggers <ebiggers@google.com>
+Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/crypto/chelsio/chcr_algo.c |   16 +++-------------
+ 1 file changed, 3 insertions(+), 13 deletions(-)
+
+--- a/drivers/crypto/chelsio/chcr_algo.c
++++ b/drivers/crypto/chelsio/chcr_algo.c
+@@ -3135,9 +3135,6 @@ static int chcr_gcm_setauthsize(struct c
+               aeadctx->mayverify = VERIFY_SW;
+               break;
+       default:
+-
+-                crypto_tfm_set_flags((struct crypto_tfm *) tfm,
+-                      CRYPTO_TFM_RES_BAD_KEY_LEN);
+               return -EINVAL;
+       }
+       return crypto_aead_setauthsize(aeadctx->sw_cipher, authsize);
+@@ -3162,8 +3159,6 @@ static int chcr_4106_4309_setauthsize(st
+               aeadctx->mayverify = VERIFY_HW;
+               break;
+       default:
+-              crypto_tfm_set_flags((struct crypto_tfm *)tfm,
+-                                   CRYPTO_TFM_RES_BAD_KEY_LEN);
+               return -EINVAL;
+       }
+       return crypto_aead_setauthsize(aeadctx->sw_cipher, authsize);
+@@ -3204,8 +3199,6 @@ static int chcr_ccm_setauthsize(struct c
+               aeadctx->mayverify = VERIFY_HW;
+               break;
+       default:
+-              crypto_tfm_set_flags((struct crypto_tfm *)tfm,
+-                                   CRYPTO_TFM_RES_BAD_KEY_LEN);
+               return -EINVAL;
+       }
+       return crypto_aead_setauthsize(aeadctx->sw_cipher, authsize);
+@@ -3230,8 +3223,7 @@ static int chcr_ccm_common_setkey(struct
+               ck_size = CHCR_KEYCTX_CIPHER_KEY_SIZE_256;
+               mk_size = CHCR_KEYCTX_MAC_KEY_SIZE_256;
+       } else {
+-              crypto_tfm_set_flags((struct crypto_tfm *)aead,
+-                                   CRYPTO_TFM_RES_BAD_KEY_LEN);
++              crypto_aead_set_flags(aead, CRYPTO_TFM_RES_BAD_KEY_LEN);
+               aeadctx->enckey_len = 0;
+               return  -EINVAL;
+       }
+@@ -3269,8 +3261,7 @@ static int chcr_aead_rfc4309_setkey(stru
+       int error;
+       if (keylen < 3) {
+-              crypto_tfm_set_flags((struct crypto_tfm *)aead,
+-                                   CRYPTO_TFM_RES_BAD_KEY_LEN);
++              crypto_aead_set_flags(aead, CRYPTO_TFM_RES_BAD_KEY_LEN);
+               aeadctx->enckey_len = 0;
+               return  -EINVAL;
+       }
+@@ -3320,8 +3311,7 @@ static int chcr_gcm_setkey(struct crypto
+       } else if (keylen == AES_KEYSIZE_256) {
+               ck_size = CHCR_KEYCTX_CIPHER_KEY_SIZE_256;
+       } else {
+-              crypto_tfm_set_flags((struct crypto_tfm *)aead,
+-                                   CRYPTO_TFM_RES_BAD_KEY_LEN);
++              crypto_aead_set_flags(aead, CRYPTO_TFM_RES_BAD_KEY_LEN);
+               pr_err("GCM: Invalid key length %d\n", keylen);
+               ret = -EINVAL;
+               goto out;
diff --git a/queue-4.19/iio-st_gyro-correct-data-for-lsm9ds0-gyro.patch b/queue-4.19/iio-st_gyro-correct-data-for-lsm9ds0-gyro.patch
new file mode 100644 (file)
index 0000000..7c10656
--- /dev/null
@@ -0,0 +1,120 @@
+From e825070f697abddf3b9b0a675ed0ff1884114818 Mon Sep 17 00:00:00 2001
+From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+Date: Tue, 17 Dec 2019 19:10:38 +0200
+Subject: iio: st_gyro: Correct data for LSM9DS0 gyro
+
+From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+
+commit e825070f697abddf3b9b0a675ed0ff1884114818 upstream.
+
+The commit 41c128cb25ce ("iio: st_gyro: Add lsm9ds0-gyro support")
+assumes that gyro in LSM9DS0 is the same as others with 0xd4 WAI ID,
+but datasheet tells slight different story, i.e. the first scale factor
+for the chip is 245 dps, and not 250 dps.
+
+Correct this by introducing a separate settings for LSM9DS0.
+
+Fixes: 41c128cb25ce ("iio: st_gyro: Add lsm9ds0-gyro support")
+Depends-on: 45a4e4220bf4 ("iio: gyro: st_gyro: fix L3GD20H support")
+Cc: Leonard Crestez <leonard.crestez@nxp.com>
+Cc: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
+Cc: <Stable@vger.kernel.org>
+Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/iio/gyro/st_gyro_core.c |   75 +++++++++++++++++++++++++++++++++++++++-
+ 1 file changed, 74 insertions(+), 1 deletion(-)
+
+--- a/drivers/iio/gyro/st_gyro_core.c
++++ b/drivers/iio/gyro/st_gyro_core.c
+@@ -141,7 +141,6 @@ static const struct st_sensor_settings s
+                       [2] = LSM330DLC_GYRO_DEV_NAME,
+                       [3] = L3G4IS_GYRO_DEV_NAME,
+                       [4] = LSM330_GYRO_DEV_NAME,
+-                      [5] = LSM9DS0_GYRO_DEV_NAME,
+               },
+               .ch = (struct iio_chan_spec *)st_gyro_16bit_channels,
+               .odr = {
+@@ -205,6 +204,80 @@ static const struct st_sensor_settings s
+                       },
+               },
+               .sim = {
++                      .addr = 0x23,
++                      .value = BIT(0),
++              },
++              .multi_read_bit = true,
++              .bootime = 2,
++      },
++      {
++              .wai = 0xd4,
++              .wai_addr = ST_SENSORS_DEFAULT_WAI_ADDRESS,
++              .sensors_supported = {
++                      [0] = LSM9DS0_GYRO_DEV_NAME,
++              },
++              .ch = (struct iio_chan_spec *)st_gyro_16bit_channels,
++              .odr = {
++                      .addr = 0x20,
++                      .mask = GENMASK(7, 6),
++                      .odr_avl = {
++                              { .hz = 95, .value = 0x00, },
++                              { .hz = 190, .value = 0x01, },
++                              { .hz = 380, .value = 0x02, },
++                              { .hz = 760, .value = 0x03, },
++                      },
++              },
++              .pw = {
++                      .addr = 0x20,
++                      .mask = BIT(3),
++                      .value_on = ST_SENSORS_DEFAULT_POWER_ON_VALUE,
++                      .value_off = ST_SENSORS_DEFAULT_POWER_OFF_VALUE,
++              },
++              .enable_axis = {
++                      .addr = ST_SENSORS_DEFAULT_AXIS_ADDR,
++                      .mask = ST_SENSORS_DEFAULT_AXIS_MASK,
++              },
++              .fs = {
++                      .addr = 0x23,
++                      .mask = GENMASK(5, 4),
++                      .fs_avl = {
++                              [0] = {
++                                      .num = ST_GYRO_FS_AVL_245DPS,
++                                      .value = 0x00,
++                                      .gain = IIO_DEGREE_TO_RAD(8750),
++                              },
++                              [1] = {
++                                      .num = ST_GYRO_FS_AVL_500DPS,
++                                      .value = 0x01,
++                                      .gain = IIO_DEGREE_TO_RAD(17500),
++                              },
++                              [2] = {
++                                      .num = ST_GYRO_FS_AVL_2000DPS,
++                                      .value = 0x02,
++                                      .gain = IIO_DEGREE_TO_RAD(70000),
++                              },
++                      },
++              },
++              .bdu = {
++                      .addr = 0x23,
++                      .mask = BIT(7),
++              },
++              .drdy_irq = {
++                      .int2 = {
++                              .addr = 0x22,
++                              .mask = BIT(3),
++                      },
++                      /*
++                       * The sensor has IHL (active low) and open
++                       * drain settings, but only for INT1 and not
++                       * for the DRDY line on INT2.
++                       */
++                      .stat_drdy = {
++                              .addr = ST_SENSORS_DEFAULT_STAT_ADDR,
++                              .mask = GENMASK(2, 0),
++                      },
++              },
++              .sim = {
+                       .addr = 0x23,
+                       .value = BIT(0),
+               },
diff --git a/queue-4.19/mei-me-add-comet-point-lake-h-device-ids.patch b/queue-4.19/mei-me-add-comet-point-lake-h-device-ids.patch
new file mode 100644 (file)
index 0000000..5aa1e7d
--- /dev/null
@@ -0,0 +1,47 @@
+From 559e575a8946a6561dfe8880de341d4ef78d5994 Mon Sep 17 00:00:00 2001
+From: Tomas Winkler <tomas.winkler@intel.com>
+Date: Sun, 19 Jan 2020 11:42:29 +0200
+Subject: mei: me: add comet point (lake) H device ids
+
+From: Tomas Winkler <tomas.winkler@intel.com>
+
+commit 559e575a8946a6561dfe8880de341d4ef78d5994 upstream.
+
+Add Comet Point device IDs for Comet Lake H platforms.
+
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
+Link: https://lore.kernel.org/r/20200119094229.20116-1-tomas.winkler@intel.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/misc/mei/hw-me-regs.h |    4 ++++
+ drivers/misc/mei/pci-me.c     |    2 ++
+ 2 files changed, 6 insertions(+)
+
+--- a/drivers/misc/mei/hw-me-regs.h
++++ b/drivers/misc/mei/hw-me-regs.h
+@@ -141,8 +141,12 @@
+ #define MEI_DEV_ID_CMP_LP     0x02e0  /* Comet Point LP */
+ #define MEI_DEV_ID_CMP_LP_3   0x02e4  /* Comet Point LP 3 (iTouch) */
++
+ #define MEI_DEV_ID_CMP_V      0xA3BA  /* Comet Point Lake V */
++#define MEI_DEV_ID_CMP_H      0x06e0  /* Comet Lake H */
++#define MEI_DEV_ID_CMP_H_3    0x06e4  /* Comet Lake H 3 (iTouch) */
++
+ #define MEI_DEV_ID_ICP_LP     0x34E0  /* Ice Lake Point LP */
+ #define MEI_DEV_ID_TGP_LP     0xA0E0  /* Tiger Lake Point LP */
+--- a/drivers/misc/mei/pci-me.c
++++ b/drivers/misc/mei/pci-me.c
+@@ -108,6 +108,8 @@ static const struct pci_device_id mei_me
+       {MEI_PCI_DEVICE(MEI_DEV_ID_CMP_LP, MEI_ME_PCH12_CFG)},
+       {MEI_PCI_DEVICE(MEI_DEV_ID_CMP_LP_3, MEI_ME_PCH8_CFG)},
+       {MEI_PCI_DEVICE(MEI_DEV_ID_CMP_V, MEI_ME_PCH12_CFG)},
++      {MEI_PCI_DEVICE(MEI_DEV_ID_CMP_H, MEI_ME_PCH12_CFG)},
++      {MEI_PCI_DEVICE(MEI_DEV_ID_CMP_H_3, MEI_ME_PCH8_CFG)},
+       {MEI_PCI_DEVICE(MEI_DEV_ID_ICP_LP, MEI_ME_PCH12_CFG)},
diff --git a/queue-4.19/orinoco_usb-fix-interface-sanity-check.patch b/queue-4.19/orinoco_usb-fix-interface-sanity-check.patch
new file mode 100644 (file)
index 0000000..9aae9cc
--- /dev/null
@@ -0,0 +1,39 @@
+From b73e05aa543cf8db4f4927e36952360d71291d41 Mon Sep 17 00:00:00 2001
+From: Johan Hovold <johan@kernel.org>
+Date: Tue, 10 Dec 2019 12:44:23 +0100
+Subject: orinoco_usb: fix interface sanity check
+
+From: Johan Hovold <johan@kernel.org>
+
+commit b73e05aa543cf8db4f4927e36952360d71291d41 upstream.
+
+Make sure to use the current alternate setting when verifying the
+interface descriptors to avoid binding to an invalid interface.
+
+Failing to do so could cause the driver to misbehave or trigger a WARN()
+in usb_submit_urb() that kernels with panic_on_warn set would choke on.
+
+Fixes: 9afac70a7305 ("orinoco: add orinoco_usb driver")
+Cc: stable <stable@vger.kernel.org>     # 2.6.35
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/wireless/intersil/orinoco/orinoco_usb.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/wireless/intersil/orinoco/orinoco_usb.c
++++ b/drivers/net/wireless/intersil/orinoco/orinoco_usb.c
+@@ -1611,9 +1611,9 @@ static int ezusb_probe(struct usb_interf
+       /* set up the endpoint information */
+       /* check out the endpoints */
+-      iface_desc = &interface->altsetting[0].desc;
++      iface_desc = &interface->cur_altsetting->desc;
+       for (i = 0; i < iface_desc->bNumEndpoints; ++i) {
+-              ep = &interface->altsetting[0].endpoint[i].desc;
++              ep = &interface->cur_altsetting->endpoint[i].desc;
+               if (usb_endpoint_is_bulk_in(ep)) {
+                       /* we found a bulk in endpoint */
diff --git a/queue-4.19/rsi_91x_usb-fix-interface-sanity-check.patch b/queue-4.19/rsi_91x_usb-fix-interface-sanity-check.patch
new file mode 100644 (file)
index 0000000..88ed564
--- /dev/null
@@ -0,0 +1,37 @@
+From 3139b180906af43bc09bd3373fc2338a8271d9d9 Mon Sep 17 00:00:00 2001
+From: Johan Hovold <johan@kernel.org>
+Date: Tue, 10 Dec 2019 12:44:25 +0100
+Subject: rsi_91x_usb: fix interface sanity check
+
+From: Johan Hovold <johan@kernel.org>
+
+commit 3139b180906af43bc09bd3373fc2338a8271d9d9 upstream.
+
+Make sure to use the current alternate setting when verifying the
+interface descriptors to avoid binding to an invalid interface.
+
+Failing to do so could cause the driver to misbehave or trigger a WARN()
+in usb_submit_urb() that kernels with panic_on_warn set would choke on.
+
+Fixes: dad0d04fa7ba ("rsi: Add RS9113 wireless driver")
+Cc: stable <stable@vger.kernel.org>     # 3.15
+Cc: Fariya Fatima <fariyaf@gmail.com>
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/wireless/rsi/rsi_91x_usb.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/wireless/rsi/rsi_91x_usb.c
++++ b/drivers/net/wireless/rsi/rsi_91x_usb.c
+@@ -117,7 +117,7 @@ static int rsi_find_bulk_in_and_out_endp
+       __le16 buffer_size;
+       int ii, bin_found = 0, bout_found = 0;
+-      iface_desc = &(interface->altsetting[0]);
++      iface_desc = interface->cur_altsetting;
+       for (ii = 0; ii < iface_desc->desc.bNumEndpoints; ++ii) {
+               endpoint = &(iface_desc->endpoint[ii].desc);
diff --git a/queue-4.19/rtl8xxxu-fix-interface-sanity-check.patch b/queue-4.19/rtl8xxxu-fix-interface-sanity-check.patch
new file mode 100644 (file)
index 0000000..884bad8
--- /dev/null
@@ -0,0 +1,37 @@
+From 39a4281c312f2d226c710bc656ce380c621a2b16 Mon Sep 17 00:00:00 2001
+From: Johan Hovold <johan@kernel.org>
+Date: Tue, 10 Dec 2019 12:44:24 +0100
+Subject: rtl8xxxu: fix interface sanity check
+
+From: Johan Hovold <johan@kernel.org>
+
+commit 39a4281c312f2d226c710bc656ce380c621a2b16 upstream.
+
+Make sure to use the current alternate setting when verifying the
+interface descriptors to avoid binding to an invalid interface.
+
+Failing to do so could cause the driver to misbehave or trigger a WARN()
+in usb_submit_urb() that kernels with panic_on_warn set would choke on.
+
+Fixes: 26f1fad29ad9 ("New driver: rtl8xxxu (mac80211)")
+Cc: stable <stable@vger.kernel.org>     # 4.4
+Cc: Jes Sorensen <Jes.Sorensen@redhat.com>
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
++++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
+@@ -5921,7 +5921,7 @@ static int rtl8xxxu_parse_usb(struct rtl
+       u8 dir, xtype, num;
+       int ret = 0;
+-      host_interface = &interface->altsetting[0];
++      host_interface = interface->cur_altsetting;
+       interface_desc = &host_interface->desc;
+       endpoints = interface_desc->bNumEndpoints;
diff --git a/queue-4.19/serial-8250_bcm2835aux-fix-line-mismatch-on-driver-unbind.patch b/queue-4.19/serial-8250_bcm2835aux-fix-line-mismatch-on-driver-unbind.patch
new file mode 100644 (file)
index 0000000..ae086fe
--- /dev/null
@@ -0,0 +1,49 @@
+From dc76697d7e933d5e299116f219c890568785ea15 Mon Sep 17 00:00:00 2001
+From: Lukas Wunner <lukas@wunner.de>
+Date: Thu, 16 Jan 2020 13:14:01 +0100
+Subject: serial: 8250_bcm2835aux: Fix line mismatch on driver unbind
+
+From: Lukas Wunner <lukas@wunner.de>
+
+commit dc76697d7e933d5e299116f219c890568785ea15 upstream.
+
+Unbinding the bcm2835aux UART driver raises the following error if the
+maximum number of 8250 UARTs is set to 1 (via the 8250.nr_uarts module
+parameter or CONFIG_SERIAL_8250_RUNTIME_UARTS):
+
+(NULL device *): Removing wrong port: a6f80333 != fa20408b
+
+That's because bcm2835aux_serial_probe() retrieves UART line number 1
+from the devicetree and stores it in data->uart.port.line, while
+serial8250_register_8250_port() instead uses UART line number 0,
+which is stored in data->line.
+
+On driver unbind, bcm2835aux_serial_remove() uses data->uart.port.line,
+which contains the wrong number.  Fix it.
+
+The issue does not occur if the maximum number of 8250 UARTs is >= 2.
+
+Fixes: bdc5f3009580 ("serial: bcm2835: add driver for bcm2835-aux-uart")
+Signed-off-by: Lukas Wunner <lukas@wunner.de>
+Cc: stable@vger.kernel.org # v4.6+
+Cc: Martin Sperl <kernel@martin.sperl.org>
+Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
+Tested-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
+Link: https://lore.kernel.org/r/912ccf553c5258135c6d7e8f404a101ef320f0f4.1579175223.git.lukas@wunner.de
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/tty/serial/8250/8250_bcm2835aux.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/tty/serial/8250/8250_bcm2835aux.c
++++ b/drivers/tty/serial/8250/8250_bcm2835aux.c
+@@ -115,7 +115,7 @@ static int bcm2835aux_serial_remove(stru
+ {
+       struct bcm2835aux_data *data = platform_get_drvdata(pdev);
+-      serial8250_unregister_port(data->uart.port.line);
++      serial8250_unregister_port(data->line);
+       clk_disable_unprepare(data->clk);
+       return 0;
diff --git a/queue-4.19/staging-most-net-fix-buffer-overflow.patch b/queue-4.19/staging-most-net-fix-buffer-overflow.patch
new file mode 100644 (file)
index 0000000..7a77458
--- /dev/null
@@ -0,0 +1,58 @@
+From 4d1356ac12f4d5180d0df345d85ff0ee42b89c72 Mon Sep 17 00:00:00 2001
+From: Andrey Shvetsov <andrey.shvetsov@k2l.de>
+Date: Thu, 16 Jan 2020 18:22:39 +0100
+Subject: staging: most: net: fix buffer overflow
+
+From: Andrey Shvetsov <andrey.shvetsov@k2l.de>
+
+commit 4d1356ac12f4d5180d0df345d85ff0ee42b89c72 upstream.
+
+If the length of the socket buffer is 0xFFFFFFFF (max size for an
+unsigned int), then payload_len becomes 0xFFFFFFF1 after subtracting 14
+(ETH_HLEN).  Then, mdp_len is set to payload_len + 16 (MDP_HDR_LEN)
+which overflows and results in a value of 2.  These values for
+payload_len and mdp_len will pass current buffer size checks.
+
+This patch checks if derived from skb->len sum may overflow.
+
+The check is based on the following idea:
+
+For any `unsigned V1, V2` and derived `unsigned SUM = V1 + V2`,
+`V1 + V2` overflows iif `SUM < V1`.
+
+Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
+Cc: stable <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/20200116172238.6046-1-andrey.shvetsov@microchip.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/staging/most/net/net.c |   10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+--- a/drivers/staging/most/net/net.c
++++ b/drivers/staging/most/net/net.c
+@@ -81,6 +81,11 @@ static int skb_to_mamac(const struct sk_
+       unsigned int payload_len = skb->len - ETH_HLEN;
+       unsigned int mdp_len = payload_len + MDP_HDR_LEN;
++      if (mdp_len < skb->len) {
++              pr_err("drop: too large packet! (%u)\n", skb->len);
++              return -EINVAL;
++      }
++
+       if (mbo->buffer_length < mdp_len) {
+               pr_err("drop: too small buffer! (%d for %d)\n",
+                      mbo->buffer_length, mdp_len);
+@@ -128,6 +133,11 @@ static int skb_to_mep(const struct sk_bu
+       u8 *buff = mbo->virt_address;
+       unsigned int mep_len = skb->len + MEP_HDR_LEN;
++      if (mep_len < skb->len) {
++              pr_err("drop: too large packet! (%u)\n", skb->len);
++              return -EINVAL;
++      }
++
+       if (mbo->buffer_length < mep_len) {
+               pr_err("drop: too small buffer! (%d for %d)\n",
+                      mbo->buffer_length, mep_len);
diff --git a/queue-4.19/staging-vt6656-correct-packet-types-for-cts-protect-mode.patch b/queue-4.19/staging-vt6656-correct-packet-types-for-cts-protect-mode.patch
new file mode 100644 (file)
index 0000000..fa02b2d
--- /dev/null
@@ -0,0 +1,60 @@
+From d971fdd3412f8342747778fb59b8803720ed82b1 Mon Sep 17 00:00:00 2001
+From: Malcolm Priestley <tvboxspy@gmail.com>
+Date: Wed, 8 Jan 2020 21:40:58 +0000
+Subject: staging: vt6656: correct packet types for CTS protect, mode.
+
+From: Malcolm Priestley <tvboxspy@gmail.com>
+
+commit d971fdd3412f8342747778fb59b8803720ed82b1 upstream.
+
+It appears that the driver still transmits in CTS protect mode even
+though it is not enabled in mac80211.
+
+That is both packet types PK_TYPE_11GA and PK_TYPE_11GB both use CTS protect.
+The only difference between them GA does not use B rates.
+
+Find if only B rate in GB or GA in protect mode otherwise transmit packets
+as PK_TYPE_11A.
+
+Cc: stable <stable@vger.kernel.org>
+Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
+Link: https://lore.kernel.org/r/9c1323ff-dbb3-0eaa-43e1-9453f7390dc0@gmail.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/staging/vt6656/device.h |    2 ++
+ drivers/staging/vt6656/rxtx.c   |   12 ++++++++----
+ 2 files changed, 10 insertions(+), 4 deletions(-)
+
+--- a/drivers/staging/vt6656/device.h
++++ b/drivers/staging/vt6656/device.h
+@@ -52,6 +52,8 @@
+ #define RATE_AUTO     12
+ #define MAX_RATE                      12
++#define VNT_B_RATES   (BIT(RATE_1M) | BIT(RATE_2M) |\
++                      BIT(RATE_5M) | BIT(RATE_11M))
+ /*
+  * device specific
+--- a/drivers/staging/vt6656/rxtx.c
++++ b/drivers/staging/vt6656/rxtx.c
+@@ -815,10 +815,14 @@ int vnt_tx_packet(struct vnt_private *pr
+               if (info->band == NL80211_BAND_5GHZ) {
+                       pkt_type = PK_TYPE_11A;
+               } else {
+-                      if (tx_rate->flags & IEEE80211_TX_RC_USE_CTS_PROTECT)
+-                              pkt_type = PK_TYPE_11GB;
+-                      else
+-                              pkt_type = PK_TYPE_11GA;
++                      if (tx_rate->flags & IEEE80211_TX_RC_USE_CTS_PROTECT) {
++                              if (priv->basic_rates & VNT_B_RATES)
++                                      pkt_type = PK_TYPE_11GB;
++                              else
++                                      pkt_type = PK_TYPE_11GA;
++                      } else {
++                              pkt_type = PK_TYPE_11A;
++                      }
+               }
+       } else {
+               pkt_type = PK_TYPE_11B;
diff --git a/queue-4.19/staging-vt6656-fix-false-tx-excessive-retries-reporting.patch b/queue-4.19/staging-vt6656-fix-false-tx-excessive-retries-reporting.patch
new file mode 100644 (file)
index 0000000..7fd40e5
--- /dev/null
@@ -0,0 +1,39 @@
+From 9dd631fa99dc0a0dfbd191173bf355ba30ea786a Mon Sep 17 00:00:00 2001
+From: Malcolm Priestley <tvboxspy@gmail.com>
+Date: Wed, 8 Jan 2020 21:41:36 +0000
+Subject: staging: vt6656: Fix false Tx excessive retries reporting.
+
+From: Malcolm Priestley <tvboxspy@gmail.com>
+
+commit 9dd631fa99dc0a0dfbd191173bf355ba30ea786a upstream.
+
+The driver reporting  IEEE80211_TX_STAT_ACK is not being handled
+correctly. The driver should only report on TSR_TMO flag is not
+set indicating no transmission errors and when not IEEE80211_TX_CTL_NO_ACK
+is being requested.
+
+Cc: stable <stable@vger.kernel.org>
+Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
+Link: https://lore.kernel.org/r/340f1f7f-c310-dca5-476f-abc059b9cd97@gmail.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/staging/vt6656/int.c |    6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- a/drivers/staging/vt6656/int.c
++++ b/drivers/staging/vt6656/int.c
+@@ -97,9 +97,11 @@ static int vnt_int_report_rate(struct vn
+       info->status.rates[0].count = tx_retry;
+-      if (!(tsr & (TSR_TMO | TSR_RETRYTMO))) {
++      if (!(tsr & TSR_TMO)) {
+               info->status.rates[0].idx = idx;
+-              info->flags |= IEEE80211_TX_STAT_ACK;
++
++              if (!(info->flags & IEEE80211_TX_CTL_NO_ACK))
++                      info->flags |= IEEE80211_TX_STAT_ACK;
+       }
+       ieee80211_tx_status_irqsafe(priv->hw, context->skb);
diff --git a/queue-4.19/staging-vt6656-use-nullfuction-stack-on-mac80211.patch b/queue-4.19/staging-vt6656-use-nullfuction-stack-on-mac80211.patch
new file mode 100644 (file)
index 0000000..06980ee
--- /dev/null
@@ -0,0 +1,66 @@
+From d579c43c82f093e63639151625b2139166c730fd Mon Sep 17 00:00:00 2001
+From: Malcolm Priestley <tvboxspy@gmail.com>
+Date: Wed, 8 Jan 2020 21:41:20 +0000
+Subject: staging: vt6656: use NULLFUCTION stack on mac80211
+
+From: Malcolm Priestley <tvboxspy@gmail.com>
+
+commit d579c43c82f093e63639151625b2139166c730fd upstream.
+
+It appears that the drivers does not go into power save correctly the
+NULL data packets are not being transmitted because it not enabled
+in mac80211.
+
+The driver needs to capture ieee80211_is_nullfunc headers and
+copy the duration_id to it's own duration data header.
+
+Cc: stable <stable@vger.kernel.org>
+Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
+Link: https://lore.kernel.org/r/610971ae-555b-a6c3-61b3-444a0c1e35b4@gmail.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/staging/vt6656/main_usb.c |    1 +
+ drivers/staging/vt6656/rxtx.c     |   14 +++++---------
+ 2 files changed, 6 insertions(+), 9 deletions(-)
+
+--- a/drivers/staging/vt6656/main_usb.c
++++ b/drivers/staging/vt6656/main_usb.c
+@@ -978,6 +978,7 @@ vt6656_probe(struct usb_interface *intf,
+       ieee80211_hw_set(priv->hw, RX_INCLUDES_FCS);
+       ieee80211_hw_set(priv->hw, REPORTS_TX_ACK_STATUS);
+       ieee80211_hw_set(priv->hw, SUPPORTS_PS);
++      ieee80211_hw_set(priv->hw, PS_NULLFUNC_STACK);
+       priv->hw->max_signal = 100;
+--- a/drivers/staging/vt6656/rxtx.c
++++ b/drivers/staging/vt6656/rxtx.c
+@@ -278,11 +278,9 @@ static u16 vnt_rxtx_datahead_g(struct vn
+                         PK_TYPE_11B, &buf->b);
+       /* Get Duration and TimeStamp */
+-      if (ieee80211_is_pspoll(hdr->frame_control)) {
+-              __le16 dur = cpu_to_le16(priv->current_aid | BIT(14) | BIT(15));
+-
+-              buf->duration_a = dur;
+-              buf->duration_b = dur;
++      if (ieee80211_is_nullfunc(hdr->frame_control)) {
++              buf->duration_a = hdr->duration_id;
++              buf->duration_b = hdr->duration_id;
+       } else {
+               buf->duration_a = vnt_get_duration_le(priv,
+                                               tx_context->pkt_type, need_ack);
+@@ -371,10 +369,8 @@ static u16 vnt_rxtx_datahead_ab(struct v
+                         tx_context->pkt_type, &buf->ab);
+       /* Get Duration and TimeStampOff */
+-      if (ieee80211_is_pspoll(hdr->frame_control)) {
+-              __le16 dur = cpu_to_le16(priv->current_aid | BIT(14) | BIT(15));
+-
+-              buf->duration = dur;
++      if (ieee80211_is_nullfunc(hdr->frame_control)) {
++              buf->duration = hdr->duration_id;
+       } else {
+               buf->duration = vnt_get_duration_le(priv, tx_context->pkt_type,
+                                                   need_ack);
diff --git a/queue-4.19/staging-wlan-ng-ensure-error-return-is-actually-returned.patch b/queue-4.19/staging-wlan-ng-ensure-error-return-is-actually-returned.patch
new file mode 100644 (file)
index 0000000..2b6eb50
--- /dev/null
@@ -0,0 +1,37 @@
+From 4cc41cbce536876678b35e03c4a8a7bb72c78fa9 Mon Sep 17 00:00:00 2001
+From: Colin Ian King <colin.king@canonical.com>
+Date: Tue, 14 Jan 2020 18:16:04 +0000
+Subject: staging: wlan-ng: ensure error return is actually returned
+
+From: Colin Ian King <colin.king@canonical.com>
+
+commit 4cc41cbce536876678b35e03c4a8a7bb72c78fa9 upstream.
+
+Currently when the call to prism2sta_ifst fails a netdev_err error
+is reported, error return variable result is set to -1 but the
+function always returns 0 for success.  Fix this by returning
+the error value in variable result rather than 0.
+
+Addresses-Coverity: ("Unused value")
+Fixes: 00b3ed168508 ("Staging: add wlan-ng prism2 usb driver")
+Signed-off-by: Colin Ian King <colin.king@canonical.com>
+Cc: stable <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/20200114181604.390235-1-colin.king@canonical.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/staging/wlan-ng/prism2mgmt.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/staging/wlan-ng/prism2mgmt.c
++++ b/drivers/staging/wlan-ng/prism2mgmt.c
+@@ -959,7 +959,7 @@ int prism2mgmt_flashdl_state(struct wlan
+               }
+       }
+-      return 0;
++      return result;
+ }
+ /*----------------------------------------------------------------
diff --git a/queue-4.19/usb-dwc3-pci-add-id-for-the-intel-comet-lake-v-variant.patch b/queue-4.19/usb-dwc3-pci-add-id-for-the-intel-comet-lake-v-variant.patch
new file mode 100644 (file)
index 0000000..3cbbf7f
--- /dev/null
@@ -0,0 +1,41 @@
+From f5ae8869095552e3396ee3e404f9586cc6a828f0 Mon Sep 17 00:00:00 2001
+From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
+Date: Fri, 17 Jan 2020 12:30:33 +0300
+Subject: usb: dwc3: pci: add ID for the Intel Comet Lake -V variant
+
+From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
+
+commit f5ae8869095552e3396ee3e404f9586cc6a828f0 upstream.
+
+There is one more Comet Lake PCH variant, CML-V, that has
+its own PCI ID.
+
+Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
+Cc: stable <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/20200117093033.48616-1-heikki.krogerus@linux.intel.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/dwc3/dwc3-pci.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/usb/dwc3/dwc3-pci.c
++++ b/drivers/usb/dwc3/dwc3-pci.c
+@@ -34,6 +34,7 @@
+ #define PCI_DEVICE_ID_INTEL_GLK                       0x31aa
+ #define PCI_DEVICE_ID_INTEL_CNPLP             0x9dee
+ #define PCI_DEVICE_ID_INTEL_CNPH              0xa36e
++#define PCI_DEVICE_ID_INTEL_CNPV              0xa3b0
+ #define PCI_DEVICE_ID_INTEL_ICLLP             0x34ee
+ #define PCI_INTEL_BXT_DSM_GUID                "732b85d5-b7a7-4a1b-9ba0-4bbd00ffd511"
+@@ -340,6 +341,9 @@ static const struct pci_device_id dwc3_p
+       { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_CNPH),
+         (kernel_ulong_t) &dwc3_pci_intel_properties, },
++      { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_CNPV),
++        (kernel_ulong_t) &dwc3_pci_intel_properties, },
++
+       { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_ICLLP),
+         (kernel_ulong_t) &dwc3_pci_intel_properties, },
diff --git a/queue-4.19/usb-dwc3-turn-off-vbus-when-leaving-host-mode.patch b/queue-4.19/usb-dwc3-turn-off-vbus-when-leaving-host-mode.patch
new file mode 100644 (file)
index 0000000..eaeb79c
--- /dev/null
@@ -0,0 +1,35 @@
+From 09ed259fac621634d51cd986aa8d65f035662658 Mon Sep 17 00:00:00 2001
+From: Bin Liu <b-liu@ti.com>
+Date: Wed, 11 Dec 2019 10:10:03 -0600
+Subject: usb: dwc3: turn off VBUS when leaving host mode
+
+From: Bin Liu <b-liu@ti.com>
+
+commit 09ed259fac621634d51cd986aa8d65f035662658 upstream.
+
+VBUS should be turned off when leaving the host mode.
+Set GCTL_PRTCAP to device mode in teardown to de-assert DRVVBUS pin to
+turn off VBUS power.
+
+Fixes: 5f94adfeed97 ("usb: dwc3: core: refactor mode initialization to its own function")
+Cc: stable@vger.kernel.org
+Signed-off-by: Bin Liu <b-liu@ti.com>
+Signed-off-by: Felipe Balbi <balbi@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/dwc3/core.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/usb/dwc3/core.c
++++ b/drivers/usb/dwc3/core.c
+@@ -1199,6 +1199,9 @@ static void dwc3_core_exit_mode(struct d
+               /* do nothing */
+               break;
+       }
++
++      /* de-assert DRVVBUS for HOST and OTG mode */
++      dwc3_set_prtcap(dwc, DWC3_GCTL_PRTCAP_DEVICE);
+ }
+ static void dwc3_get_properties(struct dwc3 *dwc)
diff --git a/queue-4.19/usb-serial-ir-usb-add-missing-endpoint-sanity-check.patch b/queue-4.19/usb-serial-ir-usb-add-missing-endpoint-sanity-check.patch
new file mode 100644 (file)
index 0000000..b3c514b
--- /dev/null
@@ -0,0 +1,40 @@
+From 2988a8ae7476fe9535ab620320790d1714bdad1d Mon Sep 17 00:00:00 2001
+From: Johan Hovold <johan@kernel.org>
+Date: Wed, 22 Jan 2020 11:15:26 +0100
+Subject: USB: serial: ir-usb: add missing endpoint sanity check
+
+From: Johan Hovold <johan@kernel.org>
+
+commit 2988a8ae7476fe9535ab620320790d1714bdad1d upstream.
+
+Add missing endpoint sanity check to avoid dereferencing a NULL-pointer
+on open() in case a device lacks a bulk-out endpoint.
+
+Note that prior to commit f4a4cbb2047e ("USB: ir-usb: reimplement using
+generic framework") the oops would instead happen on open() if the
+device lacked a bulk-in endpoint and on write() if it lacked a bulk-out
+endpoint.
+
+Fixes: f4a4cbb2047e ("USB: ir-usb: reimplement using generic framework")
+Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
+Cc: stable <stable@vger.kernel.org>
+Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/ir-usb.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/usb/serial/ir-usb.c
++++ b/drivers/usb/serial/ir-usb.c
+@@ -195,6 +195,9 @@ static int ir_startup(struct usb_serial
+       struct usb_irda_cs_descriptor *irda_desc;
+       int rates;
++      if (serial->num_bulk_in < 1 || serial->num_bulk_out < 1)
++              return -ENODEV;
++
+       irda_desc = irda_usb_find_class_desc(serial, 0);
+       if (!irda_desc) {
+               dev_err(&serial->dev->dev,
diff --git a/queue-4.19/usb-serial-ir-usb-fix-irlap-framing.patch b/queue-4.19/usb-serial-ir-usb-fix-irlap-framing.patch
new file mode 100644 (file)
index 0000000..66a543c
--- /dev/null
@@ -0,0 +1,173 @@
+From 38c0d5bdf4973f9f5a888166e9d3e9ed0d32057a Mon Sep 17 00:00:00 2001
+From: Johan Hovold <johan@kernel.org>
+Date: Wed, 22 Jan 2020 11:15:28 +0100
+Subject: USB: serial: ir-usb: fix IrLAP framing
+
+From: Johan Hovold <johan@kernel.org>
+
+commit 38c0d5bdf4973f9f5a888166e9d3e9ed0d32057a upstream.
+
+Commit f4a4cbb2047e ("USB: ir-usb: reimplement using generic framework")
+switched to using the generic write implementation which may combine
+multiple write requests into larger transfers. This can break the IrLAP
+protocol where end-of-frame is determined using the USB short packet
+mechanism, for example, if multiple frames are sent in rapid succession.
+
+Fixes: f4a4cbb2047e ("USB: ir-usb: reimplement using generic framework")
+Cc: stable <stable@vger.kernel.org>     # 2.6.35
+Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/ir-usb.c |  113 +++++++++++++++++++++++++++++++++++---------
+ 1 file changed, 91 insertions(+), 22 deletions(-)
+
+--- a/drivers/usb/serial/ir-usb.c
++++ b/drivers/usb/serial/ir-usb.c
+@@ -45,9 +45,10 @@ static int buffer_size;
+ static int xbof = -1;
+ static int  ir_startup (struct usb_serial *serial);
+-static int  ir_open(struct tty_struct *tty, struct usb_serial_port *port);
+-static int ir_prepare_write_buffer(struct usb_serial_port *port,
+-                                              void *dest, size_t size);
++static int ir_write(struct tty_struct *tty, struct usb_serial_port *port,
++              const unsigned char *buf, int count);
++static int ir_write_room(struct tty_struct *tty);
++static void ir_write_bulk_callback(struct urb *urb);
+ static void ir_process_read_urb(struct urb *urb);
+ static void ir_set_termios(struct tty_struct *tty,
+               struct usb_serial_port *port, struct ktermios *old_termios);
+@@ -77,8 +78,9 @@ static struct usb_serial_driver ir_devic
+       .num_ports              = 1,
+       .set_termios            = ir_set_termios,
+       .attach                 = ir_startup,
+-      .open                   = ir_open,
+-      .prepare_write_buffer   = ir_prepare_write_buffer,
++      .write                  = ir_write,
++      .write_room             = ir_write_room,
++      .write_bulk_callback    = ir_write_bulk_callback,
+       .process_read_urb       = ir_process_read_urb,
+ };
+@@ -254,35 +256,102 @@ static int ir_startup(struct usb_serial
+       return 0;
+ }
+-static int ir_open(struct tty_struct *tty, struct usb_serial_port *port)
++static int ir_write(struct tty_struct *tty, struct usb_serial_port *port,
++              const unsigned char *buf, int count)
+ {
+-      int i;
++      struct urb *urb = NULL;
++      unsigned long flags;
++      int ret;
+-      for (i = 0; i < ARRAY_SIZE(port->write_urbs); ++i)
+-              port->write_urbs[i]->transfer_flags = URB_ZERO_PACKET;
++      if (port->bulk_out_size == 0)
++              return -EINVAL;
+-      /* Start reading from the device */
+-      return usb_serial_generic_open(tty, port);
+-}
++      if (count == 0)
++              return 0;
+-static int ir_prepare_write_buffer(struct usb_serial_port *port,
+-                                              void *dest, size_t size)
+-{
+-      unsigned char *buf = dest;
+-      int count;
++      count = min(count, port->bulk_out_size - 1);
++
++      spin_lock_irqsave(&port->lock, flags);
++      if (__test_and_clear_bit(0, &port->write_urbs_free)) {
++              urb = port->write_urbs[0];
++              port->tx_bytes += count;
++      }
++      spin_unlock_irqrestore(&port->lock, flags);
++
++      if (!urb)
++              return 0;
+       /*
+        * The first byte of the packet we send to the device contains an
+-       * inbound header which indicates an additional number of BOFs and
++       * outbound header which indicates an additional number of BOFs and
+        * a baud rate change.
+        *
+        * See section 5.4.2.2 of the USB IrDA spec.
+        */
+-      *buf = ir_xbof | ir_baud;
++      *(u8 *)urb->transfer_buffer = ir_xbof | ir_baud;
++
++      memcpy(urb->transfer_buffer + 1, buf, count);
++
++      urb->transfer_buffer_length = count + 1;
++      urb->transfer_flags = URB_ZERO_PACKET;
++
++      ret = usb_submit_urb(urb, GFP_ATOMIC);
++      if (ret) {
++              dev_err(&port->dev, "failed to submit write urb: %d\n", ret);
++
++              spin_lock_irqsave(&port->lock, flags);
++              __set_bit(0, &port->write_urbs_free);
++              port->tx_bytes -= count;
++              spin_unlock_irqrestore(&port->lock, flags);
++
++              return ret;
++      }
++
++      return count;
++}
++
++static void ir_write_bulk_callback(struct urb *urb)
++{
++      struct usb_serial_port *port = urb->context;
++      int status = urb->status;
++      unsigned long flags;
++
++      spin_lock_irqsave(&port->lock, flags);
++      __set_bit(0, &port->write_urbs_free);
++      port->tx_bytes -= urb->transfer_buffer_length - 1;
++      spin_unlock_irqrestore(&port->lock, flags);
++
++      switch (status) {
++      case 0:
++              break;
++      case -ENOENT:
++      case -ECONNRESET:
++      case -ESHUTDOWN:
++              dev_dbg(&port->dev, "write urb stopped: %d\n", status);
++              return;
++      case -EPIPE:
++              dev_err(&port->dev, "write urb stopped: %d\n", status);
++              return;
++      default:
++              dev_err(&port->dev, "nonzero write-urb status: %d\n", status);
++              break;
++      }
++
++      usb_serial_port_softint(port);
++}
++
++static int ir_write_room(struct tty_struct *tty)
++{
++      struct usb_serial_port *port = tty->driver_data;
++      int count = 0;
++
++      if (port->bulk_out_size == 0)
++              return 0;
++
++      if (test_bit(0, &port->write_urbs_free))
++              count = port->bulk_out_size - 1;
+-      count = kfifo_out_locked(&port->write_fifo, buf + 1, size - 1,
+-                                                              &port->lock);
+-      return count + 1;
++      return count;
+ }
+ static void ir_process_read_urb(struct urb *urb)
diff --git a/queue-4.19/usb-serial-ir-usb-fix-link-speed-handling.patch b/queue-4.19/usb-serial-ir-usb-fix-link-speed-handling.patch
new file mode 100644 (file)
index 0000000..14270a3
--- /dev/null
@@ -0,0 +1,102 @@
+From 17a0184ca17e288decdca8b2841531e34d49285f Mon Sep 17 00:00:00 2001
+From: Johan Hovold <johan@kernel.org>
+Date: Wed, 22 Jan 2020 11:15:27 +0100
+Subject: USB: serial: ir-usb: fix link-speed handling
+
+From: Johan Hovold <johan@kernel.org>
+
+commit 17a0184ca17e288decdca8b2841531e34d49285f upstream.
+
+Commit e0d795e4f36c ("usb: irda: cleanup on ir-usb module") added a USB
+IrDA header with common defines, but mistakingly switched to using the
+class-descriptor baud-rate bitmask values for the outbound header.
+
+This broke link-speed handling for rates above 9600 baud, but a device
+would also be able to operate at the default 9600 baud until a
+link-speed request was issued (e.g. using the TCGETS ioctl).
+
+Fixes: e0d795e4f36c ("usb: irda: cleanup on ir-usb module")
+Cc: stable <stable@vger.kernel.org>     # 2.6.27
+Cc: Felipe Balbi <balbi@kernel.org>
+Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/usb/serial/ir-usb.c |   20 ++++++++++----------
+ include/linux/usb/irda.h    |   13 ++++++++++++-
+ 2 files changed, 22 insertions(+), 11 deletions(-)
+
+--- a/drivers/usb/serial/ir-usb.c
++++ b/drivers/usb/serial/ir-usb.c
+@@ -335,34 +335,34 @@ static void ir_set_termios(struct tty_st
+       switch (baud) {
+       case 2400:
+-              ir_baud = USB_IRDA_BR_2400;
++              ir_baud = USB_IRDA_LS_2400;
+               break;
+       case 9600:
+-              ir_baud = USB_IRDA_BR_9600;
++              ir_baud = USB_IRDA_LS_9600;
+               break;
+       case 19200:
+-              ir_baud = USB_IRDA_BR_19200;
++              ir_baud = USB_IRDA_LS_19200;
+               break;
+       case 38400:
+-              ir_baud = USB_IRDA_BR_38400;
++              ir_baud = USB_IRDA_LS_38400;
+               break;
+       case 57600:
+-              ir_baud = USB_IRDA_BR_57600;
++              ir_baud = USB_IRDA_LS_57600;
+               break;
+       case 115200:
+-              ir_baud = USB_IRDA_BR_115200;
++              ir_baud = USB_IRDA_LS_115200;
+               break;
+       case 576000:
+-              ir_baud = USB_IRDA_BR_576000;
++              ir_baud = USB_IRDA_LS_576000;
+               break;
+       case 1152000:
+-              ir_baud = USB_IRDA_BR_1152000;
++              ir_baud = USB_IRDA_LS_1152000;
+               break;
+       case 4000000:
+-              ir_baud = USB_IRDA_BR_4000000;
++              ir_baud = USB_IRDA_LS_4000000;
+               break;
+       default:
+-              ir_baud = USB_IRDA_BR_9600;
++              ir_baud = USB_IRDA_LS_9600;
+               baud = 9600;
+       }
+--- a/include/linux/usb/irda.h
++++ b/include/linux/usb/irda.h
+@@ -119,11 +119,22 @@ struct usb_irda_cs_descriptor {
+  * 6 - 115200 bps
+  * 7 - 576000 bps
+  * 8 - 1.152 Mbps
+- * 9 - 5 mbps
++ * 9 - 4 Mbps
+  * 10..15 - Reserved
+  */
+ #define USB_IRDA_STATUS_LINK_SPEED    0x0f
++#define USB_IRDA_LS_NO_CHANGE         0
++#define USB_IRDA_LS_2400              1
++#define USB_IRDA_LS_9600              2
++#define USB_IRDA_LS_19200             3
++#define USB_IRDA_LS_38400             4
++#define USB_IRDA_LS_57600             5
++#define USB_IRDA_LS_115200            6
++#define USB_IRDA_LS_576000            7
++#define USB_IRDA_LS_1152000           8
++#define USB_IRDA_LS_4000000           9
++
+ /* The following is a 4-bit value used only for
+  * outbound header:
+  *
diff --git a/queue-4.19/zd1211rw-fix-storage-endpoint-lookup.patch b/queue-4.19/zd1211rw-fix-storage-endpoint-lookup.patch
new file mode 100644 (file)
index 0000000..a4967df
--- /dev/null
@@ -0,0 +1,37 @@
+From 2d68bb2687abb747558b933e80845ff31570a49c Mon Sep 17 00:00:00 2001
+From: Johan Hovold <johan@kernel.org>
+Date: Tue, 10 Dec 2019 12:44:26 +0100
+Subject: zd1211rw: fix storage endpoint lookup
+
+From: Johan Hovold <johan@kernel.org>
+
+commit 2d68bb2687abb747558b933e80845ff31570a49c upstream.
+
+Make sure to use the current alternate setting when verifying the
+storage interface descriptors to avoid submitting an URB to an invalid
+endpoint.
+
+Failing to do so could cause the driver to misbehave or trigger a WARN()
+in usb_submit_urb() that kernels with panic_on_warn set would choke on.
+
+Fixes: a1030e92c150 ("[PATCH] zd1211rw: Convert installer CDROM device into WLAN device")
+Cc: stable <stable@vger.kernel.org>     # 2.6.19
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/wireless/zydas/zd1211rw/zd_usb.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/wireless/zydas/zd1211rw/zd_usb.c
++++ b/drivers/net/wireless/zydas/zd1211rw/zd_usb.c
+@@ -1275,7 +1275,7 @@ static void print_id(struct usb_device *
+ static int eject_installer(struct usb_interface *intf)
+ {
+       struct usb_device *udev = interface_to_usbdev(intf);
+-      struct usb_host_interface *iface_desc = &intf->altsetting[0];
++      struct usb_host_interface *iface_desc = intf->cur_altsetting;
+       struct usb_endpoint_descriptor *endpoint;
+       unsigned char *cmd;
+       u8 bulk_out_ep;