Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1969604imm; Thu, 19 Jul 2018 10:48:10 -0700 (PDT) X-Google-Smtp-Source: AAOMgpedkqYCxtK7BEjdyYtWV9JawupzDvNb0lHzQrto+HIkx6TMGjIff/NZS63udcS/QDla/NMV X-Received: by 2002:a63:9b19:: with SMTP id r25-v6mr10938100pgd.44.1532022490212; Thu, 19 Jul 2018 10:48:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532022490; cv=none; d=google.com; s=arc-20160816; b=liTGQXS/X+rykyvnSOs4tZcAHo0BXsZgNGIJ4j3W7TrO8OOkEoNN8vJ/JzpU0lXyCc 7Ot4C/RHGqP8Oxhe8nQC4LZsXdnh/C1SOZPZN2uDSQa5Jk9hb96DKMg1PNhQ6c1T6HhA aizs5CkfMfej6vP+UxylXGftBFuqO7E/8A5I/E8ksoOyWMoRcpEJn7vy6s5Y8hlEr9jH gcnFgXuVSl4oK19SeOO00S2mgg8oIEUplR9zhg51nrsvHbif2uKjWdJE+qG14nWnUjEC h6gJZsYbT2/HHuiZvN/rfBwe8RdVvcy0jjOShoMZNM3fszQbD3X42dJ520qLsW0cUgIh pHSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=3aI5e8XRd5Jo3yxVli0VKQ+mQnMDkAuPnkWevETurN8=; b=hFUkeQ+WVbPVZLeNtGyz6EPOyYx9UEKw5W0xWK1MzoFISBwbgJ57wp8fUfW8x8qYzf E6hTcCZXYXvWIg63LFlaMXNBuB/0w//N25Wqoq+7tm07VjiGCJFS28lhbdTzpzDhYY0t q58lRCSHrPI/wg+yz1VVaOcSdPukNSqhDtQqN93BG1wZltDfIsJFFd8Re2NpePf/dFrk 06ioRyQoYK/iHgpEDUz6IkNbtMU3KQo9gYD+WvZYyOIcqoTw++CiK6xKsIUOBOGXXlBV p5oBjSVSENQARCGYZtgzkfsHKZp7L+SGmgVMTx70zapKivuGmgPXPH8qVI1CxYE5pBha 81+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=pztAiPjP; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i62-v6si6413970pfc.217.2018.07.19.10.47.55; Thu, 19 Jul 2018 10:48:10 -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; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=pztAiPjP; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732642AbeGSSac (ORCPT + 99 others); Thu, 19 Jul 2018 14:30:32 -0400 Received: from mail-it0-f66.google.com ([209.85.214.66]:56084 "EHLO mail-it0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732158AbeGSSab (ORCPT ); Thu, 19 Jul 2018 14:30:31 -0400 Received: by mail-it0-f66.google.com with SMTP id 16-v6so10991956itl.5 for ; Thu, 19 Jul 2018 10:46:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=3aI5e8XRd5Jo3yxVli0VKQ+mQnMDkAuPnkWevETurN8=; b=pztAiPjPUXKzO0IxYkXSV2EVbRTNQmI2zkib+nU5gXeGqaRoCBdw8nFwE5sbQmcRq0 nQD6A9u7DdCDwcWjByuHsa+WvuMgc2MOS/0FvJUg+ol0kxmt9o6kFXH0ZyAtNsxdJ8wQ GK0B3RFoFeA2T0RR3pEwzavi9gJzkkh/GLIeo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=3aI5e8XRd5Jo3yxVli0VKQ+mQnMDkAuPnkWevETurN8=; b=csJ41Mc65GKLnDH5N0cmhe/Xphah6jlOUzy+tZiRpdCVou81QHqc4EjxC+NELaIMYE 2NpabjNLjpM2mk6F2sNOKQh1rnXeS1YpW/O9Xh+G7c0FQSUqzgqtV7ZAKBQ5HtXzW8f8 xt7P+X6ME47XZeIJCLA6VbXSgHM83r9I+UJ91IJYjpSUCqu4INm2E5kQblH8HHHnOWye 3gfTKC9hHvfyP460slJob8qecb7gxcIZnbDHZj2swxJxL2VbWHwu/tiYvkSHPhTYBK0p fATeYqhX4f6LzkpS183tdjG3oFMOSJoGmok/Ub9c0AtnzuEKZjrGO52ZKE5GKWXAjJUc LvwQ== X-Gm-Message-State: AOUpUlHSlf52r7LnTBOVpxUZ5FuekQEr0qqPwTjnYfZy8V8z/LLiekSE 8s+SHEUFLriyqNk+jYUwkHVXH0Qjl5J+dm0xwemo/fKI X-Received: by 2002:a02:6a2f:: with SMTP id l47-v6mr10444269jac.71.1532022379172; Thu, 19 Jul 2018 10:46:19 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:a785:0:0:0:0:0 with HTTP; Thu, 19 Jul 2018 10:46:18 -0700 (PDT) In-Reply-To: <20180719153706.GD3949@uda0271908> References: <20180719101038.9465-1-jagan@amarulasolutions.com> <20180719153706.GD3949@uda0271908> From: Jagan Teki Date: Thu, 19 Jul 2018 23:16:18 +0530 Message-ID: Subject: Re: [PATCH] usb: musb: Call musb_platform_exit from musb_stop To: Bin Liu , Jagan Teki , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 19, 2018 at 9:07 PM, Bin Liu wrote: > Hi, > > On Thu, Jul 19, 2018 at 03:40:38PM +0530, Jagan Teki wrote: >> musb stop is musb core call during unregister or shutting down >> gadget or host musb. For graceful exit add musb_platform_exit >> on musb_stop so-that it can exit the musb platform driver as well. > > Thanks for the patch. but musb_stop() is called in the .udc_stop() and > host .stop() hooks, which can stop (and restart) at any time by the udc > or host core, not really during unregister. musb_platform_init() is not > called in .udc_start() and .start() hooks, so we shouldn't add > musb_platform_exit() in musb_stop(). Thanks for the explanation. Look like musb_platform_exit calling during musb_remove call of platform driver. can you explain how the shutdown sequence happen because of if udc_stop call musb_stop to shutdown how come platform_exit will shutdown it's PHY and CLK bits. or is it in reverse? Jagan.