From: Greg Kroah-Hartman Date: Sun, 1 May 2022 16:36:22 +0000 (+0200) Subject: 4.14-stable patches X-Git-Tag: v5.4.192~66 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=04c3a70a50c4f2542ff5675130e726fe0481b4f2;p=thirdparty%2Fkernel%2Fstable-queue.git 4.14-stable patches added patches: iio-dac-ad5446-fix-read_raw-not-returning-set-value.patch iio-dac-ad5592r-fix-the-missing-return-value.patch iio-magnetometer-ak8975-fix-the-error-handling-in-ak8975_power_on.patch serial-8250-also-set-sticky-mcr-bits-in-console-restoration.patch serial-8250-correct-the-clock-for-endrun-ptp-1588-pcie-device.patch usb-dwc3-core-only-handle-soft-reset-in-dctl.patch usb-gadget-configfs-clear-deactivation-flag-in-configfs_composite_unbind.patch usb-gadget-uvc-fix-crash-when-encoding-data-for-usb-request.patch usb-misc-fix-improper-handling-of-refcount-in-uss720_probe.patch usb-phy-generic-get-the-vbus-supply.patch --- diff --git a/queue-4.14/iio-dac-ad5446-fix-read_raw-not-returning-set-value.patch b/queue-4.14/iio-dac-ad5446-fix-read_raw-not-returning-set-value.patch new file mode 100644 index 00000000000..4f1acaa573b --- /dev/null +++ b/queue-4.14/iio-dac-ad5446-fix-read_raw-not-returning-set-value.patch @@ -0,0 +1,36 @@ +From 89a01cd688d3c0ac983ef0b0e5f40018ab768317 Mon Sep 17 00:00:00 2001 +From: Michael Hennerich +Date: Wed, 6 Apr 2022 12:56:20 +0200 +Subject: iio: dac: ad5446: Fix read_raw not returning set value +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Michael Hennerich + +commit 89a01cd688d3c0ac983ef0b0e5f40018ab768317 upstream. + +read_raw should return the un-scaled value. + +Fixes: 5e06bdfb46e8b ("staging:iio:dac:ad5446: Return cached value for 'raw' attribute") +Signed-off-by: Michael Hennerich +Reviewed-by: Nuno Sá +Link: https://lore.kernel.org/r/20220406105620.1171340-1-michael.hennerich@analog.com +Cc: +Signed-off-by: Jonathan Cameron +Signed-off-by: Greg Kroah-Hartman +--- + drivers/iio/dac/ad5446.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/iio/dac/ad5446.c ++++ b/drivers/iio/dac/ad5446.c +@@ -171,7 +171,7 @@ static int ad5446_read_raw(struct iio_de + + switch (m) { + case IIO_CHAN_INFO_RAW: +- *val = st->cached_val; ++ *val = st->cached_val >> chan->scan_type.shift; + return IIO_VAL_INT; + case IIO_CHAN_INFO_SCALE: + *val = st->vref_mv; diff --git a/queue-4.14/iio-dac-ad5592r-fix-the-missing-return-value.patch b/queue-4.14/iio-dac-ad5592r-fix-the-missing-return-value.patch new file mode 100644 index 00000000000..63039f75aaa --- /dev/null +++ b/queue-4.14/iio-dac-ad5592r-fix-the-missing-return-value.patch @@ -0,0 +1,34 @@ +From b55b38f7cc12da3b9ef36e7a3b7f8f96737df4d5 Mon Sep 17 00:00:00 2001 +From: Zizhuang Deng +Date: Thu, 10 Mar 2022 20:54:50 +0800 +Subject: iio: dac: ad5592r: Fix the missing return value. + +From: Zizhuang Deng + +commit b55b38f7cc12da3b9ef36e7a3b7f8f96737df4d5 upstream. + +The third call to `fwnode_property_read_u32` did not record +the return value, resulting in `channel_offstate` possibly +being assigned the wrong value. + +Fixes: 56ca9db862bf ("iio: dac: Add support for the AD5592R/AD5593R ADCs/DACs") +Signed-off-by: Zizhuang Deng +Link: https://lore.kernel.org/r/20220310125450.4164164-1-sunsetdzz@gmail.com +Cc: +Signed-off-by: Jonathan Cameron +Signed-off-by: Greg Kroah-Hartman +--- + drivers/iio/dac/ad5592r-base.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/iio/dac/ad5592r-base.c ++++ b/drivers/iio/dac/ad5592r-base.c +@@ -532,7 +532,7 @@ static int ad5592r_alloc_channels(struct + if (!ret) + st->channel_modes[reg] = tmp; + +- fwnode_property_read_u32(child, "adi,off-state", &tmp); ++ ret = fwnode_property_read_u32(child, "adi,off-state", &tmp); + if (!ret) + st->channel_offstate[reg] = tmp; + } diff --git a/queue-4.14/iio-magnetometer-ak8975-fix-the-error-handling-in-ak8975_power_on.patch b/queue-4.14/iio-magnetometer-ak8975-fix-the-error-handling-in-ak8975_power_on.patch new file mode 100644 index 00000000000..27d4eaa7e43 --- /dev/null +++ b/queue-4.14/iio-magnetometer-ak8975-fix-the-error-handling-in-ak8975_power_on.patch @@ -0,0 +1,42 @@ +From 3a26787dacf04257a68b16315c984eb2c340bc5e Mon Sep 17 00:00:00 2001 +From: Zheyu Ma +Date: Sat, 9 Apr 2022 11:48:49 +0800 +Subject: iio: magnetometer: ak8975: Fix the error handling in ak8975_power_on() + +From: Zheyu Ma + +commit 3a26787dacf04257a68b16315c984eb2c340bc5e upstream. + +When the driver fails to enable the regulator 'vid', we will get the +following splat: + +[ 79.955610] WARNING: CPU: 5 PID: 441 at drivers/regulator/core.c:2257 _regulator_put+0x3ec/0x4e0 +[ 79.959641] RIP: 0010:_regulator_put+0x3ec/0x4e0 +[ 79.967570] Call Trace: +[ 79.967773] +[ 79.967951] regulator_put+0x1f/0x30 +[ 79.968254] devres_release_group+0x319/0x3d0 +[ 79.968608] i2c_device_probe+0x766/0x940 + +Fix this by disabling the 'vdd' regulator when failing to enable 'vid' +regulator. + +Signed-off-by: Zheyu Ma +Link: https://lore.kernel.org/r/20220409034849.3717231-2-zheyuma97@gmail.com +Cc: +Signed-off-by: Jonathan Cameron +Signed-off-by: Greg Kroah-Hartman +--- + drivers/iio/magnetometer/ak8975.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/iio/magnetometer/ak8975.c ++++ b/drivers/iio/magnetometer/ak8975.c +@@ -404,6 +404,7 @@ static int ak8975_power_on(const struct + if (ret) { + dev_warn(&data->client->dev, + "Failed to enable specified Vid supply\n"); ++ regulator_disable(data->vdd); + return ret; + } + /* diff --git a/queue-4.14/serial-8250-also-set-sticky-mcr-bits-in-console-restoration.patch b/queue-4.14/serial-8250-also-set-sticky-mcr-bits-in-console-restoration.patch new file mode 100644 index 00000000000..1cf6e084fd9 --- /dev/null +++ b/queue-4.14/serial-8250-also-set-sticky-mcr-bits-in-console-restoration.patch @@ -0,0 +1,36 @@ +From 6e6eebdf5e2455f089ccd000754a0deaeb79af82 Mon Sep 17 00:00:00 2001 +From: "Maciej W. Rozycki" +Date: Mon, 18 Apr 2022 16:27:10 +0100 +Subject: serial: 8250: Also set sticky MCR bits in console restoration + +From: Maciej W. Rozycki + +commit 6e6eebdf5e2455f089ccd000754a0deaeb79af82 upstream. + +Sticky MCR bits are lost in console restoration if console suspending +has been disabled. This currently affects the AFE bit, which works in +combination with RTS which we set, so we want to make sure the UART +retains control of its FIFO where previously requested. Also specific +drivers may need other bits in the future. + +Signed-off-by: Maciej W. Rozycki +Fixes: 4516d50aabed ("serial: 8250: Use canary to restart console after suspend") +Cc: stable@vger.kernel.org # v4.0+ +Reviewed-by: Andy Shevchenko +Link: https://lore.kernel.org/r/alpine.DEB.2.21.2204181518490.9383@angie.orcam.me.uk +Signed-off-by: Greg Kroah-Hartman +--- + drivers/tty/serial/8250/8250_port.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/tty/serial/8250/8250_port.c ++++ b/drivers/tty/serial/8250/8250_port.c +@@ -3240,7 +3240,7 @@ static void serial8250_console_restore(s + + serial8250_set_divisor(port, baud, quot, frac); + serial_port_out(port, UART_LCR, up->lcr); +- serial8250_out_MCR(up, UART_MCR_DTR | UART_MCR_RTS); ++ serial8250_out_MCR(up, up->mcr | UART_MCR_DTR | UART_MCR_RTS); + } + + /* diff --git a/queue-4.14/serial-8250-correct-the-clock-for-endrun-ptp-1588-pcie-device.patch b/queue-4.14/serial-8250-correct-the-clock-for-endrun-ptp-1588-pcie-device.patch new file mode 100644 index 00000000000..7d04033728c --- /dev/null +++ b/queue-4.14/serial-8250-correct-the-clock-for-endrun-ptp-1588-pcie-device.patch @@ -0,0 +1,63 @@ +From 637674fa40059cddcc3ad2212728965072f62ea3 Mon Sep 17 00:00:00 2001 +From: "Maciej W. Rozycki" +Date: Mon, 18 Apr 2022 16:27:16 +0100 +Subject: serial: 8250: Correct the clock for EndRun PTP/1588 PCIe device + +From: Maciej W. Rozycki + +commit 637674fa40059cddcc3ad2212728965072f62ea3 upstream. + +The EndRun PTP/1588 dual serial port device is based on the Oxford +Semiconductor OXPCIe952 UART device with the PCI vendor:device ID set +for EndRun Technologies and is therefore driven by a fixed 62.5MHz clock +input derived from the 100MHz PCI Express clock. The clock rate is +divided by the oversampling rate of 16 as it is supplied to the baud +rate generator, yielding the baud base of 3906250. + +Replace the incorrect baud base of 4000000 with the right value of +3906250 then, complementing commit 6cbe45d8ac93 ("serial: 8250: Correct +the clock for OxSemi PCIe devices"). + +Signed-off-by: Maciej W. Rozycki +Cc: stable +Fixes: 1bc8cde46a159 ("8250_pci: Added driver for Endrun Technologies PTP PCIe card.") +Reviewed-by: Andy Shevchenko +Link: https://lore.kernel.org/r/alpine.DEB.2.21.2204181515270.9383@angie.orcam.me.uk +Signed-off-by: Greg Kroah-Hartman +--- + drivers/tty/serial/8250/8250_pci.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +--- a/drivers/tty/serial/8250/8250_pci.c ++++ b/drivers/tty/serial/8250/8250_pci.c +@@ -2668,7 +2668,7 @@ enum pci_board_num_t { + pbn_panacom2, + pbn_panacom4, + pbn_plx_romulus, +- pbn_endrun_2_4000000, ++ pbn_endrun_2_3906250, + pbn_oxsemi, + pbn_oxsemi_1_4000000, + pbn_oxsemi_2_4000000, +@@ -3184,10 +3184,10 @@ static struct pciserial_board pci_boards + * signal now many ports are available + * 2 port 952 Uart support + */ +- [pbn_endrun_2_4000000] = { ++ [pbn_endrun_2_3906250] = { + .flags = FL_BASE0, + .num_ports = 2, +- .base_baud = 4000000, ++ .base_baud = 3906250, + .uart_offset = 0x200, + .first_offset = 0x1000, + }, +@@ -4039,7 +4039,7 @@ static const struct pci_device_id serial + */ + { PCI_VENDOR_ID_ENDRUN, PCI_DEVICE_ID_ENDRUN_1588, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, +- pbn_endrun_2_4000000 }, ++ pbn_endrun_2_3906250 }, + /* + * Quatech cards. These actually have configurable clocks but for + * now we just use the default. diff --git a/queue-4.14/series b/queue-4.14/series index c6aa74a9abc..2c7411f45b6 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -12,3 +12,13 @@ usb-serial-cp210x-add-pids-for-kamstrup-usb-meter-reader.patch usb-serial-option-add-support-for-cinterion-mv32-wa-mv32-wb.patch usb-serial-option-add-telit-0x1057-0x1058-0x1075-compositions.patch xhci-stop-polling-roothubs-after-shutdown.patch +iio-dac-ad5592r-fix-the-missing-return-value.patch +iio-dac-ad5446-fix-read_raw-not-returning-set-value.patch +iio-magnetometer-ak8975-fix-the-error-handling-in-ak8975_power_on.patch +usb-misc-fix-improper-handling-of-refcount-in-uss720_probe.patch +usb-gadget-uvc-fix-crash-when-encoding-data-for-usb-request.patch +usb-gadget-configfs-clear-deactivation-flag-in-configfs_composite_unbind.patch +usb-dwc3-core-only-handle-soft-reset-in-dctl.patch +usb-phy-generic-get-the-vbus-supply.patch +serial-8250-also-set-sticky-mcr-bits-in-console-restoration.patch +serial-8250-correct-the-clock-for-endrun-ptp-1588-pcie-device.patch diff --git a/queue-4.14/usb-dwc3-core-only-handle-soft-reset-in-dctl.patch b/queue-4.14/usb-dwc3-core-only-handle-soft-reset-in-dctl.patch new file mode 100644 index 00000000000..ed9007eec17 --- /dev/null +++ b/queue-4.14/usb-dwc3-core-only-handle-soft-reset-in-dctl.patch @@ -0,0 +1,35 @@ +From f4fd84ae0765a80494b28c43b756a95100351a94 Mon Sep 17 00:00:00 2001 +From: Thinh Nguyen +Date: Thu, 21 Apr 2022 19:33:56 -0700 +Subject: usb: dwc3: core: Only handle soft-reset in DCTL + +From: Thinh Nguyen + +commit f4fd84ae0765a80494b28c43b756a95100351a94 upstream. + +Make sure not to set run_stop bit or link state change request while +initiating soft-reset. Register read-modify-write operation may +unintentionally start the controller before the initialization completes +with its previous DCTL value, which can cause initialization failure. + +Fixes: f59dcab17629 ("usb: dwc3: core: improve reset sequence") +Cc: +Signed-off-by: Thinh Nguyen +Link: https://lore.kernel.org/r/6aecbd78328f102003d40ccf18ceeebd411d3703.1650594792.git.Thinh.Nguyen@synopsys.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/usb/dwc3/core.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/usb/dwc3/core.c ++++ b/drivers/usb/dwc3/core.c +@@ -238,7 +238,8 @@ static int dwc3_core_soft_reset(struct d + + reg = dwc3_readl(dwc->regs, DWC3_DCTL); + reg |= DWC3_DCTL_CSFTRST; +- dwc3_writel(dwc->regs, DWC3_DCTL, reg); ++ reg &= ~DWC3_DCTL_RUN_STOP; ++ dwc3_gadget_dctl_write_safe(dwc, reg); + + do { + reg = dwc3_readl(dwc->regs, DWC3_DCTL); diff --git a/queue-4.14/usb-gadget-configfs-clear-deactivation-flag-in-configfs_composite_unbind.patch b/queue-4.14/usb-gadget-configfs-clear-deactivation-flag-in-configfs_composite_unbind.patch new file mode 100644 index 00000000000..ac26af5e008 --- /dev/null +++ b/queue-4.14/usb-gadget-configfs-clear-deactivation-flag-in-configfs_composite_unbind.patch @@ -0,0 +1,37 @@ +From bf95c4d4630c7a2c16e7b424fdea5177d9ce0864 Mon Sep 17 00:00:00 2001 +From: Vijayavardhan Vennapusa +Date: Wed, 13 Apr 2022 16:10:38 -0500 +Subject: usb: gadget: configfs: clear deactivation flag in configfs_composite_unbind() + +From: Vijayavardhan Vennapusa + +commit bf95c4d4630c7a2c16e7b424fdea5177d9ce0864 upstream. + +If any function like UVC is deactivating gadget as part of composition +switch which results in not calling pullup enablement, it is not getting +enabled after switch to new composition due to this deactivation flag +not cleared. This results in USB enumeration not happening after switch +to new USB composition. Hence clear deactivation flag inside gadget +structure in configfs_composite_unbind() before switch to new USB +composition. + +Signed-off-by: Vijayavardhan Vennapusa +Signed-off-by: Dan Vacura +Cc: stable +Link: https://lore.kernel.org/r/20220413211038.72797-1-w36195@motorola.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/usb/gadget/configfs.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/usb/gadget/configfs.c ++++ b/drivers/usb/gadget/configfs.c +@@ -1411,6 +1411,8 @@ static void configfs_composite_unbind(st + usb_ep_autoconfig_reset(cdev->gadget); + spin_lock_irqsave(&gi->spinlock, flags); + cdev->gadget = NULL; ++ cdev->deactivations = 0; ++ gadget->deactivated = false; + set_gadget_data(gadget, NULL); + spin_unlock_irqrestore(&gi->spinlock, flags); + } diff --git a/queue-4.14/usb-gadget-uvc-fix-crash-when-encoding-data-for-usb-request.patch b/queue-4.14/usb-gadget-uvc-fix-crash-when-encoding-data-for-usb-request.patch new file mode 100644 index 00000000000..e020d804749 --- /dev/null +++ b/queue-4.14/usb-gadget-uvc-fix-crash-when-encoding-data-for-usb-request.patch @@ -0,0 +1,58 @@ +From 71d471e3faf90c9674cadc7605ac719e82cb7fac Mon Sep 17 00:00:00 2001 +From: Dan Vacura +Date: Thu, 31 Mar 2022 13:40:23 -0500 +Subject: usb: gadget: uvc: Fix crash when encoding data for usb request + +From: Dan Vacura + +commit 71d471e3faf90c9674cadc7605ac719e82cb7fac upstream. + +During the uvcg_video_pump() process, if an error occurs and +uvcg_queue_cancel() is called, the buffer queue will be cleared out, but +the current marker (queue->buf_used) of the active buffer (no longer +active) is not reset. On the next iteration of uvcg_video_pump() the +stale buf_used count will be used and the logic of min((unsigned +int)len, buf->bytesused - queue->buf_used) may incorrectly calculate a +nbytes size, causing an invalid memory access. + +[80802.185460][ T315] configfs-gadget gadget: uvc: VS request completed +with status -18. +[80802.185519][ T315] configfs-gadget gadget: uvc: VS request completed +with status -18. +... +uvcg_queue_cancel() is called and the queue is cleared out, but the +marker queue->buf_used is not reset. +... +[80802.262328][ T8682] Unable to handle kernel paging request at virtual +address ffffffc03af9f000 +... +... +[80802.263138][ T8682] Call trace: +[80802.263146][ T8682] __memcpy+0x12c/0x180 +[80802.263155][ T8682] uvcg_video_pump+0xcc/0x1e0 +[80802.263165][ T8682] process_one_work+0x2cc/0x568 +[80802.263173][ T8682] worker_thread+0x28c/0x518 +[80802.263181][ T8682] kthread+0x160/0x170 +[80802.263188][ T8682] ret_from_fork+0x10/0x18 +[80802.263198][ T8682] Code: a8c12829 a88130cb a8c130 + +Fixes: d692522577c0 ("usb: gadget/uvc: Port UVC webcam gadget to use videobuf2 framework") +Cc: +Signed-off-by: Dan Vacura +Link: https://lore.kernel.org/r/20220331184024.23918-1-w36195@motorola.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/usb/gadget/function/uvc_queue.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/usb/gadget/function/uvc_queue.c ++++ b/drivers/usb/gadget/function/uvc_queue.c +@@ -246,6 +246,8 @@ void uvcg_queue_cancel(struct uvc_video_ + buf->state = UVC_BUF_STATE_ERROR; + vb2_buffer_done(&buf->buf.vb2_buf, VB2_BUF_STATE_ERROR); + } ++ queue->buf_used = 0; ++ + /* This must be protected by the irqlock spinlock to avoid race + * conditions between uvc_queue_buffer and the disconnection event that + * could result in an interruptible wait in uvc_dequeue_buffer. Do not diff --git a/queue-4.14/usb-misc-fix-improper-handling-of-refcount-in-uss720_probe.patch b/queue-4.14/usb-misc-fix-improper-handling-of-refcount-in-uss720_probe.patch new file mode 100644 index 00000000000..36e2eb8d655 --- /dev/null +++ b/queue-4.14/usb-misc-fix-improper-handling-of-refcount-in-uss720_probe.patch @@ -0,0 +1,52 @@ +From 0a96fa640dc928da9eaa46a22c46521b037b78ad Mon Sep 17 00:00:00 2001 +From: Hangyu Hua +Date: Thu, 7 Apr 2022 10:40:01 +0800 +Subject: usb: misc: fix improper handling of refcount in uss720_probe() + +From: Hangyu Hua + +commit 0a96fa640dc928da9eaa46a22c46521b037b78ad upstream. + +usb_put_dev shouldn't be called when uss720_probe succeeds because of +priv->usbdev. At the same time, priv->usbdev shouldn't be set to NULL +before destroy_priv in uss720_disconnect because usb_put_dev is in +destroy_priv. + +Fix this by moving priv->usbdev = NULL after usb_put_dev. + +Fixes: dcb4b8ad6a44 ("misc/uss720: fix memory leak in uss720_probe") +Cc: stable +Reviewed-by: Dongliang Mu +Signed-off-by: Hangyu Hua +Link: https://lore.kernel.org/r/20220407024001.11761-1-hbh25y@gmail.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/usb/misc/uss720.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- a/drivers/usb/misc/uss720.c ++++ b/drivers/usb/misc/uss720.c +@@ -84,6 +84,7 @@ static void destroy_priv(struct kref *kr + + dev_dbg(&priv->usbdev->dev, "destroying priv datastructure\n"); + usb_put_dev(priv->usbdev); ++ priv->usbdev = NULL; + kfree(priv); + } + +@@ -749,7 +750,6 @@ static int uss720_probe(struct usb_inter + parport_announce_port(pp); + + usb_set_intfdata(intf, pp); +- usb_put_dev(usbdev); + return 0; + + probe_abort: +@@ -769,7 +769,6 @@ static void uss720_disconnect(struct usb + if (pp) { + priv = pp->private_data; + usbdev = priv->usbdev; +- priv->usbdev = NULL; + priv->pp = NULL; + dev_dbg(&intf->dev, "parport_remove_port\n"); + parport_remove_port(pp); diff --git a/queue-4.14/usb-phy-generic-get-the-vbus-supply.patch b/queue-4.14/usb-phy-generic-get-the-vbus-supply.patch new file mode 100644 index 00000000000..e14777e82e8 --- /dev/null +++ b/queue-4.14/usb-phy-generic-get-the-vbus-supply.patch @@ -0,0 +1,38 @@ +From 03e607cbb2931374db1825f371e9c7f28526d3f4 Mon Sep 17 00:00:00 2001 +From: Sean Anderson +Date: Mon, 25 Apr 2022 13:14:09 -0400 +Subject: usb: phy: generic: Get the vbus supply + +From: Sean Anderson + +commit 03e607cbb2931374db1825f371e9c7f28526d3f4 upstream. + +While support for working with a vbus was added, the regulator was never +actually gotten (despite what was documented). Fix this by actually +getting the supply from the device tree. + +Fixes: 7acc9973e3c4 ("usb: phy: generic: add vbus support") +Cc: stable +Signed-off-by: Sean Anderson +Link: https://lore.kernel.org/r/20220425171412.1188485-3-sean.anderson@seco.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/usb/phy/phy-generic.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/drivers/usb/phy/phy-generic.c ++++ b/drivers/usb/phy/phy-generic.c +@@ -293,6 +293,13 @@ int usb_phy_gen_create_phy(struct device + return -EPROBE_DEFER; + } + ++ nop->vbus_draw = devm_regulator_get_exclusive(dev, "vbus"); ++ if (PTR_ERR(nop->vbus_draw) == -ENODEV) ++ nop->vbus_draw = NULL; ++ if (IS_ERR(nop->vbus_draw)) ++ return dev_err_probe(dev, PTR_ERR(nop->vbus_draw), ++ "could not get vbus regulator\n"); ++ + nop->dev = dev; + nop->phy.dev = nop->dev; + nop->phy.label = "nop-xceiv";