lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1543662811-5194-1-git-send-email-anurag.kumar.vulisha@xilinx.com>
Date:   Sat, 1 Dec 2018 16:43:21 +0530
From:   Anurag Kumar Vulisha <anurag.kumar.vulisha@...inx.com>
To:     Felipe Balbi <balbi@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Shuah Khan <shuah@...nel.org>,
        Alan Stern <stern@...land.harvard.edu>,
        Johan Hovold <johan@...nel.org>,
        Jaejoong Kim <climbbb.kim@...il.com>,
        Benjamin Herrenschmidt <benh@...nel.crashing.org>,
        Roger Quadros <rogerq@...com>,
        Manu Gautam <mgautam@...eaurora.org>,
        <martin.petersen@...cle.com>, Bart Van Assche <bvanassche@....org>,
        Mike Christie <mchristi@...hat.com>,
        Matthew Wilcox <willy@...radead.org>,
        Colin Ian King <colin.king@...onical.com>
CC:     <linux-usb@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <v.anuragkumar@...il.com>, Thinh Nguyen <thinhn@...opsys.com>,
        Tejas Joglekar <tejas.joglekar@...opsys.com>,
        Ajay Yugalkishore Pandey <APANDEY@...inx.com>,
        Anurag Kumar Vulisha <anurag.kumar.vulisha@...inx.com>
Subject: [PATCH v7 00/10] usb: dwc3: Fix broken BULK stream support to dwc3 gadget driver

This patch series fixes the broken BULK streaming support in
dwc3 gadget driver and also adds timers in udc/core.c  for
the endpoints which may go out of sync with host and enter into
deadlock. For example when bulk streams are enabled for an
endpoint, there can be a condition where the gadget controller
waits for the host to issue prime transaction and the host
controller waits for the gadget to issue ERDY. This condition
could create a deadlock. To avoid such potential deadlocks, a
timer is started after queuing any request for the endpoint in
usb_ep_queue(). The gadget driver is expected to stop the timer
if a valid event is found (ex: stream event for stream capable
endpoints). If no valid event is found, the timer expires after
the programmed timeout value and a timeout callback function
registered would be called. This callback function dequeues the
request and re-queues it again, doing so makes the controller
restart the transfer, thus avoiding deadlocks.
 
This kind of behaviour is observed in dwc3 controller and expected
to be generic issue with other controllers supporting bulk streams.


Changes in v7:
	1. Added timer timeout handler into udc/core.c
	2. Started timer per request instead of per endpoint as suggested by
	   "Felipe Balbi"
	3. Added usb_ep_dequeue() & usb_ep_queue() logic into timeout handler
	   as suggested by "Felipe Balbi"

Changes in v6:
	1. Added timer into udc/core.c for stream capable endpoint
	   as suggested by "Felipe Balbi"

Changes in v5:
	1. Removed the dev_dbg prints as suggested bt "Thinh Nguyen"

Changes in v4:
	1. Corrected the commit message and stream timeout description
	   as suggested by "Thinh Nguyen"

Changes in v3:
	1. Added the changes suggested by "Thinh Nguyen"

Changes in v2:
	1. Added "usb: dwc3:" in subject heading

Anurag Kumar Vulisha (10):
  usb: gadget: udc: Add timer support for usb requests
  usb: gadget: function: tcm: Add timeout for stream capable endpoints
  usb: dwc3: gadget: handle stream events
  usb: dwc3: update stream id in depcmd
  usb: dwc3: make controller clear transfer resources after complete
  usb: dwc3: don't issue no-op trb for stream capable endpoints
  usb: dwc3: check for requests in started list for stream capable
    endpoints
  usb: dwc3: Correct the logic for checking TRB full in
    __dwc3_prepare_one_trb()
  usb: dwc3: Check for IOC/LST bit in both event->status and TRB->ctrl
    fields
  usb: dwc3: Check MISSED ISOC bit only for ISOC endpoints

 drivers/usb/dwc3/gadget.c           |  67 +++++++++++++++++---
 drivers/usb/gadget/function/f_tcm.c |  25 +++++---
 drivers/usb/gadget/udc/core.c       | 119 +++++++++++++++++++++++++++++++-----
 include/linux/usb/gadget.h          |  15 +++++
 4 files changed, 197 insertions(+), 29 deletions(-)

-- 
2.1.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ