From patchwork Mon Sep 21 14:46:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathias Nyman X-Patchwork-Id: 53966 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by patches.linaro.org (Postfix) with ESMTPS id 1328E22B1E for ; Mon, 21 Sep 2015 14:42:49 +0000 (UTC) Received: by lbbti1 with SMTP id ti1sf39156331lbb.3 for ; Mon, 21 Sep 2015 07:42:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=WEmdQ1HHwntW6Tyw0qEEHViGtuszkpgEM2YVzSj/ggI=; b=MGgjfPVK/w42mVrLvQG4wbnx6/VDZpwo/ApWfdbXhmMrDXZK47VEx3Mft4sShr1Ef5 Tg5iKHlaB78Rly7VPIYEmNVhKGDnz7YLO9/MKfmynSMPRzq0+440TBvRjjA6xd7A503u 66w9MPHcqc3vXsyeefByLp04cLfqrtuZW/zjCvkfV7leKaK7uRgTOUiwGwDivZwar67o l5KisVk+aBd1fBGs4gYKJ4rsTcUiWrU0OjxmCuBg1hT0De0KzJbZvaVD2XCAYTz76YVK IatP/KnOKh2UZBP8kBt/PUD0BWelWpt7eDluZV6cIJqed60Kn1Q/Qt3EuuHDESbX0kf8 siIg== X-Gm-Message-State: ALoCoQlfjO3DB1b1VCoAapsCjfVIP0wTdL/02IM7IchjBvwtLmq0LRbwA7MJ/j6MnLc7oQr8HCzR X-Received: by 10.112.125.104 with SMTP id mp8mr3333416lbb.20.1442846567521; Mon, 21 Sep 2015 07:42:47 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.20.229 with SMTP id q5ls408010lae.17.gmail; Mon, 21 Sep 2015 07:42:47 -0700 (PDT) X-Received: by 10.152.178.194 with SMTP id da2mr7815501lac.77.1442846567266; Mon, 21 Sep 2015 07:42:47 -0700 (PDT) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id km15si16223195lbb.28.2015.09.21.07.42.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 Sep 2015 07:42:47 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by lagj9 with SMTP id j9so69792224lag.2 for ; Mon, 21 Sep 2015 07:42:47 -0700 (PDT) X-Received: by 10.112.168.66 with SMTP id zu2mr7640471lbb.29.1442846567038; Mon, 21 Sep 2015 07:42:47 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp1753770lbq; Mon, 21 Sep 2015 07:42:46 -0700 (PDT) X-Received: by 10.66.219.102 with SMTP id pn6mr25194228pac.80.1442846556619; Mon, 21 Sep 2015 07:42:36 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ax2si38238984pbc.170.2015.09.21.07.42.36; Mon, 21 Sep 2015 07:42:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756677AbbIUOmZ (ORCPT + 4 others); Mon, 21 Sep 2015 10:42:25 -0400 Received: from mga14.intel.com ([192.55.52.115]:26736 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756409AbbIUOmX (ORCPT ); Mon, 21 Sep 2015 10:42:23 -0400 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP; 21 Sep 2015 07:42:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,568,1437462000"; d="scan'208";a="809845976" Received: from mattu-haswell.fi.intel.com ([10.237.72.176]) by fmsmga002.fm.intel.com with ESMTP; 21 Sep 2015 07:42:18 -0700 From: Mathias Nyman To: Cc: , Roger Quadros , , Mathias Nyman Subject: [PATCH v2 5/9] usb: xhci: Clear XHCI_STATE_DYING on start Date: Mon, 21 Sep 2015 17:46:13 +0300 Message-Id: <1442846777-18389-6-git-send-email-mathias.nyman@linux.intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1442846777-18389-1-git-send-email-mathias.nyman@linux.intel.com> References: <1442846777-18389-1-git-send-email-mathias.nyman@linux.intel.com> Sender: linux-usb-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: patch@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Roger Quadros For whatever reason if XHCI died in the previous instant then it will never recover on the next xhci_start unless we clear the DYING flag. Cc: Signed-off-by: Roger Quadros Signed-off-by: Mathias Nyman --- drivers/usb/host/xhci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index f560c41..5fe2419 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -146,7 +146,8 @@ static int xhci_start(struct xhci_hcd *xhci) "waited %u microseconds.\n", XHCI_MAX_HALT_USEC); if (!ret) - xhci->xhc_state &= ~XHCI_STATE_HALTED; + xhci->xhc_state &= ~(XHCI_STATE_HALTED | XHCI_STATE_DYING); + return ret; }