Message ID | 1442587333-21056-8-git-send-email-mathias.nyman@linux.intel.com |
---|---|
State | Superseded |
Headers | show
Return-Path: <patchwork-forward+bncBDPILVOKSELBB26D6CXQKGQEIDXKGXI@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by patches.linaro.org (Postfix) with ESMTPS id A9DF1218E3 for <linaro@patches.linaro.org>; Fri, 18 Sep 2015 14:38:36 +0000 (UTC) Received: by lbbmp1 with SMTP id mp1sf17774275lbb.2 for <linaro@patches.linaro.org>; Fri, 18 Sep 2015 07:38:35 -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=ReqKnEjH5T30sd2D2MZ2S05XwGX4AaljTnVes+Q+czA=; b=i68mZUfDIGz+vbjM7FY7YyPgkSYnS8Q/SQFmI5iwy52hquW/6wZRpTEPG6u4zbfpY+ yJesusa7RhDHIT70Ty+io8gGFftKhzbB9EC4/wpiuVwgd278DlDgVXuYxkLLla7nvkvg AGX1MhhUWz/XVx8lJ1ZJZ4rwsNyRFWC+/yU1ToxiPD1el4XT+qHgYu1u2F2CJmMDqp8Z AE2FL2NB/aV+5l95GDhW4zLuhYgirLxmYzXbNIxhW8km+L9oTkjFr3OQJKzmGKBPRZxh l37wGDoPCqO3bhZs80sl+H/B2iDmJpnbfAldyGh5DfEEhuPfrrb7v5gT2bWtQsjAL5Ps bNvg== X-Gm-Message-State: ALoCoQkxIM0L42bwP93ZoNpYIliv8aZnd3scFl1IgMECJl8vsSWq2Woy3jRg7K9jW+RpZbCKRRTJ X-Received: by 10.152.19.234 with SMTP id i10mr972579lae.8.1442587115636; Fri, 18 Sep 2015 07:38:35 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.30.97 with SMTP id r1ls220535lah.95.gmail; Fri, 18 Sep 2015 07:38:35 -0700 (PDT) X-Received: by 10.112.198.66 with SMTP id ja2mr3321679lbc.22.1442587115532; Fri, 18 Sep 2015 07:38:35 -0700 (PDT) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com. [209.85.215.44]) by mx.google.com with ESMTPS id ap9si6314844lac.87.2015.09.18.07.38.35 for <patchwork-forward@linaro.org> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Sep 2015 07:38:35 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) client-ip=209.85.215.44; Received: by lagj9 with SMTP id j9so32152435lag.2 for <patchwork-forward@linaro.org>; Fri, 18 Sep 2015 07:38:35 -0700 (PDT) X-Received: by 10.112.17.34 with SMTP id l2mr3201789lbd.117.1442587115397; Fri, 18 Sep 2015 07:38:35 -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 w3csp334006lbq; Fri, 18 Sep 2015 07:38:34 -0700 (PDT) X-Received: by 10.68.69.8 with SMTP id a8mr5606119pbu.144.1442587112591; Fri, 18 Sep 2015 07:38:32 -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.32; Fri, 18 Sep 2015 07:38:32 -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 S1752200AbbIROia (ORCPT <rfc822;usman.ahmad@linaro.org> + 4 others); Fri, 18 Sep 2015 10:38:30 -0400 Received: from mga01.intel.com ([192.55.52.88]:19092 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752342AbbIROiZ (ORCPT <rfc822;linux-usb@vger.kernel.org>); Fri, 18 Sep 2015 10:38:25 -0400 Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP; 18 Sep 2015 07:38:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,553,1437462000"; d="scan'208";a="564275867" Received: from mattu-haswell.fi.intel.com ([10.237.72.176]) by FMSMGA003.fm.intel.com with ESMTP; 18 Sep 2015 07:38:14 -0700 From: Mathias Nyman <mathias.nyman@linux.intel.com> To: <gregkh@linuxfoundation.org> Cc: <linux-usb@vger.kernel.org>, Roger Quadros <rogerq@ti.com>, Mathias Nyman <mathias.nyman@linux.intel.com> Subject: [PATCH 7/9] usb: xhci: exit early in xhci_setup_device() if we're halted or dying Date: Fri, 18 Sep 2015 17:42:11 +0300 Message-Id: <1442587333-21056-8-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: <patchwork-forward.linaro.org> 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.44 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: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Unsubscribe: <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com>, <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe> |
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index f881d5a..9957bd9 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -3788,6 +3788,9 @@ static int xhci_setup_device(struct usb_hcd *hcd, struct usb_device *udev, mutex_lock(&xhci->mutex); + if (xhci->xhc_state) /* dying or halted */ + goto out; + if (!udev->slot_id) { xhci_dbg_trace(xhci, trace_xhci_dbg_address, "Bad Slot ID %d", udev->slot_id);