aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb
AgeCommit message (Collapse)AuthorFilesLines
2021-01-18USB: serial: mxuport: drop short control-transfer checkJohan Hovold1-7/+0
There's no need to check for short control transfers when sending data so remove the redundant sanity check. Reviewed-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Johan Hovold <[email protected]>
2021-01-18USB: serial: cp210x: add copyright noticeJohan Hovold1-0/+1
Add a copyright notice for myself. Reviewed-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Johan Hovold <[email protected]>
2021-01-18USB: serial: cp210x: drop unused includesJohan Hovold1-3/+0
Drop include directives that are no longer used. Reviewed-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Johan Hovold <[email protected]>
2021-01-18USB: serial: cp210x: drop short control-transfer checksJohan Hovold1-12/+6
There's no need to check for short control transfers when sending data so remove the redundant sanity checks. Reviewed-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Johan Hovold <[email protected]>
2021-01-18USB: serial: cp210x: update control-characters on every changeJohan Hovold1-3/+7
Update the XON/XOFF control characters also when no other flow-control flag has changed and software flow control is enabled. Reviewed-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Johan Hovold <[email protected]>
2021-01-18USB: serial: cp210x: set IXOFF thresholdsJohan Hovold1-0/+3
At least CP2102 requires the XON/XOFF limits to be initialised in order for software input flow control (IXOFF) to work. Specifically, XOFF is never sent if the XOFF limit is left at its default value of zero. Set the limits so that input is throttled when the FIFO free level drops below 128 bytes and restarted when the FIFO fill level drops below 128 bytes. Note that the threshold values have been chosen so that they can be used also with CP2105 which has the smallest FIFO of the currently supported device types (288 byte for the SCI port). If needed the limits can be made device specific later. Reviewed-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Johan Hovold <[email protected]>
2021-01-18USB: serial: cp210x: add support for software flow controlWang Sheng Long1-2/+65
When data is transmitted between two serial ports, the phenomenon of data loss often occurs. The two kinds of flow control commonly used in serial communication are hardware flow control and software flow control. In serial communication, If you only use RX/TX/GND Pins, you can't do hardware flow. So we often used software flow control and prevent data loss. The user sets the software flow control through the application program, and the application program sets the software flow control mode for the serial port chip through the driver. For the cp210 serial port chip, its driver lacks the software flow control setting code, so the user cannot set the software flow control function through the application program. This adds the missing software flow control. Signed-off-by: Wang Sheng Long <[email protected]> Link: https://lore.kernel.org/r/[email protected] [ johan: rework properly on top of recent termios changes ] Reviewed-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Johan Hovold <[email protected]>
2021-01-18USB: serial: pl2303: fix line-speed handling on newer chipsJohan Hovold1-1/+7
The latest chip family (HXN) apparently does not support setting the line speed using divisors and instead needs to use the direct encoding scheme for all rates. This specifically enables 50, 110, 134, 200 bps and other rates not supported by the original chip type. Fixes: ebd09f1cd417 ("USB: serial: pl2303: add support for PL2303HXN") Cc: [email protected] # 5.5 Cc: Charles Yeh <[email protected]> Signed-off-by: Johan Hovold <[email protected]>
2021-01-15xhci: tegra: Delay for disabling LFPS detectorJC Kuo1-0/+7
Occasionally, we are seeing some SuperSpeed devices resumes right after being directed to U3. This commits add 500us delay to ensure LFPS detector is disabled before sending ACK to firmware. [ 16.099363] tegra-xusb 70090000.usb: entering ELPG [ 16.104343] tegra-xusb 70090000.usb: 2-1 isn't suspended: 0x0c001203 [ 16.114576] tegra-xusb 70090000.usb: not all ports suspended: -16 [ 16.120789] tegra-xusb 70090000.usb: entering ELPG failed The register write passes through a few flop stages of 32KHz clock domain. NVIDIA ASIC designer reviewed RTL and suggests 500us delay. Cc: [email protected] Signed-off-by: JC Kuo <[email protected]> Signed-off-by: Mathias Nyman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-01-15xhci: make sure TRB is fully written before giving it to the controllerMathias Nyman1-0/+2
Once the command ring doorbell is rung the xHC controller will parse all command TRBs on the command ring that have the cycle bit set properly. If the driver just started writing the next command TRB to the ring when hardware finished the previous TRB, then HW might fetch an incomplete TRB as long as its cycle bit set correctly. A command TRB is 16 bytes (128 bits) long. Driver writes the command TRB in four 32 bit chunks, with the chunk containing the cycle bit last. This does however not guarantee that chunks actually get written in that order. This was detected in stress testing when canceling URBs with several connected USB devices. Two consecutive "Set TR Dequeue pointer" commands got queued right after each other, and the second one was only partially written when the controller parsed it, causing the dequeue pointer to be set to bogus values. This was seen as error messages: "Mismatch between completed Set TR Deq Ptr command & xHCI internal state" Solution is to add a write memory barrier before writing the cycle bit. Cc: <[email protected]> Tested-by: Ross Zwisler <[email protected]> Signed-off-by: Mathias Nyman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-01-15usb: udc: core: Use lock when write to soft_connectThinh Nguyen1-3/+10
Use lock to guard against concurrent access for soft-connect/disconnect operations when writing to soft_connect sysfs. Fixes: 2ccea03a8f7e ("usb: gadget: introduce UDC Class") Cc: [email protected] Acked-by: Felipe Balbi <[email protected]> Signed-off-by: Thinh Nguyen <[email protected]> Link: https://lore.kernel.org/r/338ea01fbd69b1985ef58f0f59af02c805ddf189.1610611437.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-01-15usb: dwc3: qcom: add URS Host support for sdm845 ACPI bootShawn Guo1-3/+56
For sdm845 ACPI boot, the URS (USB Role Switch) node in ACPI DSDT table holds the memory resource, while interrupt resources reside in the child nodes USB0 and UFN0. It adds USB0 host support by probing URS node, creating platform device for USB0 node, and then retrieve interrupt resources from USB0 platform device. Reviewed-by: Bjorn Andersson <[email protected]> Signed-off-by: Shawn Guo <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-01-15usb: gadget: u_ether: support configuring interface names.Lorenzo Colitti3-2/+58
This patch allows the administrator to configure the interface name of a function using u_ether (e.g., eem, ncm, rndis). Currently, all such interfaces, regardless of function type, are always called usb0, usb1, etc. This makes it very cumbersome to use more than one such type at a time, because userspace cannnot easily tell the interfaces apart and apply the right configuration to each one. Interface renaming in userspace based on driver doesn't help, because the interfaces all have the same driver. Without this patch, doing this require hacks/workarounds such as setting fixed MAC addresses on the functions, and then renaming by MAC address, or scraping configfs after each interface is created to find out what it is. Setting the interface name is done by writing to the same "ifname" configfs attribute that reports the interface name after the function is bound. The write must contain an interface pattern such as "usb%d" (which will cause the net core to pick the next available interface name starting with "usb"). This patch does not allow writing an exact interface name (as opposed to a pattern) because if the interface already exists at bind time, the bind will fail and the whole gadget will fail to activate. This could be allowed in a future patch. For compatibility with current userspace, when reading an ifname that has not currently been set, the result is still "(unnamed net_device)". Once a write to ifname happens, then reading ifname will return whatever was last written. Tested by configuring an rndis function and an ncm function on the same gadget, and writing "rndis%d" to ifname on the rndis function and "ncm%d" to ifname on the ncm function. When the gadget was bound, the rndis interface was rndis0 and the ncm interface was ncm0. Signed-off-by: Lorenzo Colitti <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-01-15usb: dwc3: pci: add support for the Intel Alder Lake-PHeikki Krogerus1-0/+4
This patch adds the necessary PCI ID for Intel Alder Lake-P devices. Acked-by: Felipe Balbi <[email protected]> Signed-off-by: Heikki Krogerus <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-01-15usb: dwc3: pci: ID for Tiger Lake CPUHeikki Krogerus1-0/+4
Tiger Lake SOC (the versions of it that have integrated USB4 controller) may have two DWC3 controllers. One is part of the PCH (Platform Controller Hub, i.e. the chipset) as usual, and the other is inside the actual CPU block. On all Intel platforms that have the two separate DWC3 controllers, the one inside the CPU handles USB3 and only USB3 traffic, while the PCH version handles USB2 and USB2 alone. The reason for splitting the two busses like this is to allow easy USB3 tunneling over USB4 connections. As USB2 is not tunneled over USB4, it has dedicated USB controllers (both xHCI and DWC3). Acked-by: Felipe Balbi <[email protected]> Signed-off-by: Heikki Krogerus <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-01-15usb: dwc3: pci: Register a software node for the dwc3 platform deviceHeikki Krogerus1-24/+37
By registering the software node directly instead of just the properties in it, the driver can take advantage of also the other features the software nodes have. Acked-by: Felipe Balbi <[email protected]> Signed-off-by: Heikki Krogerus <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-01-15drivers/usb/gadget/udc: Assign boolean values to a bool variableJiapeng Zhong1-1/+1
Fix the following coccicheck warnings: ./drivers/usb/gadget/udc/udc-xilinx.c:1957:2-18: WARNING: Assignment of 0/1 to bool variable. Reported-by: Abaci Robot <[email protected]> Acked-by: Felipe Balbi <[email protected]> Signed-off-by: Jiapeng Zhong <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-01-14USB: gadget: dummy-hcd: Fix errors in port-reset handlingAlan Stern1-3/+7
Commit c318840fb2a4 ("USB: Gadget: dummy-hcd: Fix shift-out-of-bounds bug") messed up the way dummy-hcd handles requests to turn on the RESET port feature (I didn't notice that the original switch case ended with a fallthrough). The call to set_link_state() was inadvertently removed, as was the code to set the USB_PORT_STAT_RESET flag when the speed is USB2. In addition, the original code never checked whether the port was connected before handling the port-reset request. There was a check for the port being powered, but it was removed by that commit! In practice this doesn't matter much because the kernel doesn't try to reset disconnected ports, but it's still bad form. This patch fixes these problems by changing the fallthrough to break, adding back in the missing set_link_state() call, setting the port-reset status flag, adding a port-is-connected test, and removing a redundant assignment statement. Fixes: c318840fb2a4 ("USB: Gadget: dummy-hcd: Fix shift-out-of-bounds bug") CC: <[email protected]> Acked-by: Felipe Balbi <[email protected]> Signed-off-by: Alan Stern <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-01-14USB: dwc3: document gadget_max_speedMauro Carvalho Chehab1-0/+1
This new field was added to struct dwc3_scratchpad_array, but a documentation for it was missed: ../drivers/usb/dwc3/core.h:1259: warning: Function parameter or member 'gadget_max_speed' not described in 'dwc3' Signed-off-by: Mauro Carvalho Chehab <[email protected]> Reported-by: Stephen Rothwell <[email protected]> Acked-by: Felipe Balbi <[email protected]> Link: https://lore.kernel.org/r/e9332e31bec9bcead2c7ced2b25462120488ca85.1610610444.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-01-14usb: dwc3: gadget: Disable Vendor Test LMP Received eventThinh Nguyen1-2/+1
Some users questioned why Vendor Test LMP Received event was enabled. The driver currently doesn't handle this event. Let's disable it to avoid confusion. Acked-by: Felipe Balbi <[email protected]> Signed-off-by: Thinh Nguyen <[email protected]> Link: https://lore.kernel.org/r/4e785ba5d5e95801b6fcf96116f6090216e70760.1610596478.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-01-14usb: cdnsp: fixes undefined reference to cdns_removePawel Laszczak1-0/+8
Patch fixes the following errors: ld: drivers/usb/cdns3/cdnsp-pci.o: in function `cdnsp_pci_remove': cdnsp-pci.c:(.text+0x80): undefined reference to `cdns_remove' ld: drivers/usb/cdns3/cdnsp-pci.o: in function `cdnsp_pci_probe': cdnsp-pci.c:(.text+0x34c): undefined reference to `cdns_init' Issue occurs for USB/CDNS3/CDNSP kernel configuration: CONFIG_USB=m CONFIG_USB_CDNS_SUPPORT=y CONFIG_USB_CDNS3=m CONFIG_USB_CDNS3_PCI_WRAP=m CONFIG_USB_CDNSP_PCI=y Acked-by: Randy Dunlap <[email protected]> Reported-by: Randy Dunlap <[email protected]> Signed-off-by: Pawel Laszczak <[email protected]> Signed-off-by: Peter Chen <[email protected]>
2021-01-14usb: cdns3: Adds missing __iomem markersPawel Laszczak2-12/+12
Patch adds missing __iomem markers in core.h file and makes some changes in drd.c file related with these markers. The lack of __iomem has reported by sparse checker on parsic architecture. Reported-by: kernel test robot <[email protected]> Signed-off-by: Pawel Laszczak <[email protected]> Signed-off-by: Peter Chen <[email protected]>
2021-01-13usb: host: ehci-tegra: Remove the driverDmitry Osipenko3-608/+7
The ChipIdea driver now provides USB2 host mode support for NVIDIA Tegra SoCs. The ehci-tegra driver is obsolete now, remove it and redirect the older Kconfig entry to the CI driver. Tested-by: Matt Merhar <[email protected]> Tested-by: Nicolas Chauvet <[email protected]> Tested-by: Peter Geis <[email protected]> Tested-by: Ion Agorria <[email protected]> Acked-by: Thierry Reding <[email protected]> Acked-by: Alan Stern <[email protected]> Acked-by: Peter Chen <[email protected]> Signed-off-by: Dmitry Osipenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-01-13usb: chipidea: tegra: Specify TX FIFO threshold in UDC SoC infoDmitry Osipenko1-5/+14
The UDC/OTG controller could be switched to a host mode and the TXFILLTUNING register needs to be programmed properly for the host mode. Hence specify the TX FIFO threshold in the UDC SoC info. Acked-by: Peter Chen <[email protected]> Signed-off-by: Dmitry Osipenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-01-13usb: chipidea: tegra: Support runtime PMDmitry Osipenko1-3/+10
Tegra PHY driver now supports waking up controller from a low power mode. Enable runtime PM in order to put controller into the LPM during idle. Tested-by: Matt Merhar <[email protected]> Tested-by: Nicolas Chauvet <[email protected]> Tested-by: Peter Geis <[email protected]> Tested-by: Ion Agorria <[email protected]> Acked-by: Peter Chen <[email protected]> Signed-off-by: Dmitry Osipenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-01-13usb: chipidea: tegra: Support host modePeter Geis4-8/+350
Add USB host mode to the Tegra HDRC driver. This allows us to benefit from support provided by the generic ChipIdea driver instead of duplicating the effort in a separate ehci-tegra driver. Tested-by: Matt Merhar <[email protected]> Tested-by: Nicolas Chauvet <[email protected]> Tested-by: Ion Agorria <[email protected]> Acked-by: Thierry Reding <[email protected]> Acked-by: Peter Chen <[email protected]> Signed-off-by: Peter Geis <[email protected]> Signed-off-by: Dmitry Osipenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-01-13usb: chipidea: tegra: Rename UDC to USBDmitry Osipenko2-40/+40
Rename all occurrences in the code from "udc" to "usb" and change the Kconfig entry in order to show that this driver supports USB modes other than device-only mode. The follow up patch will add host-mode support and it will be cleaner to perform the renaming separately, i.e. in this patch. Tested-by: Matt Merhar <[email protected]> Tested-by: Nicolas Chauvet <[email protected]> Tested-by: Peter Geis <[email protected]> Tested-by: Ion Agorria <[email protected]> Acked-by: Thierry Reding <[email protected]> Acked-by: Peter Chen <[email protected]> Signed-off-by: Dmitry Osipenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-01-13usb: chipidea: tegra: Remove MODULE_ALIASDmitry Osipenko1-1/+0
The OF core adds an alias based on the OF device ID table, which is enough to have the driver autoloaded. The legacy MODULE_ALIAS macro was relevant to a pre-OF board files which manually created platform devices, this is irrelevant to the modern ARM kernels since devices are created by the OF core. Remove the unnecessary macro in order to keep the driver's code cleaner. Tested-by: Matt Merhar <[email protected]> Tested-by: Nicolas Chauvet <[email protected]> Tested-by: Peter Geis <[email protected]> Tested-by: Ion Agorria <[email protected]> Acked-by: Thierry Reding <[email protected]> Acked-by: Peter Chen <[email protected]> Signed-off-by: Dmitry Osipenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-01-13usb: phy: tegra: Support waking up from a low power modeDmitry Osipenko1-11/+89
Support programming of waking up from a low power mode by implementing the generic set_wakeup() callback of the USB PHY API. Tested-by: Matt Merhar <[email protected]> Tested-by: Nicolas Chauvet <[email protected]> Tested-by: Peter Geis <[email protected]> Tested-by: Ion Agorria <[email protected]> Acked-by: Thierry Reding <[email protected]> Acked-by: Peter Chen <[email protected]> Signed-off-by: Dmitry Osipenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-01-13usb: phy: tegra: Add delay after power upDmitry Osipenko1-0/+3
The PHY hardware needs the delay of 2ms after power up, otherwise initial interrupt may be lost if USB controller is accessed before PHY is settled down. Previously this issue was masked by implicit delays, but now it pops up after squashing the older ehci-tegra driver into the ChipIdea driver. Tested-by: Matt Merhar <[email protected]> Tested-by: Nicolas Chauvet <[email protected]> Tested-by: Peter Geis <[email protected]> Tested-by: Ion Agorria <[email protected]> Acked-by: Thierry Reding <[email protected]> Acked-by: Peter Chen <[email protected]> Signed-off-by: Dmitry Osipenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-01-13usb: gadget: bdc: fix checkpatch.pl repeated word warningChunfeng Yun1-1/+1
fix the warning: WARNING:REPEATED_WORD: Possible repeated word: 'and' Cc: Florian Fainelli <[email protected]> Acked-by: Florian Fainelli <[email protected]> Acked-by: Felipe Balbi <[email protected]> Signed-off-by: Chunfeng Yun <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-01-13usb: gadget: bdc: fix checkpatch.pl spacing errorChunfeng Yun1-1/+1
fix checkpatch.pl error: ERROR:SPACING: space prohibited before that ',' Cc: Florian Fainelli <[email protected]> Acked-by: Florian Fainelli <[email protected]> Acked-by: Felipe Balbi <[email protected]> Signed-off-by: Chunfeng Yun <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-01-13usb: gadget: bdc: fix checkpatch.pl tab warningChunfeng Yun2-3/+3
WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements WARNING:TABSTOP: Statements should start on a tabstop Cc: Florian Fainelli <[email protected]> Acked-by: Florian Fainelli <[email protected]> Acked-by: Felipe Balbi <[email protected]> Signed-off-by: Chunfeng Yun <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-01-13usb: gadget: bdc: use the BIT macro to define bit filedChunfeng Yun1-42/+42
Prefer using the BIT macro to define bit fileds Cc: Florian Fainelli <[email protected]> Reported-by: kernel test robot <[email protected]> Acked-by: Florian Fainelli <[email protected]> Acked-by: Felipe Balbi <[email protected]> Signed-off-by: Chunfeng Yun <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-01-13usb: gadget: bdc: avoid precedence issuesChunfeng Yun1-9/+9
Add () around macro argument to avoid precedence issues Cc: Florian Fainelli <[email protected]> Acked-by: Florian Fainelli <[email protected]> Acked-by: Felipe Balbi <[email protected]> Signed-off-by: Chunfeng Yun <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-01-13usb: gadget: bdc: add identifier name for function declaraionChunfeng Yun4-31/+31
This is used to avoid the warning of function arguments, e.g. WARNING:FUNCTION_ARGUMENTS: function definition argument 'u32' should also have an identifier name Cc: Florian Fainelli <[email protected]> Acked-by: Florian Fainelli <[email protected]> Acked-by: Felipe Balbi <[email protected]> Signed-off-by: Chunfeng Yun <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-01-13usb: gadget: bdc: fix check warning of block comments alignmentChunfeng Yun3-5/+5
fix the warning: WARNING:BLOCK_COMMENT_STYLE: Block comments should align the * on each line Cc: Florian Fainelli <[email protected]> Acked-by: Florian Fainelli <[email protected]> Acked-by: Felipe Balbi <[email protected]> Signed-off-by: Chunfeng Yun <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-01-13usb: gadget: bdc: fix warning of embedded function nameChunfeng Yun2-4/+4
Use '"%s...", __func__' to replace embedded function name Cc: Florian Fainelli <[email protected]> Acked-by: Florian Fainelli <[email protected]> Acked-by: Felipe Balbi <[email protected]> Signed-off-by: Chunfeng Yun <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-01-13usb: gadget: bdc: prefer pointer dereference to pointer typeChunfeng Yun1-1/+1
Prefer kzalloc(sizeof(*bd_table)...) over kzalloc(sizeof(struct bd_table) Cc: Florian Fainelli <[email protected]> Acked-by: Florian Fainelli <[email protected]> Acked-by: Felipe Balbi <[email protected]> Signed-off-by: Chunfeng Yun <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-01-13usb: gadget: bdc: remove bdc_ep_set_halt() declarationChunfeng Yun1-1/+0
No definition for bdc_ep_set_halt(), so remove it. Cc: Florian Fainelli <[email protected]> Acked-by: Florian Fainelli <[email protected]> Acked-by: Felipe Balbi <[email protected]> Signed-off-by: Chunfeng Yun <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-01-13usb: gadget: bdc: fix improper SPDX comment style for header fileChunfeng Yun4-4/+4
For C header files Documentation/process/license-rules.rst mandates C-like comments (opposed to C source files where C++ style should be used). Cc: Florian Fainelli <[email protected]> Acked-by: Florian Fainelli <[email protected]> Acked-by: Felipe Balbi <[email protected]> Signed-off-by: Chunfeng Yun <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-01-13USB: serial: cp210x: add new VID/PID for supporting Teraoka AD2000Chenxin Jin1-0/+1
Teraoka AD2000 uses the CP210x driver, but the chip VID/PID is customized with 0988/0578. We need the driver to support the new VID/PID. Signed-off-by: Chenxin Jin <[email protected]> Cc: [email protected] Signed-off-by: Johan Hovold <[email protected]>
2021-01-12usb: gadget: aspeed: fix stop dma register setting.Ryan Chen1-1/+4
The vhub engine has two dma mode, one is descriptor list, another is single stage DMA. Each mode has different stop register setting. Descriptor list operation (bit2) : 0 disable reset, 1: enable reset Single mode operation (bit0) : 0 : disable, 1: enable Fixes: 7ecca2a4080c ("usb/gadget: Add driver for Aspeed SoC virtual hub") Cc: stable <[email protected]> Acked-by: Felipe Balbi <[email protected]> Acked-by: Joel Stanley <[email protected]> Signed-off-by: Ryan Chen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-01-12USB: ehci: fix an interrupt calltrace errorLongfang Liu1-0/+3
The system that use Synopsys USB host controllers goes to suspend when using USB audio player. This causes the USB host controller continuous send interrupt signal to system, When the number of interrupts exceeds 100000, the system will forcibly close the interrupts and output a calltrace error. When the system goes to suspend, the last interrupt is reported to the driver. At this time, the system has set the state to suspend. This causes the last interrupt to not be processed by the system and not clear the interrupt flag. This uncleared interrupt flag constantly triggers new interrupt event. This causing the driver to receive more than 100,000 interrupts, which causes the system to forcibly close the interrupt report and report the calltrace error. so, when the driver goes to sleep and changes the system state to suspend, the interrupt flag needs to be cleared. Signed-off-by: Longfang Liu <[email protected]> Acked-by: Alan Stern <[email protected]> Link: https://lore.kernel.org/r/[email protected] Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-01-12ehci: fix EHCI host controller initialization sequenceEugene Korenevsky1-0/+12
According to EHCI spec, EHCI HC clears USBSTS.HCHalted whenever USBCMD.RS=1. However, it is a good practice to wait some time after setting USBCMD.RS (approximately 100ms) until USBSTS.HCHalted become zero. Without this waiting, VirtualBox's EHCI virtual HC accidentally hangs (see BugLink). BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=211095 Acked-by: Alan Stern <[email protected]> Signed-off-by: Eugene Korenevsky <[email protected]> Cc: stable <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-01-12Merge tag 'usb-v5.11-rc3' of ↵Greg Kroah-Hartman1-11/+11
git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-linus Peter writes: - Several bug-fixes for cdns3 imx driver - Update Peter Chen and Roger Quadros email address * tag 'usb-v5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb: MAINTAINERS: update Peter Chen's email address MAINTAINERS: Update address for Cadence USB3 driver usb: cdns3: imx: improve driver .remove API usb: cdns3: imx: fix can't create core device the second time issue usb: cdns3: imx: fix writing read-only memory issue
2021-01-12usb: typec: ucsi: Add support for USB role switchMayank Rana2-3/+55
UCSI already conveys the information about a port's connection status, whether it is operating in UFP or DFP mode, and whether the partner supports USB data or not. This information can be used to notify a dual-role controller to start up its host or peripheral mode accordingly. Add optional support for this by querying each port's fwnode to look for an associated USB role switch device. If present, call usb_role_switch_set() with the determined data role upon Connect Change or Connector Partner Change updates. Reviewed-by: Heikki Krogerus <[email protected]> Signed-off-by: Mayank Rana <[email protected]> Signed-off-by: Jack Pham <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-01-12usb: dwc2: disable Link Power Management on STM32MP15 HS OTGAmelie Delaunay1-0/+4
Link Power Management (LPM) on STM32MP15 OTG HS encounters instabilities with some Host controllers. OTG core fails to exit L1 state in 200us: "dwc2 49000000.usb-otg: Failed to exit L1 sleep state in 200us." Then the device is still not enumerated. To avoid this issue, disable Link Power Management on STM32MP15 HS OTG. Acked-by: Minas Harutyunyan <[email protected]> Signed-off-by: Amelie Delaunay <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-01-12usb: dwc2: enable FS/LS PHY clock select on STM32MP15 FS OTGAmelie Delaunay1-0/+2
When the core is in FS host mode, using the FS transceiver, and a Low-Speed device is connected, transceiver clock is 6Mhz. So, to support Low-Speed devices, enable support of FS/LS Low Power mode, so that the PHY supplies a 6 MHz clock during Low-Speed mode. Acked-by: Minas Harutyunyan <[email protected]> Signed-off-by: Amelie Delaunay <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-01-12usb: dwc2: set ahbcfg parameter for STM32MP15 OTG HS and FSAmelie Delaunay1-0/+2
STM32MP15 ahbcfg register default value sets Burst length/type (HBSTLEN) to Single (32-bit accesses on AHB), which is not recommended, according to STM32MP157 Reference manual [1]. This patch sets Burst length/type (HBSTLEN) so that bus transactions target 16x32 bit accesses. This improves OTG controller performance. [1] https://www.st.com/resource/en/reference_manual/dm00327659.pdf, p.3149 Acked-by: Minas Harutyunyan <[email protected]> Signed-off-by: Amelie Delaunay <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>