Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp897554imm; Fri, 29 Jun 2018 08:07:22 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdFrpbKwLPYEL223I0ukt1s+oTFAq++WSnBG9SVQzgOVVNAhxFzF7xuTpSyVypweLQnS6jA X-Received: by 2002:a65:5545:: with SMTP id t5-v6mr12146849pgr.157.1530284842652; Fri, 29 Jun 2018 08:07:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530284842; cv=none; d=google.com; s=arc-20160816; b=GEzFuV036cuCRZkSP8JDFN7VNWCwLKknexe4QCmO/Be8R1YoZkeKHFQsNpXEXu5r9A ZuciO48eaB3vk4n6/ZntlumL2JpKmzWD5pvUnc4Q5MsJQ90Uz5DqeITkGl1sziIWn049 ZH1jJBye+bAS+Ax37UigTAhb7/kYIX24yPhdOhX8MUl2fOQHofwsTcppE9C+efFA2zV0 IHwVTdP4L3T5MomsRXlBSWudf/tdFkcanKiVbu6vPje2iOp+JJTOGNqb1WLC9WS75kbG DW97lDYkEtx9v9snwBUUfGue61hZ7q11QqOt5gkDhRijDSx4/kK28Ix+76UBIO1iovp7 vIdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:arc-authentication-results; bh=DUpC0hYhY5PKx6OOaxnVDTHuXvDeF/8DspZQBli9M4Q=; b=AW+R/pd84fyOeEmHgDZozBZBzg5pVcEe5LzN6gU9aOXPIOnm08gZ0srl164z3yRk2n buSF5cZBl4hU4o9qYluigsDnTtwobSdt/NOH/ozXhuJ37FIdrIvTrPmM64533KCFve+s JPy6v1bJzDjslaLV/qINDTMrjL6jcdTLtgQ6IOSNUvuvGFLKLFA2FpAcR5l4ljjpKdVz 8eTYTtuOtwsBe/yli46UBdpP/K03BHsH8uPY6g11z+VZGJMs2od+tLkBH/5/WsVORGSv a315ZhxR/ZoCE1VSM71oDrmGkrJ5WColOA4T66KrKUpdP+cDAPcBpCCK+93j5Mjt0ggr r/OA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z2-v6si9310504pln.395.2018.06.29.08.07.06; Fri, 29 Jun 2018 08:07:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936050AbeF2LSC (ORCPT + 99 others); Fri, 29 Jun 2018 07:18:02 -0400 Received: from mga03.intel.com ([134.134.136.65]:45516 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932531AbeF2LSA (ORCPT ); Fri, 29 Jun 2018 07:18:00 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Jun 2018 04:17:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,285,1526367600"; d="scan'208";a="68329282" Received: from pipin.fi.intel.com (HELO localhost) ([10.237.68.37]) by fmsmga001.fm.intel.com with ESMTP; 29 Jun 2018 04:17:53 -0700 From: Felipe Balbi To: Robert Jarzmik Cc: Jia-Ju Bai , gregkh@linuxfoundation.org, nicolas.ferre@microchip.com, keescook@chromium.org, allen.lkml@gmail.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] usb: gadget: r8a66597: Fix two possible sleep-in-atomic-context bugs in init_controller() In-Reply-To: <87a7rdlup1.fsf@belgarion.home> References: <20180620035453.7721-1-baijiaju1990@gmail.com> <87efh0o6f9.fsf@belgarion.home> <87y3eydrs1.fsf@linux.intel.com> <87efgqkrzl.fsf@belgarion.home> <87k1qhevpd.fsf@linux.intel.com> <87a7rdlup1.fsf@belgarion.home> Date: Fri, 29 Jun 2018 14:15:19 +0300 Message-ID: <87bmbtetdk.fsf@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Robert Jarzmik writes: >>> And as bonus question, why is it better to have mdelay() calls in the driver ? >> >> As a bugfix, it's the smallest fix possible, right? Ideally, we wouldn't >> need either of them. Perhaps there's a bit which can be polled instead? > Ideally yes. Do you remember if a "threaded interrupt" might use msleep() ? I > seem to remember that they can, so won't that be another alternative ? yeah, unless, of course, you have a spinlock held. ;-) -- balbi