From patchwork Mon Oct 23 21:32:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 116881 Delivered-To: patches@linaro.org Received: by 10.140.22.164 with SMTP id 33csp5100835qgn; Mon, 23 Oct 2017 14:32:56 -0700 (PDT) X-Received: by 10.99.152.17 with SMTP id q17mr12603554pgd.287.1508794376492; Mon, 23 Oct 2017 14:32:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508794376; cv=none; d=google.com; s=arc-20160816; b=f9vSoVj0up0HDG3nSgxY6pPE0blffxwPhKoWQntkOWHkTQrXhlyfvlKls8crcQ3heb O3p8/4gdV/4mzwK5I0VyZyO4gqBECzaGTUHz/+QVqEPFPpe4yiPJ8LsOVzm8XACAw7Ih NxGcj2oRANO9ArgT+VD8NJVtamsNnpzCkYmKJyOV7zgKD2GOyhBy+23n61yUg5JUPfJz DmeykggEHpdjIBV/BBwHos6rjK8uwsSvfby6Bg4lsY4q+R5zzHe+uz3J2RN9NJy1BPfW RJWbnKwmOWqK3Dyxt6fS5O7d5ZtMk2QbJ+inyadnrLIx2CzugYPN94c2VItdkev2h9S/ vwuQ== 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=kjAy8D5OrdnJdRGJenzKet9OV1Ls0yPhA3L87VYbXvQ=; b=mRdtvUWBaQcbHhEJ8gdKhnrhR8ePLPjYANq5WBRIR8/6BCYUDMfGyJr4mBqGFjr6nV mNaUDeyojcsWIRzhFoWUrEeutowJtDb2cl6YwdY3omxmanEMsqvJ3OURvjHVv6hNn767 LBrePWdNoZ1b15rqbAQ5gGPuOKn+PtHSrDMYxnuRXD5zlFlYJRQpqVFeuTtvenzENo0x xC8XGlOrrI3dUnNf0jg1jgHRZCJP0hd1LB4Dh0GJJ66gDAkOeshCR8Tgjyn4U9LIRhV3 IrN7OXn2j7ABMCsIVdgJW9stvZHiFVHqTBxmQqndfdxEoMjylh/RpzSoEEzonVfUH3lU yM8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eTiuGOk8; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 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-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id o128sor2338562pfo.103.2017.10.23.14.32.56 for (Google Transport Security); Mon, 23 Oct 2017 14:32:56 -0700 (PDT) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eTiuGOk8; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 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=kjAy8D5OrdnJdRGJenzKet9OV1Ls0yPhA3L87VYbXvQ=; b=eTiuGOk854Rgov4xZPu6/NNmWB62/Kpva5uM2Bj5EhMR4X3Yg/5jTrU92jDcIgOFXw gaPRRUa1YvOlXD76MtBmOWzjRX5s2KYVmqyLJrDSYrCCS9rdKuidrYUfKLS3EYSZA6kX wnFX6szKRheWG9a0V8FVPoJ2YsOKHDwcrb7B8= 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=kjAy8D5OrdnJdRGJenzKet9OV1Ls0yPhA3L87VYbXvQ=; b=fj3vvcXRz63TBjLDf9sc8vty4Iq37v8h+pUidXvcvtncx7V3j6LY8sZ0jkhw8EJrgE sLw60IsjtrMGK7GselBc+mO/KwWUto6D/Oqt5m4Rw6p2mCUJRX77y8q6KopzMS5czsqJ 6tmcLCP+IA9vlivDkEawCKlhqfY24BmoHT9FrBIJssHqCpSx8tgICGlbZPhDAqWxStWW lWtOmWl6hUCMrEnvk+/QFbE6v5CZbwYXwyuuZYVubts0CoUPJwxevYuEyj17Y4oW0aZ5 iMge3pan7Pzg+LUuiPEg2o5Mudkj6wkBqw72atXr++rtzriEr8nlJcA4N4UtPN7QkNQG icLw== X-Gm-Message-State: AMCzsaWgysVBgoZKfxcc+kY4YVE3vq3jzffLWvO2IlmYfy625qF/BtHl ol/VxEIBO2puKK/geD00TJxaw8mz X-Google-Smtp-Source: ABhQp+Twe5CuC5zt8whhnv1qvIhwVjjnb82LsGw/6/Y8eelPpeGf37TuHDal2mq2EI6KfPsK2MYd8w== X-Received: by 10.98.78.4 with SMTP id c4mr14600468pfb.103.1508794375865; Mon, 23 Oct 2017 14:32:55 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([2601:1c2:1002:83f0:4e72:b9ff:fe99:466a]) by smtp.gmail.com with ESMTPSA id f11sm4518766pfd.82.2017.10.23.14.32.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 23 Oct 2017 14:32:54 -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: [PATCH v2 0/3] dwc2 fixes for edge cases on hikey Date: Mon, 23 Oct 2017 14:32:47 -0700 Message-Id: <1508794370-29982-1-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 2.7.4 So here is v2 of 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. 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 | 7 +++++-- 2 files changed, 12 insertions(+), 2 deletions(-) -- 2.7.4