- 10 Oct, 2021 2 commits
-
-
Nikita Yushchenko authored
This adds support for READ_CAPACITY(16), READ(16) and WRITE(16) commands, and fixes READ_CAPACITY command to return 0xffffffff if media size does not fit in 32 bits. This makes f_mass_storage to export a 16T disk array correctly. Signed-off-by:
Nikita Yushchenko <nikita.yoush@cogentembedded.com> Acked-by:
Alan Stern <stern@rowland.harvard.edu> Link: https://lore.kernel.org/r/20210921145901.11952-1-nikita.yoush@cogentembedded.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Piyush Mehta authored
Root-cause: There is an issue like endpoint is not recognized as primed, when bus have more pressure and the add dTD tripwire semaphore (ATDTW bit in USBCMD register) that can cause the controller to ignore a dTD that is added to a primed endpoint. This issue observed with the Windows10 host machine. Workaround: The software must implement a periodic cycle, and check for each dTD, if the endpoint is primed. It can do this by reading the corresponding bits in the ENDPTPRIME and ENDPTSTAT registers. If these bits are read at 0, the software needs to re-prime the endpoint by writing 1 to the corresponding bit in the ENDPTPRIME register. Added conditional revision check of 2.20[CI_REVISION_22]. Link: https://lore.kernel.org/linux-usb/SJ0PR02MB8644CBBA848A0F68323F1AA5D4D99@SJ0PR02MB8644.namprd02.prod.outlook.com/Acked-by:
Peter Chen <peter.chen@kernel.org> Signed-off-by:
Piyush Mehta <piyush.mehta@xilinx.com> Link: https://lore.kernel.org/r/20210913140005.955699-1-piyush.mehta@xilinx.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 07 Oct, 2021 1 commit
-
-
Johan Hovold authored
This reverts commit ce3e90d5. The commit in question added list of quirky hubs, but the match implementation clearly hasn't been tested at all. First, hub_udev->dev.parent does not represent a USB interface so using to_usb_interface() makes no sense and we'd be passing a random pointer to usb_match_id(). Second, if hub_udev is a root hub it doesn't even even represent a USB device. Signed-off-by:
Johan Hovold <johan@kernel.org> Fixes: ce3e90d5 ("usb: misc: ehset: Workaround for "special" hubs") Cc: Razvan Heghedus <heghedus.razvan@gmail.com> Link: https://lore.kernel.org/r/20211007090601.19156-1-johan@kernel.orgSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 06 Oct, 2021 2 commits
-
-
Robert Greener authored
This fixes the following checkpatch.pl warnings: drivers/usb/core/config.c:989: CHECK:ALLOC_SIZEOF_STRUCT: Prefer kzalloc(sizeof(*bos)...) over kzalloc(sizeof(struct usb_bos_descriptor)...) drivers/usb/core/config.c:1010: CHECK:ALLOC_SIZEOF_STRUCT: Prefer kzalloc(sizeof(*dev->bos)...) over kzalloc(sizeof(struct usb_host_bos)...) Signed-off-by:
Robert Greener <rob@robgreener.com> Link: https://lore.kernel.org/r/20211001151350.ijiexr3ebwvypmdd@shortbreadSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Fabrice Gasnier authored
STM32MP151 complies with the OTG 2.0. Set it with otg-rev dt property. Signed-off-by:
Fabrice Gasnier <fabrice.gasnier@foss.st.com> Link: https://lore.kernel.org/r/1631692473-8732-4-git-send-email-fabrice.gasnier@foss.st.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 05 Oct, 2021 34 commits
-
-
Andy Shevchenko authored
When the UDC is not found, print also the error code for easier debugging. Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20211004144126.49154-2-andriy.shevchenko@linux.intel.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Andy Shevchenko authored
Instead of duplicating, use pr_fmt() to prefix pr_*() messages. Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20211004144126.49154-1-andriy.shevchenko@linux.intel.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Thomas Haemmerle authored
Currently, the UVC function is activated when open on the corresponding v4l2 device is called. On another open the activation of the function fails since the deactivation counter in `usb_function_activate` equals 0. However the error is not returned to userspace since the open of the v4l2 device is successful. On a close the function is deactivated (since deactivation counter still equals 0) and the video is disabled in `uvc_v4l2_release`, although the UVC application potentially is streaming. Move activation of UVC function to subscription on UVC_EVENT_SETUP because there we can guarantee for a userspace application utilizing UVC. Block subscription on UVC_EVENT_SETUP while another application already is subscribed to it, indicated by `bool func_connected` in `struct uvc_device`. Extend the `struct uvc_file_handle` with member `bool is_uvc_app_handle` to tag it as the handle used by the userspace UVC application. With this a process is able to check capabilities of the v4l2 device without deactivating the function for the actual UVC application. Reviewed-By:
Michael Tretter <m.tretter@pengutronix.de> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by:
Thomas Haemmerle <thomas.haemmerle@wolfvision.net> Signed-off-by:
Michael Tretter <m.tretter@pengutronix.de> Signed-off-by:
Michael Grzeschik <m.grzeschik@pengutronix.de> Acked-by:
Felipe Balbi <balbi@kernel.org> Link: https://lore.kernel.org/r/20211003201355.24081-1-m.grzeschik@pengutronix.deSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Rikard Falkeborn authored
The only usage of wdm_wwan_port_ops is to pass its address to wwan_create_port() which takes a pointer to const wwan_port_ops as argument. Make it const to allow the compiler to put it in read-only memory. Signed-off-by:
Rikard Falkeborn <rikard.falkeborn@gmail.com> Acked-by:
Oliver Neukum <oneukum@suse.com> Link: https://lore.kernel.org/r/20210929194547.46954-3-rikard.falkeborn@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Philipp Hortmann authored
This patch fixes the checkpatch.pl warning: WARNING: min() should probably be min_t(size_t, count, MAX_TRANSFER) + size_t writesize = min(count, (size_t)MAX_TRANSFER); Signed-off-by:
Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/20210922212037.GA8110@matrix-ESPRIMO-P710Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Maxime Ripard authored
The original binding was allowing any combination of usb2-phy and usb3-phy in the phys and phy-names properties. However, the current binding enforces that those properties must be a list of usb2-phy and usb3-phy, with exactly one element, effectively making usb2-phy the only value being valid. Let's rework the properties description to allow either one or two element picked with values either usb2-phy or usb3-phy. The rest of the tooling makes sure that we don't get any duplicate value, so this should be what we want. Cc: Felipe Balbi <balbi@kernel.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-usb@vger.kernel.org Reviewed-by:
Rob Herring <robh@kernel.org> Signed-off-by:
Maxime Ripard <maxime@cerno.tech> Link: https://lore.kernel.org/r/20210927073514.14334-2-maxime@cerno.techSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Maxime Ripard authored
The SMSC USB3503 USB Hub Controller is supported by Linux thanks to its device tree binding. Now that we have the DT validation in place, let's convert the device tree bindings for that driver over to a YAML schema. Cc: Dongjin Kim <tobetter@gmail.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-usb@vger.kernel.org Reviewed-by:
Rob Herring <robh@kernel.org> Signed-off-by:
Maxime Ripard <maxime@cerno.tech> Link: https://lore.kernel.org/r/20210927073514.14334-1-maxime@cerno.techSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Krzysztof Kozlowski authored
Describe better which driver applies to which SoC, to make configuring kernel for Samsung SoC easier. Signed-off-by:
Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Link: https://lore.kernel.org/r/20210924133005.111564-1-krzysztof.kozlowski@canonical.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Shubhrajyoti Datta authored
Currently the driver depends on the bootloader to enable the clocks. Add support for clocking. The patch enables the clock at probe and disables them at remove. Signed-off-by:
Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com> Acked-by:
Felipe Balbi <balbi@kernel.org> Link: https://lore.kernel.org/r/054de6deeab81020eaf0399add2839c36b64275f.1632805672.git.shubhrajyoti.datta@xilinx.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Chunfeng Yun authored
Use xhci_dbg() to print log instead of xhci_err() due to it's not error log. Signed-off-by:
Chunfeng Yun <chunfeng.yun@mediatek.com> Link: https://lore.kernel.org/r/20210923071447.15688-1-chunfeng.yun@mediatek.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Alan Stern authored
Now that Kees Cook has added a definition for HCS_N_PORTS_MAX in commit 72dd1843 ("USB: EHCI: Add register array bounds to HCS ports"), the code in ehci_hub_control() which sanitizes port index values can be improved a little. The idea behind this change is that it prevents a possible out-of-bounds pointer computation, which the compiler might be able to detect since the port_status[] array now has a fixed length rather than a variable length. Signed-off-by:
Alan Stern <stern@rowland.harvard.edu> Link: https://lore.kernel.org/r/20211002190217.GA537967@rowland.harvard.eduSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Zhiwei Yang authored
Remove the debug info which should be instead with ftrace Acked-by:
Felipe Balbi <balbi@kernel.org> Signed-off-by:
Zhiwei Yang <yangzhiwei@uniontech.com> Link: https://lore.kernel.org/r/20210924083852.6029-1-yangzhiwei@uniontech.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Gustavo A. R. Silva authored
Make use of the struct_size() helper instead of an open-coded version, in order to avoid any potential type mistakes or integer overflows that, in the worse scenario, could lead to heap overflows. Link: https://github.com/KSPP/linux/issues/160Signed-off-by:
Gustavo A. R. Silva <gustavoars@kernel.org> Link: https://lore.kernel.org/r/20210928233935.GA299525@embeddedorSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Dmitry Osipenko authored
Support programming USB PHY into OTG mode. Signed-off-by:
Dmitry Osipenko <digetx@gmail.com> Acked-by:
Thierry Reding <treding@nvidia.com> Link: https://lore.kernel.org/r/20210912181718.1328-5-digetx@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Dmitry Osipenko authored
In order to support OTG mode we need these new properties: - interrupt - nvidia,pmc Add the new properties to the binding. Reviewed-by:
Rob Herring <robh@kernel.org> Signed-off-by:
Dmitry Osipenko <digetx@gmail.com> Acked-by:
Thierry Reding <treding@nvidia.com> Link: https://lore.kernel.org/r/20210912181718.1328-3-digetx@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Dmitry Osipenko authored
Convert NVIDIA Tegra20 USB PHY binding to schema. Reviewed-by:
Rob Herring <robh@kernel.org> Signed-off-by:
Dmitry Osipenko <digetx@gmail.com> Acked-by:
Thierry Reding <treding@nvidia.com> Link: https://lore.kernel.org/r/20210912181718.1328-2-digetx@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Cai Huoqing authored
Use dma_map_single() instead of pci_map_single(), because only dma_map_single() is called here. Signed-off-by:
Cai Huoqing <caihuoqing@baidu.com> Link: https://lore.kernel.org/r/20210925124920.1564-3-caihuoqing@baidu.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Cai Huoqing authored
Use dma_map_single() instead of pci_map_single(), because only dma_map_single() is called here. Signed-off-by:
Cai Huoqing <caihuoqing@baidu.com> Link: https://lore.kernel.org/r/20210925124920.1564-2-caihuoqing@baidu.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Cai Huoqing authored
Use dma_map_single() instead of pci_map_single(), because only dma_map_single() is called here. Acked-by:
Alan Stern <stern@rowland.harvard.edu> Signed-off-by:
Cai Huoqing <caihuoqing@baidu.com> Link: https://lore.kernel.org/r/20210925124920.1564-1-caihuoqing@baidu.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Sven Peter authored
The Apple i2c bus uses I2C_FUNC_I2C and I've tested this quite extensivly in the past days. Remove the FIXME about that testing :-) Reviewed-by:
Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by:
Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by:
Sven Peter <sven@svenpeter.dev> Link: https://lore.kernel.org/r/20210928155502.71372-7-sven@svenpeter.devSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Sven Peter authored
The Apple CD321x comes up in a low-power state after boot. Usually, the bootloader will already power it up to S0 but let's do it here as well in case that didn't happen. Suggested-by:
Stan Skowronek <stan@corellium.com> Reviewed-by:
Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by:
Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by:
Sven Peter <sven@svenpeter.dev> Link: https://lore.kernel.org/r/20210928155502.71372-6-sven@svenpeter.devSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Sven Peter authored
Apple CD321x chips are a variant of the TI TPS 6598x chips. The major differences are the changed interrupt numbers and the concurrent connection to the SMC which we must not disturb. Reviewed-by:
Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by:
Sven Peter <sven@svenpeter.dev> Link: https://lore.kernel.org/r/20210928155502.71372-5-sven@svenpeter.devSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Sven Peter authored
If no interrupts are set in IntEventX directly skip to the end of the interrupt handler and return IRQ_NONE instead of IRQ_HANDLED. This possibly allows to detect spurious interrupts if the i2c bus is fast enough. Reviewed-by:
Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by:
Sven Peter <sven@svenpeter.dev> Link: https://lore.kernel.org/r/20210928155502.71372-4-sven@svenpeter.devSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Sven Peter authored
Split the handlers for the individual interrupts into their own functions to prepare for adding a second interrupt handler for the Apple CD321x chips Reviewed-by:
Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by:
Sven Peter <sven@svenpeter.dev> Link: https://lore.kernel.org/r/20210928155502.71372-3-sven@svenpeter.devSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Sven Peter authored
A variant of the TI TPS 6598x Type-C Port Switch and Power Delivery controller known as Apple CD321x is present on boards with Apple SoCs such as the M1. Add its compatible to the device tree binding. Reviewed-by:
Alyssa Rosenzweig <alyssa@rosenzweig.io> Acked-by:
Rob Herring <robh@kernel.org> Signed-off-by:
Sven Peter <sven@svenpeter.dev> Link: https://lore.kernel.org/r/20210928155502.71372-2-sven@svenpeter.devSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Heikki Krogerus authored
The commit 217504a0 ("usb: typec: ucsi: Work around PPM losing change information") had solved this issue previously, but in a really complex manner. The core issue is that on some platforms the EC firmware does not interrupt the driver on unplug event in some cases, mainly when the cable is unplugged immediately after the plug-in. From now on handling that problem by simply re-checking new connections. Signed-off-by:
Heikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://lore.kernel.org/r/20210920142419.54493-8-heikki.krogerus@linux.intel.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Heikki Krogerus authored
Polling also the PDOs, just like the alt modes. After this ucsi_handle_connector_change() doesn't execute any commands. Signed-off-by:
Heikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://lore.kernel.org/r/20210920142419.54493-7-heikki.krogerus@linux.intel.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Heikki Krogerus authored
UCSI does not tell the driver explicitly when the firmware (PPM in UCSI lingo) has actually detected the partner alternate modes, there is no specific change event for that. That's why they have to be checked with any notification that informs that PD contract with that partner has been achieved. Previously the alternate modes were checked always when the firmware (PPM) informed that something with the partner had changed, but on some platforms the EC firmware does not generate separate events for generic partner changes at all. On those platforms the EC firmware notifies the driver only about connections, or separately about the PD contract if it was not achieved soon enough after the initial connection event. Signed-off-by:
Heikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://lore.kernel.org/r/20210920142419.54493-6-heikki.krogerus@linux.intel.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Heikki Krogerus authored
The huge delay was there to workaround a problem where the firmware did not report that it was busy with the alternate mode commands. Now that the alternate modes are polled, the delay can be dropped. Signed-off-by:
Heikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://lore.kernel.org/r/20210920142419.54493-5-heikki.krogerus@linux.intel.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Heikki Krogerus authored
The "poll worker" that is introduced here is first used for checking partner alternate modes, but it can later be used for any partner task that requires a separate job to be scheduled to the connector specific workqueues. The mechanism allows the partner device specific tasks to be polling tasks and also delayed tasks if necessary. By polling the partner alternate modes with this mechanism the long command completion timeout value can be reduced back to normal. The long command completion timeout was only used to work around a problem on some platforms where the EC firmware (PPM) didn't return BUSY even when it should with the alt mode commands. Signed-off-by:
Heikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://lore.kernel.org/r/20210920142419.54493-4-heikki.krogerus@linux.intel.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Heikki Krogerus authored
If the PPM says it's busy, we can now simply try again. Signed-off-by:
Heikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://lore.kernel.org/r/20210920142419.54493-3-heikki.krogerus@linux.intel.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Heikki Krogerus authored
This makes it possible to execute next command immediately after the busy condition. Signed-off-by:
Heikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://lore.kernel.org/r/20210920142419.54493-2-heikki.krogerus@linux.intel.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Xu Yang authored
There is a spelling mistake in a comment. Fix it. Reviewed-by:
Guenter Roeck <linux@roeck-us.net> Acked-by:
Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by:
Xu Yang <xu.yang_2@nxp.com> Link: https://lore.kernel.org/r/20210922060152.2892027-1-xu.yang_2@nxp.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Razvan Heghedus authored
The USB2.0 spec chapter 11.24.2.13 says that the USB port which is going under test needs to be put in suspend state before sending the test command. Many hubs, don't enforce this precondition and they work fine without this step. But there are some "special" hubs, which requires to disable the port power before sending the test command. Because the USB spec mention that the port should be suspended, also do this step before sending the test command. This could rise the problem with other hubs which are not compliant with the spec and the test command will not work if the port is suspend. If such hubs are found, a similar workaround like the disable part could be implemented to skip the suspend port command. Signed-off-by:
Razvan Heghedus <heghedus.razvan@gmail.com> Link: https://lore.kernel.org/r/20210915121615.3790-1-heghedus.razvan@gmail.comSigned-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 27 Sep, 2021 1 commit
-
-
Greg Kroah-Hartman authored
We need the USB fixes in here as well. Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-