summaryrefslogtreecommitdiff
path: root/drivers/usb
AgeCommit message (Collapse)Author
2016-10-10Merge "usb: gadget: ncm: Add super speed descriptors for NCM function"Linux Build Service Account
2016-10-07Merge "usb: host: Flush hub workqueue before stopping controller"Linux Build Service Account
2016-10-06Merge "usb: gadget: f_mtp: Handle mtp os desc properly"Linux Build Service Account
2016-10-06Merge "dwc3-msm: Acquire lock for USB GSI endpoint related operations"Linux Build Service Account
2016-10-06Merge "usb: gadget: f_gsi: Enable auto detect RNDIS device on windows OS"Linux Build Service Account
2016-10-06usb: gadget: f_mtp: Handle mtp os desc properlyHemant Kumar
Currently mtp function driver is skipping function setup call back by not populating function pointer in function instance. Also, is_ptp flag is set incorrectly as true for mtp instance which would pass wrong os descriptor for mtp and ptp instance. Allow mtp driver to send os descriptor by populating function pointer in function instance and correctly set the is_ptp flag to pass valid os descriptors. Change-Id: Iec05a2f9309aba7d9ff81eca4ce683eff1590699 Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2016-10-06Merge "usb: pd: Return different errors in devm_usbpd_get_by_phandle()"Linux Build Service Account
2016-10-06Merge "usb: xhci: clean up command queue on HC halt failure as well"Linux Build Service Account
2016-10-06usb: host: Flush hub workqueue before stopping controllerHemant Kumar
when xhci platform driver is removed with a usb device connected there is a possibility of race between xhci platform driver remove context and device disconnect hub event work context. This results into use after free: xhci_mem_clean() called from xhci_plat_remove() freeing the xhci virtual device when a structure member is being accessed by xhci_alloc_virt_device() after virtual device allocation as part of connect hub event. deadlock: Upon device disconnect if stop endpoint command remains pending xhci_mem_cleanup() frees xhci virtual device which also frees up endpoint stop_cmd_timer. udev->dev lock is held until cancelled urb is not given back to class driver. In a different context xhci platform remove calls usb_disconnect() on children of root hub which tries to acquire the same udev->dev lock this results into a dead lock condition. Fix issues by making sure hub events are flushed before xhci is stopped. Change-Id: I86d414bca17464d1dff3346ec668d8b3efec1652 Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2016-10-06Merge "usb: gadget: f_qc_rndis: Add support for configfs"Linux Build Service Account
2016-10-06Merge "usb: gadget: f_qc_rndis: Add RNDIS support using IPA over BAM2BAM"Linux Build Service Account
2016-10-05usb: gadget: f_gsi: Enable auto detect RNDIS device on windows OSHemant Kumar
RNDIS IAD descriptor needs to get updated to support auto detection of RNDIS device so that windows OS can load the RNDIS driver without manually loading the driver. Change-Id: Ia0cb418d886d6dd066d956c359a39af3ab47c9f2 Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2016-10-05dwc3-msm: Acquire lock for USB GSI endpoint related operationsMayank Rana
There is possibility where any control request for USB GSI endpint e.g. CLEAR_FEATURE racing against USB GSI endpoint operation. Hence acquire lock for USB GSI endpoint related operations which involves sending required USB commands for the endpoint operation. Change-Id: If14af809c443e12bd64e54910602c4aeeca4f0df Signed-off-by: Mayank Rana <mrana@codeaurora.org>
2016-10-03usb: gadget: ncm: Add super speed descriptors for NCM functionMayank Rana
This change adds super speed descriptors which is required to get NCM function to work with SSUSB mode. The burst capability is not enabled for now. CRs-Fixed: 804486 Change-Id: I6239ad9e64969afb4e9af87d76837b940c3d1348 Signed-off-by: Mayank Rana <mrana@codeaurora.org>
2016-10-03usb: gadget: f_qc_rndis: Add support for configfsChandana Kishori Chiluveru
Add APIs to allocate and instanciate f_qc_rndis function driver using configFS. Change-Id: I24f3dcb14c6467ab4c2d2eda464dfacda2c5b426 Signed-off-by: Chandana Kishori Chiluveru <cchiluve@codeaurora.org>
2016-10-03usb: gadget: f_qc_rndis: Add RNDIS support using IPA over BAM2BAMChandana Kishori Chiluveru
On some targets RNDIS function uses BAM to BAM transport, and is handled by the f_qc_rndis driver. This change adds RNDIS support using IPA over BAM2BAM. Also removes all different supported control and data transports and assume BAM2BAM_IPA as default mode. RNDIS UL changes using software path also removed as IPA supports both UL and DL on latest products. DPL support will be added in subsequent patches. Change-Id: I8f7bf069523a8f3ea37e0a32a2e32830944a5c97 Signed-off-by: Chandana Kishori Chiluveru <cchiluve@codeaurora.org>
2016-10-01Merge "usb: gadget: f_cdev: Fix memory leak with func_name"Linux Build Service Account
2016-10-01Merge "usb: gadget: f_cdev: Remove func_name and port_num attributes"Linux Build Service Account
2016-09-30Merge "usb: pd: Print out source/sink subtypes"Linux Build Service Account
2016-09-30Merge "usb: pd: Clear requested_voltage/current values on disconnect"Linux Build Service Account
2016-09-30Merge "usb: pd: Add support to set the maximum speed via extcon"Linux Build Service Account
2016-09-29usb: xhci: clean up command queue on HC halt failure as wellManu Gautam
'Commit c9cabb7ee02bcb0c ("usb: xhci: clean up command queue when halting"); fixes deadlock condition when some commands are pending at the time of usb_remove_hcd() or when controller is halted. That change cleans up command queue if halting of controller is successful. But, this deadlock may still be seen in case if due to some reason halting of controller fails. To handle that scenario as well cleanup command queue irrespective of controller halt succeeds or fails. Change-Id: I2c88fca3614af7fe58bc858898449d47546da247 Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
2016-09-28usb: pd: Print out source/sink subtypesJack Pham
Add additional verbiage to the info logs to help determine the type of source cable connected: default, medium or high current. Similarly, if a sink is attached, indicate whether it is with a powered cable or not. Change-Id: I0687365827cdbb8a1b7168a2b676b1afd2f576f6 Signed-off-by: Jack Pham <jackp@codeaurora.org>
2016-09-28usb: dwc3: fix overriding core clock rate to default maxVamsi Krishna Samavedam
Fix the bug introduced by commit 82d4ec97786d ("usb: Add support for reset controller framework") which overrides the core clock rate from device tree. Change-Id: Ic3ef2229fa8552301e09dfb912e79e044a81324f Signed-off-by: Vamsi Krishna Samavedam <vskrishn@codeaurora.org>
2016-09-26usb: pd: Add support to set the maximum speed via extconHemant Kumar
Driver sets the speed using extcon cable state flag. This allows to start host or peripheral in selected speed. By default start peripheral in super speed mode. However, starting host in super speed consumes more power so to achieve lower consumption default it to high speed only. Add module params to override the default behavior as follows: # echo Y|N > /sys/module/policy_engine/parameters/ss_dev # echo Y|N > /sys/module/policy_engine/parameters/ss_host Change-Id: I2a45a4149f593a129b4dd123df730405169404f9 Signed-off-by: Hemant Kumar <hemantk@codeaurora.org> Signed-off-by: Jack Pham <jackp@codeaurora.org>
2016-09-26usb: pd: Return different errors in devm_usbpd_get_by_phandle()Jack Pham
Allow callers of devm_usbpd_get_by_phandle() to distinguish between different errors depending on what failure is encountered. For instance, return -EPROBE_DEFER if the device is available but not yet probed, which allows callers to appropriately try again later. Change-Id: I96b03d0a4c2a04a405af5a40f9f713443bc5769b Signed-off-by: Jack Pham <jackp@codeaurora.org>
2016-09-24Merge "usb: gadget: f_cdev: Avoid potential NULL pointer dereference"Linux Build Service Account
2016-09-23Merge "USB: gadget: f_fs: Use %zu when printing size_t"Linux Build Service Account
2016-09-23Merge "usb: gadget: gsi: Set NUM_OF_TRB as 15 for IN and OUT GSI endpoints"Linux Build Service Account
2016-09-23Merge "dwc3: core: clear DELAYP1TRANS with USB3PIPECTL register"Linux Build Service Account
2016-09-23Merge "usb: phy: qusb: Reset clock mux to avoid leakage on vdd rail"Linux Build Service Account
2016-09-23Merge "usb: gadget: composite: fix dereference after null check coverify ↵Linux Build Service Account
warning"
2016-09-23Merge "usb: gadget: Enable L1 suspend by default"Linux Build Service Account
2016-09-23usb: gadget: f_cdev: Avoid potential NULL pointer dereferenceMayank Rana
Fix possible NULL pointer dereference issue as strrchr() API can return NULL if there is no port_num found as part of passed string. Change-Id: I410e58361282f175e46b68cbfaf4824e386454f8 Signed-off-by: Mayank Rana <mrana@codeaurora.org>
2016-09-23usb: gadget: f_cdev: Remove func_name and port_num attributesMayank Rana
func_name and port_num attributes related information is already available as part of created driver instance name itself. These attributes don't give any valuable information. Hence remove both attributes and related functionality. Add check against length of func_name. CRs-Fixed: 1069476 Change-Id: Ibfc050cda62cfc7e5838949ae833a9d7c0a59303 Signed-off-by: Mayank Rana <mrana@codeaurora.org>
2016-09-22usb: gadget: f_cdev: Fix memory leak with func_nameMayank Rana
func_name related memory is allocated on creating instance of driver with cser_set_inst_name() API with usage of kstrndup(). If cser_set_inst_name() returns non-zero value or driver instance is released, this func_name related memory is not freed. Fix this memory leak by freeing func_name from cser_free_inst() API. CRs-Fixed: 1070060 Change-Id: I7ba4c5a65bb01d056b4d2690fe30f7cbe47ba311 Signed-off-by: Mayank Rana <mrana@codeaurora.org>
2016-09-22USB: gadget: f_fs: Use %zu when printing size_tManu Gautam
Using %lu for size_t gives compilation error on 32bit system. Replace this with %zu which should be used to print size_t on both 32bit and 64bit machines. Change-Id: Id8a42dec3e081187054cb2353ba3473bae9dd547 CRs-fixed: 1069970 Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
2016-09-21usb: gadget: composite: fix dereference after null check coverify warningPeter Chen
cdev->config is checked for null pointer at above code, so cdev->config might be null, fix it by adding null pointer check. Change-Id: Ie919a2a886924f1b1e01415bfdaa53f74046f5b0 Signed-off-by: Peter Chen <peter.chen@nxp.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com> Git-commit: c526c62d565ea5a5bba9433f28756079734f430d Git-repo: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git Signed-off-by: Jack Pham <jackp@codeaurora.org>
2016-09-21dwc3: core: clear DELAYP1TRANS with USB3PIPECTL registerMayank Rana
Commit fd115e68971b ("dwc3: core: Don't perform controller and PHYs soft reset") removed clearing DELAYP1TRANS. It is recommended to clear DELAYP1TRANS bit with USB3PIPECTL register which controls USB controller allowing USB QMP PHY low power transitions. Change-Id: I54ba694f4c997bf5ecc540cee274e2cb07b77446 Signed-off-by: Mayank Rana <mrana@codeaurora.org>
2016-09-20usb: pd: Avoid potential NULL ptr dereferencesJack Pham
Check that a valid pointer was passed in addition to non-zero length to avoid dereferencing NULL pointers in functions where data is copied from policy engine to the PD PHY. Issues were identified with static analysis tool. Change-Id: Ib42aad9e0d838eda4653e0bab9f074b3031983dd Signed-off-by: Jack Pham <jackp@codeaurora.org>
2016-09-19Merge "Revert "usb: dwc3: gadget: start requests as soon as they come""Linux Build Service Account
2016-09-19Merge "Revert "usb: dwc3: gadget: use update transfer command""Linux Build Service Account
2016-09-19usb: gadget: Enable L1 suspend by defaultHemant Kumar
Currently L1 suspend is disabled. Superspeed capable device needs to support L1 suspend in HS/FS/LS mode. Also, add module parameter to disable L1 suspend in High speed mode. Change-Id: Ie8e7f3949d276325305799640f2775343bd6b9da Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2016-09-19usb: dwc3: Add support to select maximum speed via extcon notificationHemant Kumar
Use extcon notification to select the maximum speed for host as well as for peripheral mode. Notification handler sets maximum speed based on the extcon cable state flag. This provides an option to start host or peripheral in high speed only mode and leave ss phy suspended. Change-Id: Ic48c661e68a293822d30cbd491e0fe6e46d385c9 Signed-off-by: Hemant Kumar <hemantk@codeaurora.org> Signed-off-by: Jack Pham <jackp@codeaurora.org>
2016-09-19usb: phy: qusb: Reset clock mux to avoid leakage on vdd railVamsi Krishna Samavedam
Reset the clock mux when cable is disconnected and suspended to avoid leakage on vdd rail. Also, add missing clock reset when usb cable connect is notified. Change-Id: If5485379934a222f19f5dd20b8d4f44769470e8d Signed-off-by: Vamsi Krishna Samavedam <vskrishn@codeaurora.org>
2016-09-17Merge "Revert "usb: dwc3: gadget: always enable IOC on bulk/interrupt ↵Linux Build Service Account
transfers""
2016-09-17Merge "Revert "usb: gsi: Queue control notification on gsi_resume""Linux Build Service Account
2016-09-17Merge "USB: f_accessory: Fix NULL pointer dereference in acc_read()"Linux Build Service Account
2016-09-16usb: gadget: gsi: Set NUM_OF_TRB as 15 for IN and OUT GSI endpointsMayank Rana
It is recommended to use NUM_OF_TRB greater than USB controller's TRB cache size. Currently USB controller's TRB cache size on GSI available platform is 12. TRB ring base address must be aligned to TRB ring length rounded to power of two. Hence set NUM_OF_TRB as 15 for both IN and OUT GSI endpoints. CRs-Fixed: 1067833 Change-Id: Iab8b0bc6fd17183fc6056f06a90421cde24987c8 Signed-off-by: Mayank Rana <mrana@codeaurora.org>
2016-09-15Revert "usb: gsi: Queue control notification on gsi_resume"Mayank Rana
This reverts commit <fae741edccb> ("usb: gsi: Queue control notification on gsi_resume") as expected notification is not queued resulting into mismatch of QMI transaction packet. CRs-Fixed: 1067006 Change-Id: I4abdd79699d47054e268978aae9199f1d5d1ddcb Signed-off-by: Mayank Rana <mrana@codeaurora.org>