From patchwork Thu Sep 7 00:30:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 111842 Delivered-To: patches@linaro.org Received: by 10.140.94.239 with SMTP id g102csp54525qge; Wed, 6 Sep 2017 17:31:08 -0700 (PDT) X-Received: by 10.84.238.137 with SMTP id v9mr1042900plk.180.1504744268539; Wed, 06 Sep 2017 17:31:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504744268; cv=none; d=google.com; s=arc-20160816; b=wamKe3EBGP9rPR6vn32pb7nujUirnevTGdr+TAsNF728Yfi4FSHOrk7Ph/qqLTzgqL w20guigsJgEe6WW+LK4j029exzMDRhacV17qEB7XIoF74beAU1YqLdK+jNOUvVPZO7oc 2UskfbU8GLpOCTETech8d2gVWwTWrVSCRIBgwW6ZUUQeiECmIo6QDZXVKTZ9VWCglhBE URO1jX9njFjyQSYa8EsrYI4cETd+zdS4v5vsQ2ouwr/JQZSCS0B5rW4FR00UqJzsQp1E KSTRyAlFuz11rUPelixVOLArSu3+vbPpR6zdVI0GKCZFOz60NKUHcIDQDa9GaRhGSblO HKIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=S55/VQ1hrklG9SAa/Wi0kfQ1n5CvhIL/M8+M8iJDG2k=; b=n/YuwXihu1qMv85RhPd+CSy72zrAG8fuY3MrOk9V6YBhyzMihA2lX7fgwuZI6JO3my JU8kTz872+AjNzf3i0C99gHrLj+b4UprSeAscNb4oDEGZM8we6xhDo4yVUwm+irXansg 6NaKD0f5YuQ32eV5BPCyatm3IChqakXjh3x+wvYFQDeuDSO//gwsikVBU/3OxySALcUF dvzXVLqAE9w65j3viszx9FzdxESzSdSN2rt07o1icUV8JVhNZ13zthPMSnXsgULeYQBb 3AXs/qkPVIcZ0tpWY5FbQWSdoVN7l+2+z9SSp5p51o0dOlunjuKudLcZ8CrF9UsrH35+ dyAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OEQba7uk; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.41 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id r63sor671701plb.19.2017.09.06.17.31.08 for (Google Transport Security); Wed, 06 Sep 2017 17:31:08 -0700 (PDT) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OEQba7uk; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.41 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=S55/VQ1hrklG9SAa/Wi0kfQ1n5CvhIL/M8+M8iJDG2k=; b=OEQba7ukd7WNgp71PW7Rwzmb5x9yPLgKSUoKBMqCGcxZ80nXAP0dzAAz9+rEk1QuSL On9HCQdEeel/i9wyM7ogdLcoWzEgbuG2ApAjYgmakZhnhhn1kKFgCvmb5VfxbGZYoQYO YKLJzsY5Vi7MgTEZuQJjHpXSMdV8O6jz6HqC4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=S55/VQ1hrklG9SAa/Wi0kfQ1n5CvhIL/M8+M8iJDG2k=; b=cA46sMwCANvUPV3RScZElvzVkcuS2yMGXYhyvT/49KDhr3pujGMTSLA79aM0XK4HSo Q/XPtWWodTVdxZBoGI1/G4cZFAqan6Wlro66CCH6v0GkElNd4Ypya4Od96GxoKMSam9s g63OdR/UvRDfjlLf2DF+GbJsSk/cT2/gF2ZZeN5uwb64aXCGicu0V9jBgg7Lp7LALTqG 9jCsIEznHZYhu0n5REzze42xQAnkPNIY7a78rSoxt7xiIcGoXQTAWqFN0KObFBTOH1rJ CwjisqiF5QLutMoH0HAbyZabJCd+lPnlWdwiTW0/2u2174C8GEZZe7ZS9GbZDjT8Djhl Yzdg== X-Gm-Message-State: AHPjjUgtaO179fCfm9fdOm77bb8hvFat6jMp+m2/Xbkz6LPWIn+xCAox 72Rulf3bSaVEp2i+KTA= X-Google-Smtp-Source: ADKCNb7YUI8kqBMk0tMqRWg4LhSv7Yan+lvZnHM09LjbhNupFJYh7MAhiibLJ2fhKfzB+EN5DMluYQ== X-Received: by 10.159.218.71 with SMTP id x7mr1024000plv.2.1504744268198; Wed, 06 Sep 2017 17:31:08 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([2601:1c2:1002:83f0:4e72:b9ff:fe99:466a]) by smtp.gmail.com with ESMTPSA id o19sm987378pgn.76.2017.09.06.17.31.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 06 Sep 2017 17:31:07 -0700 (PDT) From: John Stultz To: lkml Cc: John Stultz , Wei Xu , Guodong Xu , Amit Pundir , YongQin Liu , John Youn , Minas Harutyunyan , Douglas Anderson , Chen Yu , Felipe Balbi , Greg Kroah-Hartman , linux-usb@vger.kernel.org Subject: [RESEND][PATCH 0/3] dwc2 fixes for edge cases on hikey Date: Wed, 6 Sep 2017 17:30:52 -0700 Message-Id: <1504744255-25281-1-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 2.7.4 So here are a few dwc2 fixes that I've been using with HiKey. I'm not totally sure these are all ideal, but they avoid edge case issues that we have been running into with switching between gadget mode and host mode. I'd guess the first two are potentially -stable material, and the last might be worth sending to -stable too, as its a relatively simple fix, but to my understanding the UDC state tracking has always been broken so its not really a regression. But still. I'd love to get some feedback on the patches and consideration to be merged upstream. thanks -john Cc: Wei Xu Cc: Guodong Xu Cc: Amit Pundir Cc: YongQin Liu Cc: John Youn Cc: Minas Harutyunyan Cc: Douglas Anderson Cc: Chen Yu Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org John Stultz (3): usb: dwc2: Improve gadget state disconnection handling usb: dwc2: Error out of dwc2_hsotg_ep_disable() if we're in host mode usb: dwc2: Fix UDC state tracking drivers/usb/dwc2/gadget.c | 7 +++++++ drivers/usb/dwc2/hcd.c | 8 ++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) -- 2.7.4