From patchwork Thu Feb 4 06:58:28 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Mundt X-Patchwork-Id: 76909 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o146wd2C020872 for ; Thu, 4 Feb 2010 06:58:39 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754172Ab0BDG6i (ORCPT ); Thu, 4 Feb 2010 01:58:38 -0500 Received: from 124x34x33x190.ap124.ftth.ucom.ne.jp ([124.34.33.190]:54687 "EHLO master.linux-sh.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754165Ab0BDG6h (ORCPT ); Thu, 4 Feb 2010 01:58:37 -0500 Received: from localhost (unknown [127.0.0.1]) by master.linux-sh.org (Postfix) with ESMTP id 09D5163773; Thu, 4 Feb 2010 06:58:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at linux-sh.org Received: from master.linux-sh.org ([127.0.0.1]) by localhost (master.linux-sh.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id V1u1cu1-zLl9; Thu, 4 Feb 2010 15:58:28 +0900 (JST) Received: by master.linux-sh.org (Postfix, from userid 500) id 9839263777; Thu, 4 Feb 2010 15:58:28 +0900 (JST) Date: Thu, 4 Feb 2010 15:58:28 +0900 From: Paul Mundt To: Yoshihiro Shimoda Cc: linux-usb@vger.kernel.org, linux-sh@vger.kernel.org, Greg KH Subject: [PATCH] usb: r8a66597-hcd: Fix up spinlock recursion in root hub polling. Message-ID: <20100204065828.GB5574@linux-sh.org> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.13 (2006-08-11) Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 04 Feb 2010 06:58:39 +0000 (UTC) diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c index 0ceec12..bee558a 100644 --- a/drivers/usb/host/r8a66597-hcd.c +++ b/drivers/usb/host/r8a66597-hcd.c @@ -1006,6 +1022,8 @@ static void start_root_hub_sampling(struct r8a66597 *r8a66597, int port, /* this function must be called with interrupt disabled */ static void r8a66597_check_syssts(struct r8a66597 *r8a66597, int port, u16 syssts) +__releases(r8a66597->lock) +__acquires(r8a66597->lock) { if (syssts == SE0) { r8a66597_write(r8a66597, ~ATTCH, get_intsts_reg(port)); @@ -1023,7 +1041,9 @@ static void r8a66597_check_syssts(struct r8a66597 *r8a66597, int port, usb_hcd_resume_root_hub(r8a66597_to_hcd(r8a66597)); } + spin_unlock(&r8a66597->lock); usb_hcd_poll_rh_status(r8a66597_to_hcd(r8a66597)); + spin_lock(&r8a66597->lock); } /* this function must be called with interrupt disabled */