Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp17537632ybl; Thu, 2 Jan 2020 07:18:43 -0800 (PST) X-Google-Smtp-Source: APXvYqxSxMCU1yTmGez4M8GoWpI525wYrXXdx0xIzJTueuqmE1tHMNVvb+7MEtSBpw5ZwDoqGkda X-Received: by 2002:aca:2207:: with SMTP id b7mr2350849oic.109.1577978323684; Thu, 02 Jan 2020 07:18:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577978323; cv=none; d=google.com; s=arc-20160816; b=TAH9dwogpc+8+whr+T+DLoDKwyMYHWIV2FdHFqyAQrJ3HJj8rmahRbVnmBXQisIoMQ l8fRWxkscYYadPT9qQKsVZPDma2BP5fOUYJI3USHcRph/gU/sTQM1isgg+VDNWXt0WmA KriIWxSdApC2HBXEBWBbstqP8Mx+HeuKLTQQV5lRBsgNBXvpInZbT66GRqykCFrI3MbN e8a99v4mN17+x3qzsC5fHCfqNU0/Z9/gQ4rh0yqR3Y5ZyxVsIkYlojZitv9lfA2vo+k5 ReEvFp/mljp315Nt41MFyvcqtSyid8f2mk2LHx5yo5qlECm7kOLA9wntq5t1WXHrJ3Hw kiig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=BQek1hpGtAcuz3Vy94GFTxcBosOLuEGkc1EsxVOl7K0=; b=ZKwvH55++2kQynbhdx/kilW+hRPGxWvafthOo4+omzeWVTsXnERBMuD3UjSjtY5ECx Rcy0qjtlM69Xb0L8kfkKXiHN3i5hF9gh2VsfN59S6Qb9VVIfeRVm24UQP1MFkEN4I9aI 0Vb1N7BHm7AjwBFeCWFP5XuHF8BIUYHI7x2+HAIjVKwtQ7/ecZKOjm29gaQtw14btNH7 FU4cvy2EDRhCE8lep89OQoUnTUML+XsUBHtlma3CA8RfYl+AQvoSpoI8CCKdF+X63iwh kEj24QzS2sH7XCvoU6TljwGI0/g8v8ziSISsMihYhMzh6LeLKTGrF5u+C6SMy1qt23gM 4DBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rm6d9E+d; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p184si25506591oib.144.2020.01.02.07.18.30; Thu, 02 Jan 2020 07:18:43 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=rm6d9E+d; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728696AbgABPRw (ORCPT + 99 others); Thu, 2 Jan 2020 10:17:52 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:42414 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728561AbgABPRv (ORCPT ); Thu, 2 Jan 2020 10:17:51 -0500 Received: by mail-lj1-f194.google.com with SMTP id y4so26679199ljj.9; Thu, 02 Jan 2020 07:17:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=BQek1hpGtAcuz3Vy94GFTxcBosOLuEGkc1EsxVOl7K0=; b=rm6d9E+dTNWcbvvwgWbOuPY6szM3rkWylgsiKib7v/V9yznlEsOsFwX+N2GwxKm9U/ qWscJQCbsvRA5ARFjYODsuNr2mt8t0SjPKbFIkshsLU+B9PtUQVyieZ6wNEJCSZ6sohO 27i470vK8+FYTG4xMLLSr4GPKbk1cr4cg2CuUg8YdNrhaFOJoKzI6j/GRxnYq5rgDbcm vUYKLKvwT1mRsooiqTSbboIB9xwD8NetwGWEp+sfnw6rvNm3hkxjiD80wZ7tMJ6r1QFz O/4kShUi1C5bBOfNwHhevjBt45lkHKgqD6n2NoMawUeJDZDdSqm4KV4R6X2U2mmNryXO 4rKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=BQek1hpGtAcuz3Vy94GFTxcBosOLuEGkc1EsxVOl7K0=; b=ASVNTFb06OPMzozrwX9iDdOUWqBWV26aqWP9DeiSTxgtY8OudLWE8LDeu2tjsOCK/l U+kpSjjJzQyWdTO2UULNGzzCmrLSLz2U1VL3cm1o+au8IJa9trJfrcTTFkAw2jeLiQSV 4ZvWfeTJYfXr01A81YkyfqK1b4uyZmRI39tR2RcxV77bIYOP/CbTIKLJw5M89QfZtzon I9n2wwRkXpnpinRpaxhxTbZOlXOjCqgXxFGzR9EfoyqkTcO5nJI9dewnZU/CgAQ+DO8n 17A8tILf7ifhOEercnbI6gwOD2Rot/k/ZA3qi/niz2iQIG0UggZ7A2F8u61PotrKOodN 9W1g== X-Gm-Message-State: APjAAAW9JRPDrrYsJTJw6pzWVE7fvo7teUAJveskMlnSruAsDf9bYjap aSj9XjgkdetlG/nsmmApeMaUVLoi X-Received: by 2002:a2e:943:: with SMTP id 64mr37257269ljj.17.1577978269110; Thu, 02 Jan 2020 07:17:49 -0800 (PST) Received: from [192.168.2.145] (79-139-233-37.dynamic.spd-mgts.ru. [79.139.233.37]) by smtp.googlemail.com with ESMTPSA id g27sm23515861lfj.49.2020.01.02.07.17.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 02 Jan 2020 07:17:48 -0800 (PST) Subject: Re: [PATCH v2 10/10] usb: chipidea: tegra: Add USB_TEGRA_PHY module to driver's dependencies To: =?UTF-8?B?TWljaGHFgiBNaXJvc8WCYXc=?= Cc: Peter Chen , Rob Herring , Greg Kroah-Hartman , Thierry Reding , Jonathan Hunter , Felipe Balbi , "devicetree@vger.kernel.org" , "linux-usb@vger.kernel.org" , "linux-tegra@vger.kernel.org" , "linux-kernel@vger.kernel.org" References: <20191220015238.9228-1-digetx@gmail.com> <20191220015238.9228-11-digetx@gmail.com> <20191220035650.GC19921@b29397-desktop> <20191223213234.GA28786@qmqm.qmqm.pl> <7174833f-8325-7fb4-d190-78ba4bed0cbb@gmail.com> <20191230210259.GD24135@qmqm.qmqm.pl> From: Dmitry Osipenko Message-ID: Date: Thu, 2 Jan 2020 18:17:47 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.0 MIME-Version: 1.0 In-Reply-To: <20191230210259.GD24135@qmqm.qmqm.pl> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 31.12.2019 00:02, Michał Mirosław пишет: > On Tue, Dec 24, 2019 at 07:21:05AM +0300, Dmitry Osipenko wrote: >> 24.12.2019 00:32, Michał Mirosław пишет: >>> On Fri, Dec 20, 2019 at 07:31:08AM +0300, Dmitry Osipenko wrote: >>>> 20.12.2019 06:56, Peter Chen пишет: >>>>> On 19-12-20 04:52:38, Dmitry Osipenko wrote: >>> [...] >>>>>> --- a/drivers/usb/chipidea/ci_hdrc_tegra.c >>>>>> +++ b/drivers/usb/chipidea/ci_hdrc_tegra.c >>>>>> @@ -53,6 +53,12 @@ static int tegra_udc_probe(struct platform_device *pdev) >>>>>> struct tegra_udc *udc; >>>>>> int err; >>>>>> >>>>>> + if (IS_MODULE(CONFIG_USB_TEGRA_PHY)) { >>>>>> + err = request_module("phy_tegra_usb"); >>>>>> + if (err) >>>>>> + return err; >>>>>> + } >>>>>> + >>>>> >>>>> Why you do this dependency, if this controller driver can't >>>>> get USB PHY, it should return error. What's the return value >>>>> after calling below: >>>>> >>>>> udc->phy = devm_usb_get_phy_by_phandle(&pdev->dev, "nvidia,phy", 0); >>>> >>>> It returns -EPROBE_DEFER when phy_tegra_usb isn't loaded. >>> >>> How are other driver modules autoloaded? Isn't there an appropriate >>> MODALIAS or MODULE_DEVICE_TABLE in there? >> >> Hello Michał, >> >> The phy_tegra_usb module is fine by itself, it's getting autoloaded. >> >> The problem is that ci_hdrc_tegra module depends on the phy_tegra_usb >> module and thus the PHY module should be loaded before the CI module, >> otherwise CI driver fails with the EPROBE_DEFER. > > Why, then, is CI driver not being probed again after PHY driver loads? > EPROBE_DEFER is what should cause driver core to re-probe a device after > other devices appear (PHY in this case). CI driver is getting re-probed just fine if PHY's driver module is loaded manually after loading the CI's module. This patch removes this necessity to manually load PHY's module. This is just a minor convenience change that brings the CI's driver loading behaviour on par with the behaviour of loading Tegra's EHCI driver module.