From patchwork Fri Sep 18 14:42:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathias Nyman X-Patchwork-Id: 53883 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by patches.linaro.org (Postfix) with ESMTPS id 8539E218E3 for ; Fri, 18 Sep 2015 14:38:43 +0000 (UTC) Received: by lamf6 with SMTP id f6sf20427152lam.1 for ; Fri, 18 Sep 2015 07:38:42 -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=cOvn1VRhTbT9Suxa6aqAciZj96URZkSzy+NSjWlyr64=; b=ksGm/srmLtub1hQGmI2f5z75DwHKTdAHpmxsp2hFsNad0KBXOMPokRrW/63WR+xGzt lDPm+imHIlL1GUsfDeVjLCXPpUhLRBkBmneTEN9SPw6iKX1TkNK5GHHTNTm/rz9x+VK3 jCuhBi+OaCzUYeLRA03ojKHfKjiGAL2TEg1O27qQvIbp8EXCSD98Lr+amSnlWcMB569N QtO1h9/Km6LAxIZafnEYaesg57PQYlkIlyqPJEhSaibFCejFTuna/yPEai6gloT8WmGz 5MaSRCGdZHZpBWDn/6eSkVvvx7vWdqSwvHNyN7OJTMM2y83Hhq8Frb86E6MwpjF2G+4u WQ8Q== X-Gm-Message-State: ALoCoQniFBD3HZImvrmYtZ+qfmzJlB5xByr25Vp0kaEn1mr0BGcgR6cpe329jlEL6uJQmJyROQUB X-Received: by 10.112.12.132 with SMTP id y4mr976417lbb.0.1442587122489; Fri, 18 Sep 2015 07:38:42 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.6.105 with SMTP id z9ls218434laz.18.gmail; Fri, 18 Sep 2015 07:38:42 -0700 (PDT) X-Received: by 10.152.7.37 with SMTP id g5mr3329722laa.22.1442587122386; Fri, 18 Sep 2015 07:38:42 -0700 (PDT) Received: from mail-lb0-f170.google.com (mail-lb0-f170.google.com. [209.85.217.170]) by mx.google.com with ESMTPS id s3si6305905lae.143.2015.09.18.07.38.42 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Sep 2015 07:38:42 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.170 as permitted sender) client-ip=209.85.217.170; Received: by lbpo4 with SMTP id o4so26265807lbp.2 for ; Fri, 18 Sep 2015 07:38:42 -0700 (PDT) X-Received: by 10.152.161.232 with SMTP id xv8mr3427096lab.32.1442587122274; Fri, 18 Sep 2015 07:38:42 -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 w3csp334078lbq; Fri, 18 Sep 2015 07:38:41 -0700 (PDT) X-Received: by 10.68.250.5 with SMTP id yy5mr7689915pbc.34.1442587115759; Fri, 18 Sep 2015 07:38:35 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id zv8si14045210pbc.164.2015.09.18.07.38.35; Fri, 18 Sep 2015 07:38:35 -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 S1752774AbbIROiZ (ORCPT + 4 others); Fri, 18 Sep 2015 10:38:25 -0400 Received: from mga01.intel.com ([192.55.52.88]:43091 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752342AbbIROiY (ORCPT ); Fri, 18 Sep 2015 10:38:24 -0400 Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP; 18 Sep 2015 07:38:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,553,1437462000"; d="scan'208";a="564275841" Received: from mattu-haswell.fi.intel.com ([10.237.72.176]) by FMSMGA003.fm.intel.com with ESMTP; 18 Sep 2015 07:38:11 -0700 From: Mathias Nyman To: Cc: , Roger Quadros , Mathias Nyman Subject: [PATCH 5/9] usb: xhci: Clear XHCI_STATE_DYING on start Date: Fri, 18 Sep 2015 17:42:09 +0300 Message-Id: <1442587333-21056-6-git-send-email-mathias.nyman@linux.intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1442587333-21056-1-git-send-email-mathias.nyman@linux.intel.com> References: <1442587333-21056-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.217.170 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. 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; }